I came across the challenges of data packet loss and unsynchronized firmware updates while working on an OTA project where I was restricted to using a single microcontroller.

So I developed a method of receiving and storing the new firmware on a local memory device and then initiating a self-flash on the microcontroller.

To do this, I made minor modifications to an open-source repository called Miniboot, and used it as the bootloader on my Microcontroller. The Microcontroller then simply ran the bootloader (by resetting), which checked the memory device for a new firmware and flashed it's own program memory on finding one.

Over-the-Air Programming

The Setup

Using the Atmega328 with the external EEPROM

I developed this for an Atmega328 microcontroller, starting with an Arduino and then moving to a standalone Atmega chip on a breadboard.

I modified and used Miniboot, a bootloader that has the added functionality of:

  1. Reading an external I2C memory chip
  2. Finding a firmware binary on it
  3. Validating the binary
  4. And then writing the new firmware to the Atmega's program memory

To test this, I used two different Blink programs with an LED:

  1. A slow blink program that was pre-written on the Atmega
  2. And a fast blink program that I wrote to the external memory

The Atmega would run the bootloader, read the fast blink program on the external memory, and overwrite the running slow blink program.

This could later be extended to more complex programs that managed and initiated the self-flashing themselves.

A Demo

Using an External EEPROM memory chip

Get In Touch

  • Pune (MH), India