2
\$\begingroup\$

It's been ages since I had to design something electrical so please don't laugh if this is stupid idea but I would like to power ESP32 with super capacitors, just for 30 sec or so so it can finish the sketch even if the power is cut off suddenly. Except I have no idea if this would work as intended.

I made a schematic here:

Schematic

The problem is I'm not sure how long it could power the ESP32 in this config if I put 4x 0.47 F caps in parallel (would that even work?).

Am I missing something, i.e. over charging protection - is that needed? If by some miracle this works, how can I discharge the capacitors once the ESP32 finishes and shuts itself off?

\$\endgroup\$
5
  • \$\begingroup\$ The diode D1 is wasting valuable capacitor capacity. WIth a 3V3 output you could use a linear LDO regulator. Assume no D1 and an LDO with 0.1V dropout. So Vcap = 5V to 3.4V. Energy in say 1 F is E= 1/2.C.V^2 = 0.5 x 1 x (5^2-3.4^2) = 6.7 J per F. To operate for 30 S you have 6.7/30 = 0/.224 J/s = 224 mW. At 3V3 that's 68 mA per Farad. The average efficiency with a linear regulator is 3.3V / (5V - 3.4V) = 78.6%. A good switching regulator would be somewhat better, but not vastly so. \$\endgroup\$
    – Russell McMahon
    Commented May 8, 2019 at 7:48
  • \$\begingroup\$ The MP2161 is an OK choice BUT it is a BUCK regulator ie only steps DOWN. You cannot use Vcap below about 3.3V. || Cap energy is 44% remaining at 3.3V so 56% used. But 16% remaining at 2V = 84% used. SO if you use a buck boost converter that will operate down to 2V you get 84/56 = 50% more of the stored energy. The efficiency will drop at lower V's but the 50% increase in available energy may make up for the losses. \$\endgroup\$
    – Russell McMahon
    Commented May 8, 2019 at 9:45
  • \$\begingroup\$ The TPS6120x looks quite good BUT you need to be certain what your true maximum load is as it may not be able to handle toe ESP32 peak drain at very low Vin. In the above data sheet page 7 figs 1 2 3 4 look at what currents and Vin are available with Vout = 3V3. At the 500 mA peak that ChristianB suggests you may need 1.5V in. At somewhat lower you MAY get down to 1V in. A large cap on the 3V3 side may handle the largest peaks. || The VSON package would be a challenge for anyone inexperienced in very small IC packages. \$\endgroup\$
    – Russell McMahon
    Commented May 8, 2019 at 14:21
  • \$\begingroup\$ Capacitor discharge is not a real problem (usually). The ESP will usually happily deal with them. If they MUST be discharged by other means either a large value bleed resistor can be provided. Or a 'discharge circuit' can be implemented that clamps the Vin supply as soon as Vout starts to fall below 3V3. Or the ESP can initiate a supply shutdown. Or ... . \$\endgroup\$
    – Russell McMahon
    Commented May 8, 2019 at 14:25
  • \$\begingroup\$ Thanks Ruseell you are super helpful, yea if it drops to 1V the mA would not cut it, but it should not damage it self right ? Just brown out and than probably it will not even turn on again at that low power... which would be fine I guess. Still I need like 10 of the caps... I will add some big normal capacitor to 3.3V out and see what it does :D \$\endgroup\$ Commented May 8, 2019 at 19:43

2 Answers 2

0
\$\begingroup\$

The diode D1 is wasting valuable capacitor capacity.
It does not seem to be necessary.

With a 3V3 output you could use a linear LDO regulator.
Assume no D1 and an LDO with 0.1V dropout.
So Vcap = 5V to 3.4V.
Energy in say 1 F is E= 1/2.C.V^2 = 0.5 x 1 x (5^2-3.4^2) = 6.7 J per F.

To operate for 30 S you have 6.7/30 = 0/.224 J/s = 224 mW per Farad.
At 3V3 that's P/V = 0.224/3.3 = 68 mA per Farad.

The average efficiency with a linear regulator is
3.3V / (5V - 3.4V) = 78.6%.
A good switching regulator would be somewhat better, but not vastly so.

\$\endgroup\$
7
  • \$\begingroup\$ thanks, if I got it correctly this setup would not help me really if its only 68mA, since the ESP32 can draw 260mA with wifi usage..not counting the power needed for eink display update. \$\endgroup\$ Commented May 8, 2019 at 8:03
  • \$\begingroup\$ @VladoPortos That's 68 mA for 30 seconds per Farad. If you need 268 mA x 30 seconds then you need 268/69 =~ 4F \$\endgroup\$
    – Russell McMahon
    Commented May 8, 2019 at 9:21
  • \$\begingroup\$ Thanks Russell, so in the end I would need like 10 of these capacitors + boost converter to make it. that would be too much price wise, but still I might make just one prototype for fun :D \$\endgroup\$ Commented May 8, 2019 at 10:36
  • \$\begingroup\$ TPS61201 might be good choice for the buck boost it takes down to 0.3V up to 5.5V and provide 3.3V \$\endgroup\$ Commented May 8, 2019 at 11:23
  • \$\begingroup\$ you can get 4f 5.5v caps, even cheaply, which should simplify \$\endgroup\$
    – dandavis
    Commented May 9, 2019 at 19:41
0
\$\begingroup\$

The energy stored in a capacitor equals:

$$U=\frac{1}{2}CV^2$$

source

In your circuit \$C=\$4 * 0.47 F = 1.88F and \$V=\$5V

That them means that \$U=\$ 1/2 * 1.88 * 5^2 = 23.5 J (Joule).

Unfortunately we cannot use all that energy as that would discharge the capacitors to 0 V (zero Volt) and that will not work, the MP2161 buck converter needs a non-zero input voltage and there is also some drop across the diode D1. I'm going to assume we can discharge to 4 V, maybe we can go lower but 4 V seems a safe assumption to me.

At 4 V the energy in the capacitors will be: \$U=\$ 1/2 * 1.88 * 4^2 = 15.04 J

So that gives us 23.5 - 15.04 = 8.46 J to work with.

If we would use that 8.46 J in 1 second that would mean our load can consume 8.46 J /second = 8.46 W (Watt). That's only theoretical, we want to discharge much slower.

Over your requested 30 seconds that would divide by 30: 8.64W / 30 = 0.282 W

That means you need to keep the current going into the MP2161 to be less than 0.282 W / 5 V = 56.4 mA. If there is not much more than just the microcontroller to power then that would be more than sufficient.

I think you can even suffice with using only one 0.47 F capacitor!

\$\endgroup\$
3
  • \$\begingroup\$ Well if it is really a ESP32 at work and WiFi is used the peak current can easily reach 500mA. Maybe this source is of interested as the writer tried to power an esp via a solar cell buffered with a super cap: hackaday.io/project/20466-wifi-epaper/log/… . Summerized: it is possible but the author actually used a 5F cap for a roughly 10sec process in the end. So I believe <1 F hardly suffice. \$\endgroup\$ Commented May 8, 2019 at 7:43
  • \$\begingroup\$ Ah that is very similar project to mine, cause I also need WiFi to check server, update display and go sleep... so from what I understand this can't be easily done with small supercapacitors due to mA requirements(?) of WiFi although the specs say it uses 260mA \$\endgroup\$ Commented May 8, 2019 at 7:57
  • \$\begingroup\$ At least you have to make sure that your power source provides enough reserves for some serious current peaks. The power consumption depends strongly on the the application and setup. E.g. can a ground plane to close to the antenna lead to siginificant higher input current. If you look for low power solution Bluetooth or similar might be worth a try. If a platform switch is an option something like cc26xx family might be an interesting alternative for you. \$\endgroup\$ Commented May 8, 2019 at 13:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.