auto off switch

Thread Starter

allnite

Joined Sep 13, 2009
3
I also need a circuit like this. I would like for a microcontroller, (parallax propellor) to be able to turn itself off to save battery life. I would like to turn the circuit on using a momentary contact switch, then to turn off the circuit with a signal from the controller. the circuit is powered by 9v battery to 5v regulator to 3.3v regulator. controller output pins are 3.3 volts. I believe this "auto-off" ability should be a common problem, but i haven't been able to find any information on the web! any help is greatly appreciated!
 

Thread Starter

allnite

Joined Sep 13, 2009
3
Thank you, i will be sure to start a new thread next time.

I think the controller has a sleep mode, but I would like to cut power from the battery to the entire circuit so that zero power is being consumed by the circuit until the circuit is switched on again by a momentary contact switch.

I want to mimic the same functionality found in most modern portable devices:
1) push a momentary contact to boot the device
2) the device can completely power itself down after inactivity or some other event (for example, the power button is held for a few seconds). I imagine this is done with an output signal from the processor to some circuit to kill the power, but I cannot find a circuit like this on the web
 

KMoffett

Joined Dec 19, 2007
2,918
Here is a Push-ON/Push-OFF/Auto-OFF circuit I did for a PICAXE microcontroller. If you don't need the Push-OFF function delete D2/D3/R8/R9.
Pushing the button powers the μC.
The μC sets and holds pin7 high.
That turns on Q2, that turns on Q1.
Q1 maintains power after the button is released.
The program can pull pin 7 low for Auto-OFF.
The program can also monitor pin 5 for a high.
That indicates a Push-OFF request.

Ken
 

Attachments

Last edited:

Thread Starter

allnite

Joined Sep 13, 2009
3
thank you for the drawing, this looks exactly like what i need! I will try it soon and let you know how it goes, thanks again!
 

robk

Joined Mar 7, 2011
2
Hi Ken, I just came across this circuit and built it for an Arduino project I'm working on (arduino replaces the PICAXE in your diagram). One question-- I'm using a 3.3v Arduino, not a 5v source. The auto-off circuit seems to be dropping about 1v when passing to the Arduino, so when I put 3.3v through the auto-off circuit (2AAs), there's not enough power through the circuit to fully boot the Arduino. Is this because of some value in one of the resistors you spec'd because you planned on having a 4.5v input, or was the plan always to drop 1v in the circuit and deliver ~3.5v to the microprocessor with a 4.5v input?

Ideally, I'd like to be able to supply 3.3v directly to your auto-off circuit and still have close to that amount pass through (sufficient to power the Arduino and LEDs connected to it). Do you know how I might be able to modify your circuit (changing resistor values, etc.) to make that happen?

I'd greatly appreciate any assistance you could provide. Thank you!

--Rob
 

KMoffett

Joined Dec 19, 2007
2,918
The likely problem is that 3.3V between the gate and source of the P-MOSFET is not enough to turn it fully on. You would need a logic level P-MOSFET that can saturate at that voltage that. Or, switch to a PNP BJT, and add a resistor between the NPN's collector and the PNP's base for current limiting.

Ken
 
Last edited:

KMoffett

Joined Dec 19, 2007
2,918
Just tested two alternative logic level MOSFETs. NDP6020 for the P-MOSFET, and BS108G N-MOSFET in place of the 2N3904 BJT. The 100K resistor between the P0 output and Q2 can be eliminated. ON state switching had 0.01V drop with a 3.3v supply and a 100mA load...and worked down to 1.0v supply with only 0.01v drop with a 30mA load.

Ken
 

Attachments

Last edited:

robk

Joined Mar 7, 2011
2
Wow, thank you Ken! This looks great-- I really appreciate your help, all the way down to creating a new schematic! I'll definitely try this out.

Again, I really appreciate your help!

--Rob
 
Top