ESP32 Supercapacitor Power – How to Power ESP32 with Supercapacitors

esp8266microcontrollerschematicssupercapacitor

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?

Best Answer

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.