Electronic – Capacitor does not hold charge when switching power

capacitorchargerelayswitching

I'm trying to create a power source switch using a relay. This's supposedly will be used for my Raspberry Pi. So what I want to do here is :

  • Create a backup power source with battery that will replace the main power if it's failed/off
  • Add a capacitor to holds charge, so when the relay is switching, the power will not completely cut off

Here's my schematic:

my schematic

I already tried to create this, but the problem is when the main power is cut off, the output still drops and then backs up to 5V. So I've assumed the capacitor is not doing its job.

But strangely, if I cut both of the power, the output still shows 5V (and slowly going down), so this means the capacitor actually holds a charge, right? Then why when the relay switching, the power still temporary went down? Do I did this incorrectly?

Best Answer

The cause of the problem could be the relay's switching characteristics.

The 'pull-in' voltage of a relay would be closer to its nominal voltage whereas its 'drop-out' voltage would be much lower.

After occurrence of a power failure, the relay's 'drop-out' characteristic would ensure that it stays on in spite of the decaying power supply voltage.

Hence the capacitor would also get discharged before switch-over to the battery could occur.

Here's an alternative scheme using a Schottky diode for switching.

enter image description here

The PSU would predominate, with it's voltage set marginally higher. In any case the probability of the PSU voltage exceeding that of the battery is quite high.

With availability of Schottky diodes having a forward voltage as low as 150mV, voltage drop during backup should not be an issue.

Related Topic