Brewery 2.0, Brew #1

Today is my first day brewing with the latest iteration of my brewery. That includes a Chugger pump, my countercurrent heat exchanger for wort chilling, and my conical fermenter with upgraded cabinet controller software.

Thank goodness the friends I invited had other plans. The day started stressful when I snapped a polypropylene female camlock fitting while tightening an adjacent threaded fitting. 

I quickly replaced it with a stainless fitting, finished tightening things up, and the day improved thereafter.

The first task was to sanitize the conical fermenter. This meant making a 5 gallon batch of Star San. I knew it would foam when I turned on the sump pump, but what a mess!  

The foam nearly filled the 15 gallon conical tank. When I turned off the pump, the foam ran out faster than I thought and overfilled two buckets. It got all over the place! I saved a gallon like I always do, but I had to store the other four in a couple of cornelius kegs. I don’t have anywhere to keep these cool, so I can’t reliably store the Star San for the next brew session. It’s not like the stuff is expensive, but I’d like to optimize my use if I can since it’s a synthetic detergent. At least I have two sanitized kegs ready to take the beer from this brew session.

Another difference is that my burner has wheels!  

I like to brew close to the garage door for ventilation and to enjoy the weather, but I need to move the pot to the cabinet to pump it into the tank. I could either get really long hoses or make my brew pot mobile. Until I go all electric, I chose the latter. This has an additional benefit: I can fill the brew pot directly from the cam lock water supply I installed in my garage.  

I burned a couple of new lines on my brew paddle at 10 and 11 gallons since I’m doubling the batch size and got to work!  

One of the more annoying tasks with extract brewing is getting liquid extract dissolved. Dry extract is luxurious. It floats on top until it dissolves. It’s also expensive. Liquid extract is much cheaper, but it’s a sticky syrup that sinks straight to the bottom where it scorches. I previously dealt with this by slowly dissolving the extract with a metal strainer. Now that I have a pump, I can aggressively circulate the wort while adding extract!  
Sweet. With the extract dissolved, it’s only a matter of getting through the hot break. This is the point in the brew when the surface tension of the wort transiently increases, and bubbles form like crazy. With 5 gallon batches, I never worried too much. A 15 gallon pot can hold the entire hot break of a 5 gallon batch. I braced for the hot break and watched vigilantly. I was very underwhelmed. The hot break was prolonged and mild. I suppose this was just a lesson in dimensional analysis, but a welcome one.

With things underway, the most important part of brew day becomes imminent. My in-laws just got back from a European cruise. My mother-in-law stuffed a few beers from Copenhagen into her suitcase. What better to drink than beer that’s a gift, especially when it is a very thoughtful gift?

The recipe for today is a dubbel:

  • 60 minute boil
  • 12 lb pale LME
  • 2 lb pale DME (couldn’t fit all the LME in my bucket!)
  • 1 lb Cara Munch and 1 lb Special B, steeped
  • 2 lb homemade dark candi sugar (I’ll make a separate post about my recipe for this sometime)
  • 3 oz Hallertau hops, added at boil start
  • 2 oz Styrian Goldings hops, added with 15 minutes left
  • Wyeast 1388 Belgian Strong Ale
  • OG 1.061

Things took a little longer than I planned, mostly due to the new piping complexity.  

When brew day was finished, though, 10 gallons in the conical fermenter was a pretty sight. 

Here’s hoping it comes out tasty.

Update

The final gravity was 1.018. This comes out to an ABV of 5.6%. It’s good. Although the body is a little thin, the hops and malts are balanced. A second keg is aging and may have a little more aroma and mouthfeel.

Advertisement

Heat Exchange Snobbery

The recipe for beer is pretty simple. One important step is boiling the wort, the sweet mixture that yeast will ferment into beer. Boiling sanitizes the beer so that yeast can work its magic, but not before the wort is cooled back down or the yeast meets the same quick, steamy end as its potential competitors. There are many ways to cool wort, but I recently upgraded my cooling technique to the optimum method: countercurrent heat exchange.

2015-08-25 07.15.27I previously used this immersion cooler. This is a good method in which a length of coiled tubing is placed into the wort. Cool water is pumped into one side and it comes out hot on the other, all the while cooling the wort. Despite the ease of execution of an immersion chiller, it’s limited. Initially, there is a large temperature difference between the wort and the cold water running through the chiller, and it works well. As the wort cools, the temperature difference between the wort and the water decreases, and the cooling is less effective. It takes more and more water to accomplish the same heat transfer. Countercurrent exchange doesn’t suffer this limitation, and this is why it’s a superior heat transfer method. How it avoids this limitation can be demonstrated by comparing the countercurrent configuration to the parallel configuration, which is somewhat similar to the immersion chiller method. Here’s a diagram showing both flow configurations:

Capture

Both involve a tube within a tube. The inner tube is usually made of thin metal so that the fluids can easily exchange heat across the metal. In the parallel configuration, hot wort is introduced at the same side as cold water. As the wort and water flow through the tube and exchange heat, they approach the same temperature you would get if you mixed the two in a bucket (ignoring the thermodynamic effects of mixing). In the countercurrent configuration, hot wort is introduced at one end and cold water is introduced on the other. This results in a very different temperature profile for each fluid along its path. Check out this diagram from Engineering Toolbox:

The result is that the wort is continuously cooled throughout its path while the cold water is continuously heated throughout its path. To phrase this more practically, you more fully utilize the cooling ability of all the water you use. Unlike the immersion chiller that only heats the first amount of water to near the starting wort temperature, all the water used in a countercurrent heat exchanger will be heated near the starting wort temperature. While countercurrent heat exchange is limited by the surface area and the flow rates, so are other methods. For any exchange method, too small a surface area or too high a flow rate and the fluids don’t have a chance to exchange enough energy. Countercurrent exchange is not equilibrium limited, and this is the difference.

Countercurrent exchange isn’t just an engineering technique. It evolved biologically and is evident in many homeostasic mechanisms. My favorite is the kidney, an analogous example of countercurrent mass transfer. Remember those tubules and the sodium gradient? That’s countercurrent exchange, nature’s way. There are heat exchange examples in nature as well.

Now that countercurrent exchange is justified, it should be implemented. Even though there are commercially available, reasonably priced countercurrent plate chillers designed especially for home brewers, that’s too easy! Here’s the tube-in-a-tube heat exchanger I built:

2015-08-24 19.02.04

The design is simple. The outer ports connect to a 3/8″ stainless tubing coil that, with great lubrication, forcefulness, and bleeding, I managed to shove inside a length of garden hose. Wort is pumped through the stainless tubing in one direction while tap water flows through the hose and around the outside of the tubing in the other direction. 3/8″ compression fittings seal the internal path from the external path. 1/4″ compression fittings house in-line DS18B20 temperature probes that I’ll eventually use to monitor and optimize heat exchange. As always, cam locks attach the hoses attachments. I fastened the coil with rope and hung the exchanger in the roof of my cabinet so that cooled wort can go directly to the conical fementer. Here is the entire system in a test:
2015-08-24 19.00.28

2015-08-24 19.07.35 2015-08-24 19.11.46For the test, I brought the whole system to 80 degrees Celsius and let the wort out of the exchanger flow across my kettle thermometer. I had to cut the flow rate down, but I was able to get the outlet temperature down to almost 20 degrees Celsius in one pass.

This will be my last modification to the system until after boards, but I should have a few brew posts. Right now I’m growing a yeast culture for a 10 gallon batch of Dubbel, which will hopefully sate everyone for a little while. My friends sure can put away some home brew.

In Tune

The recent modifications to the cabinet warranted a small software upgrade. The power and heat transfer of the two modes are drastically different. The heating side, a SSR-throttled in-line water heater element, can increase the temperature of the fluid much faster than the thermoelectric chips I was using previously. The cooling side, a copper coil sitting inside the refrigerator, is much slower; in fact, it has to slowly cool the fluid reservoir before it even approaches a useful rate of heat transfer from the fermenter. Previously, I’d used a single set of control parameters for both the heating and the cooling side, but the parameters are now too different. I had to rewrite the code to use different PID parameters for each. This is trivial, but rewriting the TCP communication protocols to include the parameter values so that I can change them for the purpose of tuning took a little time.

Here’s the current control scheme:

Capture6

This is essentially a dual-loop control configuration with a bit of switching logic included. In simple terms, one controller uses the temperature of the fermenter to determine what temperature the heat exchange fluid should be. The heating and cooling controllers measure the current temperature of the heat exchange fluid, compare it to the desired temperature, and adjust the power output to bring the temperature to the setpoint. A bit of control logic (which actually includes another controller) determines whether the the cabinet should be in heating or cooling mode. This is necessary to keep the cabinet from inappropriately switching between the two modes when the temperature of the fermenter is near setpoint.

By “controller” I mean PID. Many brewers are familiar with discrete hardware units that are called PID controllers, but PID control is really just an approach to controlling a measured variable by changing a process output. I wrote a software PID object in C++ based on my father’s Visual Basic implementation (check out his blog to see that I am a small chip off a very large block) that I use in the software for the microcontroller that runs the cabinet. I omitted derivative control, opting only for proportional and integral. As my father would say, derivative control isn’t often that important.

An important thing to know about PID controllers is that they have to be tuned. Plainly, this setting how the controller reacts to the error it detects. A well tuned controller will quickly reach setpoint. An overtuned controller will oscillate aggressively about the setpoint. A loosely tuned controller will take forever to get there. An incorrectly tuned controller will blast off in the wrong direction, an undesirable and possibly unsafe scenario.

Rigorous controller tuning would require a decent process model. I don’t have even a simple one and don’t care to make one, so I opted for manual tuning. This is an iterative process that involves perturbing the system, watching its response, and adjusting the PID tuning parameters accordingly.cap5

Here is the data from the last bit of cooling mode tuning. I decided to get the fluid temperature controller tuned for the cooling loop first since it is the more sluggish side. It’s interesting to see the oscillation that was happening with the second-to-last set of parameters (left side of the graph). It looks like there are two dominant frequences, which I presume were an interaction between the two control loops. I loosened the fluid temperature controller by decreasing the magnitude of the integral parameter (see the software reset near the middle of the graph), and it evened out. Cooling mode kept the fermenter within 0.25 degC of setpoint, which I think is acceptable considering the design of the system and excellent considering how little a quarter of a degree actually matters to the quality of the beer.

Capture5

Next comes the heating mode, which I knew would be a breeze. I left the fluid temperature controller parameters alone and only tuned the heater controller parameters. This side is a much better controller compared to the cooling side. After a 10 degC setpoint change, the system brought the fermenter to within 0.25 degC of setpoint in a little over two hours with no overshoot. Thereafter, the 12-bit thermometers I use couldn’t resolve the error. I may add a bit of logic to cycle off the pump when the heater controller output drops below a threshold because this effective of a control loop isn’t even worth the power to run the tiny aquarium pump.

It’s time to drain the 10 gallons of water in the fermenter and replace it with some wort!

Splish Splash

It’s ready for a test drive. The conical fermenter is assembled and in place, ready to make some delicious beer with the convenience of a commercial brewery.2015-08-02 14.32.36 The last part needed was a clean-in-place system. Since my fermenter is so challenging to get in and out of its mounted position in my cabinet, I need a way to clean and sanitize it without taking it out for scrubbing or shaking. The solution is a system that vigorously sprays the inside of the fermenter. I fiddled around with a homemade apparatus, but quickly abandoned it for something more reliable. I got my hands on a rotating spray ball from Brewer’s Hardware. This fitting has a ball with biased slots. The slots spray fluid from the ball and are configured so the flowing fluid rotates the ball, cleaning the tank wall.

2015-08-02 14.21.57

Sump Pump in a bucket with a 3/4″ outlet hose and a 1-1/4″ return tube from the tank.

I tried attaching the spray ball to a few small pumps including my Chugger pump, but the flow rate wasn’t sufficient. The ball barely sprayed and didn’t spin at all. I had to get a high volume, intermediate pressure sump pump from Harbor Freight. I mounted the spray ball in the lid of my fermenter along with a check valve to prevent negative gauge pressure in the tank during draining, and I gave it a test. Watching it from the outside is important and useful, but it’s a little dull. I decided to get a better view of the action with my GoPro – if only for entertainment purposes.

Once it was working, I realized that I have no planned additions to the fermenter for a few years. Thus, it was time to mount it in the cabinet! It was tricky, but once I figured out how to slip the collar in place it was a piece of cake.

2015-08-02 16.19.58

Conical fermenter mounted in cabinet with running CIP system.

Now it just needs some wort, yeast, and a little time.

Cabinet 2.0

Trang and My Lan were out of town over the weekend. While I’ve mostly forgotten what it’s like to have the place to myself, I did manage to keep busy working on an academic manuscript and, of course, the brewery.

Between the broken cabinet fan, the conversion from thermoelectric chips to a tube mounted water heater, and the conical installation, the cabinet has been in pieces for weeks. Fortunately, it’s slowly coming back together.

I replaced the thermoelectric chips with a water heater mounted in a stainless steel tube. It’s only a 1200 W element but is much more powerful than the chips. I tested the system at only 1% power and the fluid temperature increased 10 degrees Celsius in about 30 seconds. Nuclear winter won’t keep me from my ales.

2015-07-26 13.57.32

I’ve also gone back to a smaller aquarium pump in a bucket. The Denner magnetic drive pump I had in place before was a little noisy and overpowered, so I’ll reuse that for my clean-in-place system. The bucket mounted pump is quiet, adequate for the system (I measure a flow rate of 30 mL/s), and can fit inside the refrigerator. Putting the fluid reservoir in the refrigerator might also allow me to make cooling more efficient.

Secondly, I redid the wiring for the whole system. I run the power for the pump and heating element directly through the wall of the refrigerator. The thermosensor wiring is all new, with pre-terminated RJ-45 cables that don’t have to be secured with rubber-bands to maintain a connection. They’re all connected through my OneWire hub circuit board and providing reliable signal. I just need to tidy up the cables.

2015-07-26 13.57.51

The cabinet fan still doesn’t work although I’m sure the controller is providing power. The immersion coil may make the cabinet radiator obsolete in the summer, so I’m not in a hurry to fix it. Removing the thermistors frees up a second fan terminal for the controller, so I may put a large fan into the refrigerator to increase heat transfer at the copper coil inside. I’ll wait until I can run a cooling test with the conical in place to see just how cold I can get 5 gallons of water.

Once my CIP fitting arrives, the conical will be ready to go into the cabinet. I’ve put my Chugger pump on a temporary mount. All I need is to put my burner on wheels and finish the counter-flow heat exchanger, and the back end of my brewery will be finished!

Under Pressure!

I finally pressure tested my fermentor!2015-07-12 15.41.38Several brewers have made conical fermenters using plastic tanks. These tanks have the benefit of a valve at the very bottom. This allows the removal of trub (dead yeast) without transferring to a whole new vessel. The disadvantage is setting up a conical fermenter takes a little more work.

2015-07-12 15.41.48Using a simple ball valve on the bottom is problematic. Ball valves have a recess between the body and the ball that collects fluid. For sanitary operations, these would have to be sanitized with heat and occasionally disassembled. A superior approach is a butterfly valve. These valves have no recess to collect fluid, but are mechanically more complicated since the disc has to mate with a gasket. They’re typically much more expensive, but I found a couple of beautiful 1.5″ stainless butterfly valves with silicone gaskets for nearly nothing on eBay. A couple of tri-clamp adapters from Glacier Tanks and a 1.5″ camlock adapter from ProFlow Dynamics makes my valve assembly.

2015-07-12 15.42.26Unfortunately, this is where things got tricky and delayed the project. I failed to account for the length of this valve assembly when designing my Fermentation Cabinet. I also designed the doors of the cabinet to account for the tank but not the metal frame. To make an embarrassing story short, I attached hooks to the tank walls for hoisting it into place using small pulleys in my cabinet. The hooks are attached with stainless bolts and washers, which are internally sealed with 1/4″ silicone o-rings and gaskets I made using silicone sheet and punch tools. I built a simple frame into which the tank is lowered in the cabinet, giving enough clearance for the valve assembly.

I also wanted to add an immersion coil, something I haven’t seen anyone do with a plastic conical yet. This will make my temperature control system more efficient since I’ll pump the heat exchange medium (I use water) directly through the tank instead of heating or cooling the air around the tank. I got some 3/8″ stainless tubing on eBay that sat in someone’s closet for a couple of decades and a couple of stainless compression fittings. I discovered two things when making this coil. First, bending stainless tubing is not easy! I invariably end up bleeding every time I do it. I wasn’t able to make perfectly smooth bends in the long segments, but the small kinks are only cosmetic and may even improve overall heat transfer by adding turbulence. Second, the walls of the plastic conicals are thicker than stainless vessels. Getting the male NPT fittings through the vessel wall required NPS locknuts from Bargain Fittings. I also wasn’t able to place a washer between the camlock adapter on the external side and the tank. I’ll just have to hope it doesn’t break.2015-07-12 15.42.32

I also added a camlock adapter below the liquid level for a temperature sensor and another near the top for a blow-off tube.

2015-07-12 15.42.092015-07-12 15.42.02Finally, I pressure tested the vessel by filling it to the brim. There weren’t any leaks through the wall, but one of the compression fittings had a slow leak. Coolant contamination of the beer being undesirable, I attached a manual air pump to the immersion coil, clamped the other side, and pumped it up to visualize the leaking fitting. I tightened it until I couldn’t make it leak anymore, which is lucky because I don’t think I had enough muscle to tighten it further. I checked it once more by draining the tank and attaching it to the house water line with the other end clamped.

All that’s left is to seal the lid attachment using silicone and the tank will be ready for use! Of course, cleaning this thing will be a pain, but I have a plan for that.

Circuit Board Woes

My guru told me long ago that I’d find myself cutting traces on printed circuit boards to problem solve. I thought I must have been lucky to go two-for-two without any hardware problems, but I found that the FTDI problem with my valve board was electronic, not software. I neglected to include a 100 nF capacitor between the FTDI DTR header and the ATMega328p reset line. I probably should have checked my FTDI header on the breadboard, but I must have instead assumed it behaved similar to the ICSP header reset connection, which connects directly to the reset pin. Anyway, I’ve finally cut my first trace to solder in the capacitor. Here it is successfully running the blink sketch, this time loaded via USB rather than AVR programmer.

2015-07-10 23.19.23

Considering that I’m redesigning the valve with a geared-up DC motor, the ICSP header wasn’t appropriately sized to allow a proper header, and I’d like to reorient the radio breakout board to not hang off the edge, I’ll probably have a new set of boards fabricated.

Another day. I’m again on call tomorrow.

Brew Day: What a Cluster

My cabinet isn’t all together, but this is my last opportunity to brew for four or five weeks because of call. I’m really itching to go all grain, but I’m sure I’ll make many more extract batches before I’ve got a configuration that can reliably function. Until then, I’ll keep doing what I’m doing.

I’m out of home brew, so I’m drinking a Double Mountain Cluster. Thanks, Cagley!  Today I’m making a Belgian Pale. It’s my first legitimate pale since every other brew I’ve used candi sugar of one kind or another. This will also be one of my lowest gravity beers in a while, which will be nice in the late summer. Simply:

  1. 60 minute boil
  2. 1/2 lb Honey Malt and 1/2 lb Belgian Pale for specialty grains
  3. 8 lb Light LME
  4. 1 oz Sorachi Ace at 0 minutes for alpha
  5. 1 oz Hallertau at 55 minutes for aromatics
  6. Wyeast 1388 Belgian Strong Ale

OG: 1.058

I am using my Bayou Classic burner for the first time, which is nice. My old burner was dangerously small. 

I’ll be on call next weekend, so happy early 4th! Please don’t blow yourself up. I really don’t want to read your trauma pan-scan.

OneWire Header

Measurement of temperature is important to many stages of brewing. There are lots of options out there, but I decided on the DS18B20. What’s different about this device is that it’s not just a thermocouple or thermistor but a self contained chip with which you communicate digitally. The device communicates via the OneWire protocol, so multiple such devices can be connected through a single digital pin simultaneously.

The protocol is involved, but there are two Arduino libraries that make getting these devices up and running a snap. The OneWire library provides for the basic communication protocol while the DallasTemperature library abstracts the specific commands for the DS18B20 and similar devices.

The tricky thing about these thermometers is the wiring. Hooking up one or two is straightforward, but my first attempt at connecting five of these for my Fermentation Cabinet failed miserably. A little browsing of the forums revealed that I had used wire with too high an impedance and had used a star topology when connecting these in series allowed for more reliable communication. I bought some CAT5 cable, RJ45 plugs, and a crimping tool and got down to business.IMG_2588

I spliced the thermometers to one end of the cable, connecting two-to-one. I crimped two plugs at the other end of the cable. One faces toward the microcontroller while the other connects to the thermometers further down the series. The cables are connected to one another by female-female adapters. This way, power, ground, and data all connected completely in series.

The connections were not very secure, but rubber bands around the adapters held everything in place. The cabinet ran fine this way for months without connectivity problems. Even so, I decided a cleaner solution would be useful while working on my all grain design, which would require that I be able to assemble and disassemble the electrical connections for cleaning and storage. Here’s the diagram:

One Wire RJ45 Hub

This allows each cable to have only one plug and eliminates the need for all the female-female adapters, but it needs a special header for connecting the devices in series. Using a readily available Ethernet splitter board would have been nice but would have resulted in a star topology. Drafting a board and having it fabricated was fast, easy, and inexpensive.

IMG_2573IMG_2572

This board connects the jacks in a series configuration rather than in parallel. I can connect my Cabinet shield or my all-grain boards to this one, and then connect multiple thermometers.

Obviously, since the connections are in serial the devices must be plugged adjacent to one another. To achieve a fully serial topology, the microcontroller board should be connected to either end. Here are three thermometers connected to an Uno through the board.

IMG_2574

Connections are confirmed using the OneWire address finder sketch.

This board worked without a hitch with three thermometers. Considering that my Cabinet worked fine with the prior configuration, I have no doubt it will handle all five. I doubt I’ll have cause to test the circuit with longer cables, which is reportedly a limiting factor for OneWire communications.

The only problem I had was with plug crimping. I bought solid core wire and universal plugs, but most of my crimps fail, usually involving the middle four wires. I suspect the plugs are too cheap or that I should have gone with stranded. I decided to use pre-terminated patch cables instead. I’ll soon be replacing the thermoelectric chips in my cabinet with an in-line electrical heating element, and will put one of these boards into operation in my cabinet at the same time.

Standalone Arduino

My custom Arduino shield for my fermentation cabinet gets the job done, it’s a less than optimal design. First, I used multiple individual optocouplers and transistors. It would have been much more elegant to use integrated components with multiple optocouplers and multiple transistors in one package. Second, I used only screw terminals, which are not very sturdy. Lastly, and mostly, shields aren’t great for a permanent board. For prototyping, they are quite an elegant solution. But for a permanent board, they’re bulky and constrained. Using Arduino boards for permanent implementations misses the whole purpose of a development board. Their price point is low enough for it to be feasible for single implementations, but it doesn’t avoid the design problem. The Arduino is designed for prototyping. I want equipment I can use for years.

I’d been planning on creating a standalone board for the ATMega328p, but accelerated the plan when the Arduino split occurred. The idea was to create a very basic clone of the Arduino Uno without pin headers or USB interface. I want to be able to program either with an ICP programmer or an FTDI breakout board, so it will need headers for these. I plan on using the nrf24L01+ with multiple projects, so headers for the breakout board for that chip are also needed. A board design with these features makes a great template for many boards.

The design is based on some instructions on the Arduino website for assembling a Standalone Arduino, with the additional of a smaller ceramic capacitor adjacent to the ATMega328p VCC pin.

The simplest board I had planned was a board for a flow control valve. In addition to the template above, it needs an L293D H-bridge for driving a stepper motor, an electrolytic capacitor adjacent to the L293D VCC pin, a header for connecting to the motor to change the valve position, and a header for connecting to a potentiometer to detect valve position. In testing the prototype, I found that one NEMA 17 motor didn’t have enough juice, even with a gear ratio of 8. Rather than splicing wires, I just added a second header to the board. When I got my board back from OSH Park, I soldered in the components to give it a whirl.


Unfortunately, I placed the ICP header too close to the radio nRF24L01+ header and had to replace it with two rows of pins instead of the nice jack that matches the 6-pin programmer cable. After a little voltmeter testing revealed that my chips weren’t completely seated in their sockets (you really have to jam them in), I successfully loaded the blink sketch with the programmer.


As with the cabinet shield, I was amazed the design was right. I’m still having trouble getting the board to communicate via serial through an FTDI friend, but that’s a battle for another day.