1
\$\begingroup\$

I put the following circuit together and it's working fine, but I still want to be completely sure I'm not missing anything. I think I read somewhere that when a relay is used to switch between power supplies, a capacitor on the pencil circled area is needed to avoid damage to the relay or other parts of the circuit because of the sudden change of power supply, but I can't find where I read it. I also read that that same capacitor (or is it a second one of other type?) would be useful to supply the load with the voltage that would cut off the time it takes for the relay to change from one power supply to the other. Can someone guide me on what value or type of capacitor to use for both purposes? And if anything else needs correction please let me know and I would greatly appreciated!

enter image description here

\$\endgroup\$
  • \$\begingroup\$ You need to know the current into the load to properly calculate an appropriate capacitor size. Also, if this relay will be switched to an absent power source (to turn off), you may look into a flyback diode to prevent the damage you're talking about. \$\endgroup\$ – Samuel Feb 1 '18 at 22:30
  • \$\begingroup\$ Hi Samuel!! The current into the load will me 2A tops. There won't be absent power sources because the switching will be done "manually" through a user interface whenever the DC supply is available. \$\endgroup\$ – Fabian S Feb 1 '18 at 22:44
  • 1
    \$\begingroup\$ Ah, so you don't want it to switch automatically when the 12V is plugged in and back when it's absent? 2A is a lot, how much voltage droop is ok? That is, during the 10ms your relay is switching, what's the lowest the voltage that the load will be ok with? \$\endgroup\$ – Samuel Feb 1 '18 at 23:04
  • \$\begingroup\$ We need to know more about the load. What is it? Is it an electronic circuit and if so does it already have capacitors in the supply? Is it an inductive load (motor) that requires something else (Snubber or another fly-back diode). You definitely need a fly-back diode over your relay (Cathode at 5V Anode at In1) \$\endgroup\$ – Oldfart Feb 2 '18 at 6:27
  • \$\begingroup\$ @Samuel , the switching will always be done through the user interface. The complete system is a generator that will use several renewable resources to generate electricity. All of that energy will be stored to batteries, and we'll be having 12V and 5V outputs to power mainly electronic devices (cellphones, tablets, etc). The first element of the "load circuit" is a step-up or boost converter, so that would prevent a voltage drop in theory \$\endgroup\$ – Fabian S Feb 2 '18 at 19:40
1
\$\begingroup\$

When the relay switches there will be a short moment where the load does not get power. If it is .e.g. a battery or something which does not have to keep running you can use the circuit as-is. If it has it's own voltage regulator your load is also likely to survive the switch over.
If the load needs a continuous power supply you have to get energy from somewhere else. A capacitor is the simplest solution but there are issues with using capacitors:

  • The voltage will drop when they are discharging.
  • They can not store a lot of energy unless the are very big.
  • If you have big capacitors they can cause your supply to trip/fail at startup.

The is the principle circuit with the formula:

enter image description here

We can calculate R from your 12V supply and max 2A: 12V/2A = 6 Ohms.
Lets assume some figures:
- We can accept a voltage drop of 0.5V.
- The relay takes 10 milliseconds to switch.

Vo = 12V, Vt=11.5V, T=0.01 R=6 Gives C = ~39e-3 F (39 milli Farad) If your supply can deliver 2A I don't think that capacitor will cause problems when you switch your system on.

For other values, different voltage drop or faster/slower relay, you can calculate the capacitor yourself . (I hope..)

\$\endgroup\$
  • \$\begingroup\$ yeah, a short period without power won't affect the rest of the circuit. My main concern is having a safe circuit. But I guess it would be better if I could avoid it. I'll do some testing with the help of your circuit. Thanks a lot my friend!! \$\endgroup\$ – Fabian S Feb 2 '18 at 21:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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