# Can I connect a capacitor in parallels to power supply of a router

In the building where I live, because of older wiring, the mains voltage frequently drops for a fraction of a second and this restarts my wifi router. I am planning to solder a capacitor in parallel to either input or output of the 9V power supply.

Would this work, and would it cause any problems?

• easier, safer, better to just buy a cheap UPS. – Mark Sep 24 '11 at 7:14

Yes, but ... .
A capacitor can help as you suggest but it may need more than that.

• Restating Steven's formula - a Farad will supply one amp for one second with one volt of drop. So 10,000 uF ( = 0.010 Farad = 10 milliFarad = 10 mF*) will supply 0.01A = 10 mA for one second with one volt drop or 1 amp for 0.01 second with 1 volt drop. Murphy and reality adjust actual result somewhat but that gives you an idea

• Capacitor Must be on a DC rail (ie not on AC input.)

• Note that some such devices use AC input from power supply so that they can rectify it internally and generate + and - supply rails. Unusual but check what the power pack output voltage specification plate says.

• Also, a few supplies feed 2 or more voltages from the power pack, but this is unusual.

• A superCap may help for longish brownouts.

• For very substantial brownouts you may not be able to sensibly provide a large enough capacitor. You could use a battery pack slightly below supply voltage with a Schottky diode to V+ so that when the mains dips the battery takes over automatically.

A 9V "PP#" / "transistor" radio battery may do but voltage may be too high compared to 9V loaded supply. If so you could use several series diodes from battery to 9V rail to drop voltage. eg if battery = 9.75V O/C (about right for very new Alkaline 9V) and if loaded supply rail = 8.8V (say) difference = 9.75 - 8.8 = 0.95V.
2 x silicon (not Schottky diodes would cause 9V battery to take over at ABOUT 9.75 - 1.2 = 8.55V. Drop across silicon diode (eg 1n400X) IS > 0.6v at 10's to 100s of mA. You could use an LDO regulator to allow very precise battery takeover BUT quiescent current needs to be very low. Not so crucial if battery is charged from supply usually - see below.

• If using a battery you could use a rechargeable - connect to rail via diode as above AND a resistor in parallel with diode. Dimension resistor to provide a very small trickle current to keep battery supplied.

• The smallest of UPS's with their own internal battery will handle this application well. Even one which has a very dead battery will probably hold up long enough for this. Such may be available free or close to free depending where you are.

For interest, where are you located?

Large Capacitors:

All values below are examples. Use values to suit what you are doing.

A large capacitor MAY be able to be used directly - depends on how the power supply reacts to a heavy short term overload as the capacitor charges.

If the supply does not "like" the capacitor startup load then as you note - use a resistor to charge the capacitor and a Schottky diode across the resistor to discharge into load when required.

As a starting point, dimension the resistor to allow cap to take max allowable current when cap is short circuit at startup. So if eg 9V 500 mA supply, a R = V/I = 9/0.5 = 18 ohm resistor will take 500 mA when the capacitor is dead short at startup and this will decrease as the capacitor charges.

If the capacitor is say 10,000 uF then with say 18 ohm as above the time constant = RC = 18 x 0.01F = 0.18S. The capacitor will charge in under a second. 1 second ~= 5 time constants, but as the supply is also driving the router as it starts up all the current will not be available.

You may be able to use a lower value than 18 ohms in the above example. try and see. Observation with an oscilloscope would help but even an analog meter will give you an idea of how long charging takes.

• It would be much better if you buy some cheap UPS on e-bay. – avra Sep 22 '11 at 9:48
• You can get a quality 350VA UPS for ~\$50 US. Consider APC Back-UPS ES BE350G 350 VA (200 Watts). This is what I use on my network switch, router and wireless access point. – JYelton Sep 22 '11 at 16:03
• UPS for the win. Every UPS worth buying will do line conditioning including boosting the voltage in a brown out – Earlz Sep 22 '11 at 16:50

Routers often work with external wall warts as power supply. (Main reason is that they can keep unhealthy voltages out of the apparatus, so that they don't have to worry about safety distances and such.) Place the capacitor parallel to the rectified DC voltage; there should already be a capacitor. The capacitor's value depends on the duration of the power dips and the router's current. The voltage drop during a power dip is defined by

$\Delta V = \dfrac{I \cdot T}{C}$

Since the duration is probably unknown you may have to experiment with the exact value, but 4700$\mu$F would be a good starting value.
edit: Wouter is probably right; you'll need a higher value. Since there's already a cap the dip will not be a sharp and narrow spike.

The only disadvantage I can see is that at startup there will be a bit larger current peak when the capacitor charges, but this is usually not really a problem.

• Necip could check what is the value of the capacitor that is already in place. His addition must be at least lest's say 10 times as large. I doubt 4m7 will be enough. The startup problem (if a a problem at all) could be remedied by having a resistor (1k for a start) between the + of the PSU and the + of the capacitor, and a diode aiming from the + of the capacitor back to the + of the power. – Wouter van Ooijen Sep 22 '11 at 9:40
• I thought for a moment about a supercap (double-layer capacitor), because they will limit the inrush current the way they work. Unfortunately they are only available up to 5 volts (afaik). This solution would also not be super cheap. – 0x6d64 Sep 22 '11 at 9:59
• @0x6d64: I think it would be better to just buy lots of large electrolytic capacitors. Supercaps generally have different applications – endolith Sep 22 '11 at 14:18
• @endolith, what applications do supercaps usually have? – Matt B. Sep 24 '11 at 7:58
• @Matt - They're usually used for (very) low current supplies, like a real time clock which can run on a supercap for days, even weeks when no mains power is available. For those applications the high ESR is not a problem. – stevenvh Sep 24 '11 at 8:00