Preserve battery with Sleep ?

I am working with arduino pro mini 3.3V connecting with IR temperature sensors, openlog, a few RGB LEDs and a buzzer. I followed the example on sleep function here Arduino Playground - ArduinoSleepCode and put arduino to sleep when it is inactive for 8 seconds while it will wake when a interrupt button is pressed.

I attached a Li-Po battery 110mAh to it and after a day it run out of battery.
I also found another example on battery saving at http://interface.khm.de/index.php/lab/experiments/sleep_watchdog_battery/
Will watchdog + sleep help to save more battery power ? I need to have it running without changing battery for at least 5 days.

Why wait 8 seconds? Anyway you need to measure the current consumption. It sounds like it is using a lot more than sleep current.

I did an example here:

http://www.gammon.com.au/forum/?id=11149

That used sleep plus a watchdog. Whilst asleep it used 25 uA so that should last quite a few days on a 110 mAh battery.

You will need a LOW level interrupt to wake it, as other interrupts are not processed when asleep (RISING, FALLING, CHANGE).

You may need to minimize the use of LEDs and buzzers. Also, as illustrated on the page I linked to, you can turn off internal functions like the ADC converter, to save power while asleep.

How do I measure the current consumption ??

The program is actually consist of a few steps of task to be perform.
Which also include changing of location of measurement but the between task time shouldn't exceed 8 seconds, it could be minimize to 4 or 3 seconds but it wouldn't make much difference I guess.
I am currently used HIGH interrupt as when the button is press then wake up. "attachInterrupt(1, wakeUpNow, HIGH);"
It is intended to be used like once a day so the used of LED and buzzer is only use during the performance of task so I hope to keep it the way it is.
Is the sensors other component still consuming the power even when arduino sleep?

Put your multimeter in mA mode.
Disconnect the battery + connection, connect it to red meter probe.
Connect black meter probe to Vcc pin on the promini.

So now the meter is in series between the battery+ and the arduino VCC. Turn it on. Should see a jump in current as the part wakes up and does the readings.
If it does the functions really fast you won't get a good reading - have them repeat for a second or so in that case.

Depending on how you designed it, the other parts of you circuit may (and probably will) draw current while the Arduino is sleeping. Post the shematic that we can check is it possible to minimize the power consumption.

Yeast:
I am currently used HIGH interrupt as when the button is press then wake up. "attachInterrupt(1, wakeUpNow, HIGH);"

That won't work. Only a LOW interrupt wakes the processor from sleep.

Besides which, there is no such thing as a HIGH interrupt:

http://arduino.cc/en/Reference/AttachInterrupt

Only LOW, CHANGE, RISING, FALLING.

Is the sensors other component still consuming the power even when arduino sleep?

Yes, which is why I said above:

@Nick
Thanks Nick :slight_smile:
I will try that out later on today.

@Pekkaa
I will get working on the schematic right away

Please excuse my bad drawing skill.

Don't you have current limiting resistors in the front of the RGB leds? What what are the two boxes in the top right corner? I can't read the text above them.

"soft button"

I have newer used buzzers, but shouldn't you have a resistor in the front of it also?

I am currently using the RGB from the lilypad series (http://www.sparkfun.com/products/8467).
The soft button made up of two layers of conductive fabric separated by a layer of sponge.
One side is connected to ground and input. The another is connected to VCC.
How can I make one that produce LOW when it is press to be replace with this one ??
Are the resistors necessary ??? Will it help in reducing power consumption or does it provide more stability ?

You absolutely need to add the resistors. Check the shematic from the page you linked. It shows how to wire the resistors. Without the resistors the leds draw to much current. It may damage both the Arduino and the leds. And yes, the resistors will reduce the power consumption.

Check also the buzzer's specs. It may need a resistor as well. Btw, do you know how much current the openlog in your diagram draws while idling?

How can I make one that produce LOW when it is press to be replace with this one ??

Wire the other end of the button into the GND pin. Remove the pull down resistor R from your diagram and enable the Arduino's internal pull up, http://www.arduino.cc/en/Tutorial/DigitalPins. Or if you want use an external pull up, connect it into the Arduino's Vcc pin.

And the most important thing: What is the battery's voltage? Is it 3.3V? If it is higher than that, you need to connect it into the RAW pin instead of Vcc.

Btw, the schematic on the Sparkfun's page is for 5V. You need the calculate resistor values for 3.3V yourself.

What is the battery's voltage?

It is 3.7V and I totally forget about the RAW pin - -"
And I have no idea how much openlog (http://www.sparkfun.com/products/9530) consume while idling.

Next question will be do I need a watchdog or just sleep function is enough?

And I have no idea how much openlog (SparkFun OpenLog - DEV-13712 - SparkFun Electronics) consume while idling.

Read the page you linked:

2mA idle, 6mA at maximum recording rate

You absolutely need to add the resistors

I'll take that back. I looked at the picture on the Sparfun's webpage again and noticed the leds on the pcb already seem to have the resistors in front of them. However, this leads to an other problem: If the resistors are rated for 5V, then the led's wont be very bright if you power them from 3.3V.

Yeast:
Next question will be do I need a watchdog or just sleep function is enough?

It depends what you are trying to achieve. Once asleep, either an interrupt (a LOW interrupt) or the watchdog (and various other things, read the data sheet) will wake it up.

If you just want it awake when you press the button, the interrupt will do. If you want it to take a reading every 5 minutes, you need the watchdog. If you want both, you need both.

I already changed the circuit to LOW on button press and attach interrupt as attachInterrupt(1, wakeUpNow, LOW);
And when ideal time exceed 8 seconds it called upon sleepNow() function which is almost identical to the example.
The battery still only run for a day. Did I forget something ??

void sleepNow()         
{
    set_sleep_mode(SLEEP_MODE_PWR_DOWN);   
    sleep_enable();
    attachInterrupt(1,wakeUpNow, LOW); 
    sleep_mode();      
    sleep_disable();   
    detachInterrupt(1);    
}

**I haven't check the mA yet, I need to find a multimeter first.

I think we need to see more of your code - like all of it.