0
\$\begingroup\$

I want to operate an ESP32 with a 9V battery pack. In-between there is power latching circuit which is responsible for feeding a LDO voltage regulator with power for the micro controller module (ESP32). In order to activate the power latching circuit I need a push button, which is working fine. As soon as the micro controller is active a latching pin is keeping the latching power circuit activated. To shut everything down I need the same push button to tell via a GPIO port/pin the latching pin to switch the power latching circuit off. The problem is that the push button is sending 9 Volts to the GPIO pin, which is way to much. I can't just put the push button after the LDO, since the button wouldn't be able work anymore if the LDO is switched off. Thus how to regulate the 9V to fit to the GPIO specifications? Here is an image to illustrate my problem:

esp32 with power latching circuit

\$\endgroup\$
2

1 Answer 1

0
\$\begingroup\$

Thanks to the comments I think i got pointed into the right direction. Pls correct me if I'm wrong. My solution was to create a voltage divider with the help of an additional resistor and a Zener diode, like shown in the following illustration: not working completely

new solution (with n-channel mosfet, f.e. BSS138): accordion to this one post: solution from other post

solution with mosfet

\$\endgroup\$
5
  • \$\begingroup\$ Yes, it's wrong. If the MCU 3.3V is turned off, but you have 3.3V from button on a GPIO pin of unpowered MCU, it may push power through IO protection diodes to MCU supply and it will be on. It may also damage thr MCU. \$\endgroup\$
    – Justme
    Nov 6, 2023 at 21:55
  • \$\begingroup\$ No, power ist reaching the MCU just if the button is pressed. \$\endgroup\$
    – playmobox
    Nov 7, 2023 at 10:54
  • \$\begingroup\$ OK, so in that case, the problem only happens when MCU is unpowered and you push the button. Which also means problems when turning MCU on and turning the MCU off. \$\endgroup\$
    – Justme
    Nov 7, 2023 at 11:01
  • \$\begingroup\$ The problem is, when you want to turn the circuit on, the MCU is unpowered. Then you give it 3.3V to IO pin while it is unpowered. Then power supplies turn on and MCU is powered. Same when turning the circuit off. When you push the button, there is 3.3V on IO pin. 3.3V supply turns off. Now there is stll 3.3V on IO pin because you are still pushing the button while MCU no longer has supply. \$\endgroup\$
    – Justme
    Nov 7, 2023 at 11:08
  • \$\begingroup\$ @Justme could you please confirm my new solution? \$\endgroup\$
    – playmobox
    Nov 8, 2023 at 0:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.