So, a bunch of the ATMega AVRs have the ability to work on very low voltage (down to 1.8V) and also, to require extremely low current – less than 1mA! This is 1/10th of what the typical Arduino setup uses, so, for extremely low power applications (such as a super-minimalistic solar setup), it’s worth considering.

But of course, there is a catch. Current is a function of both Vcc voltage and clock rate. The lower the active current, the slower you have to go – but as a side benefit you can also lower the voltage:

A low-voltage, low-frequency Arduino requires a special bootloader build – since the default bootloaders are made for substantially faster clock rates, and 3.3V/5V voltage.


Setting up a slowduino bootloader

Here is a precompiled bootloader for an ATMega168-based arduino, using the internal RC clock:
ATmegaBOOT_168_slowpoke_1mhz_int.zip
(Download, then unzip, which will create the ATmegaBOOT_168_slowpoke_1mhz_int.hex file)

This bootloader is derived from the “atmega” family of bootloaders (for the diecimilia in particular) but with the following differences:

  • 1MHz clock frequency
  • Internal oscillator, for a truly minimalistic design
  • A change of the brownout threshold to 1.8V (from the default 2.7V)
  • And since the internal oscillator is not as precise as an external piezo, a change of the serial baud rate to 4800 (from the default 19200)



Installing the bootloader in the Arduino development environment

The special-purpose bootloader file (the ATmegaBOOT_168_slowpoke_1mhz_int.hex file) needs to be placed together with the rest of the “atmega” family of booloaders. I am using a Mac, so for me it is:

cp -a ATmegaBOOT_168_slowpoke_1mhz_int.hex
  /Applications/Arduino/Arduino.app/Contents/Resources/Java/hardware/arduino/bootloaders/atmega


Creating a new “board”

In order for the Arduino development environment to recognize the new bootloader, the “boards.txt” file (on the Mac, /Applications/Arduino/Arduino.app/Contents/Resources/Java/hardware/arduino/boards.txt) needs to be modified. A new entry must be created for this bootloader.

slowpoke_1mhz_int.name=Slowduino 1MHz Internal RC Clock

slowpoke_1mhz_int.upload.protocol=stk500
slowpoke_1mhz_int.upload.maximum_size=14336
slowpoke_1mhz_int.upload.speed=4800

slowpoke_1mhz_int.bootloader.low_fuses=0x62
slowpoke_1mhz_int.bootloader.high_fuses=0xde
slowpoke_1mhz_int.bootloader.extended_fuses=0x00
slowpoke_1mhz_int.bootloader.path=atmega
slowpoke_1mhz_int.bootloader.file=ATmegaBOOT_168_slowpoke_1mhz_int.hex
slowpoke_1mhz_int.bootloader.unlock_bits=0x3F
slowpoke_1mhz_int.bootloader.lock_bits=0x0F

slowpoke_1mhz_int.build.mcu=atmega168
slowpoke_1mhz_int.build.f_cpu=1000000L
slowpoke_1mhz_int.build.core=arduino

##############################################################



Burning the bootloader on an ATMega168

With the assumption of availability of an Arduino of some sort that one can use as an ISP:

  • Go through the Arduino-as-ISP setup here (look at the bottom of the page, image on the left for the setup with internal clock). Don’t forget to do the necessary reset-disable dance as needed.

    This is the setup that was used to test this blog post!

  • Fire up the Arduino development environment
  • Select “Tools/Boards/Slowduino 1MHz Internal RC Clock”.
  • Select “Tools/Burn Bootloader/w/ Arduino as ISP”

And if all is well, a “Done burning bootloader” message will eventually appear. It will take some amount of time, since everything is happening at 4800 baud.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)