Poor Man's BrewPi

I've recently started brewing my own ale at home, I've had some success, but this has been, somewhat, limited by the summer heat, which, whilst I love the summer, my ale suffers, and becomes too warm. With peek temperatures of 31° Celsius this year, I really struggled to keep the temperature low enough to limit harm to the fermentation process.

I needed a fridge and a controller: step up BrewPi, my only constraint was that it needed to be cheap. The following outlines some of the issues I had building my first BrewPi.

Parts list

  • Fridge - £15
    • Took a while to find the perfect fridge, but found one on Gumtree for £15.
  • Raspberry Pi Zero - £10
    • I already had a couple of Pi Zeros looking for purpose... so this was of no cost. I did have to purchase a USB OTG hub for the network connectivity and the Arduino. This cost me around £3, plus a WiFi adaptor. With my initial prototype I used an old Pi 1, model B, which saved on the hub, however, this obviously still required some form of network.
  • Arduino clone - £5.69
    • I used a clone Arduino Uno R3 MEGA328P-AU, purchased for less that £6 from ebay, inc P&P! This device featured the Chinese CH340G FTDI replacement serial converter. I've read many articles on these causing issues with drivers, however, this worked out-of-the-box.
  • DS18B20 Temperature Probe sensor - £2.69 each.
    • Many varieties exist. You can get away with one, but at least two sensors are recommended, 1 for the beer and the other for the fridge temperature. I have one for the room temperature too, although I had to repurpose this for the second beer temp since only 3 sensors are supported by the Arduino.
  • Relay boards - £2.50
    • I had already purchased a couple of these for other projects, so was able to crib from there. Total cost: ~ £35 + supplies.

Installation

The installation was simple enough: install Raspbian, then install BrewPi. I followed this forum post mostly, which gives a good overview or the process and hardware setup. I also found the BrewPi docs very helpful. It took me a little time to work out why my Arduino wasn't connecting with Brewpi since, this was the first time I've used the Arduino platform, and I was under the impression that the BrewPi would flash the device upon connection. This is not the case, for a couple of reasons:

  • The Arduino platform uses a bootloader to read the hex image over the serial link.
    • Only having worked directly with AVR devices, I was expecting BrewPi to flash a single image to the microcontroller, and wasn't aware of the bootloader. After some research I was able to identify that the platform had been factory programmed with the bootloader.
  • Since the Arduino platform I used was a cheap chinese reproduction, the vendor and device IDs were not recognised by the BrewPi scripts as a viable device.
    • The process for adding the device to the scripts is as follows:

Locate the Arduino device vendor and device IDs - VIDs and PIDs

Our device is the '1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter' in the following snippet.

pi@brewpi:~ $ lsusb
Bus 001 Device 005: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter
Bus 001 Device 004: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp. LAN9500 Ethernet 10/100 Adapter / SMSC9512/9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Add our device to the BrewPI scripts

In my case, vim is the only command line editor. I needed to add my device as an additional "Arduino Uno"

pi@brewpi:~ $ sudo -u brewpi vim /home/brewpi/autoSerial.py
known_devices = [
    {'vid': 0x2341, 'pid': 0x0010, 'name': "Arduino Mega2560"},
    {'vid': 0x2341, 'pid': 0x8036, 'name': "Arduino Leonardo"},
    {'vid': 0x2341, 'pid': 0x0036, 'name': "Arduino Leonardo Bootloader"},
    {'vid': 0x2341, 'pid': 0x0043, 'name': "Arduino Uno"},
    {'vid': 0x2341, 'pid': 0x0001, 'name': "Arduino Uno"},
    {'vid': 0x1a86, 'pid': 0x7523, 'name': "Arduino Uno"},
    {'vid': 0x2a03, 'pid': 0x0010, 'name': "Arduino Mega2560"},
    {'vid': 0x2a03, 'pid': 0x8036, 'name': "Arduino Leonardo"},
    {'vid': 0x2a03, 'pid': 0x0036, 'name': "Arduino Leonardo Bootloader"},
    {'vid': 0x2a03, 'pid': 0x0043, 'name': "Arduino Uno"},
    {'vid': 0x2a03, 'pid': 0x0001, 'name': "Arduino Uno"},
    {'vid': 0x1D50, 'pid': 0x607D, 'name': "Particle Core"},
    {'vid': 0x2B04, 'pid': 0xC006, 'name': "Particle Photon"}
]

Once this was carried out, I still needed to flash the brewPI image to Arduino, for this I needed the Uno RevC image. Once I programmed the device, I still had additional issues, the version of brewPI I installed, the latest at the time, no longer supported the revC Arduino Uno image I had installed, since BrewPi is "... running into the limits of the platform." (BrewPi)

Therefore, I needed to downgrade the version of BrewPi I had installed to a version that supported the 0.2.10 image. This was simple with the BrewPi upgrade script, run the following command and select the "Legacy version":

pi@brewpi:~ $ sudo python ~/brewpi-tools/updater.py --ask

Installing the Temperature Sensors

In my case, this was simply a case of routing the cable through the drip pipe at the bottom of the fridge; A fiddly task, but achievable. This took about an hour. I had to pass a weighted bit of string down, which I then used to pull the the cable - 6 core alarm flex, o.2mm² - through. I used these wires for the internal fan and the temperature sensors.

And that was about it. I now just needed to get a brew on.

Edits

Okay, so it was never going to end there.

Installing the heater

As the long, warm summer days started to fade, I soon realised that I needed a heater to ensure the beer remained up at the correct temperature. This was added in much the same way as the fridge, with a simple relay providing on/off control.

For the heater I used a simple 45 Watt tube heater, this was very cheap. I didn't want to drill any holes in the fridge so I managed to pull the wires through the drip pipe by taping them to the previously installed temperature sensor cable. This was very difficult, and in the end I had to remove the outer insulation and pass through the 3 mains cores. Not ideal, but I managed to clean it all up quite nicely.

Installing a Thermowell

I also needed a couple of thermowells to allow the temperature sensors to measure the actual temperature of the brew. A thermowell provides a way to get the temperature sensors right into the middle of the beer. Strapping/taping/sticking these sensors to the side of the fermentation bucket will never give an accurate reading of the brew temperature, and inserting them directly into the beer presents a host of problems.

I found it a bit of a struggle to find any reasonbly priced thermowells in the UK, at the time, the cheapest on ebay/amazon was around £40 each. After some searching I finally found brewbuilder selling them for around £14 each + shipping.

The actual installation of these was quite difficult since I had to drill a 21mm hole in the side of a plastic fermentation bucket. Definitely not as simple as it sounds; I ruined a bucket before I'd realised that I needed to use a spade drill bit - and slowly.

Links

Tags: 

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <php>, <python>, <ruby>. The supported tag styles are: <foo>, [foo].
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <img>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.
By submitting this form, you accept the Mollom privacy policy.