Arduino Controlled Brewing
Arduino Controlled Brewing
Abstract-This paper details experiences in making an au While we desire to minimize time, this is not as important as
tomated brewing system. Specifically, it focusses on the initial other factors like making sure that the sugars are not scorched.
brewing stage of mashing grains to achieve saccharification of
We want the system to raise the temperature of a water and
the starches by enzymes, How can we build a system to aid
brewing, specifically to control the saccharification stage? This
grist mixture, hold it for a specified time, then raise the
paper provides background on temperatures used in the beer temperature to a new value. Since the desired temperatures are
brewing process, then introduces a low-cost control architecture higher than the ambient temperature, we will include heating
for automatically raising and holding temperatures, based on the elements only. We do not have to add to the complexity and
Arduino. This system has been used over 50 times for a variety
expense by adding cooling equipment.
of beers.
The next section provides background on the brewing pro
Index Terms-Bioengineering, automatic temperature control,
Arduino, Brewing. cess. Section 3 discusses the control architecture, while section
4 examines some of the results. Finally, section 5 presents
conclusions.
I. INTRODUCTION
Beer is made with malted barley, hops, water, and yeast. II. BACKGROUND
Some styles use additional ingredients, like oats, rye, and A. Enzyme Activity
wheat. The beer making process has several steps: mashing Mashing holds the water and grains at specific temperatures
and sparging the grains, boiling, fermenting, packaging, and to allow different enzymes to work. At 113-122°F, some en
aging. Mashing refers to the saccharification stage. Enzyme zymes create yeast nutrients from nitrogen-based proteins [2],
activity depends on temperature, so automatic temperature while a rest at 122-140°F helps clarity [2]. In particular,
control is very important to this process. Sparging means alpha-amylase (best at 149-153°F) and beta-amylase (best at
using additional water to maximize the sugar collected from 126-144°F) break down starch into sugars in complementary
the grains. The sweet liquid, called wort, is then boiled with ways [2]. Thus, a common temperature range for mashing is
hops. Once cool, the brewer adds a yeast culture to start 150 to 158°F. Temperatures on the low end aid fermentability,
fermentation. After this step, which can last from several days and those on the high end contribute to the body. See Figure 1
to several weeks, the beer is packaged in bottles or kegs, then for a chart illustrating some of the important temperature
aged typically for a couple of weeks. Of these steps, mashing is ranges.
perhaps the most difficult. It requires at least an hour of active Why not mash at one temperature? Then the process will
participation on the brewer's part, where he/she must monitor be much simpler, since a calculated amount of water can be
temperatures and make adjustments as needed. Commercial heated, mixed with grains, and kept in an insulated container.
breweries automate this process, as a result. However, there is The heat loss over the span of an hour is small enough to not
a thriving hobbyistlhomebrewing community that can benefit be a problem, and many brewers use this technique, called a
from a low-cost temperature control system, and this is the single infusion mash. However, it limits what we can do. For
intended audience. example, a recipe with oats, corn or similar grains benefits
The Arduino is the open-source hardware platform contain from a protein rest at 122°F before the main mash.
ing a micro-controller along with digital and analog inputs and Typically, the mash takes an hour. We can use a simple
outputs [1]. It can be programmed with a language similar iodine test to check for saccharification completion. That is,
to C. It was designed to be easy to use, inexpensive, and we remove a small amount of liquid from the mash and add
extensible. The temperature control system described here-in a couple drops of iodine. The starches in the grains would
uses the Arduino to monitor and control heating. normally turn a purple-black color, but once the starches have
This paper is concerned with the first step of the brewing converted to sugars, the color appears brown instead. Since
process, saccharification, where the starches in malted barley iodine is a poison, we dispose of the sample after the test.
are converted to sugars. The problem statement: how can we
build a system to aid brewing, specifically to control the B. Temperature Control
saccharification stage? This problem becomes one of heat How do we control the temperature? A traditional solution
control, and important factors include minimizing expense. is step mashing, where calculated amounts of boiling water
Degrees Celsius -
HLT
t
Degrees Fahrenheil
Fig. I. Several temperature ranges important for mashing. During the brewing
process, the mixture of grains and water is heated and held at different
temperatures, shown in blue. Not only do the temperatures increase from
left to right, one can view this chart as steps in the process over time, again
increasing from left to right. We start with the grains at room temperature,
add water, heat to the protein rest stage (if desired), then heat to one or more
stages within the saccharification range. burner
bottom or filter used in the mash-tun to prevent grains from this work as more than lOoF, then the heat will be on or off,
flowing out, the stainless steel tubing for the heat exchanger, as needed. Smaller differences mean that the system cycles
etc. Most brewers already have these items. the burner on and off, where the heat has time to dissipate,
Heating control involves a way to introduce heat, such as a resulting in a gradual increase and a low amount of over-shoot.
burner under the mash-tun, or a heat exchanger, where a burner Proportional, integral, derivative control means that the
is under the hot liquor tank. (Also, another type of heating system uses several pieces of information. The integral amount
element would work in place of a burner.) There should be refers to the sum of the differences. A net positive amount
a way to distribute the heat, through agitation/stirring, and/or means that it is too hot, while a net negative amount means
pumping the liquid. A pump could be run continuously, to mix that it is not hot enough. Therefore, this amount can be used to
the liquid from the bottom with that of the top. Or a pump adjust the heating by lengthening either the on cycle or the off
could be used with a heat exchanger, where running the pump cycle. For the derivative, we can use the history of differences,
means that the liquid returns to the mash-tun slightly hotter such as difference for measurement n and the difference for
than when it left. Having a burner under the mash-tun provides measurement n -1. Better yet, we can compare the differences
a quick way to introduce heat, though it is prone to over for samples n and, say, n 10 to give us a slightly more
-
shoot. Some form of mixing should be done: stirring, pumping stable view. This term tells us about how the system responds;
or both. Figure 4 shows how the set-up with direct heat values small in magnitude imply that the system changes the
would work. The Arduino reads the mash-tun's temperature, temperature slowly. Also, this term gives us a sense of whether
and controls the burner. The Arduino programming software the system is closing in on the correct temperature. Weights
provides a serial monitor, with a two-way serial connection for the proportional, integral, and derivative values allow the
with the Arduino. A simple way to get the temperature data system to be "tuned" to give the response that we desire.
is to select all the output, and copy and paste it to a text file.
The laptop on the left of Figure 4 is not really necessary,
however it allows the brewer to change the target temperatures
and durations, monitor the temperature and system state, and
override the computer control. For example, if the pump
becomes clogged, the brewer can turn it off. Alternately, a
[
lower-cost machine can be used in place of the laptop, such
as a Chromebook. Figure 5 shows how the Arduino can be
used to control recirculation through a HLT. Laplop
OFF i!ow
ON
-
-- l threshold
burner
the result. This idea comes from an early study on ship This system has been used approximately 50 times, and it
steering [5]. While this sounds much like the on/off control, it has evolved during this time. At first, it simply provided a way
allows us to handle the heating differently depending on how to record the mash temperatures. Manual controls were added,
big the difference is. If the difference is large, defined for then computer control. As the system went from a direct-heat
+-IEEE Proceedings of the IEEE SoutheastCon 2015, April 9 - 12, 2015 - Fort Lauderdale, Florida
OFF ON
and on, respectively, except that these states are reached only
through user control. They expire after a set amount of time.
States -3 and 3 represent off and on, and that the difference
between the measured and target temperature is large enough
that the system will not change it until it becomes smaller.
Below are several figures that include the observed signals.
Figure 6 shows the on/off temperature control. The diagram
for proportional temperature control appears in Figure 7.
Notice how it is based on the simpler on/off control, and
essentially adds states -3 and 3 to deal with large differences
between the set temperature and the measured temperature.
Next, Figure 8 provides a diagram of PID temperature control.
Figure 9 shows an example plot of proportional, integral, and
derivative (PID) feedback signals for a protein rest. Figure 10
shows a plot of PID signals for an example mash. The step
uw,,,",,"w th"t,,eto 'h, , �hown in the top graph at minute 6 indicates that the desired
g
to 2 o>-lfmm "y oth",,,,,.
temperature changed as one stage ends and the next begins.
Outsidelow-high baml
Finally, Figure 11 shows a plot of PID signals for an example
Fig. 7. Proportional temperature control. sparge stage (heating the liquid before ending the mash). These
graphs are given as examples of the PID control signals.
Changing the weights of the Kp, Ki, and Kd values shown
farge!
in Figure 8 would greatly affect the response.
:��:=:A�:= 1
5 10 15 20
Proportion
25 30 35 40
I
�E:�l
I i;::"t'" --
---.J
I
Fig. 8. PID temperature control. o 5 10 15 20 25 30 35 40
Integral
:k; ::='''':-(�=:
5
I 10 15 20
Proportion
25 30 35
l
40
[1] "Arduino
REFERENCES
:�: . =c9
[2] Charlie Papazian, The Complete Joy of Homebrewing, Avon Books, New
York, 1984, page 259.
- -----=' - - -----=' -----=' ----,J [3] Adam Meyer, "One Wire Digital Temperature. DSI8B20 + Arduino",
- 20 L- -:':,-------
0 10
--
2O
-: L ,-----
30
L
4O
----=' ,----------,
50 S0 70
,-----
-- :':-
8---, 0 ,-----
90 :':-
100 bildr.org, published July 8, 2011, Last accessed July 19, 2013,
http://bildr.org/2011/07/ds18b20-arduino/.
J?: : : , : : : :J
[4] E. J. Mastascusa, Control Systems Lessons: Proportional
Control (on-line material), ELEC 105 Instrumentation
'. "
& Measurements, Bucknell University, Spring 2009,
o 10 20 30 40 50 SO 70 80 90 100 http://www.facstaff.bucknell.edu/mastascu/econtro
Derivative lhtml/intro/intro2.html
l� : : ':: :�
[5] Nicolas Minorsky, "Directional stability of automatically steered bod
ies," Journal of the American Society for Naval Engineers, vol. 34, no.
2, pp. 280309, 1922.
o 10 20 30 40 50 SO 70 80 90 100
:�� : l
So L------='--�---L--�--l---L------='--�
o 5 10 15 20 25 30 35 40
Proportion
1� : : : : • == 1
o 5 10 15 20
Integral
25 30 35 40
:�� ' 11
o 5 10 15 20
Derivative
25 30 35 40
J\£N0A01V� 15 10 15 20 25 30 35 40