The problem with yesterday’s setup is power consumption:
There’s no way the sketch will run for a decent amount of time on just a single AA battery.
Let’s take some measurements:
- total power consumption on a 5V supply (via the USB BUB) is 20 mA
- total power consumption on 3.3V is almost the same: 19 mA
- the battery drain on the Eneloop at 1.28V is a whopping 95 mA
(the regulator on the AA board was selected for its low idle current, not max efficiency)
That last value translates to a run time of 20 hours on a fully charged battery. Fine for a demo, but definitely not very practical if this means we must replace batteries all the time.
Let’s try to reduce the power consumption of this thing – my favourite pastime.
The first obvious step is to turn off the Graphics Board backlight – a trivial change, since it can be done under software control. With the dark-on-light version of the GLCD this is certainly feasible, since that display is still quite readable in ambient light. But the net effect with a 5V power is that we now draw 16.5 mA … not that much better!
The real power consumer is the RFM12B module, which is permanently on. Turning it off drops the power consumption to 6.0 mA (with the Graphics Board still displaying the last values). And putting the ATmega to sleep reduces this even further, down to 0.5 mA. Now we’re cookin’ – this would last some 6 months on 3 AA batteries.
Except that this variant of the “homeGraph” sketch is next to useless: it powers up, waits for a packet, updates the display, and then goes to sleep: forever… whoops!
But maybe there’s a way out – stay tuned…