I have a button connected to the power rail of my project and I want to know when it's pressed with an ESP32 chip. Since the input voltage (6.5V to 15V) is higher than the maximum rating of the ESP32 I need to bring it down.
Like this video of a power switch circuit, I used a current limiting resistor of 10K ohm between the button and the chip, relying on the protective diodes of the GPIO pin. But when I measure the voltage it's 4.1V which is still higher then the maximum spec of the ESP32; so I'd like a safer way.
Is this circuit using a 3.3V voltage regulator appropriate? I use a 1k ohm resistor to load the voltage regulator, and 2 10uF caps as suggested in the datasheet. The low response time of the button should be fine.