where : ibrtses embedded

AVR powersave implementation

A recent battery powered project required to save as much power as possible. The then used CPU was of the Mega32L type. From the datasheet 2503i-AVR-04/06, page 288, the power supply current is [mA]:

Active Vcc=3V, 1MHz, Mega32L typ 1.1 ..
Active Vcc=3V, 4MHz, Mega32L typ 3.8 max 5
Active Vcc=5V, 8MHz, Mega32 typ 12 max 15
Idle Vcc=3V, 1MHz, Mega32L typ 0.35 ..
Idle Vcc=3V, 4MHz, Mega32L typ 1.2 max 2.5
Idle Vcc=5V, 8MHz, Mega32 typ 5.5 max 8
Power down, Vcc=3V, WDT enabled typ < 0.01 max 0.02
Power down, Vcc=3V, WDT disabled typ < 0.001 max 0.01

for comparison the Tiny26, (document Rev 1477G-AVR-03/05)

Active Vcc=3V, 1MHz, Tiny26L typ 0.7 ..
Active Vcc=3V, 4MHz, Tiny26L typ 2.5 max 6
Active Vcc=5V, 8MHz, Tiny26 typ 8 max 15
Idle Vcc=3V, 1MHz, Tiny26L typ 0.18 ..
Idle Vcc=3V, 4MHz, Tiny26L typ 0.75 max 2
Idle Vcc=5V, 8MHz, Tiny26 typ 3.5 max 7
Power down, Vcc=3V, WDT enabled typ 7.7uA max 15uA
Power down, Vcc=3V, WDT disabled typ 0.3uA max 3uA


for comparison the Mega324P, (document Rev 8011E-AVR-04/07)

Active Vcc=2V, 1MHz, Mega324P typ 0.5 max 0.5
Active Vcc=3V, 4MHz, Mega324P typ 2.5 max 2.7
Active Vcc=5V, 8MHz, Mega324P typ 8.7 max 9
Idle Vcc=2V, 1MHz, Mega324P typ 0.1 max 0.15
Idle Vcc=3V, 4MHz, Mega324P typ 0.6 max 0.7
Idle Vcc=5V, 8MHz, Mega324P typ 2.5 max 4
Power save 32kHz, Vcc=1.8V typ 0.5uA
Power save 32kHz, Vcc=3V typ 0.6uA
Power down, Vcc=3V, WDT enabled typ 4.3uA max 8uA
Power down, Vcc=3V, WDT disabled typ 0.2uA max 2uA


for comparison the Mega64, (document Rev 2490K-AVR-04/06)

Active Vcc=3V, 1MHz, Mega64L max 5
Active Vcc=5V, 8MHz, Mega64 max 20
Idle Vcc=3V, 4MHz, Mega64L max 2
Idle Vcc=5V, 8MHz, Mega64 max 12
Power down, Vcc=3V, WDT enabled typ 10uA max 20uA
Power down, Vcc=3V, WDT disabled typ 4uA max 10uA

The list of requirement could include : The battery life depends on the current consumption as

battery type lifetime @ 100uA lifetime @ 1mA lifetime @ 10mA
Lithium Vanadiumpentoxyd
30mAh
2% p.a.
300h or
12.5 days
N/A - exceeds spec N/A - exceeds spec
Lithium CR2032
225mAh
shelf life 5 years
2250h or
93 days or
3 months
225h or
9 days
22h or
1 day
LiPolymer 500mAh 5000h or
208 days or
7 months
500h or
21 days
50h or
2 days
LiPolymer 3Ah 30000h or
1250 days or
3.4 years
3000h or
125 days or
4 months
300h or
12.5 days
Note, that the self depletion of the battery is not included in the numbers.

The following measures are applied to save current.

The powerdown dream

The powerdown state is the one taking the least power. It however is rather difficult to fully exploit. The cpu taking a mere 10uA, a single 300kOhm pullup somewhere on the pcb already doubles this current. Further is the wakeup not really immediate. The oscillator takes its time to stable oscillation. Either 4ms or 65ms depending on some bits in the clock source select. For a system that has to do very little every few minutes/hours/days, an external RTC with alarm output to be connected to the external interrupt of the controller together with the power down mode would be that way to go. Some RTCs

RTC RAM interface supply case additional
DS1302 31 bytes 3-wire 2.0 to 5.5V
300nA @2V
DIP8, SO8
DS1305 96 bytes 3-wire 2.0 to 5.5V
300nA @2V
DIP16, TSSOP20 dual interrupt on time match, programmable trickle charge battery
DS1306 96 bytes SPI & 3-wire 2.0 to 5.5V
400nA @2V
DIP16, TSSOP20 1Hz & 32768Hz output, dual interrupt on time match, programmable trickle charge battery
DS1307 56 bytes I^2C 2.0 to 5.5V
500nA @2V
DIP8, SO8 programmable squarewave 1Hz, 4k, 8k & 32kHz out
DS1337 7 bytes I^2C 1.8 to 5.5V
425nA @ < 1.8V
DIP8, SO8 programmable squarewave 1Hz, 4k, 8k & 32kHz out, 2 programmable Alarms
DS12887 114 bytes parallel muxed bus 4.5 to 5.5V
battery included
10 years lifetime
DIP24 programmable squarewave 2Hz to 8kHz out, interrupt on time match

The power save mode

This is an easily doable solution when at design time, the 32kHz Quarz is planned to be on the timerpins. Timer2 running on this 32kHz can be used to wake up periodically. When the prescaler is set to 1:1024 and the 8 bit Timer2 is naturally overflowing every 256 cycles, then the wakeup is every 8 seconds.

The extended standby mode

Identical to the power save mode, here the oscillator keeps running and a wake takes just 6 clock cycles.

Further

Creating a low power project involves considerations on many parts, the controller just being one of them. Just adding low power in the final phase of the project is too late. Yes, some power consumption measurements are missing yet.

Outlook

The new picopower models running from just 1.8V allow to lower the supply while sleeping.



Questions ?
Suggestions?
Feedback ?








sponsored links




AVR
embedded
home



last updated : 9.dec.06, or perhaps later



Copyright (99,2006) Ing.Büro R.Tschaggelar