SHARE

If you’ve ever wanted to learn how to hack a circuit’s firmware, a great beginning point would be SparkFun Electronics. Many of the development, prototyping, and sensor products sold by SparkFun come equipped with a special programming interface. Even better, most of these products feature downloadable firmware. Therefore, with just a modest amount of effort, you can modify one of these products’ firmware, reprogram the circuit, and create your own customized product.

You can add your name to a splash screen, develop a new product feature, or—living life on the edge—rewrite the whole shebang and make an entirely new product: the sky’s the limit when hacking firmware. There is one very important caveat, though: if you don’t know what you’re doing when tinkering with firmware, you could destroy the product.

In this introduction to firmware hacking, let’s try a simple modification. We’ll reformat the output from the USB Weather Board v1 so that it can be meaningfully displayed on a serial-enabled 20-by-4 LCD.

In its stock configuration, the output from the USB Weather Board is a continuous string of numbers, like

#47.25,081.23,026.5,079.70,101723,76$i

Not very friendly, is it? We’ll modify the firmware so that the output is easier to comprehend. Something like:

1.Humidity=47.25% 2.Temp=81.23F 3.Press=101723Pa

But wait; there’s more. We’ll also add an LCD for displaying this new output and a battery power supply, and wrap everything up in a handheld enclosure. The result is a portable, handheld personalized weather forecasting system. Or, as I’ve dubbed it: the “4Caster 1000.”

Stats

A handheld electronic device with an LCD screen.
The 4Caster 1000. Dave Prochnow
  • Time: 3 hours
  • Cost: $160.73
  • Difficulty: easy

Parts

A weather board with wires coming out of it and the AVR ICSP header and BlueSMIRF headers labeled.
The 4Caster’s USB weather board. Dave Prochnow

Instructions

1. Make the firmware accessible by soldering the 2-by-5 AVR ISCP male header to the USB Weather Board.

  • Note: Some boards might already have this header attached.

2. Solder the 6×1 header to the BlueSMiRF connector on the USB weather board.

3. Download, install, and start the free AVR Studio 4 Integrated Development Environment (IDE). The target AVR on the USB weather board is an ATmega8.

4. Download the USB weather board firmware and create a new AVR Studio 4 project for your hacked firmware. For example, call your project “4Caster” and paste the SparkFun Electronics firmware into the main 4Caster program window.

5. Modify the firmware.

A black plastic box with an LCD screen and circuit board attached.
A close-up of the 4Caster 1000. Dave Prochnow

Take your portable, handheld personalized weather forecasting system with you wherever you go. Just press the button on the outside of the project box for a quick snapshot of your current weather conditions. By monitoring these weather stats from your hacked firmware, you might be able to make a quick “guess” about upcoming weather changes.

Please note: spurious characters might sometimes appear on the LCD. For example, all “Ps” will suddenly change to “@.” Or a “0” (zero) will drop out. This distasteful effect usually disappears within one or two seconds.

A green LCD screen showing the humidity at 43.99 percent and the temperature at 79.51 degrees Fahrenheit.
The 4Caster’s display. Dave Prochnow