I want to make a switch which permanently cuts a power supply to a microcontroller when the supply voltage drops below a certain level.
I am powering an ESP32 development board from two 3.7V 18650 batteries. The board has a built-in AMS1117-3.3V regulator which regulates the voltage to the MCU at 3.3V. The microcontroller basically lives in deepsleep mode and just wakes up to send a byte of information to a server (hosted by an ESP8266 board) every hour. The problem that I am having is that there is no kill switch to turn off the microcontroller when the voltage gets too low. So the microcontroller just boots and fails continuously.
I know that you can turn off the MCU by pulling the ENABLE line low, but I need a switch to pull it low and remain in that state after being "tripped".
I hope it makes sense and I am open to any design ideas or alternatives that could work.