BrewPi with Arduino Leonardo (via OS X)

Decided that it was high time to build a BrewPi. I've been using an STC-1000 based temp controller in my ferm chamber for many years, but not being able to build profiles, or have logging, has recently just been the push I was looking for to build something new. That, and I have a ton of spare Arduinos just sitting around.

The biggest challenge though, is the creator of BrewPi decided at some point to base it on the Spark Core, instead of Arduino. The last release of the HEX files which are needed for programming an Arduino was done in April 2015 ( A 'legacy' branch of the back-end software and web UI has been maintained with Arduino compatibility.

I started out my build with a big thread over on HomeBrew Talk ( However, I didn't discover the need for using the legacy branch till much later, and had a hell of a time figuring out where the .hex files actually were. So, here's a bit of my build. I am making assumptions here, that you have raspbian installed on the pi, and you can access the terminal (SSH or via kbd/monitor, don't care).


Here's a Fritzing diagram of my circuit. I found a teeny-tiny breadboard in my parts stash, and mounted it in the middle of the Leonardo with some double-sided tape. Where possible, I prefer to build my circuits on a breadboard, as it's much easier to recover the parts for a future project.

The relay board shown is similar to what I'm using. There's a wide selection of relay boards you can pick up on Ebay, just make sure it can use 3.3v logic and has 5v Vcc for switching the relays.

Pi Software

  • On the pi, clone the brewpi-tools repo into your homedir. Run the install command : sudo ~/brewpi-tools/
  • Run the update script with the ask option : sudo ~/brewpi-tools/ --ask
  • When prompted to enter a branch, choose legacy
  • Answer no when prompted to check the firware on the Arduino
  • Arduino Software

    I'm not certain if it was due to my Leonardo being an 'off' brand, the different type of bootloader it has (vs. an Uno), the USB ports on the Pi, or what. I couldn't ever get the Arduino to flash via the web UI of BrewPi. To make matters further frustrating, there's lots of info on doing this manually when running Windows, but, the most common tool (XLoader) wouldn't communicate with my Leonardo while running in a VMWare VM. A bit of digging led me to AVR Tools : . Install this, and follow their instructions for installing the dependencies, and the first 'lesson' ( ) on the site will walk you through flashing the .hex file ( ) onto the Leonardo. After this is complete, connect the Arduino to the Pi, and as root run echo 'E\n' > /dev/ttyACM0 This will clear the EEPROM of the Arduino, without this I was unable to 'Install' devices via the BrewPi interface (check the HomeBrewTalk thread for this part, it is the same)


    I had the same problem myself, and haven't got around to fixing yet.

    Am i right in thinking your run the automated brewpi install as normal, which I assume gets you latest brewpi, then the update with --ask puts you back to the legacy version?

    I think that's how it works. If you search around about 'legacy' brewpi there's a couple other discussions I recall running across.

    Just ran back through the install (see latest blog post), and can confirm. Running through the script with --ask lets you switch back to the legacy (arduino compatible) version.

    Add new comment