After playing with the MySensors1 framework and possible sensor types, I build a prototype of a Temperature Sensor which is battery powered. The MySensors website contains a great guide on battery powered nodes2 but I wanted to go one step further and reduce the clock of the used Arduino Pro Mini from 8Mhz to 1Mhz.
Jean-Matthieu DECHRISTÉ wrote an extensive article on this topic3, so this post only includes the basics.
While you can use a simple USB-Serial adapter to program an Arduino, you’ll need an ISP to set the fused which are relevant for the clock. If you have a spare Arduino, you can simply use the Arduino ISP sketch and use it as programmer4.
Furthermore you need to calculate the fuses for the desired settings (e.g. using Fuse Calculator5).
If you want to keep the basic settings of the Arduino to default and only set the clock to 1Mhz and disable the brownout detection, you can use the following values:
Write Fuses with AVRDUDE
Depending on the used path and COM port, you might need to modify this command which writes the three fuses to the Arduino:
Program Board in Arduino IDE
After setting the fuses, you will no longer be able to use the default boards provided by the Arduino IDE to program your Arduino. I did not find a reliable way to program a 1Mhz Arduino using the USB-Serial Adapter, therefor it’s required to add a new Board Configuration to the IDE and use the ISP for further programming.
First find the
boards.txt of your Arduino IDE installation. On windows it is placed in
C:\Program Files (x86)\Arduino\hardware\arduino\avr. Now append the following configuration and save the file:
You should now see a new entry
Arduino Pro Mini (1MHz internal, 1.8V) in your IDE.