EXAMPLE: Arduino project that runs off of battery with minimal power consumption

Original concept came from this article.

My project can be found on Codebender.cc. If you haven't used Codebender, it is a nice site that allows you to store your projects and upload them to the arduino from a browser. Make sure you specify the correct device before uploading.

I bought on ebay 5 Pro Minis atmega328 3.3V 8M for about $8. In codebender I specified my unit as: Arduino Pro or Pro Min (3.3V, 8Mhz) w/ ATmega328

Take an ATmega328P Pro Mini Version (either 3.3V or 5V version) and use a sharp knife to cut the trace from the power LED.

Note: The author noted that after cutting the trace the 5V version actually draws less than the 3.3V version. Go figure. I only have the 3.3V versions, so I was unable to test if this was true, but I did receive the same power draw (.054mA) after cutting the trace.

N.B. - I did not remove the power regulator, so I can't personally attest to the power savings. For my needs, the power savings I achieved appear to be enough so that I didn't bother with this step.

Traces to the Power LED before cutting. Cut either trace indicated by the red arrows.

|500x421

Traces to the Power LED after cutting. I used a new box cutter blade. An exacto knife would probably work better. I've read some people have used a dremel too, but I can't see how they did it. If anyone is good with dremels and knows how this would be done, please chime in.

|500x421

Use the Rocketscream to put the unit into deep sleep. Use interrupts to wake device and perform an action and then put unit back to sleep. When sleeping, the unit draws .054mA. Not too shabby.

Sketch:

//This code is originally from https://codebender.cc/sketch:247412
//Adapted from http://www.home-automation-community.com/arduino-low-power-how-to-run-atmega328p-for-a-year-on-coin-cell-battery/
//Add to your folder LowPower.cpp and LowPower.h from https://github.com/rocketscream/Low-Power
#include "LowPower.h"

volatile boolean TriggerA = false;
volatile boolean TriggerB = false;

const byte ButtonTriggerA = 2;
const byte IntTriggerA = 0;

const byte ButtonTriggerB = 3;
const byte IntTriggerB = 1;

void setup()
{
    pinMode(ButtonTriggerA, INPUT);
    digitalWrite(ButtonTriggerA, HIGH);

    pinMode(ButtonTriggerB, INPUT_PULLUP);
    digitalWrite(ButtonTriggerB, HIGH);
}

void goToSleep()
{
    //attach interrupts to methods
    attachInterrupt(IntTriggerA, wakeUpA, LOW);
    attachInterrupt(IntTriggerB, wakeUpB, LOW);

    //next line puts Arduino to sleep
    LowPower.powerDown(SLEEP_FOREVER, ADC_OFF, BOD_OFF);
    //after interrupt fires, coode continues from here

    detachInterrupt(IntTriggerA);
    detachInterrupt(IntTriggerB);
}

void wakeUpA()
{
    TriggerA = true;
}

void wakeUpB()
{
    TriggerB = true;
}

void loop()
{
    if (TriggerA)
        DoA();

    if (TriggerB)
        DoB();

    goToSleep();
}

void DoA()
{
    //do something for A
}

void DoB()
{
    //do something for B
}

Why do you need to cut both traces to the LED? Cutting one should shut it down.

When sleeping, the unit draws .054mA.

More tricks, described here, will reduce that figure to less than 1 microampere. Leaving the regulator installed may explain some of the excess power drain.

I use a broken hacksaw blade with the end ground into a curve which ends in a chisel point on the side that had the teeth (which is hardened). This cuts a square sided slot across a trace, ensuring no remaining copper at the bottom.