Electronic – Will a discharge resistor help here

capacitordischargeesp8266resistors

I have a simple circuit, powering an ESP8266, specifically the esp-12-e.

Connected to the 3.3v coming in I have a 1000uF electrolytic capacitor, to help keep things stable (suggested by the esp8266 community)

It's all working well. However when I cut the power to the board, I see my LEDs etc hang around dimly glowing for just less than a second before the board appears to loose all current. I assume this is because of the giant capacitor. I like it :), and have it behaving otherwise very stably.

I hear people talk about bleeder/discharge resistors, normally on DC power supplies. However, if my theory is right, one may help me here, so when I cut the power, everything turns off…more or less instantly.

Thoughts? If my theory is correct, how would I wire the resistor up, how many ohms should it be, and why?

Best Answer

To start with, you could reduce the decoupling capacitor size. It does seem to be an enormous capacitor for the job it's doing, so you could reduce its value. The size required depends on the decoupling capacitance you already have in your power supply and the length and current capacity of those connections to the power supply. The shorter and thicker the connections (lower resistance, inductance), the better. I previously worked with on of four rigs containing a ESP8266 board which worked reliably with a 100 uF capacitor close to the board supply pins. So it all depends upon your total circuit.

If you have the parts available, you can try 470 uF or 220 uF and see if you notice any difference over time when its operating. If you have access to an oscilloscope, measure the ripple, noise and supply dips across the 1000 uF capacitor and then measure it with the 470 uF in place and again with the 220 uF. If ripple, noise and the supply are not significantly larger with the 470 uF or 220 uF, use that smaller capacitor.

Once you've settled on the capacitor you want to use, you could add a discharge resistor to do what you want.

A discharge resistor would be connected across the supply rail, and therefore the supply decoupling capacitance. Its value is a trade-off between operating power wastage and speed of discharge. When the supply is operating, the resistor will be drawing a continual current and dissipating power as heat. The lower the resistor value, the more power from the supply is wasted as heat in the resistor and the higher its power rating has to be but the faster the capacitor has to be.

The resistor current is found from: I = V/R = 3.3/R Amps

The resistor power is found from: P = V*V/R = 10/R Watts

The 1000 uF capacitor discharge time because of the resistor across it can be taken roughly from: td = 5RC = 0.005 x R secs

For example, a 100 ohm resistor would draw 33 mA, dissipate 0.1 W continually and discharge your 1000 uF capacitor in 0.5 secs. That seems a reasonable trade-off but it depends on your power supply's rating as to how much you want to waste in the resistor. Derate the resistor to 50% so it is not under stress. So for the 100 ohm resistor, use a 200 mW or 500 mW part.