Power Latch Circuit Help

Thread Starter

David Schofield

Joined Sep 1, 2016
32
Hi,

I am currently designing a GPS lap timer and data logger for my Formula 2 racing sidecar. The sidecar runs a motorbike engine and electronics (Honda CBR 600 RR) and is powered by a 12V lead acid battery.

The processing is done by a 3.3v Micro controller, ESP32. I have a buck converter to reduce the incoming 12V to 5V. 5V is needed to run the GPS module and the ESP32 can take 5V as an input as there is an integrated linear regulator.

I need to control when power is turned off, as I do not want to be mid SD card write when power is lost. I have been investigating soft latching circuits but cannot find one that suits my needs. This one looks like a good start.

https://randomnerdtutorials.com/lat...auto-power-off-circuit-esp32-esp8266-arduino/

I can get a 12V feed directly from the battery, and also 12V from the kill switch. This is turned to the ON position in order to give power to everything and enable the engine to run. I need this switch to turn on my ESP32 and GPS when it is on, and I also need to be able to detect when it goes to the off position so I can stop any writes to the SD card and turn off.
 

sghioto

Joined Dec 31, 2017
3,409
You need a switch circuit connected directly to the 12 volt battery that is controlled by the kill switch and software on the ESP32.
GPIO 1 is an output that maintains power when the Kill Switch is turned OFF. This pin goes high shortly after the ESP32 powers up
This pin will remain high after the Kill Switch is turned OFF until the SD card write is complete.
GPIO 2 is an input that tells the ESP32 when the Kill Switch is ON and OFF.

1644981107672.png
 
Last edited:
Top