Homebrew RIMS Build
Author: Mark Mabry
RIMS = Recirculating Infusion Mash System
The goal of this project is to take my brewing quality to the next level. It will do this by providing a very consistent and accurate temperature control of the "mash".
For the non-brewing audience, the mash is a step in the brewing process where all the grains (barley, wheat, etc) are steeped in a few gallons of hot water for usually over an hour. The temperature of the mash is very important, especially for the type of beer that I love brewing - lagers. They are a less-forgiving style. So I want to maintain a temperature target with a tolerance of +/-1 degree F. Hopefully better.
Components of the Recirculating Infusion Mash System:
"Mash tun" - the orange Igloo cooler is where the mash will steep in approximately 3 gallons of hot water.
Pump - Used to drive the recirculation. In the photo it is below the cooler, with white hoses connecting it to the Igloo cooler and to the heating element
Heating Tube - To the left of the Igloo cooler is a stainless steel vertical pipe, mounted to a metal angle iron. This is the heating element. The liquid flows out of the pump, up into the stainless steel tube, and out the top side into another white hose, and down into the top of the mash tun.
The heating tube is made out of several pieces which join together using tri-clamps. I purchased this set of pieces, since it was not much more expensive than buying threaded stainless steel pipe, and much easier to clean after a brew day.
Inside the Heating Tube is a heating element. It is the same as found in a hot water heater. The liquid flows over this heating element, getting warmer.
Temperature Sensor - At the top of the Heating Tube is a temperature sensor. It is a digital sensor, the Dallas 1-Wire 18B20.
Controller - The brains of the system, see below.
I'm holding the heating element, which will be inside the RIMS tube.
To control the heating element, I need something that will read the temperature sensor and adjust the heating element output.
Enter the Raspberry Pi
I chose to use an inexpensive Raspberry Pi as the brains. The Pi is connected to a prototyping breadboard where the temperature sensor, pushbuttons, LEDs, LCD panel were all connected.
Since the Controller will be dealing with a heating element that takes 120 volts at up to 15 amps, I need to handle the wiring carefully. So for this reason, and just general well managed environment, I put all the electronics in a Control box. I'll have a few pictures of the control box as it gains more and more components.
Both the heating element and the pump will plug into the control box.
Software is the key
I wrote all the software for the Mash Controller in Python. There are lots of cool software elements including the PID feedback loop calculation, control of all the external components, etc.
The LCD displays the current temp and the target temperature. It uses a classic PID function to determine the level of heat output to select. Then it sets a hardware PWM (pulse width modulator) in the Raspberry Pi to dial in the exact level of heat output.
It automatically creates a graph of the mash temperature over time, and save the data readings into a .csv file.
Dry Run / Calibrating the Controller
It was a big day to perform a dry run of the whole system. I took over the garage, using my "YouTube garage TV" as a monitor for the Raspberry PI so that I could edit the PID tuning parameters. I ended up finding some excellent online software to help with the tuning, which was super difficult to do manually.
Controller Front Panel
Final assembly of the controller box. It includes an LCD display with 3 pushbuttons (mode, and target temp up and down), and 3 power switches. The heater is wired so that the heater switch and the pump switch must both be on before the heat can run.
Initial test results look great with a +/- 0.2 deg F accuracy!!
On April 20, I brewed with it. Accuracy was very good, but I noticed what appears to be poor mixing of the return liquid into the mash tun. It was just splashing in there after dropping a foot or so. So next brew (April 20) I will add a hose to create a very gentle return path and allow the new liquid to mix on top of the grain bed first.
Graph of Mash Temp during Brew on April 20
Blue is actual temp. Yellow is the target temperature set by me.
The measurement is out the output of the RIMS heating tube. So the temperature of the grains and 3 gallons of water in the mash tun will be much more stable than this. Initially the mash tun was a little below 152, so some heat was required.
The graph shows an initial target temp of 152, at which point I turned the heater on (override switch). As you can see the temperature bounced around wildly for 5 minutes or so. This was just after I mixed the 164 degree water with the grains which were at 72 degrees. Things had not settled out. After that, the heat was applied and things stablized, mostly.
After an hour, I raised the target temperature to 168 for mash-out. It raised the temp quickly, within 7 minutes. At that point I shut off the controller and let the mash sit for the last 10 minutes at that temp.