ELECTRONICS

ESP32 Latching Power Switch

A worked electronics example, rendered live. Open it in the AI editor and adapt it to your own case.

UPDATED 2026-08-03
EXAMPLEESP32 Latching Power Switch
Make this diagram your own.

Open it in the AI editor with a prompt pre-filled — keep what works, change what doesn't.

CASE ANALYSIS

Scenario

Designing a battery-powered IoT device that needs a push-to-on/software-off power latching circuit, so the ESP32 can self-shutdown after tasks or on low battery.

Key decisions

  • Use a high-side P-channel MOSFET to switch ESP32 power; gate pulled high by resistor to Vbat, pulled low by push button or NPN latch.
  • Add an NPN transistor with base driven by ESP32 GPIO through a resistor to hold the MOSFET gate low after turn-on.
  • Include a TC54 voltage detector on the output rail to signal battery health to an ADC pin for graceful low-battery shutdown.

When to reuse this

Battery-operated microcontroller devices requiring a physical button to power on and software to power off while monitoring battery status.

Open this example in the editor →

Tweak it with chat, export PNG/SVG, or fork it for your own use case.