Arduino Microcontroller Self Power Off




This short instructable presents a very simple way of auto powering off your microcontroller. I'm using an Arduino, but it should work for others in the very same way. I've searched myself for this for a while and found the solution in this application note: . The solution presented here is simpler than others I found, and it works for higher voltages than the 5V used out there. What you need:

  • 1x P-MOSFET - I'm using an IRF9640, although this is overkill - the board is using only 50mA incl. the display
  • 1x Small signal N-MOSFET - I'm using a BS170
  • 1x Resistor 4,7k or 10k - anything between 1k and 10k should do
  • 1x push button to power on the controller

The following figure shows the circuit:

Step 1: Build Up the Circuit

Build the circuit as shown in the diagram. It is important to use the Vin pin of the arduino as the 9V need to go through its 5V converter.

Step 2: Implement Your Code

The example shows the code required to turn D7 (any other will do as well) HIGH after powering on the Arduino. Then, after 5 seconds, D7 is set to LOW, thus powering off the device.

Replace the 5 seconds delay with your code.

I've measured ~55mA when the Arduino is on, including the display, and I could not measure any current when it was off.



    • Tape Contest

      Tape Contest
    • Trash to Treasure

      Trash to Treasure
    • Arduino Contest 2019

      Arduino Contest 2019

    3 Discussions


    2 years ago

    I think you can do this job with only one N-channel Mosfet ?! (see attached pic)


    2 years ago

    This is a very good idea. I had to do this, but I made it different, the micro-controller went in sleep mode.