askelectronics

This magazine is from a federated server and may be incomplete. Browse more on the original instance.

IsoKiero, in Two battery setup in camper

You want to put the batteries in parallel, so you’ll have double the capacity. Installing them in a series would increase voltage and most likely damage something (mixing 12V systems with 24V battery pack doesn’t really work). Increasing capacity with another battery can cause strain on charger components, so make sure they’re beefy enough or at least have proper protection against overcurrent.

People are correct that you should use the same capacity batteries, preferably the same make/model and age. Mixing batteries can cause problems where one battery drains faster and other(s) start to charge the lower level one so you’ll have less useful amp-hours and that degrades batteries faster.

Switching batteries with a relay or a switch is possible, but you need quite big and good quality relays/contactors for that as current can be pretty high which can cause arcing and even weld contacts together eventually. With proper parts it’s a safe way of doing it, but personally I’d just get two batteries in parallel since there’s fewer components to malfunction and adding complexity with arduino+contactor doesn’t save that much money, specially if you place any value for your time (which of course isn’t necessary, tinkering itself is often worth the time spent).

figurys,

The issue is that I cant place two of the same batteries. The extra one has to go under the passenger chair so it will be a completely different battery. I’m not completely sure that we won’t be running into issues then when linked in parallel.

I agree that the relay option it’s added complexity and finding the right relay is a bit of a challenge haha. Also there probably will be a short drop in voltage or I have to switch them shortly after each other. So both relays are closed at the same time for a little bit. I don’t know if that would fix the arcing? It will be linked in parallel for a little bit then I guess.

IsoKiero,

Get a switching relay or one normally closed and another normally open one. That way there’s no paraller connection at all. Connecting two batteries together with different voltage levels causes a huge current spike, think jump starting a car and how thick those cables are. Arcing will happen on the relay contacts no matter how you switch it if there’s load connected.

And since you’re not talking about a trailer, is one of the batteries for the car itself? Since if you’re planning to use the secondary battery as a car battery too you need very heavy wiring to give starter enough amps to run plus running that over a relay is a whole another beast to manage since starter motor can pull hundreds of amps momentarily.

figurys,

Is an extra utility battery. So that shouldn’t give any issues for starting. That’s a separate battery. I’ll try to find one of those relays. I know I can search myself but if you have any suggestions they are always welcome:)

IsoKiero,

So you’ll have total of 3 batteries at the car? One for engine, existing utility battery and now you’re planning to install another utility battery, right? That should work. I don’t know how much current you’re pulling from the battery, so it’s difficult to recommend anything. Common bosh switching relay is something you can find from pretty much every car part store for ~5€, but I think they’re rated only up to 40A and I wouldn’t push them to the limit. Check your inverter datasheet how much current it can draw and preferably get a relay which can do double the maximum rating for longevity and stability.

figurys,

That is correct. 1 battery for the engine and 2 for utility. I guess it has to be quite a beefy one. The interter is rated for max 166 amps. So that’s quite a bit. Which also makes it a bit hard to find a suitable relay.

IsoKiero,

12V 200A relays are pretty easy to find (I wouldn’t get one from alibaba tho), but that much current requires quite beefy wiring as well. Personally I’d review options to place auxiliary batteries in parallel since that would simplify wiring and the whole system a bit, but as I don’t know how your camper is built it can be tricky or you need to sacrifice storage space somewhere.

And as you’re placing a battery at the same space where people stay be careful with hydrogen. Charging lead acid battery produces hydrogen and in the worst case scenario, specially if you have a gas stove be dangerous if not lethal.

FuzzChef, in Shift register missing bits

What does shiftDataOut do? You loop over it but you give the whole byte to it anyway in each loop.

mvirts, in Shift register missing bits

Would it work if you made that delay 1000?

mvirts,

Also try upping the usleep call?

mvirts,

Hmmmm do you want to write to both shift register at the same time? I say this because you’re looping 16 times, but seem to be sending the high and low bytes out 16 times over rather than one bit each time, although you are shifting the input.

mvirts,

Maybe I’m getting ahead of myself, but maybe try using digitalWrite for a single bit instead of shiftDataOut?

quiescentcurrent,

Good idea, I’ve tried usleep after all lines, but no change…

Kalcifer, (edited ) in Shift register missing bits

The first two lines of the for loop,


<span style="color:#323232;">byte upper_byte = input_bin >> 8;
</span><span style="color:#323232;">byte lower_byte = input_bin &amp; 0x00FF;
</span>

don’t really accomplish anything. The first line is bit shifting to the right 8, and then you just bitwise and it resulting in the same thing. For example, starting with input_bin:


<span style="color:#323232;">1000 0000 0000 0000
</span><span style="color:#323232;">>> 8
</span><span style="color:#323232;">0000 0000 1000 0000
</span><span style="color:#323232;">&amp; 0xFF
</span><span style="color:#323232;">0000 0000 1000 0000
</span>

So, every time you go through a cycle of the for loop, you’ll just start with the same values in upper_byte, and lower_byte. To sequentially output each shifted value, you’ll instead want something like:


<span style="color:#323232;">output_value = 0b1
</span><span style="color:#323232;">for i = 1 to 16:
</span><span style="color:#323232;">    latch(low)
</span><span style="color:#323232;">    shift_out(output_value)
</span><span style="color:#323232;">    latch(high)
</span><span style="color:#323232;">    output_value = output_value &lt;&lt; 1
</span>

That is, if I interpereted correctly that you want the shift registers to output the following:


<span style="color:#323232;">output_count, upper_shift_register, lower_shift_register
</span><span style="color:#323232;">1, 00000000, 00000001
</span><span style="color:#323232;">2, 00000000, 00000010
</span><span style="color:#323232;">3, 00000000, 00000100
</span><span style="color:#323232;">.
</span><span style="color:#323232;">.
</span><span style="color:#323232;">.
</span><span style="color:#323232;">16, 10000000, 00000000
</span>

Note: Lemmy has a bug where it doesn’t format some symbols correctly, so the left angle bracket gets formatted as &lt;. The same issue exists for the right angle bracket, the ampersand, and I would presume others.

quiescentcurrent,

You’re 100% right, I’ve lost ‘i’ somewhere in my debugging process

byte upper_byte = input_bin >> (8+i) ; byte lower_byte = (input_bin >> i) & 0x00FF;

mvirts,

I think you got and and or switched, first two lines should be fine for shifting the top 8 bits down.

Kalcifer,

I don’t follow what you mean.

FuzzChef,

I think what he refers to is that you seem to do a bitwise or for the second line instead of the bitwise and.

Kalcifer,

2nd line of what? Oh you are completely right. My bad. Idk why I wrote that. I’ll fix my comment.

mvirts,

Yes that’s what I was thinking

flippyfingw, in No output with MCP1700-3302E

Here’s something I’ve been using in my own esp8266 projects for a while, LiFePo4 18650 cells. Their working voltage range, 2.6 - 3.6, 3.2v typical, makes them perfect for esp chips, and you remove the quiescent drain (though really low for mcp1700). Downsides of LFP being, lower capacity in the same size (energy density), pouch cells are generally not available and LiIon is a far more mature tech, with easy (and cheap tp/tc 4056) charging solutions.

Kalcifer, in Shift register missing bits

Would you not want to shift out the upper byte first? I could be misinterpreting your setup.

quiescentcurrent,

You’re probably right, but that should only change the order of the outputs right?

tanka, in Lower part of the screen is updated one frame earlier. Signal source: HDMI
@tanka@lemmy.ml avatar

Solved: Ok, it seems to have been a software problem. That had to do with the sync. I have installed ubuntu on the laptop for now and everything works again. Some update seems to have shot something. I am now using a

mvirts, in Lower part of the screen is updated one frame earlier. Signal source: HDMI

I used to see this on my Linux desktop with an old Acer monitor and Intel integrated graphics. Haven’t noticed it in a long time with newer linux

tanka, in Lower part of the screen is updated one frame earlier. Signal source: HDMI
@tanka@lemmy.ml avatar

Edit: I want to add that this problem occurred from one day to the next. I’m using Jellyfin as playback, but this effect even occurs when moving windows over the screen

Faceman2K23,
@Faceman2K23@discuss.tchncs.de avatar

is refresh rate auto switching enabled?

This is likely a Jellyfin issue as auto switching may not work on multimonitor systems and especially when moving the player between windows.

tanka,
@tanka@lemmy.ml avatar

refresh rate auto switching enabled

not that I am aware of. How could I find this out?

Faceman2K23,
@Faceman2K23@discuss.tchncs.de avatar

I’m not familiar with Jellyfins current UI as I havent used it since the very first beta releases, but it will be in the settings somewhere.

Faceman2K23, in Lower part of the screen is updated one frame earlier. Signal source: HDMI
@Faceman2K23@discuss.tchncs.de avatar

Very weird looking tearing, but if you are playing 24, 25, or 50 FPS content on a TV or monitor that is locked to 60HZ it is going to tear, some handle it better than others.

I suspect your output is set to 60hz or something and you are watching content that isn’t at either 30 or 60 and your playback software isnt doing autoswitching (kodi, plex etc do this, but not web browsers or apps like netflix)

So it’s not a hardware fault, its just the reality of watching media on a computer with an external display, so it’s a software configuration problem.

Also, considering the severity of it, are your video drivers up to date? that amount of tearing is close to what you’d see when running standard vesa drivers like when you have no video driver installed at all.

kn33, in Lower part of the screen is updated one frame earlier. Signal source: HDMI

I’d it’s a monitor with g-sync/freesync, turn that on. Otherwise, try to turn on v-sync. Looks like classic screen tearing.

tanka,
@tanka@lemmy.ml avatar

a monitor with g-sync/freesync, turn that on

no the monitor does not have this feature,

try to turn on v-sync

I did and it does not change anything.

dack,

What GPU and OS?

BigDanishGuy, in No output with MCP1700-3302E

The “typical application circuits” on page 2 in the datasheet ww1.microchip.com/…/MCP1700-Data-Sheet-20001826F.… shows both input and output being decoupled with a 1µF cap, have you tried that? I haven’t worked with the MCP1700, but I have had other LDOs fry themselves because the decoupling malfunctioned.

Froghut,

I initially tried with those capacitors but decided to also try without them - perhaps you’re right and I broke my LDOs by doing that :/

BigDanishGuy,

I’m not saying that your LDOs are fried. What I am saying is that some LDOs don’t take too kindly on not having the company of some nice caps.

What just caught my eye is that the datasheet specifies ceramic non-polar caps. That seems a bit weird. Just drawing a non-polar would have made sense, but specifying that it is a ceramic is strange. Using a ceramic makes sense, I mean there are 5 times the ceramic 1uF caps on digikey than there are electrolytics, but it should be technologically agnostic… I’d probably try to get some 1uF ceramics for testing.

joulethief, in No output with MCP1700-3302E

Unlikely. Have you measured the voltage present at Vin?

Froghut,

Yes, I measured across ground and Vin and it shows ~4V. Across ground and Vout 0V.

joulethief,

Just to be sure: positive probe on Vin, negative probe on GND, measurement shows no minus sign?

Froghut,

Yes, that’s what I did and what it shows. I also attached a picture of my test setup just in case I did something wrong there

joulethief,

Huh, that’s weird. Double checking the part markings would’ve been my next suggestion, but the picture shows they’re correct. Maybe try a 1kOhm load resistor across Vout and GND, though in theory you should be able to see the output voltage without it.

Froghut,
gondezee, in How do you determine if 450V caps are in spec?

Can you run and plot a frequency sweep?

BigDanishGuy,

Well I guess, I’ve got a sweeping function gen and a 4ch DSO… I’m gonna look into that and get back.

Caveat: my engineering diploma in embedded electronics is 10 years old, and it’s been awhile since I’ve done more than just the odd solder job. So it’s going to take a little while.

BigDanishGuy,

@gondezee when you say “plot a frequency sweep” what you’re looking for is just the usual voltage/time graph from a scope? No resistance in parallel to the capacitor for discharge? No fixed resistance in series? No x/y graphing funny business?

Or are you looking for a bode plot? I was hesitant in my first response because I thought I remembered Dave doing a bode plot with a sweeping gen and a scope, but I wasn’t sure if I could find it. I could m.youtube.com/watch?v=uMH2hGvqhlE

BigDanishGuy, (edited )

I think I’ve managed to do what you asked, let me know if I messed it up.

I got my function gen to do 6.1-12 in two decades x100 and x1000. The sweeps are almost linear after the first 500ms, meaning that each horizontal division of each 200ms denotes the following:

Timemark Frequency
0 6.1kHz
200ms 6.1kHz
400ms 6.1kHz
600ms 10.2kHz
800ms 22.7kHz
1000ms 36.2kHz
1200ms 50kHz
1400ms 64.1kHz
1600ms 78.1kHz
1800ms 92.6k
2000ms 106kHz
2200ms 119kHz

With all that said here’s the data

Replacement cap 610-12k https://sh.itjust.works/pictrs/image/b1a7479a-8d19-4649-8f5a-45863906eda4.webp

Original cap 610-12k https://sh.itjust.works/pictrs/image/bc1d44e9-a580-4ba7-afc6-e9cad9aca6d6.webp

Replacement cap 6.1k-120k https://sh.itjust.works/pictrs/image/ae7b53dc-5ac2-4ab9-9b30-8e53dd11429c.webp

Original cap 6.1k-120k https://sh.itjust.works/pictrs/image/a71ac2e8-82da-4b11-8800-e7fd407ae3e3.webp

birdcat, in can you see a beeper in this image?
@birdcat@lemmy.ml avatar

FOUND THAT PIECE OF SHIT! 🥳

Hiding under a hidden and additionally enclosed and secured circuit board, omg cannot believe I didn’t break it removing that shit 😅

12

RocketBoots,

There he is! Yup, piezo buzzer, good work op.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • askelectronics@discuss.tchncs.de
  • localhost
  • All magazines
  • Loading…
    Loading the web debug toolbar…
    Attempt #