Revisiting Arduino Bootloaders
A couple of years ago, I put together an Arduino / ATmega-based project that really needed to skimp on power. There wasn’t a huge amount of documentation around at the time, but after some digging I managed to get the ATmega running at 8MHz using it’s own internal oscillator. Taking it one step further, I then dropped that rate down to 1MHz by recompiling the bootloader. Tada! That project ran constantly for many months at a time on a couple of D-cell batteries.
When it came to my latest endeavour I dug out the old bootloaders. No beans. Times have moved on a little in the Arduino world and the Arduino 1.0.5 IDE wasn’t playing with my bootloaders any more. I thought I’d narrowed it to a simple tweak of the
boards.txt file, but apparently not. I’d never been completely happy that I’d not gone the distance and used Optiboot anyway, so before I knew it the source code was downloading.
The Optiboot bootloader is actually included in the Arduino IDE these days, but compiled just at 16MHz for the veteran ATmega168 / 328 chips and not actually available for use without some tinkering. So, I decided to replicate my earlier setup and create 1, 8 and 16MHz versions.