Recently, we have expanded and upgraded the brewery for larger batches and more effecient brewing. More equipment, requires additional controls. Initially, we were looking at building a traditional controller, using PID`s and switches. This would allow us to control the pumps and heaters. This is the most traditional method for brewery controllers, and there are a lot of clever guides on how to build this, both High-End and low budget versions.
But with some creativity and skills, this can be done using a mixture of software and hardware. Just recently, i came across an application that can achieve just this: CraftBeerPi Find the guide on installation on the official GitHub page. But we will get you through the process here as well. So, what do you need? Well, lets start with what we have done, and let that be a guide.
Also, see our Automated Fermenter for controlling a refrigerator automatically.
This guide will cover;
Parts and tools
*skip to any step by clicking them
Parts and tools
1x Raspberry Pi. What model you use is not important as from the model B, they all work for this type of application. One thing to note, is that the older versions have less processor speed (700MHz) and less memory (512MB) than the newer ones. These are models A+, B, B+. From RPi version 2, we have more processing speed with quad core (900MHz) and double the memory with (1GB). What does this mean for you? Its a bit faster, you can run other processes on the RPi and more flexibility. That being said, you can also use the Raspberry Pi Zero, for a minimal build. But we recommend running Raspbian Jessie with your install, and recommend the model 2 or 3 of RPi.
1-3 XLR Panel connectors (for sensors)
1-3 XLR Connectors (for sensors)
Stainless Steel Thermowell This is the best way to get your temperature sensor inside the kettle. These come with o-rings to keep a watertight seal and is rated for this type of application. See our guide on how to build your own DS18B20 RTD Thermowell with quick connector. We do however recommend you buy DS18B20 Kits that are pre-built. There is little cost to save in building your own and you have the potential to get poor readings if not done correctly.
1x 4,7k Ohm Resistor. This will jumper between your sensor pin and your voltage pin.
1-4 SSRs (3-32VDC control) Keep in mind that you need one that is rated for what your connecting to it. A powerful heating element will draw maybe 16+ Ampere. The common ones are 40A and 25A versions. We also recommend getting a heat sink on the SSRs as this will prevent it getting hot during operations with e.g. heating elements. Please check around before purchasing SSR`s. There are a couple on the marked that simply wont work with the normal GPIO voltage. The GPIO voltage is just slightly over 3V and some SSR`s require 3.5v and more to function. We have used MAGER and FOTEK SSR`s. But there are plenty of good options.
GPIO jumper cables. This enables us to jumper from the Raspberry Pi board to our SSR`s etc..
While you dont need a screen for your setup and can access the software using any PC, cellphone etc.. Some want to have a screen attached to the controller. In that case, we recommend using the official RPi touch screen. This is easy to connect and easy to mount in a panel. It runs of the Raspberry Pi`s 5V power, so it doesnt “steal” any connectors we would otherwise need.
We are going to leave the power sockets out of this list. This is best sources from your local hardware store. Just make sure it is rated for the output you plan to put on it. A 16A socket is not rated to handle a 5500W element. Recommend getting some industrial grade sockets and connectors for the elements. For pumps and auxiliary equipment, there are some very good Neutrik PowerCon connectors. This is a great connector making connecting your equipment very effortless, but they only go up to 20A, So thats something to be aware of.
For our build, with the screen, it came to around 3500NOK or just over 300EUR. Thats not bad for a brewery controller. And you also have the option of upgrading this setup if your brewery expands.
The main software your Raspberry Pi needs to run is Raspbian. This is a version of Debian tailored for Raspberry Pi, Follow the official guide to install your operating system on your SD card.(SD cards usually dont come with the RPi and needs to be purchased seperately)
When you boot up your Raspberry Pi, you either have to navigate your way using a connected display and keyboard, or you have to access it with SSH. If you want to use SSH (remote connection) you can use software like “Putty” You first have to find out what IP address your Raspberry Pi is using. There are apps for your phone that can do this, or you can check your router for connected devices. From your terminal/putty, enter the Raspberry Pi`s IP address and port “22” Login as: pi with password: raspberry.
*note, latest distibutions of Raspbian (Debian) do not have SSH enabled from the install. This needs to be done with a screen attached to your Raspberry Pi, here is how you do it;
Enter sudo raspi-config in a terminal window
Select Interfacing Options
Navigate to and select SSH
For a complete guide on how to get started from scratch with the Raspberry Pi, follow our Getting Started – Brewing with Raspberry Pi guide
First thing you want to do before installing anything, is to expand your system to the entire SD card, otherwise you could run out of space. Here is how you do it
sudo raspi-config Choose option 1. "Expand Filesystem" Choose "Finish" and reboot
Now we can move on to setup your CraftBeerPi.
git clone https://github.com/Manuel83craftbeerpi.git
- Updating CraftBeerPi is just as easy, just navigate to the folder and run the command git pull
So now you need to figure out how you want to use your CraftBeerPi software. The easiest way is to just have the Raspberry Pi running alone inside a control box, and use the application through the web interface (http://IPADDRESS:5000) Just make sure that your phone/tablet/computer browser, is running in “incognito mode” or “Private browsing session”, otherwise, it will save information in cache, and could cause some issues later.
If you want to boot the Raspberry Pi straight into a fullscreen CraftBeerPi, and you are using the Raspberry Pi`s HDMI or like us, the 7in touch screen, the you need to configure your boot up file.
Install Chromium:using the command;
sudo apt-get install chromium-browser
If that doesnt work, please follow this guide
To configure chromium to auto start in fullscreen mode, edit the autostart file with this command;
sudo nano ~/.config/lxsession/LXDE-pi/autostart
Edit the file so it looks like this:
#@lxpanel –profile LXDE
#@pcmanfm –desktop –profile LXDE
@xset s off
@xset s noblank
@chromium-browser –noerrdialogs —kiosk http://localhost:5000 –incognito
When you reboot now, you are booting straight into the CraftBeerPi application.(The “#” in front of the first two lines will prevent the raspberry pi loading the desktop)
If you want to hide the mouse cursor when your not using it, you can add a command to remove it. First you need to install “Unclutter” by running:
sudo apt-get install unclutter
In your config, you add the command;
@unclutter -idle 0.1 -root
This removes cursor when its not in use in one second, it will be visible as long as you move it.
Raspberry Pi 2 B+
We recommend using the Raspberry Pi 2 model B and above. This has a decent specs to run applications smoothly. The application doesnt require much, and we have tried running CraftBeerPi on older Raspberry Pi`s, but its sluggish and things take more time. You should go for a 16GB Micro-SD card and have a power supply that can deliver at least 2.5A.
OPTIONAL 7inch Raspberry Pi touch screen is a nice to have, not need to have. If your not running with a display, you can find your monitor by accessing the Raspberry Pi`s IPADDRESS:5000 (e.g. http://192.168.0.20:5000) Use a laptop, phone or tablet to view your dashboard.
The touch screen will act as your control panel display. It might look complicated, but its actually very simple.
As is directly connected to the Raspberry Pi thats is running the software, its easy to use and configure. Basically, all you have to do is tell the Raspberry Pi to boot up in the application, not in the desktop. These steps are covered in the link above.
If you want to get the interface looking like a mobile interface (e.g. like on a tablet) you will have to get a keyboard connected and use the “zoom” shortcut to force the GUI to go into mobile view.
We have a few parts to get us started., now you need a box to build it all into. We have used a plastic medicine cabinet from IKEA. Plastic means its great for electrical safety, easy to cut into and is very light weight.
We cut the screen to fit in the door, and the Raspberry Pi is mounted on the back of the screen. So all you have to do, is securing the screen in the door, and this part is now complete.
SSR (Solid State Relay)
What actually makes things turn on and off is the SSR (Solid State Relay) You need to make sure its 3-32VDC Controlled and preferably of a good quality. Example:
The Raspberry pi will control this using its GPIO pins (see those pins on the picture above) When the SSR says DC 3-32V Control, it means that the small voltage the GPIO pins can apply, will be able to control the SSR (on/off). You need one SSR for each function you want to make. Pump, Heater etc.. some can also use smaller SSR`s, but you need to make sure it can handle the current draw. (e.g. 5500W heater on 230V will get you just over 24 Ampere) Make sure you calculate your own brewery consumption. A good tool to do a rough calculation can be found here
For the sensor, use a DS18B20. This works best with Raspberry Pi`s.
*Update* Recent experience recommends connecting the 3.3V and GPIO using the pull-up resistor between, but running a 5V straight to the sensor (like in the above image) This for better quality using several sensors.
Now you have to make it work inside your kettle. For this, we recommend DS18B20 Kits that are pre-built. There is little cost to save in building your own and you have the potential to get poor readings if not done correctly. If you do however want to build your own, you will need one of these; 4 Inch Stainless Steel Thermowell with 1/2″ NPT Weldless Fittings. If you want to get a proper solution for connecting the sensor to all this hardware, have a look at the RTDconnector kit. This could allow you to solder your sensor to a mini xlr connector, and it can now be disconnected if your moving the kettle for cleaning etc. For the other end of the temp sensor, just use ordinary XLR/mini XLR plugs and sockets;
*Update* If you want to build this into a thermowell for your kettle, see our thermowell guide here
Connecting it all up
(please be careful when connecting power cables!)
From our setup in the above image, we can now configure our hardware in CraftBeerPi. Example; Additional Hardware – Type: Pump – Connector: GPIO18. The pump will now switch on/off using the application.
And there it is, A low cost brewery controller. Expandable to HERMS by just adding more SSR`s and temp sensors.
The community and the creator of CraftBeerPi is constantly working on pushing new and improved features to the application! Visit www.facebook.com/craftbeerpi to follow.
If you want the “Raspberry Pi with tap handle” logo, You can download the image here.