# Is it possible to power AVR micro project with just one coin cell battery?

My current project setup is:

ATmega328P micro with 32 LEDS driven by 4 8-bit shift registers.

System without LEDs draws 20mA of current continuously. With all LEDs lit at the same time, it draws 85mA.

Since the whole device is tiny (SMD), I didn't want to put any large batteries like AAA. But coin cell batteries have a maximum pulse drain @ 15mA and continuous drain @ 0.19mA!? Example of CR2032

I wonder if there are any optimization techniques for circuits to get a better battery life? Or workarounds? Or coin batteries with the same specs as AAA batteries for instance?

• Why does your microcontroller draw so much power (20 mA) with the LEDs off? What is it doing? Aug 16, 2014 at 5:25
• It's clocked with 16MHz crystal, and I haven't yet played with sleeping modes of ATmega328P. So just continuously sending serial data to shift registers results in 20mA power consumption Aug 16, 2014 at 21:47

But coin cell batteries have a maximum pulse drain @ 15mA and continuous drain @ 0.19mA!? Example of CR2032

Coin cells are intended for low current, long life applications. Like keeping a RTC alive for years. Everything in a datasheet for them applies to that. The current capacity, the drain rate, the voltage, etc. A CR2032 has Typical Capacity of 240 mAh, from 3.0 to 2.0 volts, Rated at 15K ohms/0.19mA at 21°C, providing 1263 hours of life.

Change the load/current draw, and the life of the battery changes. That's all it means. At 85mA continuous, you will not get 240mAh. Notice the Pulse Drain Characteristics showing between 175 and 200mAh. Even if you did, the battery would still only last 3 hours, and be at 2V i.e. dead at that time.

And as the load increases, the battery experiences voltage droop. As noticed in the Pulse Characteristics, a 2 second drain at 100 ohm/~25mA leads to a 0.4V drop in voltage. It's internal resistance rises.

So YES, you can drive a CR2032 hard! But all of this needs to be considered for YOUR application. Is 2 hours good enough for you? Doubt it.

I wonder if there are any optimization techniques for circuits to get a better battery life? Or workarounds?

Yes, by choosing more efficient ICs. Is your ATMega code using low power modes whenever possible? Can you reduce your on time? Is it running at 16MHz (which is a problem if you are powering at <4V btw) or is it running at a lower speed like 8MHz or 4MHz? Could you run it at 1mHz without problem? That would save some power. Can you replace the shift registers with better ones with lower quiescent current draw?

Or coin batteries with the same specs as AAA batteries for instance?

Maybe, but likely really expensive. You could use a AAA form factor (10500 shape) LiPo batteries instead.

You can use the Lithium Rechargeable battery with small size, some shops offer you the small size just as tiny as possible for RC-helicopter: http://www.all-battery.com/37vli-polymerandli-ionbatterypacks.aspx

Beside of that, use the technique of programming, such as "sleep mode" for ATmega328. If you use Arduino platform, here playground.arduino.cc/Learning/arduinoSleepCode

If you use C to program: here www.gammon.com.au/forum/?id=11497

• You can also run the AVR with a lower clock.
– Mike
Aug 16, 2014 at 7:36

The continuous drain current in the data sheet you linked is not a maximum rating, it's just the typical drain for a 15 kΩ load. You can certainly draw more current than 190 µA or we wouldn't have LED Throwies. Wikipedia lists the maximum discharge current at 3 mA, but with no source. The question is how long you need your device to run. At your current current draw and your 240 mAh battery, you'll have about three hours of life if all the LEDs are on, assuming similar discharge characteristics as a 15 kΩ load (it's probably worse at your higher current draw).

If this isn't enough runtime, you have a couple of options:

1. Reduce your microcontroller current draw - 20 mA is a lot of current for that microcontroller to be drawing, the datasheet for that model specifies 200 µA in active mode (1 MHz, 1.8 V), so something is drawing a lot of extra current. Things you can do to reduce power consumption include reducing the microcontroller's clock frequency, keeping it in a sleep state whenever possible, as Phu Le points out (though you should run the clock as fast as possible if you're using sleep to minimize the time spent out of sleep states), ensuring unused pins are set to pull up or down. Atmel has a great document with a whole pile of other techniques here (that document's for the XMEGA series so not all of those will apply to your MEGA chip) You may also want to drive the microcontroller directly off the battery, if you're using a regulator. It should be feasible to get the microcontroller down well under 1 µA in a sleep state.
2. Reduce your LED current draw - the LEDs are going to be the bulk of your power consumption if your application has them on a lot. You may be able to replace them with dimmer ones, depending on your application.
3. Use a larger battery - If you can get the microcontroller current down and your application only has the LEDs active infrequently as status indicators or whatever, you may be able to get away with the button cells. You could use a couple of CR2032s in parallel since they're easy to find. Small rechargeables as Phu Le mentions also exist, but you would need a way to recharge them. If your LEDs do have to be on a lot of the time, your current draw is going to be pretty high no matter what you do and you may need to find a way of fitting a more substantial battery. CR2477's are rated for 1000 mAh and are much thicker than the CR2032, but not that much wider, with a capacity comparable to using a pair of AAA batteries (though far more expensive). If it only has to run for a day or two, it might be feasible, but longer term, you may need something even bigger.
• 32 leds plus the AVR and Shift registers draw 85mA. Remove the 20mA that the ICs consume, that's 65mA, divided by 32 that's barely 2.1mA per led if all on. I don't see somewhere to reduce that more. Aug 16, 2014 at 16:55
• Thanks for suggestions. I'll try 1MHz @ 1.8V circuit for my microcontroller. 85mA was the worst case scenario for my circuit as I found 2mA blue SMD LEDs. I noticed that they also even have 0.5mA SMD LEDs, but unfortunately not blue :( Aug 16, 2014 at 22:46

Direct qualifying answer to your question: Yes, it's possible... just not for very long.

Don't be ashamed to have more mass tied up in power supply than in active electronics. That's NOT uncommon.