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!
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:
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..)