MicroController wrote:
Start up and set the BOD to, say, 3.0V; when the BOD triggers (interrupt), do your shutdown/cleanup routine, then set BOD to 3.3V to reset the chip and hold it there until power comes back.
If only the brown-out peripheral worked that way, I'd be in tall cotton. It's how I hoped/expected it to work.
But some very simple tests showed otherwise (as @boarchuz suggested): if you set the BOD to ~3.19v (max setting), and power the chip on 2.8v, it will enter an infinite reboot loop (~1/2 sec intervals).
Which is why I commented that the brown-out peripheral is effectively useless. Because in addition to the failure of BOD to hold the chip in reset, it also fails to reset the ESP32 if VDD is taken below 1.8v and then slowly brought back up (as I mentioned in a previous post).
After some thought, my best bet (aside from adding an external 2.5v voltage supervisor to the ESP32 as @boarchuz suggested) may be to pull the ULP coprocessor into play (watch for the BOD output to fall -> chip reset). My first thought was to put the ESP32-S2 into deep sleep, and use the BOD interrupt to wake it--but said interrupt will fire when the voltage FALLS (and the internal signal goes HIGH). I need it to fire when the voltage RISES above the BOD threshold. I'll dig into the technical reference manual further and see if there happens to be an interrupt signal polarity invert bit...but at the current rate, I'll be a bit surprised.
MicroController wrote:
Inrush current - nothing that can't be fixed with a diode/FET and a single resistor
Diode = 0.6v drop at any significant current, and suddenly 3.3v - 0.6v = 2.7v...barely above the chip-functional-failure level of ~2.4v--and that's pre-ESR losses and otherwise. (Yes, I know, "schottky diode", but those have a significant reverse leakage--easily up to
15mA at high operating temperatures--and often will reach similar voltage drops at any significant current flow.) FET...as I mentioned earlier, even a logic level FET has difficulty with on resistance at low gate drive voltages--which will result in a similar problem with voltage drop. There just isn't the voltage headroom to do much of anything.
MicroController wrote:
so you may not actually need 20F of low ESR to get down to the impedance required.
So you're right that I don't need the 20 farad rating...it's just that any smaller EDLC supercaps have too high of an ESR in order to be functionally usable.
Let me explain:
In my project, said EDLC supercap
ALSO has to power a cellular modem...which "conveniently" runs at 3.8v (and can pull bursts of 2A). This is also why the shutdown tasks can comprise several seconds (sending power loss message & safely shutting down the modem)--and largely why the EDLC must have a low ESR. A 4-amp boost converter (MT3608) cannot "start" the whole board (inrush and losses result in the boost chip browning out at its own 1.98v UVLO threshold), though it can "sustain" it if power is lost. 4 amps @ 0.050 ohm ESR = 0.2v drop, so with ESR losses alone--not including inductor losses or internal boost FET losses--I'm already at 3.0v - 0.2v = 2.8v input to the boost converter. And the lower the input voltage, the higher the amperage must go in order to sustain the same output wattage--which very quickly becomes a death spiral.
I keep stressing "low ESR" supercaps--because you can EASILY find multifarad supercaps that were intended for powering an RTC. Said supercaps often have an ESR exceeding one ohm...which renders them totally useless for backup power systems of a main processor (much less the entire board).