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

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 :wink:

Just found this:
http://www.faludi.com/2008/01/08/projects/
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 :wink:

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: http://interface.khm.de/index.php/lab/experiments/sleep_watchdog_battery/.
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 http://jeelabs.org/

@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!

Ciao

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 :wink: 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.

Use a clip on current transformer to steal power from insulated cables in the vicinity of your logger.

So how about maybe not full custom?
Get some of these

and just populate as little as you need:
socket for atmega168PA, 8 MHz (or llower) xtal, 22 pf caps, 10uF cap.
shield connectors for the xbee & power.
Program the atmegas seperately, plug in to the board.

More power on maximizing battery also

I would omit the crystal. This gives two additional IO pins and reduces power consumption. Instead I would add some quality RTC. This would allow for superior timing. It also would allow to go for deeper sleep modes thus resulting in even less power consuption.

If exact timing is needed the AVR RC oscillator can be calibrated. Since the RTC solution provides a reasonable good reference it is possible to recalibrate anytime exact timing is needed.

Can you hack one of these to power your project?

http://www.walmart.com/ip/Alpine-Super-Bright-Solar-LED-Plastic-Lights/15994043

Why not try an Arduino Fio? I've got one that I connected the SLEEP_ON signal from the xbee to D2 on the Fio and I'm using xbee cyclic sleep mode and putting the fio to sleep waiting on a rising edge interrupt on D2 every 10 minutes. I'm still working on the software but I'm hoping to get a couple of months from a 1000mAh LiPo battery.