# Power a 12V DC wifi-router using 6V relay as switch between two power sources

I had build a circuit that can provide current to 12-V wifi-router from two different sources (wall-adapter & battery.)

A 6-V relay is used as switch, to supply power from one of the source at a time.

Problems with the Circuit:

1. As 6V relay is powered by 12V adapter, It gets hotter by the time passes(1 hour or more).

2. When primary power (wall adapter) goes off there is tiny-bit delay in supply the power to wifi router so it gets restarted.

What should I do to overcome these problems?

Q1. How do I step down from 12V to 6V, to power the relay.

Q2. What kind of capacitor be use for the short term power in delay time?

** Upgrade with capacitor & Relay **

• I have added 2200µF 16V Capacitor with diode, before the Load to ensure power could be supplied for the 2-3~ seconds delay while switching between sources. unfortunately capacitor is powering the Relay instead of wifi-router. what should I do to ensure isolated current to wifi-router?

• Replace the 6V relay with 12V relay.

Note: I am new to electronics that is why I make circuit as simple as possible. I know I had done some blunders in the circuit. Kindly guide me through.

• The correct solution is to use a relay with make before break contacts and a 12V coil along with a diode in the line from the wall adapter. This is obviously not what what you want to hear, since want to stick with your current relay. – JRE Oct 4 '17 at 11:20
• @JRE Can you elaborate your suggestion? – Muhammad Bilal Oct 4 '17 at 11:57
• Hard to calculate the size of capacitor required without knowing the supply current required by your router. And D1 and D4 serve no purpose, though a diode across your relay coil might be needed to protect your adaptor from back EMF. – Finbarr Oct 5 '17 at 12:19
• @Finbarr when adapter power goes off, capacitor is powering the relay, thus Relay turn on after a while and capacitor is not doing what its suppose to do (powering the Load). what should I do to stop current flowing to relay?? – Muhammad Bilal Oct 5 '17 at 19:12
• D5 prevents the capacitor from discharging through the relay. D4 and D1 add nothing. – Finbarr Oct 5 '17 at 20:17

The most common approaches to this kind of buffered (battery backed) power supply are as follows:

1) Use a power supply (adapter) that is capable of charging the battery, connect it directly to the battery and to the load. Some protection circuitry can be used to disconnect the battery when fully discharged in case of a long power outage. The power supply must have foldback current limiting - to be able to lower its voltage when its current limit is reached. Most adapters restart when overloaded (also known as hiccup mode), which is not suitable. The adapter's max voltage should be selected based on battery type - like 13.8V for a lead-acid battery or 12.3V for 3 Li-Ion in series. The current limit should be enough to supply the load, but not more than the battery's safe charging current. In your case with the WiFi router as a load a 1A limit will be OK with most batteries you could try to use.

simulate this circuit – Schematic created using CircuitLab

2) Use a power supply with a voltage a bit higher than battery's max voltage and connect them using diodes. This technique can be used in case of a non-rechargable battery. Diodes could be schottky to minimize voltage losses, like 1N5822. D1 could be ommited but the adapter would slightly discharge the battery in case of a power outage.

simulate this circuit

• Another typical answer, I have seen by most of stackexchange Questions. The Answer you have given is not relevant to Questions I ask in detail. As battery has more Voltage then charger I can not charge battery, else it would drain the battery when connected. My question is about using relay as switch in which both power sources are well-disconnect, kindly help me out. – Muhammad Bilal Oct 4 '17 at 10:40
• Todor's #2 solution is the best one. It is referred to as "auctioneering". Yeah, you have a relay, but the fact is you don't need one. To fix your circuit use Todor's solution and put two diodes forward-biased in series with the battery. Their voltage drop will bring battery vdc below the normal supply vdc, which will prevent battery discharge. You will find that your circuit switches so fast you will need very little capacitor to keep the router from resetting - you may be able to do away with the capacitor completely, depending on what the power input circuit of your router is like. – Michael Gorsich Oct 9 '17 at 14:50

The simple answer is that you need considerably more capacitance.

Current, capacitance and rate of change in voltage are related by the equation:

$I=C \frac{dV}{dt}$

For a rough guide, let's assume the current consumption doesn't change as the router supply voltage reduces, so with the values you've given of 2 Amps and a drop of 4 Volts (12-8) in 3 seconds you can calculate C using:

$2=C (\frac{4}{3})$