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 Wed, 23 Apr 2025 15:44:33 +0000 hourly 1 https://wordpress.org/?v=6.8.2 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.

]]>
By: Cezary https://randomnerdtutorials.com/latching-power-switch-circuit-auto-power-off-circuit-esp32-esp8266-arduino/#comment-898507 Fri, 15 Mar 2024 08:23:23 +0000 https://randomnerdtutorials.com/?p=73704#comment-898507 In reply to Cezary.

Low voltage MOSFET (Vgate-dren need to be about 6 or 8 or 12 V) solved the problem.

]]>
By: Cezary https://randomnerdtutorials.com/latching-power-switch-circuit-auto-power-off-circuit-esp32-esp8266-arduino/#comment-898109 Wed, 13 Mar 2024 09:47:55 +0000 https://randomnerdtutorials.com/?p=73704#comment-898109 The circuit is correct I used 3,3V as an input (from 3,7V battery with 3,3V step down regulator) and I get 3,3V on OUTput but when I use it for esp12 it didn’t work. When I used the battery and regulator (without this circuit) then ESP12 booted. Do you have any ideas why?

]]>
By: lpares https://randomnerdtutorials.com/latching-power-switch-circuit-auto-power-off-circuit-esp32-esp8266-arduino/#comment-858813 Wed, 06 Sep 2023 08:18:02 +0000 https://randomnerdtutorials.com/?p=73704#comment-858813 Hi!

Thanks for your great explanation!

I have tried to make this circuit in an electronics simulator, and when running it, when the switch is off, I can see there is a current of 214nA and 746.9mV going to the VIN of the MCU. So according to the simulation it looks like there’s some Amperage drain in the Mosfet. Is this normal? If so, how could we avoid that?

Thanks!

]]>
By: Minnow https://randomnerdtutorials.com/latching-power-switch-circuit-auto-power-off-circuit-esp32-esp8266-arduino/#comment-845062 Tue, 04 Jul 2023 11:18:31 +0000 https://randomnerdtutorials.com/?p=73704#comment-845062 A functional circuit for a very useful purpose.

However, upon consulting my personal inventory of random parts, the market of random part kits, and some other light research, I have to question the way the problem was approached.

Specifically the use of a P channel mosfet to bring the board’s VCC up seems to be straightforward logically but not an idea solution. Designing around a N channel mosfet to disconnect the board from ground seems like it may be more economical.

Thank you for providing a useful starting building block for me regardless.

]]>