A study in AVR power saving techniques

amtel_avr

[Scott] found the iCufflinks from Adafruit Industries pretty interesting, but he thought that the stated run time of 24 hours was a bit short. He figured he could improve the product’s power consumption at least a little bit, to improve the overall battery life.

From their schematics, he placed an order for parts and built two identical iCufflink mock-ups side by side – one running their code and one running his. He took baseline current draw measurements, then got busy slimming down the cufflinks’ software. It had been 20 years since he touched assembly, and he has never written it for an AVR, but judging by his work he’s not rusty in the least.

He slowed the ATtiny’s clock down and tweaked a few other settings for a savings of 53μA, but the real improvements came via a fairly simple fix. The original code called for the processor to institute a counting loop to sleep, which he found to be very wasteful. Instead, he chose to put the processor in an idle state, using the chip’s watchdog timer to wake it when it was time to pulse the LED. The power savings from this change alone was a whopping 261μA!

When he was said and done, the changes save about 315μA of current draw, and should allow the cufflinks to run for up to 38 hours without swapping batteries. In [Scott’s] opinion, a nearly 60% improvement in battery life is pretty good for a day’s work, and we’re inclined to agree.

Arduino shield with offset headers

arduinoshield

Here’s another adafruit product launched today: a prototyping shield that compensates for the Arduino’s stupid oddly spaced headers.

Related: The Seeeduino has an alternate row of headers with protoboard friendly spacing.

Adjustable breadboard supply

breadboardpowersupply

adafruit industries’ latest product is an adjustable breadboard power supply kit. We’ve seen breadboard supplies before, but like most of adafruit’s kits, this is the best design you’re going to encounter. It uses an MIC2941 voltage regulator instead of the more commonplace LM317. It has a very low dropout which means your output voltage can be much closer to the input voltage. Their example is using 3AAA or a Li-Ion battery for an output of 3.3V. Input can be through a barrel jack or terminal blocks. There is a selection switch for 3.3, 5, and adjustable voltage. Using the adjustment pot you can select an output voltage anywhere from 1.3V to within .5V of the 20V maximum input. The adjusted output voltage will remain the same even if you increase the input voltage. Like all of their kits, you can find schematics, assembly and usage instructions, on their project site.

Follow

Get every new post delivered to your Inbox.

Join 93,546 other followers