Featured image is by Projekt_Kaffeebart from Pixabay

In this post, I take a look at whether there are significant differences of power consumption between the different AVR MCUs. I will look at the nominal values and also measure the power consumption in reality.

In the previous post, I looked at how to save power for battery-based Arduino projects by different means. What I did not do was to compare the power consumption of different MCUs when being in active mode. So the question is: Can you save significant power by choosing the right MCU? The short answer is: There are no dramatic differences. The maximal factor in power consumption between different MCUs is two, and this is between the “monster” MCU ATmega1284P and a small ATtiny84A. One interesting observation is that the differences (power-wise) between ATmega328P and the ATtinys are not very big.

Let us first look at the nominal values stated in the different data sheets for three different values of supply voltages and clock frequencies. By the way, the reason I chose this particular set of AVR MCUs is that I have them in my spare part box, and they are supported by the Arduino IDE.

MCU5 V
16 MHz
mA
5 V
16 MHz
mA
3.3 V
8 MHz
mA
1.8 V
1 MHz
mA
ATtiny84A06.86.82.30.20
ATtiny8509.39.33.00.29
ATtiny861A09.49.43.10.29
ATtiny231306.76.72.30.20
ATtiny16709.39.32.90.22
ATtiny16340.00n/a2.50.18
ATmega328P09.69.63.10.24
ATmega1284P13.713.74.50.38
Nominal active supply current (mA)

When one now puts these MCUs on a breadboard together with a resonator and uploads the following sketch

void setup() { }

void loop() { }

one gets the following results.

MCU5 V
16 MHz
mA
5 V
16 MHz
mA
3.3 V
8 MHz
mA
1.8 V
1 MHz
mA
ATtiny84A10.510.53.00.71
ATtiny8511.611.64.00.84
ATtiny861A12.112.13.90.83
ATtiny231314.014.03.50.55
ATtiny16714.114.14.50.85
ATtiny16340.00n/a3.60.54
ATmega328P14.114.13.50.66
ATmega1284P16.516.55.80.88
Actual active supply current with resonator and empty setup and loop (mA)

So, do the data sheets lie? If you read them carefully, then you see that the conditions under which the measurements were made are a bit different from our setup:

All current consumption measurements are performed with all I/O pins configured as inputs and with internal pull-ups enabled. A square wave generator with rail-to-rail output is used as clock source.

All Active- and Idle current consumption measurements are done with all bits in the PRR register set and thus, the corresponding I/O modules are turned off. Also the Analog Comparator is disabled during these measurements.

ATmega48A/48PA/88A/88PA/168A/168PA/328/328PA Datasheet

It is further stated that the figures are not tested during manufacturing and that the data should be taken “as an indication of how the parts will behave.” In fact, when measuring different exemplars of the same type of MCU, you get widely differing numbers. So, I measured 14 mA up to 18 mA for different exemplars of ATmega328P. Since, moreover, in battery-operated contexts, MCUs are only switched on for very short periods of time, it is probably not very significant what the exact active supply current is and the power-down current supply is much more interesting. And here the 1634 excels and the more recent ATtinys (e.g., ATtiny3227) look very promising. However, in the end, what counts are what features you want to have, what price you are willing to pay, whether you are prepared to work with SMD parts, and, most importantly, whether the MCU is in stock.

Views: 5