Comments on: Latching Power Switch Circuit (Auto Power Off Circuit) for ESP32, ESP8266, Arduino https://randomnerdtutorials.com/latching-power-switch-circuit-auto-power-off-circuit-esp32-esp8266-arduino/ Learn ESP8266, ESP32, Arduino, and Raspberry Pi Mon, 16 Mar 2026 13:01:25 +0000 hourly 1 https://wordpress.org/?v=6.8.5 By: Sara Santos https://randomnerdtutorials.com/latching-power-switch-circuit-auto-power-off-circuit-esp32-esp8266-arduino/#comment-1169426 Mon, 16 Mar 2026 13:01:25 +0000 https://randomnerdtutorials.com/?p=73704#comment-1169426 In reply to Proteek Basu.

That’s great 🙂

]]>
By: Proteek Basu https://randomnerdtutorials.com/latching-power-switch-circuit-auto-power-off-circuit-esp32-esp8266-arduino/#comment-1165093 Sat, 28 Feb 2026 14:49:56 +0000 https://randomnerdtutorials.com/?p=73704#comment-1165093 Hi Sara and Rui,
I have used this circuit to power down a remote circuit using an ESP8266 at its core running ESP Now, I have used an SMD mosfet AO3401 and it works great. Before shutting down I have coded it to display Shutting Down… on a 0.96 inch OLED for 2 seconds and GPIO14 goes low to do the rest.
Thank You, keep doing all the good work..
Regards,
Proteek

]]>
By: Garry https://randomnerdtutorials.com/latching-power-switch-circuit-auto-power-off-circuit-esp32-esp8266-arduino/#comment-1106950 Tue, 07 Oct 2025 14:55:54 +0000 https://randomnerdtutorials.com/?p=73704#comment-1106950 In reply to Muhammad Fahad Imtiaz Chugtai.

There are several variations of microcontroller in the Espressif ESP32 family that come with a specific connector for a 3.7v Lithium Ion battery.

Any of these will work just the same with the circuit Rui has shared. The operation is just the same. This circuit is ideal for battery operation as there is no quiescent load on the battery when the circuit has powered down. There is zero drain on the battery until your switch is activated to close and latch the circuit.

]]>
By: Muhammad Fahad Imtiaz Chugtai https://randomnerdtutorials.com/latching-power-switch-circuit-auto-power-off-circuit-esp32-esp8266-arduino/#comment-1106828 Tue, 07 Oct 2025 06:28:30 +0000 https://randomnerdtutorials.com/?p=73704#comment-1106828 I wanna use 3.7 volt Li-ion battery. How can I do this?

]]>
By: Daniel Alsén https://randomnerdtutorials.com/latching-power-switch-circuit-auto-power-off-circuit-esp32-esp8266-arduino/#comment-1030092 Wed, 23 Apr 2025 15:44:33 +0000 https://randomnerdtutorials.com/?p=73704#comment-1030092 Great tutorial!

Does anyone know how to modify this to turn off the device when the button is pressed? Like a normal on/off button.

The circuit would power up the device when the button is pressed and the device is off. And power off the device safely when the button is pressed (or via code) when the device is on.

Best,
Daniel

]]>
By: Riaz Ahmed https://randomnerdtutorials.com/latching-power-switch-circuit-auto-power-off-circuit-esp32-esp8266-arduino/#comment-1013809 Thu, 06 Mar 2025 09:36:27 +0000 https://randomnerdtutorials.com/?p=73704#comment-1013809 In reply to Rui Santos.

The NDP6020P is not available. I am not much familiar with Transistors so please suggest an alternative

]]>
By: Riaz Ahmed https://randomnerdtutorials.com/latching-power-switch-circuit-auto-power-off-circuit-esp32-esp8266-arduino/#comment-1008989 Tue, 18 Feb 2025 20:47:35 +0000 https://randomnerdtutorials.com/?p=73704#comment-1008989 In reply to Sara Santos.

Hi, will the latch work with Esp32 c3?

]]>
By: George https://randomnerdtutorials.com/latching-power-switch-circuit-auto-power-off-circuit-esp32-esp8266-arduino/#comment-980019 Sat, 02 Nov 2024 20:37:14 +0000 https://randomnerdtutorials.com/?p=73704#comment-980019 In reply to shubham.

How could i modify this so that a Low signal from the GPIO keeps the power on and a high signal turns it off? Long story on why I would need that…
Thanks

]]>
By: Nick https://randomnerdtutorials.com/latching-power-switch-circuit-auto-power-off-circuit-esp32-esp8266-arduino/#comment-917837 Fri, 24 May 2024 16:19:59 +0000 https://randomnerdtutorials.com/?p=73704#comment-917837 In reply to Nick.

Ignore the above, fake mosfets from AliExpress, branded P channel where they are actually N.

]]>
By: Nick https://randomnerdtutorials.com/latching-power-switch-circuit-auto-power-off-circuit-esp32-esp8266-arduino/#comment-917814 Fri, 24 May 2024 13:53:51 +0000 https://randomnerdtutorials.com/?p=73704#comment-917814 Not sure what I am doing wrong but the mosfet is always on, won’t turn off at all. Powering the circuit with a 4.2 LiIon battery.

]]>