Brewery Project With an Arduino and a Raspberry Pi
Step 1: Introduction
Hello everyone, welcome to our pico-brewery project. Through this tutorial we will explain you how to proceed to realize your installation.
So, Let's start with the presentation of our team, the team is composed of 5 members:
Alexandre Carlier : Hi, I am Alexandre and I am currently a student in the last year of a master’s degree in industrial engineering building and special technics specialization. Even though I am in building specialization, I really would like to be able to use and to program the Arduino device and the Raspberry device for home automation uses for instance.
Florent Guillaume : Hello, I am Florent, I come from the “Building & Special technics” option. I did not follow the usual path of engineer, I did a bridge year after my Home Automation bachelor. New technologies are my passion and I am a good handyman, therefore “Do it yourself” tutorials don’t scare me!
Jason Lefebure : Hello, my name is Jason I am currently a second-year master student in electromechanical engineer. I have been passionate about brewing for one year. I already made small brews of 5-6 liters but it’s very time-consuming for a small quantity. This project will give me an opportunity to develop my technical skills in electronics, brewing and communication.
Julien Nortier : Hello, my name is Julien. I am studying industrial engineering with a major specialization in Electromechanics and a minor in facilities technologies. I am really excited about creating this homemade brewery and also discovering how Arduino and Raspberry Pi are working to use them in my future house. I am very interested in new technologies that you can implement everywhere you want, using sensors and actuators. It’s the future!
Louis Dever : I am a student in industrial engineering in last year of a Electromechanics Master degree, more specifically in the mechanics specialization. One of my interests is about mechanics stuffs and understand how everything works. I will use these mechanical skills to find solutions to our installation and make it as functional as possible.
As you can imagine, we obviously love to drink beers so to have a brewery it's an old dream. When the professor asked us “what will be your project?” The design and the automation of a brewery was an fatality.
The goal of this project is to create a pico-brewery with a limited budget and this including an Arduino and a Raspberry-pie. The budget has to around 150 euros.
To achieve our goal, we worked with recovery components. Moreover, the CERISIC (Centre d’études et de recherches de la categories techniques de la HELHa), helped us providing several components. Thanks to them for the help.
We had the idea of a vertical brewery to allow making beer without a lot of space. The idea was to create a low-cost brewery but also to give the ambitious at people to make their pico-brewery.
Here is the video of our first idea but later we designed it vertically.
Step 2: Example of Beer Recipe
Here is an example of a recipe for beer, it comes from the site http://univers-biere.net
You can also go to this site to better understand the differents steps.
In this part, I'm going to explain briefly the steps necessary to the creation of a home-made white beer. The recipe is in the front picture.
This step is one of the most import in the brewing process. You have to sterilize the items to avoid a future infections of your beer.
2.The crunching of malt
You have to crunch all the malt ( 3,00 kg Pilsner +1,90 kg Wheat Malt). Use a small mill to have a good crunching. The envelope of the grain must remain whole and you don't have to make too much flour with the malt.
- First mix 0.5 kg of flakes wheat with 4 liters of boiling water and keep the boiling during 15 min
- Then add the crushed malt and the rest of the water (12,2 liters)
- Heat the water to 68.0 °C during 60 min by mixing softly
- After that, heat to 78.0 °C during 10 min to stop the enzymatic action
Now, you have to filter the wort ( this step can take time). Once all the wort is past, rince the "cereal cake" with hot water to have 26 liters of juice.
5. The boiling
- Boils the wort with hops (20,00 gm Styrian Goldings and 15,00 gm Hallertauer Hersbrucker) during 60 min
- After 60 min of boiling: add 15,00 gm Saaz, 10,00 gm Coriander Seed and 15,00 gmOrange Peel, Sweet. Keep the boiling during 10 min
6. The cooling
Cooled the wort from 100°C to 25 °C. Uses appropriate equipment because this step must be done as quickly as possible.
- Spill the wort in your fermentation barrel
- Add yeast
- Seal hermetically the barells and put the bubbler.
- Wait, Wait, Wait ( 1 week at 23 °C + 4 weeks at 16°C)
8. The bottling
- Clean your bottles
- Mix your beer with 7g of sugar per liter
- Fill the bottles
- Close them
- Leave your bottles at 25 °C during 1 week so that the yeasts can make the beer sparkling
9. The tasting
I don't think that I have to explain it.
Step 3: Hardware
1) : The bom
First of all, before to start to build your brewery, you need some components. So this is the list of all what you need to start your own brewery at home. This list is only about the installation.
- 2 empty barrels
- 2 heating resistances
- 1 fermentation barrel + 1 bubbler
- 1 filter
- 1 cooling cool
- 1 DC motor
- 1 mixer
- 2 taps
- 2 PT100 sensors
2) : Few cutting to do in both barrels.
We need to cut the top of the upper barrel. This will allow us to place the filter inside this one.
For the filter, we advised you to use a perforated stainless steel sheet. In this one, we have to make a circular cutting. The diameter of this one depend of the inside diameter of your barrel.
Then we just have to put the filter inside the upper barrel
On the top of the bottom barrel, we need to make a hole. This one will allow us to place the cooling coil inside of it.
It’s possible to build your own cooling coil by bending a copper pipe and giving him an helicoid shape.
Then we just have to put this cooling coil inside the bottom barrel
3) : Fixing of the resistances
Below both barrels, an heating resistance is fixed. This one is linked to an iron sheet with a few bolts and nuts.
Before to close this space, we need to attach 3 clips to be able to do it.
Then this assembly is linked to the bottom of the barrel with 3 bolts and nuts attached to the 3 clips installed beforehand. Furthermore, inside this space, we added some insulating materials to let the heating process be more efficient. This will help the heat to be directed to the barrel.
Now, repeat these 3 operations on the other barrel.
4) Adding of the taps and the Pt100 sensors
In this step, we will drill 2 holes in each barrel. One for the tap, the other for the Pt100 sensor. The first hole for the tap has to be lower enough to only lets flow the liquid below the filter. For the second hole, you should be thinking that the Pt100 sensor has to be immersed. We advised you to do it half of the barrel's height. Now a picture of these 4 holes done.
These 4 holes done, we have to attach the taps and the Pt100 sensors. The taps are welded to the barrels. For the Pt100 sensors we use a bolt and nut system to do it.
5) : Making of the mixer
To make this mixer, we used a steel rod and a sheet of stainless steel. In this stainless steel sheet, we cut some blades. Then the blades are welded to the steel rod. This mixer has 2 utilities: first, by turning, it allows the filtering to be faster and more efficient. Secondly, still by turning, it allows to regulate the temperature inside the barrel.
Then the mixer is linked to the DC motor. Personally, we recycled an old kitchen robot instead of buying a DC motor. So now, we have to link the kitchen robot, the mixer and the lid of the upper barrel. Once again, we did it with a few bolts and nuts
6) : Final assembly
We can now link the both barrels. To be sure that the installation is stable and non hazardous, we fixed the bottom barrel, the upper one's and the lid together with three pieces of wood. We could have used pieces of steel but once again, we recycled what we had at home. The pieces of wood are linked to the installation with a few bolts and nuts. At this time, your installation should look like this.
[Picture 14 and 15]
7) : Last details
We are almost ready to brew some beer. The last things to add to the installation are a few hoses. One between the tap of the upper barrel and the inside of the bottom one's. Another between the tap of the bottom barrel and the fermentation barrel. The two last ones will allow water to flow from a water tap of your house to the cooling coil and from the cooling coil to a discharge water system.
If you have any difficulties to realise one of this step, we encourage you to watch our video about the hardware. We hope it will help you
Step 4: Arduino
1. Which Arduino do you need to buy ?
You can buy any Arduino, the real one, or even a fake one. It doesn’t matter.
For our project, we bought an Elegoo Super Starter Kit, which is a fake Arduino.
In this kit, there are :
- a Breadboard,
- a buzzer,
- resistors (100 ohm or 220 ohm),
- a LCD Display,
- a potentiometer,
- … many other components useful for our project.
Here is the link for the kit :
For the next steps, please use the same pins like us if you want that your project works !
2. How to connect your LCD Display ?
To connect our LCD display, we followed an very good explained tutorial, here is the link :
You can only look at the diagram to know how to wire the LCD display. For the program, it’s already in our code. But if you want to do something else on your LCD display, the tutorial explains you how to do it.
3. How to connect your PT100 sensor ?
Here, you have to be very careful, because if you inject a high current in the sensor, you might burn it ! A good PT100 sensor only allows 50 mA maximum. In a PT100 sensor, usually there are 2 reds wires and 1 white wire. We only use 1 red wire and 1 white wire because the second red one is to cancel the error (wire resistance) but we didn’t think it’s was useful for our project.
You can look at the diagram to how we wire our PT100 sensor.
With your PT100 sensor, you need to find the temperature curve. You need to have an other temperature sensor, like a cooking temperature sensor to compare your values of temperature. For each temperature, write down the voltage going out the PT100 then draw the curve and find your equation. If you have an good PT100 sensor, you can find your equation in the datasheet. We think that It’s the hardest step in this Arduino part. Don’t hesitate to ask if you have any question.
Note : Others tutorials are using a 4-20 mA transmitter than you can supply with a 24V DC, it’s way easier but we couldn’t do it because we had to make the cheapest project.
4. How to connect your relays ?
Ours relays have to be commanded with 5V and they can command a 240V.
To connect our relays, we followed an other good explained tutorial, here is the link :
You can look at the diagram to know how we connect our 4 relays (2 resistors, 1 mixer, 1 electro-valve).
For our project, we always use normally open relays.
5. How to connect your buzzer ?
To connect our buzzer, we followed an other good explained tutorial, here is the link :
You can look at the diagram to know how to connect your buzzer.
6. How to connect your buttons ?
To connect ours buttons, we followed an other good explained tutorial, here is the link :
We used the analog pin because we didn't have enough room in the digital pin.
You can look at the diagram to know how to connect your buttons.
For the code, it is explained in the Raspberry Pi part.
Step 5: The Raspberry Pie
1. How to install NOOBS on the raspberry?
The first step is essential to be able to use the Raspberry, it allows to install the operating system (OS) on this one. Note that some micro SD cards are prepared with NOOBS and are for sale. In this case you can go directly to the updating step 1.2.
1.1 This first link explains how to install Noobs on your raspberry if it is not already installed.
1.2 The second link is useful to update the raspberry.
2. How to connect easily your computer to the Raspberry ?
For this we will use VNC viewer which allows to have a remote control on the raspberry from a computer or a Smartphone.
For more information please visit the following site : https://www.realvnc.com/docs/raspberry-pi.html
Once the raspberry is connected to a network, it automatically recognizes it. It should normally keep the same IP address at each boot but it may change its address. Therefore it will have to be found. I advise you to use the software "Angry IP Scanner" which will scan the network. Of course you need to connect first your computer on the same wifi.
Just scan the network and this program will find the IP address of the raspberry. Then you must repeat the VNC procedure as indicated in the previous link.
Once the raspberry is connected to a network, it automatically recognizes it. Normally it should keep the same ip address at each boot but sometimes it may change its address. Therefore we will have to found it. I advise you to install the software "Angry IP Scanner" which will scan the network. Of course, it is required to connect first the Computer on the same WIFI network.
This program will find the raspberry IP address by a ping executed to all the possibilities. Then you must repeat the VNC procedure as indicated in the previous link.
Once these steps are complete, we are connected to the raspberry!
3. Ease of use
3.1 Modify the resolution
Launch the terminal to change the resolution.
3. Type in "sudo nano /boot/config.txt" and press enter.
You will arrive in the following menu:
It is necessary to remove the "#" present at these three lines. Then press simultaneously the keys ctrl + x and it will ask you to save the file. Press the letter "y" of the keyboard to confirm.
Now you must restart the raspberry to set changes.
3.2 Switch the keyboard in azerty or qwerty
To change the keyboard in azerty or qwerty, stay in the console of Lxterminal and type the following command.
For azerty: "setxkbmap en"
For qwerty: "setxkbmap us"
4. How to run the interface?
4.1 Place the file in the right location
- Download and extract the Brewery.rar file. which is at the end of this blog.
- Transfer the Brewery file to the raspberry by using a USB key.
- Open the file explorer.
- Place the Brewery folder in the raspberry documents.
Note: You shouldn’t delete anything in this folder because otherwise the correct execution of the program will be compromised...
4.2 How to create an executable on the desktop?
To create it, open the Lxterminal and enter the following two commands:
"Cd / home / pi / Documents / Brewery"
"chmod +x Brewery.py"
Your Brewery.py file starts now with a simple double click. If you try the next window appears.
If nothing happens, you must first find the correct USB port (see step 5).
If you don’t want it appears each time you launch the brewery interface, you must go to the menu Edit è Preferences.
Then check the case “Do not ask for an option when launching an executable file”. The window should not appear anymore when you double click on the Brewery.py file.
We will finally create the link on the desktop! Select the Brewery.py file to achieve this, then click on Edit è create a link.
Select Desktop and confirm.
A shortcut has now appeared on the desktop. You can rename it as you want by doing a right click => rename.
5. Raspberry & Arduino code
5.1 Software installation.
To install the arduino software on raspberry you must first type the following commands in Lxterminal:
"sudo apt-get update && sudo apt-get install arduino"
Note: -you must have an internet connection.
-more information on the link below.
5.2 Find the USB port of the Arduino.
It is possible that the interface does not launch, that’s because the program does not recognize the Arduino on the right USB port.
To find the USB port a solution is to run the Arduino program.
You can find the USB used in tools è serial port.
NOTE : Usually, the USB port is "/dev/ttyUSB0" , "/dev/ttyACM0" or "/dev/ttyACM1".
This will have to be changed in the python code. The way to enter the script is by doing a right-click on the file Brewery.py è open with è python2.
Now you have to find the following code line:
It will be necessary to change the "/ dev // ttyUSB0" by the serial port mentioned above.
5.3 Transfer of the Arduino code
We can also transfer the Arduino code!
In the installation folder there is a file called “Project_finalL.ino”. Double click on this one to open it, and then click on Upload.
Note: don’t forget to select the serial port.
6. Run the brewery interface!
Your arduino is now ready and the interface can be used! Simply click on the shortcut on the desktop and the following menu will appear:
You will be able to read the current brewing step, the temperature and the remaining timecount if it is necessary in the step. In addition, a picture indicates the elements currently being used in red.
Note: Every time you start, remember that the IP address of the raspberry may have changed, you can fix it with the step 3 => point 2 of this tutorial.
Step 6: Conclusion
So it's done, we hope that all these tips will help you to realize your own installation at home.
If you have any questions, do not hesitate to ask us. We will be happy to answer you.
Also, it could be cool that if you publish images of your brewery once you have realized it.
A little last thing, you will find here a link to our last video that presents our entire project. At the end of this one you will find links to the different intermediates videos.
See you guys