LowBrau morphs into a Raspberry Pi brewbot

October 7, 2013

It’s been 4 months since I last wrote about my automated brewing project.  LowBrau was meant to be a low cost single-vessel automated step mash and boiling system.  But, although the controller box was mostly complete, I ran into problems when I fried my Arduino.  That and the hellishly cramped nature of my project box (which was designed to sit neatly under the boiling vessel) really put the brakes on mentally for me – I just wasn’t super motivated to push forward.

Although I may have been silent on this one, I have been working on the next iteration of the project for the last couple of months.  It was always my intention to not simply clone the commercially available systems, but to better them where I see a feature that is clunky or limited.  As a result this hiatus seemed like the perfect opportunity to rethink the core technologies of the project.

The biggest change is that I have now decided to ditch the Arduino and base the control box off a Raspberry Pi.  At $35 this little embedded linux computer is vastly more powerful than an Arduino, yet it really isn’t much more expensive than a name-brand Arduino.  It will allow profoundly enhanced functionality.

I also bought a far bigger project box.  Rather than living under the boiling vessel this one will be fully detachable, with all inputs and outputs connected via sockets.  It can happily live on the bench next to the brewbot.  I divided it into two physical sections with an off-cut of PVC square-section drainpipe to separate the high and low voltage components.

I’ll write a bit of commentary about each main component pictured in the photo below…

PiNT control box

As I wanted the control box fully detachable the AC power comes in and the pump and element connect via IEC sockets.  I went with snap in mountings rather than ones that require bolts/rivets, so all that was needed was an accurately sized rectangular hole to push them through.

The element and pump are switched by solid state relays.  Mine are Fotek 25DA.  I neither recommend or warn you off them – other than to say that they cost less than $4 each including postage and one of them came dead-on-arrival.  They’re mounted onto the heatsink used in the previous edition of the controller box.

Lastly in the high voltage area there’s the 5V 2A power supply module.  Everything else in the box gets powered off this 5V supply.  The RPi requires 1A, so there’s an additional 1A overhead for all the rest of the bits.

Down the left hand side is the Raspberry Pi (RPi).  The 26 pin general purpose input/output (GPIO) connector is connected to my breakout board via some grey ribbon cable.  I have thrown a very cheap $4 USB wifi (rtl8188cus chipset) on the RPi which will allow the advanced interface opportunities.

The temperature probe attaches via a 4 pin socket on the right.  The probe uses the DS18B20 chipset which is read natively by the RPi using the 1-Wire connector on the GPIO.  In linux the output of this probe appears as a text file for easy reading.  Couldn’t be simpler.

Along with wifi control, I also want to keep the option to control everything through the control box as usual.  I have selected a 20×4 LCD ($5), which provides more screen space than the Braumeister’s 16×2.  This in turn will allow me to implement a more sensible user interface that doesn’t require so many nested menus and laborious button pressing.  The LCD is a standard HD44780 chipset, however I do not connect it straight to the GPIO.  I have soldered to the back an i2c conversion board ($3) which further shrinks the number of IO lines to 2.  It also conveniently takes care of all the contrast potentiometer wiring.  Between this board and the RPi is a level shifter board ($2).  This is necessary because the RPi GPIO all works off 3.3V levels, not the 5V standard.  This board is bi-directional so it pumps 3.3V signals to 5V in one direction and 5V back down to 3.3 in the other.

On a related note, all the other outputs (SSR signals and LED indicators) are passed through a Darlington array (60c).  The 3.3V supply internal to the RPi only has a total capacity of 50mA – so even 3 LEDs would take it beyond its capacity!

The buttons are set with both pull-up resistors and current limiting resistors.  The pull-ups (10k) are required to stop the inputs from floating.  The current limiting resistors (1k) are often left out by people, but they’re a pretty good idea to do it correctly.  If your GPIO is always set up correctly as inputs then you’d never need them, but in the case that they get set erroneously as outputs they prevent them from creating a short circuit between the RPi output and ground.  I have also installed 100nF ceramic capacitors across the terminals of the buttons to hardware debounce them.  A quick circuit diagram is below.

PullUp-SwitchProtected-DebouncedAnd finally, there’s a speaker and amplifier.  One of the annoyances I find with the Braumeister is the incessant beeping that seems to accompany almost every step of the process.  Yet despite this it can also be surprisingly unapparent when everything has stopped waiting for you to press a button.  I have decided to solve these problems by replacing the buzzer in favour of voice prompts driven off the RPi audio output.  While a flashing status LED will give clear indication that a user input is needed.  The amp is a 5V D-class 3W audio amplifier ($3), which is commonly used in USB speakers and for that reason conveniently runs off my 5V supply and is plenty loud enough.