Fancy a brew? A proper one, that is? Ben Croston uses a Pi to control the brewing process at Fuzzy Duck Brewery.

Anyone who has ever splashed a coffee over an uncovered Raspberry Pi will be among the first to confirm that liquids and electronics don’t generally mix very well. But when it comes to the harder stuff, Ben Croston is proving the two can actually go together rather perfectly.

This article first appeared in The MagPi #66 and was written by David Crookes. Sign up to our newsletter and get a free digital copy of The MagPi every month.

See also:

Raspberry Pi AI teasmade on Channel 4 TV show

Pi Party Gallery

Brewing beer with Raspberry Pi: the Fuzzy Duck Brewery

That’s because Ben is the head brewer at the Fuzzy Duck Brewery located in Poulton-le-Fylde, Lancashire. He makes use of a Raspberry Pi controller in the brewing process and his beers have become very well known over the last few years.

One of the most popular is Irration Ale, which he concocts for various Pi bashes. Tasting of raspberries, it is so-called because pi is known as an irrational number, but it goes down even better knowing the computer is involved in its making.

It all started in late 2011 before the first Pi even rolled off the production line. Ben, who began using Red Hat Linux in 1996 before moving to Ubuntu in 2004 and then Debian in 2009, wrote what became the RPi.GPIO Python module, thinking it would become useful in the future for controlling tasks in the brewery plant.

“It was the equivalent of my GCSE IT project in 1994, which was a relay switch-box that connected to the parallel printer port of a PC,” he tells us. “The use of a Raspberry Pi in the brewery was the natural thing for me to do.” By using the RPi.GPIO module and a DS18B20 temperature sensor which is accurate to within 0.5 degrees Celsius over a range of -10° C to 85° C, Ben is able to achieve a high level of consistency in his brews.

“The choice of sensors and actuators was made more difficult due to the physical size of the plant and the fact that some parts have to be made to a food quality standard,” Ben says. Thankfully, the rest of the process was reasonably straightforward.

Quick facts about Fuzzy Duck brewery

Ben founded the Fuzzy Duck Brewery in 2006

He began creating his Pi controller in 2012

Ben also authored the RPi.GPIO Python library

Irration Ale is brewed for the Pi Birthday Bash

The name’s a pun. Do you get it?

Essentially, the sensor connects to a Raspberry Pi before being placed in the hot liquor tank. Data is then sent down the wire to a general-purpose I/O (or GPIO) pin. Since Ben’s RPi.GPIO allows you to control the pins on a Raspberry Pi using the language, it is possible to then monitor the temperature. Ben does this using special-purpose software he created himself (the bulk of which is closed-source and commercially sensitive). Should the brew get too hot or cold, the heaters can then be adjusted.

“This is crucial because the key to commercial brewing is to be able to brew exactly the same beer all the time between batches,” Ben explains. “This means being able to measure, record, and control physical attributes while the brew is taking place, and it is where automating as much as possible using a Raspberry Pi makes things a lot easier and consistent.”

In order to control the temperature, the brewery makes use of three methods – an electronic control panel, a webpage viewable on a smartphone, and a PyQt4 GUI application – all of which can be used at the same time. Fuzzy Duck also uses software running on a Pi for its invoicing and cask tracking. That software was written using Python 2.4 in 2007, well before the Pi’s birth, however.

So has the Pi saved Ben lots of money? “I don’t have a clue,” he says. “I’ve never looked at buying any commercial brewery control equipment. It is much more fun to make things yourself and it’s certainly easier to customise and maintain.”

Step-01: Heat up the water

With the Raspberry Pi set up and the sensor built into the insulated tank, the water can be heated up to the required temperature and kept under constant control.

Step-02: Mash in the beer

The mashing process begins. This combines a mix of grain with the water (or liquor as it is also known). During the heating, the enzymes in the malt break down the starch into sugars.

Step-03: Drink and relax

The malt sugar solution is boiled with hops, cooled, and yeast is added. Fermentation begins, releasing alcohol. Here, Irration Ale is produced – not too sweet or bitter and not excessively raspberry flavoured.