Momentary switch to turn on battery powered circuit

Thread Starter

grobliro2

Joined Mar 21, 2022
1
Background.
I have designed a ESP32S3 microcontroller based circuit (actually an ailtimeter) that is powered by a LiPo battery. The battery is connected to the ESP32S3 boards specific + and - pads, and the - pin is connected to the GND pin on the ESP32S3. The other components of the project are then powered by the 3v3 pin of the micro. All this works. To turn this circuit on/off I have a SPDT slide switch between the minus wire of the battery and the - pin of the micro. This also works with the plus wire.

Question.
I would like to replace the switch with a momentary switch. So that if the power is off I just press and release the switch/button and this powers on the circuit and leaves it powered on. Ideally I would like to be able to turn of the power in the same way. I am pretty sure Skydiving AAD's do something like this but I have not been able to find any info and AI suggestions don't seem to make sense.
 

LowQCab

Joined Nov 6, 2012
5,101
This will depend on whether or not You want to "Disconnect" the Battery from all Loads,
or, to simply disable the ESP32S3.

The ESP32S3 can probably be put into "Sleep-Mode" fairly easily,
but I personally do not know how this would be done.
.
.
.
 

crutschow

Joined Mar 14, 2008
38,401
I would like to replace the switch with a momentary switch. So that if the power is off I just press and release the switch/button and this powers on the circuit and leaves it powered on. Ideally I would like to be able to turn of the power in the same way.
Certainly that are latch circuits that can do that.
LTspice sim of example circuit below, similar to the one posted in Post #3, but uses just one BJT besides the P-MOSFET:

Below that is the circuit using one small N-MOSFET in place of the BJT (take your pick).

1731983723172.png
-------------------------------------
1731985170090.png
 
Last edited:

crutschow

Joined Mar 14, 2008
38,401
My version using the ESP programmed to latch and unlatch the Q1-Q2 combo.
Is there an advantage to including the ESP in the control loop?
I suppose you could add an automatic time-out turn-off, if desired.

What's the purpose of D1?
 
Last edited:

sghioto

Joined Dec 31, 2017
8,634
Probably not but a different configuration for a definitive action by Sw1.
D1 was used to drop the input voltage on the GPIO input pin to appx 3 volts assuming a 1C Lipo cell.
Higher battery voltage would require replacing D1 with a resistor.
 

MisterBill2

Joined Jan 23, 2018
27,312
What I see is an easy way to switch on accidentally and have a discharged battery at an inconvenient time. I also se no way to switch it off..
 

MisterBill2

Joined Jan 23, 2018
27,312
Push-on, Push off was only mentioned by the TS in post #1. AND NONE of the proposed circuits included that function.
In addition, the processor continues to consume power even when the load is switched off.
If "push-on/push-off" is the desired mode, why not simply use a button switch that provides that function, commonly called an "Alternate Action" switch. I think that both ALCO and C&K make such switches. No external logic required.
 

sghioto

Joined Dec 31, 2017
8,634
Push-on, Push off was only mentioned by the TS in post #1. AND NONE of the proposed circuits included that function.
In addition, the processor continues to consume power even when the load is switched off.
All three proposed circuits due exactly what was asked for, push-on, push-off and how does the processor continue to consume power if no voltage is applied to it?
 

MisterBill2

Joined Jan 23, 2018
27,312
Thatis true, I did not analyze the circuits for the turn-off mode. My bad. But none of those are as simple as the alternate action push button switch. WHICH IS available in the small form factor.
 

crutschow

Joined Mar 14, 2008
38,401
But none of those are as simple as the alternate action push button switch.
No, but an alternate action switch does not have a light touch to activate, it generally requires significantly more force for that.
You also have to route the power through the switch, which may be undesirable, depending upon the location of the switch relative to the circuit.
Also, the switch will not always be off when supply power is applied, if being on for that is undesirable. An electronic switch can be made to always power-up OFF.
 

MisterBill2

Joined Jan 23, 2018
27,312
I have replaced those "light touch" switches just because they switch way to easily. Light touch is probably OK for some functions, but I find it to be a major pain in most situations. Especially for an activity like skydiving, accidentally switching ones altimeter off could have serious results. It is those secondary results of what the unthinking choose that cause serious results.
 
Top