auto off switch

Discussion in 'The Projects Forum' started by allnite, Sep 13, 2009.

  1. allnite

    Thread Starter New Member

    Sep 13, 2009
    3
    0
    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!
     
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    Welcome to AAC.

    Even though your topic is similar to - http://forum.allaboutcircuits.com/showthread.php?t=20584, we really insist that you always start a new thread for a different topic.

    Your microcontroller can track the time spent inactive and shut down (including power).
     
  3. allnite

    Thread Starter New Member

    Sep 13, 2009
    3
    0
    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
     
  4. KMoffett

    AAC Fanatic!

    Dec 19, 2007
    2,575
    230
    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
     
    Last edited: Sep 15, 2009
  5. allnite

    Thread Starter New Member

    Sep 13, 2009
    3
    0
    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!
     
  6. robk

    New Member

    Mar 7, 2011
    2
    0
    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
     
  7. KMoffett

    AAC Fanatic!

    Dec 19, 2007
    2,575
    230
    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: Mar 20, 2011
  8. KMoffett

    AAC Fanatic!

    Dec 19, 2007
    2,575
    230
    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
     
    Last edited: Mar 21, 2011
  9. robk

    New Member

    Mar 7, 2011
    2
    0
    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
     
  10. KMoffett

    AAC Fanatic!

    Dec 19, 2007
    2,575
    230
    Oh, and if you don't need the "push-OFF" function, delete D1, D2, R3, and R4. Saves an input. :)

    Ken
     
Loading...