Two sources of power:

  • 12V switched power supply (primary)

  • 12V deep cycle lead acid battery (secondary)

Note: In practice the switched power supply voltage will be adjusted to match the actual voltage across the battery when it is connected to the load.

12V Relay:

  • NO connected to secondary power supply

  • NC connected to primary power supply

  • Relay coil connected to primary power supply

Load (12V):

  • Surveillance cameras

  • Network attached storage

  • Router

  • Assume Total 10A


  • safety precautions such as fuses ignored for now,

  • battery Ah, run time etc. ignored for now,

  • why am I doing this ignored for now.


  • When the relay switches from one power supply to the other there will be a temporary open circuit.

  • How do I calculate capacitor size to use?

  • The open circuit time is unknown but can I assume it is say 10ms?

Solution? Charge:

$$Q = 10\text{ms} \cdot 10\text{A} = 0.1\text{C}$$

$$Q = C \cdot V$$

Capacitor size:

$$C = \frac{Q}{V} = \frac{0.1}{12} = 8,333 \mu \text{F}$$

Now I realize that this means that at the end of 10ms the Voltage is zero. So I figured I'd ask for some advice:)

  • \$\begingroup\$ do you have to use relays? take a look at mosfet o-ring power selection.. \$\endgroup\$
    – Wesley Lee
    Mar 22, 2016 at 18:28
  • \$\begingroup\$ Mosfets, or BGT's depending on the power requirements. do not use relays! \$\endgroup\$
    – Alex
    Mar 22, 2016 at 20:25
  • \$\begingroup\$ I'm not saying your method of calculation is correct, but your C=Q/V formula should give you a result 1000 times greater. 8e-3 is milli-farads, not micro-farads. \$\endgroup\$
    – brhans
    Mar 22, 2016 at 20:53
  • \$\begingroup\$ What is a BGT. I found another solutions using diodes. Funny how you search again and come across solution that Google didn't show earlier:) Many thanks to everyone for your help. \$\endgroup\$
    – Rav Gupta
    Mar 24, 2016 at 2:01

2 Answers 2


You are more or less close to the answer, but you should rather use the capacitor energy equation: \$E = \frac{1}{2} C * V^2\$

The Energy that you need to store can be calculated as

\$E_{needed} = Power * time = ( 12 V * 10 A ) * 10 ms\$

Then you have two instants of time, before and after the switching:

\$E_{before} = \frac{1}{2} C * V_{before}^2\$

\$E_{after} = \frac{1}{2} C * V_{after}^2\$

then \$E_{needed} = E_{before} - E_{after}\$

Also you want \$V_{after}\$ and \$V_{before}\$ close to each other, perhaps 1 V is ok (you must check the load specifications), so there is enough voltage to feed the load, \$V_{before}=12 V\$, \$V_{after}=11 V\$.

The voltage will always go down a "little", that is the rule when discharging capacitors, how "little" depends on how big the capacitor.


If I understand correct, you have grid power to a 12VDC power supply to a deep cycle 12VDC battery to a surveillance system. Why do you need anything more than circuit breakers or fuses? Adjust the power supply to output 13.7±1.0VDC to the battery and the battery directly to the surveillance system, with appropriate over-current protection. The power supply will power the surveillance system and keep a float charge on the battery. If you have grid power failures very often, you may wish to have a second charger to fast charge the battery. When grid power fails, there will be no transition when the battery starts delivering power to the surveillance system. I know it works as I use that system myself. It is the same system that is used by major companies that rely on continuous power. The 48VDC that the telephone companies have used for decades is set up that way. The only difference is that the telephone companies have end-cells that kick in when the voltage varies more than one volt.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.