Batteries, howto make a board that can run a year?

Arduino boys & girls,

To put it simple, how to power the Arduino as long as possible with a battery, accu, or whatsoever as long as it’s not connected to the net supply? I already asked this in the past in this thread:

that was quite a while ago though. Didn’t had proper time to really work it out. But basically the advise was to put the board & XBee asleep as much as possible. That makes sense of course, but when we measured the board, it was still using 10 mA in sleepmodus I believe. It could be a little bit lower or higher, I don’t precisely remember anymore. But the conclusion was that the average fat 9Volt battery would only last for a week or so.

Now I’m just a programmer, so maybe you guys have some tips to either reduce the power consumption further, or extreme batteries. Space is not a problem, we can easily place 8 AA batteries inside the box if that would be needed. Or maybe chosing another Arduino board could help as well (though I’m not sure if it can interface with the XBee & sensor then).

The situation for this particular device:

  • Mobile logging device (captures temp & humid, sends it to a server). Box can be placed anywhere (which is why we can’t use netpower)
  • Battery should live for about a year if possible
  • Arduino Duemilanove
  • XBee shield on top
  • 5 Volt Humidity / Temperature sensor (interface via serialport)
  • Module should send a few packets to the server each ~10 minutes
  • If possible, it should take a few (4 to 10) samples over those 10 minutes to make an average. That means it has to wake up for a short while, but without needing the XBee.


Go down to your local breakers yard and get a car battery that will still turn an engine over. Protect it from excessive cold and don’t draw too much current from it with extras and it should last a year without charging . You’ll probably need sleep mode as well…

If possible, it should take a few (4 to 10) samples over those 10 minutes to make an average

Why not do a sample every minute and send them all to the server, you get a much more data on the server, once there is connection you better put a bit more data through.

That said, with some clever compression you can minimize data .

e.g. measurements:
T 14.6 (one measurement = start stop T + 1 float = 7 bytes)
T 14.5 14.5 14.5 14.5 14.3 14.5 14.6 14.7 14.9 14.6 (start stop T + 10 floats ~= 43 bytes) could become
T 14.5 0 0 0 -2 0 1 2 4 1 (start stop T + 1 float + 9 deltas ~=22 bytes)

in this example there is one reference temperature and the others are byte values that indicate the offset in 0.1 wrt the reference. The max temp delta that can be send is ± 12 degrees (within one minute this is quite a lot! can be worked around by defining one code as special, eg. a value > 120 means next value is a complete float again)

So with 3x as much bytes (22) one can send 10 times as much data.

BTW - you should add some monitoring of the car battery status

Well, sending more data is not a problem, and the packets are really small already. But it would also mean the XBee (this one consumes most of the power) has to wake up more often. That's basically the reason to do it that way.

A car battery... I said space is not an issue, but a car battery is pretty large though :) It's not impossible of course, but do similar devices really need that kind of batteries? You can buy plug & play temperature/humidity loggers, and they are as big as half a fist. Sure, they don't send data wireless, and their circuits are far more optimised than my hobby project. But using a car battery on the hand sounds quite drastic.

You could get a motorcycle battery instead, they are much smaller and these come in pretty high capacities as well. Don't know if you could get them up to a year, but I think with the right precautions (sleepmode etc.) you can get it to last a long time.

Hehe, I just find the idea of driving a little microcontroller with a big motor battery weird. Never heard of it (asides from the computer INSIDE an engine). Then again, I'm just a beginner ;)

Nevertheless, I just checked a little bit. Motorcycle battery dimensions are somewhere around 15 x 7 x 10 cm or something. Still pretty big. Plus they are heavy with ~3 KG or more. These loggers usually hang somewhere on a ceiling in a warehouse or (clean) production corridors. The price of them isn't that bad though... 35 to 100 dollars is ok. Uhm, if you can recharge them after a year that is, instead of throwing away. Well, that should be possible :)

But seriously, do all remote Arduino projects use car/tractor/boat battery's? Sorry if I sound silly :)


what you can do is the math for your device. If you know what it consumes per hour you can calculate the size of the battery .... Maybe one car battery is not enough ;)

Just found this: It includes a table with battery lifetimes related to Arduino & Xbee... not very hopeful. 117 hours at best. Well at least I don't have to feel I'm doing something incredibly wrong with the Arduino / XBee.

I don't have the hardware at hands now, but we could measure it again of course. We did that a year ago, and came roughly to the same conclusions as that table. Maybe a car/motor battery isn't such a weird idea after all! Or maybe the engineers shouldn't be that lazy and make sure netpower is withing reach everywhere ;)

I wonder though, a device like a thermostat can run for a long time as well. It doesn't have a XBee, but yet it should regulate all the time, power a (dimmed) LCD, switch a relays. Are they doing something completely different then?

A thermostat usually has access to a constant powersupply if it isn't a wireless solution. If you run a heating system, you're gonna need a wire to your thermostat anyways, why not get an extra wire for power as well?

Duemilanove and the ‘official’ Arduinos in general are not designed with power management in mind, so to go lower than 10-17mA may require hacking it a bit or use of a nonstandard board. The big power drains on the Duemilanove are the USB-serial converter (powered all the time, even when a USB port is nowhere near), power LED and the CPU. You kind of need the CPU :wink: but the rest can go. Attaching a real-time clock like the DS1337 will let you put the CPU to sleep (<0.5uA) between measurements and wake it back up via an alarm interrupt. Without a way to tell it to wake up again, using the sleep modes in any meaningful way is tough. If you can’t put a realtime clock / use sleep mode, if you can swap the (16? 20? MHz) crystal for a slower one, a software delay loop will use less power. IIRC you may be able to switch to the ATmega’s internal oscillator via software control, not sure about this though. Either way, for timing-sensitive things like delay() and Serial to work correctly, you will have to edit boards.txt also to tell it the new speed you are using.

It seems like all my posts lately are spamming for my low-power Arduino project :wink: but these are pretty much the things I changed to make it work. Take the Duemilanove schematic (actually the Sanguino because I wanted more I/O), rip off that inefficient linear regulator and always-on LED, tie the USB-serial chip’s power lines to the USB port rather than Vcc, and add a realtime clock. This gets it down to <1uA during sleep mode (including the realtime clock) and you can schedule the next wakeup anytime in 1-second increments.

If you can, using a “bare bones” board like the RBBB will get you most of the way there by getting rid of the USB-serial, LEDs and usually the big linear regulator. Feed it with a low-power regulator and a good-size battery (D cells, or 6V lantern battery if an automotive battery is too big), and it should go for quite a while.

Hope this helps!

Not to steer you away from Arduinos, but you can accomplish this pretty easily with TI's MSP430. I know the Xbee uses a lot of power, but an msp430 itself can run a few years years on a coin cell battery!

Those are useful tips! I'm going to sit comfortable & read through it.

As much as I would love to play around all day with boards, a little problem is that I'm doing it in the spare hours at work (I'm the only programmer here so there are always 100 things going on at the same time). So there isn't that much time to experiment. That's why we go for the Arduino: user-friendly & ready-to-go. Nevertheless, I'll read into this. Stripping the board or even using another options seems to be the only realistic solution, (If the boss still wants to go with batteries).

Thanks! Rick

If you want to go low power do not use an Arduino. Use the raw chip. Do not use a crystal, use the RC oscillator. Put down frequency to 1MHz such that you can run at low voltage. Or even go down to 128kHz watch dog oscillator. Put it to sleep as much as possible. As already suggested by others you could use an RTC for waking it up. If you do not want to push the limits though you may want to have a look at the well known nightingale example: However with an RTC and sleeping most of the time it should not be to hard to beat this.

Notice that the Nightingale Example misses the fact that the Arduino IDE can directly access an ISP --> no need for a bootloader --> no need for 16 MHz either --> everything can be done with RC oscillator this saving both components and power. If you go down to 1Mhz you can even decrease the voltage reducing current consumption further.

Jean-Claude Wippler has done a lot of work on similar systems. Dig around at

@Udo & Chaos Thank you too!

If we want to go seriously for batteries, we need to dig a little bit deeper in the bare electronics. Not sure if the boss would like that (having one or two guys assembling custom boards every time costs time & money), but that at least I have arguments and guidelines now, thanks to you guys!


I do not know what the boards will be for and which number of boards you plan. Everything of design, assembling and implementation can be outsourced. However this is not cheap either ;) But at least you can trade money for time.

Learn about sleep modes and if its only to log temperatures run the micro with the internal 8Mhz RC and with clockdiv on, the slower it is the less power it uses, dont put any unecessary always on leds and minimize resistor use.

CKDIV will only reduce total power consumption if you also lower the voltage. Otherwise you will have to stay awake longer which in turn leads to MORE power consumption. This is because you basically transport the same amount of charge per cycle. However running with CKDIV means MORE cycles for the oscillator. So if you have to lower power consumption decrease voltage as much as possible. Then setup CKDIV to still run stable at that voltage. Alternative option: run with the watchdok oscillator only @128kHz.

Anyway: have a look at the datasheet and turn off whatever you do not need (e.g. serial, A/D converter)

I did read your topic just now. But to me it don't seem to be necessary to search for extreme small power consumption. I am currently working (also in spare time) on a batterieloader for reloadbatteries, based on arduino. The purpose is to disconnect from power supply (in my case 230 ac) if the load is complete via a optocoupler. But in your case i would work with solar power (a small surface should do) and reload batterypack (4x 1.2 volt cells do very well for this purpose). How it would best work in case of solar power supply : that needs some work out, because i also had some problems with to make it all go smooth. But mainly i think a combination of the solar cell + a constant current source toward the batterypack should do. In this way it must be possible to build easily a device that works even over a year or even two and weighs less than 1 kg.

Could you hook up a rechargeable battery to a PV cell and have it trickle charged from the sun during the day? That could help get it to last a bit longer.