CNC Beer Part 1 – Overview and Theory

CNC Beer Brewing System

Overview

A bit over a year ago, I began a project to build a computer-controlled beer brewing system that Beer Church (Pumping Station: One’s homebrew club) could use to brew all-grain beer. I had no idea when I started this project that it would lead to visiting people from multiple countries, two synchrotron radiation sources, and a nuclear research reactor, or that control systems engineers from international labs would provide assistance. While it still isn’t ready to brew beer yet, I’ve recently reached a milestone in integration testing, and I’m rapidly approaching the point where the first test batch will be possible. Unfortunately, I haven’t been blogging about it, so a lot of catching up is needed….

So, why would someone want to make what could be called a CNC machine for beer? First, it’s not about eliminating humans. The goal isn’t automation to the level of “push button, get beer.” Humans will still need to load the ingredients and monitor the process. We don’t want a hose breaking, resulting in 12 gallons of beer wort on the floor and a propane burner melting the bottom of the resulting empty stainless steel keg. Rather, the primary reasons are:

  1. Repeatability. I want to eliminate human error. Repeatability often is the domain of commercial brewers, but for hobbyists, repeatability still is critical. Transitioning from good beer to great beer means experimentation. And that requires having good control over all the variables. How do I know if that different yeast I used made my beer taste better, or if it could be explained by sloppy temperature control in the mash process?
  2. Predictability. Shareware and free beer design software exists that acts like CAD for beer. You can design your grain bill based on a library of ingredients, enter a mash and hop schedule, yeast, fermentation temperature, etc. and it will simulate the process, telling you what you can expect in terms of initial and final specific gravity, percent alcohol, color, bitterness, etc. You can tune the model based on the efficiency of your brewing system. But prediction works only as well as the repeatability of your process.
  3. Capacity. Right now, we are limited to 5 gallon batch sizes. While we certainly can buy larger hardware, it makes sense to upgrade to automation at the same time. With a system based on 15.5 gallon beer kegs, we can produce 10 gallon batches at a time.

And, well, there are plenty of secondary reasons that can best be described as “Because hackerspace!” I’ve wanted to learn more about industrial control electronics and the EPICS software environment. It was a great excuse to learn to weld. I had acquired authentic cold war indicator lights from actual nuclear missile systems that needed to be put to an awesome new use. And I could do all that while brewing beer!

To describe the CNC beer system, I first need to explain all-grain brewing and the issues inherent with our current brewing method. To be clear, these issues affect repeatability, not quality. We are already making really good beer. Nothing is wrong with what we’re doing. This new system likely will improve beer clarity (and that is important in homebrewing competitions) but otherwise it won’t do much on its own to make the beer better. Start with a bad recipe and you’ll end up with bad beer; the new hardware just makes it repeatably bad! Rather, it will provide state of the art tools to anyone who wants to experiment, and this could be very useful to brewers wishing to be competitive in homebrewing contests.

Mashing

While it is possible to outsource the mash process by buying malt extract, brewers often gravitate towards all-grain brewing, which provides much more flexibility and control. Most PS:One beers are all-grain. The brewer starts by buying grain, primarily malted barley, weighing it, and milling it. We have an excellent homebrew store in easy walking distance with a massive selection of malts and a high quality mill. Commercial malt suppliers strive for consistency in their product (seeing as their primary market is commercial brewers who demand it), so up until now, we don’t have repeatability issues.

pic4Grain contains starches, which yeast cannot ferment. Brewers utilize the malting process, where the barley is germinated and then kiln dried to break down complex starches into simpler starches. Then it undergoes the mash process. We do this today by heating water and measuring it into the “mash tun” which, for us, is an insulated plastic cooler using an extremely accurate NIST traceable volumetric measuring device (just kidding, it’s a plastic pitcher with quarts labelled using a Sharpie!), stirring in the grain, and hoping that we get within a few degrees of the right temperature, usually 150-155 F depending on the recipe. Too cold? Add more hot water and stir. Too hot? Add some cold water, stir, and hope that you haven’t destroyed the alpha and beta amylase enzymes in the barley. And that extra water will dilute the mash (a repeatability concern) and will need to be subtracted from the sparge water volume. At this point, the pH can be adjusted. (Fortunately for us at least, Chicago water is perfect for brewing. We always hit our pH target and have no need to adjust anything.) So we screw on the cooler’s lid, start a timer, and wait for what is usually  60-90 minutes.

Issue #1: Measuring large volumes of water accurately is difficult, and it takes a long time with a pitcher.

Meanwhile, the alpha and beta amylase enzymes in the grain break down starches into fermentable sugars. The mash changes from a disgusting bitter porridge into something sickeningly sweet in a process known as saccharification. But these enzymes are very temperature sensitive, and this determines the ultimate starch and sugar profile of the wort (the liquid which will later be extracted and boiled with hops to make beer) which greatly affects how the yeast can ferment it. This also has quite a significant effect on the body, clarity, and head characteristics of the beer. The best we can do is try to start the mash close to the right temperature and hope for the best. The cooler will lose some of its heat, and this can vary based on ambient temperature (winter vs. summer), so the enzymes are really operating over a temperature range that can’t be controlled all that tightly.

Issue #2: Inaccuracy in holding accurate mash temperatures leads to varying results.

What is described above is a single-step mash process. This is about as simple as you can get. However, recipes can call for multiple rests at specific times and temperatures. In particular, malts used in some German beers, and recipes using a large amount of unmalted grains, benefit from a “protein rest” at approximately 120-130 F. Peptidase enzymes break down long amino acid and protein chains, which can cause chill haze in the finished beer. Some recipes benefit from a “mashout” where the entire mash is brought to 165-170 F. This stops enzyme action but allows the wort to be lautered from the grain more easily without resulting in a “stuck mash”.

Multiple step mash schedules can be accomplished manually either by adding hot water during the mash process, or removing some of the mash, heating it directly (while taking care not to scorch it), and mixing it back in. While I know of one beer brewed at PS:One using this method, it is time-consuming, difficult, and error-prone. But the concept of a programmed schedule of timed temperature steps and transitions, called Ramp / Soak,  is extremely common in industrial processes.

Issue #3: Anything other than a single step mash schedule rapidly becomes difficult.

Lautering / Sparging

After completion of the mash, the liquid wort must be separated from the grain in a process known as “lautering.” A brewer takes care to crack the malted grain open, but not mill it into flour, so the grain husk is largely intact. This acts as a natural filter medium. We do this in the mash tun, which has a false bottom that allows the wort to be drawn off while leaving the spent grain bed in place. The wort initially drawn off will contain some grain husks that slipped through the false bottom, and a lot of particulates. We generally recirculate the first few quarts of wort back to the top of the grain bed, a process known as “vorlauf.” Then, we collect the wort into the boil kettle, which will be much clearer now that the grain bed has settled into place. Meanwhile, we take hot (160 – 170 F) water and rinse it over the top of the grain bed, in a process known as “sparging,” which likewise gets collected into the boil kettle. Controlling the sparge water temperature manually is difficult, and we often don’t give it the same level of attention as the mash temperature, even though it also affects the beer. A colder sparge is less efficient at extracting sugars from the grain bed, resulting in lower specific gravity. A hotter sparge will extract bitter tannins from the grain husks.

The clarity of the wort going into the boil kettle directly affects the clarity of the beer going into the fermenter. Yes, particulates can settle out of solution after fermentation, and the beer will be siphoned (called “racking”) off of this before final bottling or kegging. And it is possible (although not terribly common among hobbyists) to filter beer. But it follows that any particulates removed during lautering will not contribute to cloudy beer in the glass of the person drinking it. Vorlauf helps. Vorlauf during the lautering process adds to the total brew time, since any wort recirculated isn’t going into the brew kettle immediately. Ideally, vorlauf would be continuous throughout the entire mash, resulting in signficant, repeated filtration of the wort through the grain bed, such that wort could be drawn off immediately to the boil kettle at the end of the mash process. But recirculating the wort by hand using a pitcher for 60-90 minutes is infeasible, and it likely would leak considerable heat.

Issue #4: Managing sparge temperature and volume by hand accurately is difficult.

Issue #5: Increasing vorlauf manually takes time and is labor intensive, and reduced vorlauf contributes to poor beer clarity.

Boiling

Next, the wort gets boiled, usually for 60-90 minutes. Hops are added at specific time intervals according to the hopping schedule. Boiling extracts the alpha acids in the hops, giving beer its characteristic bitterness. It also reduces the volume of the wort down to a more concentrated liquid (often starting at 6.5 gallons and ending at 5.5 gallons). The power of the burner controls the rate of boil. Eyeballing the volume of a boiling liquid, and controlling burner power to adjust boil rate is extremely difficult. Typically at PS:One, we often boil off too much wort when the time called for in the recipe elapses. At the end, we find ourselves with not enough wort in the fermenter. Changes to the end volume affect the specific gravity (e.g. density, hence the amount of fermentable sugar and ultimate alcohol) in the beer. While we often try to top the fermenter off with distilled water to hit our volume target, it still means we exposed the sugars to more heat than they should have received, resulting in more caramelization. All this presents problems with repeatability.

Issue #6: Boiling rate and volume over time are not well controlled, introducing repeatability issues with resulting fermentation volume, specific gravity, and sugar caramelization.

pic14Cooling

Last, we use a copper immersion cooling coil to cool the beer as rapidly as possible to a temperature where we can safely transfer it to a fermenter and pitch yeast. This is done inside the brew kettle itself. As the temperature drops, the wort becomes increasingly vulnerable to infection, and the brew kettle is exposed to the air and potential airborne microorganisms. We use a racking cane with a spacer on its tip in an effort not to pump hop leaves or hop pellet dust, residual grain material, and the “cold break” proteins falling out of solution into the fermenter. We purposefully splash the beer when pumping it from the boil kettle into the fermenter in an attempt to increase dissolved oxygen, so that the yeast will initially respirate rather than ferment, allowing them to multiply faster initially.

Issue #6: Better technology in cooling (counterflow or plate coolers), material separation (whirlpool), and oxygenation (injecting bottled oxygen) can be employed.

Summary

The processes we use at PS:One to brew beer certainly work, and we are using them to brew great beer, but they require significant manual operations that by their nature are not very precise, leaving much room to increase repeatability. Industrial control systems solve much of this and allow for very precise process control. Open source industrial control software, as well as actuated valves, thermometers, flow rate meters, and level sensors are readily available. These can significantly increase process repeatability. And, OK, it’s fun to play with cool hardware and software!

In my next blog post on this topic, I’ll explore existing hobbyist solutions to these problems, as well as describe the design of my CNC beer brewing system. [Go to Part 2….]

Share this!

2 thoughts on “CNC Beer Part 1 – Overview and Theory

  1. Fascinating and extremely informative! I did one round of Beer Church with Justin guiding me through it, and so I know just enough to follow along, but this very thorough list of the steps definitely helps explain a lot of the “why” for what we were doing. I just ordered the equipment for a basic 5 gallon extract setup at home (with a small baby, spending all day at PS1 brewing probably isn’t in the cards again for a while), and I’ll no doubt be upgrading piecemeal as I go along, so I’m interested in your next post about hobbyist solutions to some of these problems.

    As an aside, have you ever been up to the Great Lakes Brew Fest in Racine, WI? I remember someone was selling a CNC brew setup there last year (I couldn’t go this year because of the aforementioned baby, so I’m not sure if they had a booth again this year). Back then, I didn’t know enough to understand what all they’d been able to automate, but I’d be curious how it compares to your approach.

    1. Hey Kyle,

      Thanks! I’m glad you liked this post. No, I haven’t been to Grate Lakes Brew Fest. There are a lot of different kinds of CNC brew systems available for purchase, and there are plans online to build your own. There’s one in Brew and Grow that they use. Regarding automation, usually the most important thing people want to control is mash temperature. I’m doing that, but I’m also attempting to control a lot more, like filling the kettles with brewing water to an accurate volume, and (in a later phase) measuring and controlling the boil rate so we don’t boil off too much or too little. I recently posted a second entry that talks about exactly what is being controlled, including a list of all sensors and actuators.

Comments are closed.