Sunday, June 8, 2014

Cheap battery-powered micro-controller projects

Many MCU circuits use less than 25mA of power with a 3-5V supply, making battery-powered operation not only feasible, but often cheaper than using a dedicated power supply.  Although I'm using AVR MCUs, the same concepts apply to using a PIC or MSP430.  An Arduino UNO consumes > 30mA even when the MCU is in sleep mode, so powering it from a battery is not a great idea.  For an Arduino Pro Mini or bare MCU on a breadboard, long running time on a battery can be achieved.

Disposable or re-chargeable batteries?

For projects with average power consumption in the low micro-amps range, it's hard to beat the disposable CR2032 coin cells.  Sparkfun's Adventures in Low Power Land shows how how to run an ATMega328p off a single CR2032.  JeeLabs also has some info on running wireless sensor nodes on coin cells.  Quality cells such as Panasonic cost only 25c in small quantities.  Battery holders are about 10c, or wires can be soldered directly to the cells.  For wireless sensor nodes that use bursts of more than a few mA of power, a cheap electrolytic capacitor will extend battery life, particularly with lower-quality cells.

For projects that would use more than one CR2032 per year, a rechargeable LIR2032 coin cell is another option.  Although their capacity is about 1/5th of a disposable, they can sustain higher output currents than the disposable cells.  However they are much harder to find than disposable cells.  FastTech is one place I've found that sells them for about 50c ea.  Chargers are also difficult to find, though not to hard to build according to this Hack A Day post.

Powering circuits from a 9V battery has long been popular, often with a small 5V regulator such as the 78L05.  An alkaline 9V battery has a capacity of about 600mAh, but it might last not much longer than a 220mA CR2032.  Over it's usable life, the average output voltage will be close to 7.5V, which means a linear regulator will be 66% efficient, leaving about 400mAh.  Even in low-power mode, a microcontroller will use about 50% more power at 5V than it will at 3V, meaning 267mAh at 3V would give the same battery life as 400mAh at 5V.
Once the higher cost of a 9V battery is factored in (about $1.50), the 9V battery is clearly more expensive than a 3V coin cell.  However you may have a cheap source of 9V batteries - smoke detectors.  I've found my smoke detectors start beeping to replace the batteries when the open-circuit voltage is still above 8V.

I've re-used these batteries for RF transmitter projects.  The transmitter modules I use will work with 3-12V, with more voltage providing higher power transmission.  Instead of using a voltage regulator to power the AVR, I use a LED similar to what I did for my ATtiny85 NRF24l01+ project.  Instead of a red LED, I used a green LED with a forward voltage of 3V.  With the 9V battery putting out 7.9V under load, I measured 4.9V at the input of an ATtiny84a I used.  Besides being a bit cheaper than a regulator, the LED has the benefit of working as a power use indicator - when the AVR is consuming more power the LED glows brighter.

Update: David Cook has recently posted the battery life expectancy of his Attiny lofi device.  According to Energizer's Alkaline Handbook, at 25mA drain the capacity of an AA alkaline is over 2500mAh, and under 1mA drain the capacity approaches 3000mAh.  Once self-discharge of 2-3% per year is factored in, the 12-year life expectancy David calculated is about right.  With a cost of about 25c for AA cells and 20c for CR2032 cells, 12 years of use on CR2032's would cost about $2 vs. 50c for the AA cells.

A wireless sensor node using an Atmega328p with a 32.768khz watch crystal and a nrf24l01+ module could work for >12yrs with a CR2032.  The power-down current with timer2 running is 1uA, or about 9mAh per year.  The nrf module would need to be transmitting for 0.5ms to transmit 16 bytes at 250kbps, vs 53ms for an ASK/OOK module at 2400bps, and both consume 10-15mA at 3V.  Even consuming 15mA for 2ms every 5 minutes would equate to only 0.1uA average consumption.  Adding 0.25uA for self-discharge adds up to 12mAh per year, or 16 years of battery life!

1 comment:

  1. Here another project running from a CR2032: