2
\$\begingroup\$

I've added a 'House Battery' to my vehicle, which I keep charged by various means, including solar panels. When the vehicle isn't running, I can switch various accessories from the Car Battery to the House Battery, so the Car Battery won't get run down when I camp. The actual switching is done by relays, so, ignoring details like fuses and voltage cut-off, the setup boils down to this simple circuit:

schematic for relay switching between the Car Battery and House Battery, with a switch

This has been working great for years, for lights, USB outlets, and accessories like that. But there's a problem when switching the car stereo: it reboots whenever it's switched between the batteries.

I presume this is caused by the split-second loss of power, and my understanding is that one way to avoid this is to add a capacitor to the circuit, like this:

similar schematic as above, except with a capacitor between the accessory output and ground

My questions:

  1. Is this the best solution?
  2. What type of capacitor should I use? (Obviously it needs to be at least 15 volts, but how do I calculate the capacitance, assuming the stereo draws, say, 50 watts, and what other details are important?)
  3. Would any other modifications to the circuit be a good idea? e.g. Should I worry about a flyback diode?

Thanks.

\$\endgroup\$
5
  • 3
    \$\begingroup\$ Just remember that you have a charged capacitor when working on the circuit in the future... It WILL happily remind you :) \$\endgroup\$ Commented Jul 28, 2023 at 20:23
  • 1
    \$\begingroup\$ Your radio might have a 50W rating. That rating might even be in 'real' RMS Watts (when pigs fly). But unless you do the switch over while playing it at full volume, it's not likely to be consuming much more than 5W. \$\endgroup\$ Commented Jul 29, 2023 at 2:51
  • \$\begingroup\$ @SolarMike +1, what you said is an extreme understatement. I got shocked by caps while servicing mains-powered stuff and got the sparks flying while servicing 12V stuff enough times to know that those bastards are way more dangerous that most people envision. I'm not saying they are more dangerous than a fully-charged car battery (that's obviously not the case), but people at least SEE the battery and expect to handle it properly (i.e. not drop a wrench across the terminals). That's usually not the case with caps TBH. Also, ESR can be low enough to get the sparks even connecting them to batt. \$\endgroup\$ Commented Jul 29, 2023 at 4:38
  • \$\begingroup\$ also, I guess that would be a good reason to have both a parallel bleeder res and a series current-limiting res (or a fuse) here... but that would make sense only if this solution would make sense by itself. It mostly doesn't (see Harper's answer for details) \$\endgroup\$ Commented Jul 29, 2023 at 4:42
  • \$\begingroup\$ When you size your capacitor you must also consider the aux load as well as it is not isolated. You could isolate the radio and cap with a schottky diode. \$\endgroup\$ Commented Jul 29, 2023 at 5:24

4 Answers 4

5
\$\begingroup\$

All due respect, you're making it harder than it is :)

This is a common and well-solved problem with plenty of solutions. Simplest is to just put the radio, lights etc. on the house battery and done. No relay.

How do you charge the house battery? With any of a variety of battery isolators made for the RV industry. These cleverly charge the house battery from the engine alternator or EV DC/DC converter when the car battery is topped up and the excess alternator/DC-DC power is surplus.

This does not conflict with other ways of sustaining the house battery, such as solar.

\$\endgroup\$
0
4
\$\begingroup\$

Is this the best solution?

It's a solution that is highly likely to work.

What type of capacitor should I use? (Obviously it needs to be at least 15 volts, but how do I calculate the capacitance, assuming the stereo draws, say, 50 watts, and what other details are important?)

50 watts at 12 volts implies a current of around 4 amps. That's the first thing. The second thing is the contact switching time and, this may be 10 ms. The third thing is how low the voltage can droop to when the relay is in the process of switching. This third thing depends on the stereo and, how low the voltage can drop to without it losing its settings. I'll take a guess at 7 volts (a drop of 5 volts from 12 volts).

The hold-up (electrolytic) capacitor is then calculated by this: -

$$C = \text{switching period} \times \text{current} \div \text{volt drop}$$

I get a value of 4 amps × 10 ms ÷ 5 volts = about 8 mF (8,000 uF)

Choose a voltage rating of 25 volts is my advice.

Should I worry about a flyback diode?

A flyback diode isn't necessary

\$\endgroup\$
4
  • \$\begingroup\$ Thanks. What's particularly helpful is that the voltage drop is what I need to consider. It thus seems the battery's resting voltage being closer to 13 doesn't matter… although the 25V rating does sound like a good idea. I'll let you know how it goes in a week or two, when I've had a chance to get the cap and put it all together. ☺ \$\endgroup\$ Commented Jul 28, 2023 at 22:22
  • \$\begingroup\$ +1 for the calculation Andy, but TBH, ~8,000 uF 12V cap in my RV just for the sake of something that basically shouldn't be done? Thanks, but no thanks... I'd suggest the OP to charge a cap that big, and then just put a piece of metal across the leads, just for the sake of experiment - but I'm no sadist :D (and yeah, I hope he has fuses on the battery->appliances connections anyway) \$\endgroup\$ Commented Jul 29, 2023 at 4:33
  • \$\begingroup\$ tl;dr bleeder + fuse/limiter. It's an RV, it's usually flammable like hell and the sparks/charring can happen in places that are basically invisible. That's my take on it. \$\endgroup\$ Commented Jul 29, 2023 at 4:43
  • \$\begingroup\$ It's actually not an RV #vanlife and as I stated, the diagram does not include fuses, which I have leading to each battery and to the load. Point taken on the bleeder resistor. \$\endgroup\$ Commented Dec 2, 2023 at 19:03
2
\$\begingroup\$

It depends on the current being drawn from a battery at the time you want to make the switch. If the car is turned off then it should be quite small or else it would drain your car battery.Then a capacitance value can be calculated by:$$C\approx\frac{I\Delta t}{\Delta V}$$.

\$\Delta t\$ is the time it takes the relay to switch batteries.

\$\Delta V\$ is the maximum allowed voltage drop.

Starting the car pulls the voltage as low as 9V, but does not reset the radio. So \$\Delta V\$ could be as much as 3V.

Lets assume the relay takes 0.1 second to switch and 10mA. Then$$C\approx\frac{0.01\cdot0.1}{3}\approx330\mu F$$

I expect if the car is off then the current will be much lower. If the switch is in the accessory position it will be much higher.

A 1V or 2 V \$\Delta V\$ may be better but will need a bigger capacitor.

It is best to measure the current, then multiply in a safety margin.

\$\endgroup\$
0
\$\begingroup\$

Is this the best solution?

It can be a viable solution, but the effectiveness will depend on the exact specifications of your stereo system and the duration of the power loss during switching. The capacitor would need to supply power long enough to cover the switching time, and have enough capacitance to supply the necessary current without the voltage dropping too much.

What type of capacitor should I use?

You would likely want to use an electrolytic capacitor because they can provide a high capacitance in a small package and they are suitable for low-frequency (DC) applications like this.

The necessary capacitance can be roughly estimated by first determining the amount of charge (Q) needed. This can be calculated from the power (P) of the stereo and the time (t) of the power interruption as follows:

Q = P * t

Assuming the power interruption is very brief (say, 0.1 seconds), and the stereo is a 50W system running at 12V (which gives a current of about 4.2A), the required charge would be:

Q = 50W * 0.1s = 5 Joules

The energy stored in a capacitor can be calculated as:

E = 0.5 * C * V^2

Rearranging for C gives:

C = 2E / V^2

Substituting the values:

C = 2 * 5J / (12V)^2 = 0.07 Farads or 70,000 microFarads

So, a capacitor of around 70,000 microFarads (uF) and rated for at least 15V (preferably more for safety margin) should suffice.

Would any other modifications to the circuit be a good idea? e.g. Should I worry about a flyback diode?

Including a flyback diode could be a good idea to prevent any potential reverse voltage spikes which could occur when the relay is switched off. This is particularly important if you have other sensitive electronics connected to the same circuit.

\$\endgroup\$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.