Been putting togather a little lanyard badge thing on an ESP32-S3 with one of those small e-ink panels. It shows my timetable and some notes, sleeps after about ten seconds of doing nothing, and wakes when I press either button. The annoying part is that once it's asleep, if I let go of the power button the whole board cuts out. So every time I wake it I end up holding that button for a few extra seconds like I'm defusing something. I read somewhere that a spare pin can hold the power on by itself, sort of like the board latches itself once it's running, but I can't picture how that actually works in practice. Do you press the button, the pin goes high, and then something keeps it high even through sleep? And if it does stay high the whole time, doesn't that slowly drain the battery while it's sat in a drawer? Also honestly not sure this is even the right approach. Maybe the simpler fix is to make short presses do nothing and only cut power on a long hold? Would love to hear how anyone else has handled this on a similar board, becasue right now my workaround is just a rubber band around the button, which is not a long term plan.
How do I stop my e-ink badge from dying when I let go of the power button?
Oct 15, 2026
Last reply: 38 seconds ago
5 Replies
First reply
Yeah, the self-latch is a real thing and it's exactly how boards like this usally do it. The power button doesn't connect to the ESP32 at all, it feeds the enable line of the regulator or a power-hold circuit. Press it and the board boots. Early in your firmware you drive a…
Read the full replyYeah, the self-latch is a real thing and it's exactly how boards like this usally do it. The power button doesn't connect to the ESP32 at all, it feeds the enable line of the regulator or a power-hold circuit. Press it and the board boots. Early in your firmware you drive a spare pin high, and that pin also feeds the same enable line, usually through a diode or a resistor so the two sources don't fight each other. Now the board is holding itself on and you can let go of the button. It's not that the pin magically stays high through sleep on its own, it's that the rail stays up because the latch circuit is still fed, and the pin just keeps asserting it. The catch on the ESP32-S3 is that deep sleep resets the normal pin behavior, so you have to tell the chip to keep driving that pin while asleep. There's a hold feature for exactly this, you set the pin, call the hold function for it before entering deep sleep, and the pad keeps its level through sleep and wake. You do need to pick a pin that survives deep sleep this way, some pads can and some can't, so check the datasheet table before you wire it up.
On the battery question: the pin itself pulls basicly nothing. What drains the battery is that the whole board stays powered, so your sleep current is whatever the regulator, the e-ink controller and anything else on the rail leak. With the panel powered down and the CPU in deep sleep that's usually small enugh that a badge sat in a drawer for weeks is fine, but it's worth measuring with a meter once so you know. Your long-press idea is honestly the cleaner design though. Skip the hardware latch entirely, let the button only wake the chip from deep sleep, and handle shutdown in software. Short press wakes it, a hold of a couple seconds runs your shutdown routine, you release the pin hold and cut the rail from firmware. That also gives you a clean way to do a proper reset later, since a latched board is annoying to actually turn off when it misbehaves. I ended up doing exactly that on a similar build after fighting with a latch that would occasionally not release.
This is helpful, I'm doing something similar but with an ESP8266 and a tiny OLED instead of e-ink, and I went the software shutdown route without even knowing the latch thing existed. One thing I ran into that might bite you too: my badge lives in my pocket and the wake button kept getting pressed by accident, so it would boot up and drain itself sitting there. I ended up requiring two presses within a second to actually wake it. Crude but it works. Also still figuring out how people measure the sleep current, my cheap multimeter only goes down to milliamps and the numbers I get seem too high to trust.
Not buying the 'drawer for weeks is fine' part. I tried the same latch setup on a small wearable last year and it went flat in about four days sitting on my desk. Turned out the regulator on that board leaked way more asleep than the datasheet suggested, plus a status LED I'd forgotten was wired before the switch. So the advice to measure it once is right, but do it over a full night, not just a quick meter check right after it sleeps, because the current can settle differently once everything's quiescent. Also a rubber band in a pocket is asking for a dead battery and a scratched screen, get a proper case or a slide switch.
The one gotcha I hit with a latch like that was timing: my hold pin didn't get driven untill a fair bit into setup, because WiFi init was first, so a quick tap would die before the latch ever engaged. Now it's literally the first line in setup, before anything else, and I put a small capacitor on the enable line so it rides through button bounce and any slow boot. Also check wich way your diode points if you go the OR-ing route, I had it backwards once and the regulator refused to start at all, which took me an embarrassing evening to figure out.
Kind of glad e-ink keeps showing the last picture even when the power is fully off, so if my badge dies in my bag it still looks like a normal timetable and not a blank brick. Mine just sits there looking alive while doing nothing. So the shutdown thing in firmware sounds fine to me, worst case the screen freezes on whatever was up. Does anyone know if leaving the panel powered down for days at a time messes with the picture at all, like does it fade or get patchy until you refresh it?
Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required