If you’re an Engineering student at RMIT University, you probably have come across the OUSB Board. This board is similar to an Arduino however it has a bunch of inputs and sensors and is powered by an Atmega32A. I found this board to be a great learning experience as I’ve done various projects and it was my first dive into embedded systems.

I’m writing this tutorial for those who want to flash their OUSB Board to how they got it originally. The reason for this is because I had different firmware running for a project but now I need to interface the “ousb” executable again. This tutorial will be for Linux but the steps should be similar in Windows or MacOS as well.

Prerequisites

Assuming you’re on a Linux distribution, download and install avrdude from your package manager. If you aren’t sure what this is, you probably have to do something like:

# Fedora - Or dnfdragora for GUI
sudo dnf install avrdude

# Ubuntu - You can use synaptic (GUI front-end)
sudo apt install avrdude

# Arch Linux / Manjaro - You can use Pamac/Octopi
sudo pacman -S avrdude

You also want to download the OUSB firmware hex file from here. Simply right click on the link named open_usb_io_firmwarehex and save it, making sure to remove the .gif from the end of it and renaming it was .hex

Disclaimer

I’m not responsible for bricked boards. I’ve only tested this on one board so proceed at your own risk!

Installation

Plug your OUSB Board into your computer and make sure to enable programming mode. This is done by moving the jumper from the LED area and plugging it into the one near the potentiometer. Refer to the open-usb-io reference manual if you’re unsure.

Open up a terminal and type lsusb and see if the device is recognised:

You should get something like this (highlighted in red).

Navigate to the directory where your hex file is stored and run the following command. This command will write to the microcontroller overwriting any firmware that is stored on it with the one you just downloaded.

sudo avrdude -c USBasp -p atmega32 -U flash:w:open_usb_io_firmware.hex

You should get an output like this:

Looks good.

That’s it! Now you can remove the jumper and put it back to its original spot (normal functioning mode) run a command using the ousb binary. You may have to run it as root as it needs permission to communicate to the device.

sudo ousb io portb 255

Voila!

If it worked for you, let me know! Of course, if you’re on Windows you probably have to download avrdude and the USBasp driver separately and install them.