Brewing Controller User Interface |
I have been a “home brewer” in the electronic hobbyist sense for decades, but I am also a “home brewer” of beer. I mentioned this in my post on Reading Temperature With Thermistors.
I now use digital temperature sensors (typically the DS18B20) read over an I2C bus. Adafruit has a good tutorial on how this is done located at http://learn.adafruit.com/adafruits-raspberry-pi-lesson-11-ds18b20-temperature-sensing/overview
It is fairly common to control a refrigerator and heater to keep a constant (or slowly changing) temperature during the fermenting process, especially with lagers. I have done this using the Raspberry Pi, thermistors, and an A/D convertor. Now, I decided to get a lot more ambitious.
I won’t go into all the details of the brewing process since there are many resources on the web to provide that. For a quick look at this process, see the article on my photo blog. I wanted to be able to control at least the following items for one of the simpler methods of brewing (called partial mash.)
- Valve to a tank of propane
- Grill ignitor to light the burner
- Sensor to detect if the burner actually did light
- Temperature sensor for the wort (the brew of water, malt extract, and hops)
- Pump for circulating water through the wort chiller
What I needed to do this:
- A relay to output 12V to control the propane valve
- Another relay to output much higher amperage of 12V to run the pump
- A relay connected in place of the button on the grill ignitor
- A connection for one or more DS18B20 temperature sensors
The hardware is described below. I also wrote software for the Raspberry Pi (in C, my language of choice) to manage this hardware and the brewing logic. C# .Net provides the user interface on a Windows laptop. That is the image at the top of this post. The laptop and the Pi communicate via socket calls over wifi.
There were three major problems that had to be overcome once I started testing. One is that I tried using a DS18B20 to detect the flame. Well, the maximum for that sensor is 125°C and I did not use a high temperature version. The flame is VERY hot (duh!) and the sensor eventually melted, shorting 5V to ground and shutting down the Pi. Fortunately it was not damaged. I doubt changing to a high temperature version will help, but I will try that next. Another option is to do what every furnace, stove, and hot water heater does for its pilot light – use a thermocouple to detect the heat. I may have to investigate this to see if I can devise a simple interface for one.
The second problem was that the wiring for the ignitor kept shorting out and creating a spark too far from the flame to light it. Additional insulation and a change in how it was mounted solved this problem.
The third problem was that the EMI created by the ignitor caused massive interference on the I2C bus that made it unusable. This was corrected by re-wiring my temperature probes with well shielded cables. I used shielded audio cables commonly used for microphones. I am also a musician so I had some of this already. If you have to buy a small reel you may find that it is rather expensive. Cat-5 cable may also work well. That is what I use for my hot tub controller, but it is not subjected to the massive EMI of this system.
I disabled the flame detection logic. This is a critical safety feature and must be corrected for this system to be trusted. However, this did allow me to successfully use this system to brew.
This is a good place to state that working with flammable gas and boiling liquids can be hazardous. I take no responsibility for your use of the advice provided in this post. BE CAREFUL! And drink responsibly.
Hardware
Control of all of the above components is pretty straight-forward. Search my blog or the web and you will find how to control relays. The Adafruit link above will show you how to connect the I2C temperature sensors.
I used audio connectors since they are cheap and readily available. ¼ inch mono for the relays and stereo for the I2C bus. Using an audio connector for the I2C bus gives the added benefit of being able to use pre-made splitters and extension cables and these tend to be well shielded and relatively inexpensive.
The 5V line from the GPIO connection is only used for the I2C bus. I already required 12V (which is actually 13.8V) for the valve and pump. However, the relays I used were controlled with 5V. This voltage does not need to be accurate, so I made a simple voltage divider using three 100Ω resistors. Two 100Ω resistors are used for R1 and one 100Ω resistor is used for R2. This divides the input voltage by 3 to provide 4.6V, which is adequate to control the relays.
The final interface box looks like this. The red and black power connector you see is called an Anderson Power Pole. I chose to use this since I already have 12V supplies for my HAM radio equipment. (I think maybe I have too many hobbies.)
Modified Grill Ignitor |
The ignitor can be found in many hardware stores as a replacement for repairing gas grills. The cheaper versions of these use a spring and a piezoelectric voltage generator to create the spark. These are not suitable for this application. You must get the more expensive type that uses a battery. I removed the push button and made my own connection that runs to the relay in the interface box.
I still have a few kinks to work out in this system, but I am sure that this automation will make the process of brewing much easier and more consistent. This is definitely the most enjoyable project that I have done so far with the Raspberry Pi, and that is not just because I end up with great beer.
The system set up for brewing |
The temperature sensor is a water-proof high temperature DS18B20 covered in food grade shrink tubing. These are available at Adafruit.com
Here, the system is set up for chilling the wort.
The cooler has water and 10 pounds of ice cubes.