Automated brewery


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.

 

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 DS18B20 Temperature Sensors

1-2x 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.

1x 4,7k Ohm ResistorThis will jumper between your sensor pin and your voltage pin.

2-3 SSRs (3-32V DC control) Keep in mind that you need one that is rated for what your connecting to it. A powerful heating element will draw maybe 25+ Ampere. The common ones for that application is a 40A version and a 10A version for smaller things like pumps and agitators. We also recommend getting a heat sink on the SSRs as this will prevent it getting hot during operations with e.g. heating elements

GPIO jumper cables. or a GPIO Breakout Expansion Board. This enables us to jumper from the Raspberry Pi board to our equipment.

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.

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 on it. A 16A socket is not rated to handle a 5500W element. Some have used the Neutrik PowerCon connector for their builds. This is a great connector but only goes up to 20A. So thats something to be aware of.

For our build, with the screen, it came to around 1980NOK or 198EUR. Thats not bad for a brewery controller. And you also have the option of upgrading this setup if your brewery expands.

setup1

Software

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.

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
cd craftbeerpi
sudo ./install.sh

  • 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 and edit the file so it looks like this:

#@lxpanel –profile LXDE

#@pcmanfm –desktop –profile LXDE

@xset s off

@xset -dpms

@xset s noblank

@chromium-browser –noerrdialogs –incognito –kiosk http://localhost:5000 

When you reboot now, you are booting straight into the CraftBeerPi application.

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.

Hardware

Raspberry Pi 2 B+

Pi_2_Model_B

We recommend using the Raspberry Pi 2 model B. 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 2A. This is a need to have if you are going to power the touch screen from the Raspberry Pi.

The 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.

7inTScontents

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) Tip: Enter this text in the search field of ebay;

40A SSR Solid State Relay + Heat Sink DC3-32V Control AC24-480V

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 i would just go with the large one. It can take alot of beating (480V 40A) so you cant break it with any brewing equipment.

Temperature Sensor

For the sensor, use a DS18B20. This works best with Raspberry Pi`s. But you then have to make it work inside your kettle. For this, 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;

6Pcs XLR 3 Pin Panel Mount Male Chassis Socket Connector +

3Pin Female XLR Connector For Microphone Mic Cable Cord plug Connector

Connecting it all up

(please be careful when connecting power cables!)

hardware setup

We recommend using a PiFace 2, this will make it easier to connect all the wires coming from the Raspberry Pi. Just be aware of the 3v and the GPIO4 pin you need for the temp sensor is not available on the piface. They need to be soldered on directly to the piface board like the picture below. But since we are dealing with a «one wire sensor» they can connect all your other sensors in series. A quick google search on «multiple ds18b20 sensors» will show you how this is done.

FB_IMG_1467445371379

The other option is to use a breadboard (show on the official GitHub page

From our setup in the above image, we can now configure our hardware in CraftBeerPi on GPIO17. Example; Additional Hardware – Type: Pump – Connector: GPIO17. The pump will now switch on/off using the application.

lmbcontrol

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.

 

Kommentarer

  1. […] were brewing this beer trying out the new controller we built, running CraftBeerPi. You can see from the image, that circulating has a huge impact on […]

  2. […] have previously completed our Automated Brewery, its now time to automate the fermenting process. The less things we need to worry about, the more […]