Turn- off button

Discussion in 'The Projects Forum' started by andrew24, Jun 25, 2010.

  1. andrew24

    Thread Starter Active Member

    Aug 20, 2008
    76
    0
    Hello, i need a single push button to turn microcontroller- based device on and off. For example holding the button for 3 sec. turns the device on, and holding the button 3 sec again turns the device off. Any ideas how to do it?
     
  2. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    I saw a nice way to do it, but don´t have any schematic:
    p-channel mosfet switching the power to the micro, gate controlled by the micro.
    One half of the pushbutton bypasses the mosfet (or pulls the gate low), so after pushing it the micro gets power, counts 3sec and then starts holding the gate low to keep it running.
    The other half of the switch simply goes into the micro, which after pushing it starts the count down, and then makes the gate go high, thus switching off the micro.
    Depending on the type of outputs of from the micro you could need a resistor between supply voltage and gate to keep the mosfet off.

    Should have absolute zero consumption until switched on, so it is suitable for batery powered operation.
     
  3. andrew24

    Thread Starter Active Member

    Aug 20, 2008
    76
    0
    Thanks a lot! The low power consumption is actually very important in this device. Tomorrow i'll try to draw a schematic based on your explanation.
     
Loading...