Wireless Fermenter Temperature Monitoring (Part 1)

July 5, 2014 1 comment

Several months back a friend who knows I tinker in this nerdy electronics stuff asked me if I could develop something to help him monitor and log fermenter temperatures. My off-the-cuff answer was “of course, lemme think on it and I’ll get back to you”. At the time I was pulling BrewzNET 2.0 together and devoted most of my energy to getting that project completed… so the fermenter temperature thing was put on the back burner. Every once in a while I’d put enough thought into it to ask him some additional meaningful questions, or add my own wants/wishes to the list, and ended up with a rough requirements list:

  • Better than 10 bit temperature resolution
  • A new reading every 5 minutes or so
  • Ability to either store data until a PC is connected, or store data on removable media, or send the data to the PC wirelessly
  • Expandable to more than one fermenter
  • Must fit in the thermowell with another sensor

Unfortunately that last one nearly killed the project (at least for my friend), because I have very limited options when it comes to temperature sensors. I decided this was something I wanted for my own homebrewing setup, so I’ve continued on hoping that once I’ve got a design put together he may still be interested in it.

My tentative plan is as follows:

Why these particular components?

  • The 3.3V Arduino Pro Mini is the obvious choice as all of the other components require 3.3V power, and using a 5V microcontroller would mean oodles of level-switching as well as a second power regulator to step the 5V down to 3.3V – It makes more sense to run everything on 3.3V.
  • The DS18B20 sensor makes the most sense in this application. It’s digital which allows longer wire runs than an analog sensor and I do not have to worry about significant signal degradation / resistance losses. It works just fine at 3.3V. It also has a better resolution than the typical 10-bit analog devices. You can also put multiple devices on the same one wire bus, which means it is expandable.
  • Bluetooth seemed to make more sense than other wireless technologies, like an Xbee, because it is really just a 2-device connection – the PC and the temperature logger. My understanding is that Bluetooth is also a relatively robust protocol for sending data – it must be considering all the devices out there that use it.
  • The MicroSD card seems like “extra”, but after thinking about my own experience with PCs and trying to log data to them, I realized redundancy is always a good thing. Our PC seems to lock up / crash with a greater frequency than I would like, and depending on the power settings it could be in “sleep” mode and miss data. Very few people have their PCs running 24/7, so while a Windows service could capture the communications and data “behind the scenes”, that strategy only works if the PC is running (and running reliably).

I am still trying to figure out if I need a RTC (real-time clock) like a DS1307 to pair date & time with the temperature readings. Setting the clock becomes the issue, if so… Maybe it sets the clock when the Bluetooth pairing with the PC occurs? I just don’t know yet.

 
wpid-20140705_070936.jpgTemp Proto Output
 

This morning I was successful in putting together a basic circuit with four DS18B20s and read their data. The Arduino program was pretty easy since I just tweaked the example sketch that comes with the OneWire library, so someone else had already done the heavy lifting. The example program was comprehensive enough to support multiple sensors, so all I changed was some of the serial output and the 1-wire bus pin. The screenshot shows the four different devices (and their hexadecimal addresses), the raw data for each, and the data converted into Celsius and Fahrenheit readings.

The sensors are all configured to run off “parasite power” which means the data line charges them up when readings are not being taken, and only two wires will be required for each sensor – a ground (going to the two outer sensor pins) and a data line (the middle pin). I am going to experiment with different gauges of wire and try to get it as thin as possible in the hope that my friend will be able to use this sensor, even with his big Ranco temp controller sensor shoved in there.

The next stage will probably take the most time – getting the Bluetooth communications set up and the MicroSD card interface working. Both of these areas are brand new to me so I’ll have a learning curve to slog my way up. Fortunately the MicroSD card breakout has an excellent tutorial associated with it, and the Bluetooth COM stuff seems pretty straight-forward. I wanted to play with the Bluetooth stuff prior to posting but unfortunately the Bluetooth adapter that serves as the PC interface side has gone missing. Hopefully it will turn up soon.

Advertisements

White Labs Schwag Commeth – part 2

June 26, 2014 Leave a comment

wpid-20140626_154825.jpgwpid-20140626_154900.jpg

Today my beautiful wife greated me in a snazzy White Labs hoodie and a big ol’ mug of Shocktop Honeycrisp with the White Labs logo printed on it. I think she likes her goodies. 🙂

In addition I received my White Labs t-shirt, which looks great and will likely become standard uniform attire during my all-grain brewing classes at HowDoYouBrew.

I like this customer club thing. It’s silly, but I do. Yay White Labs!

 

Categories: Miscellaneous

White Labs Schwag Commeth – Part 1

June 24, 2014 Leave a comment

Free Yeast!

Free Yeast!

I don’t really have much to expound apon today, but the vials we sent in to White Labs as part of the Customer Club obviously made it there and they are processing our wish list – a rather non-descript envelope showed up today with these 3 free-yeast coupons!

That hopefully means that the other stuff we ordered (glassware, a hoodie, a golf shirt, etc.) will be arriving over the coming weeks.

Woot woot! Customer Club!

Categories: Miscellaneous

Summer Pale Ale 2014

June 22, 2014 Leave a comment

wpid-20140614_125800.jpgThis past weekend I brewed a 20 gallon batch of American Pale Ale with a friend. The BeerSmith 2.0 recipe can be found here. We used my 20 gallon kettle setup with the pumps & control box, and things went reasonably well – we hit all of our targets for volume and gravity, and the electronics did what they were supposed to with one exception – during our vorlauf / recirculation step the high level switch didn’t turn on the pump one cycle. We caught it before it became an overflow situation, but there was no obvious reason why this hiccup occurred. My belief is that the XBee Coordinator modem had one of its problematic data floods and missed the communication from the grant. Unforuntately that issue persists and I am no closer to resolving it. I think it is a Digi firmware problem, and there is very little I can do about that other than wait for a new version to be released.

wpid-20140614_125806.jpgwpid-20140614_125811.jpgOnce the sparge began, we didn’t have any further issues with the electronics. The sparge arm worked as expected, and the control box managed the pump cycles appropriately. The sparge rate history screen even proved its worth as we watched our sparge rates slowly drop from the high 1.9 qt/min down to 1.7 qt/min, followed by a steep drop to near 1.0 qt/min, signaling a stuck mash. We added some hot liquor, stirred up the mash bed some, and did a quick recirc to resolve it. The flow rate was not a problem after that, and we lost maybe 10-15 minutes max. The boil was uneventful, and we collected 20 gallons in our fermenters. We pitched 2 vials of WLP001 into 2 of the fermenters, WLP051 into the third, and US05 into the fourth.

wpid-20140615_195129.jpgJake took 5 gallons home with him, and the other 15 stayed with me. The fermentation was rocking and rolling less than 24 hours later. When I checked on them about 12 hours after that, one of the carboys (the WLP001 I think) was so active that it filled the headspace with yeast and blew the airlock. I had to quickly scramble to resanitize, and added some foam control to knock the yeast back down. I’ll give the yeast another week to clean up and flocculate out before transferring them to secondary fermenters for dry-hopping and aging.
 
With my brewing activities approaching a summer hiatus, I am unsure what new brewing-related mayhem I will perpetrate this summer. One possibility is resurrecting the control box to PC data stream to capture and display session data, but that’s not really terribly exciting to me. Another (much stronger) possibility is implementing an Arduino mini & Bluetooth-based temperature monitoring system for my fermenters. This latter idea was inspired by a friend, Mike Castagno. It would be really cool (and useful) to design a system that collected the fermenter temperatures and sent the data wirelessly to the PC, and use a VB.NET Windows service to collect and log that information to a database. If the database were hosted online, you could even display that data on a webpage and remote monitor what is going on. We shall see if I can bring that particular vision to reality.

Categories: Brew session, BrewzNET 2.0

BrewzNET 2.0 Menu Screen Details

June 8, 2014 Leave a comment

For some weeks now I’ve been meaning to post video or pictures of the menu screens for the pump control box, but time has managed to get away from me. I’ve been busy integrating two new stainless Chugger pumps to replace the March industrial surplus ones I’ve used for the past 8 years, which also necessitated reworking the wiring to use standard 3-prong plugs instead of the monster Molex ones I had for the old pumps. It works… I can’t say it’s the prettiest thing ever, but using super glue on plexiglass always seems to create this milky-white deposit everywhere that is a pain to clean up.

IMG_3278IMG_3280

 I ultimately settled on taking static pictures over video, mostly because recent experience (my previous post) proves that I am not the sort of person that can simultaneously narrate and maintain a steady camera. Thank goodness for YouTube’s enhancement options.

 Bootup / Splash Screen

MenuSplash

When the control box is first turned on, it displays a “splash screen” with a mash paddle and a beer mug (or as close as I could approximate them with 5×7 dot matrix characters). Pushing any of the navigation buttons brings up the first “true” menu screen.

 SCREEN 1 – Main calculations

Menu1

The main calculation screen displays the key information used during the mash stage of brewing, and is what I display 95% of the time. In the upper right corner is a 5 character summary of what current system state. The first character (shown as an M) stands for the current pump control mode. “M” = Manual, “R” = Recirculation / Vorlauf, “S” = Sparge. More on that a little later in screen 4… The next two characters show the wireless device status for the Grant. The question mark means it is currently not connected / turned on, and a small antenna would indicate it is connected. The final two characters are similar to the previous two, except they display the sparge arm connection status.

The second through fourth lines display the three pieces of information I use most frequently during the mash: Total volume connected in gallons, current sparge rate in qt/min, and how much time is left in the sparge to collect the pre-boil batch volume in minutes. The volume collected can be tweaked up or down in 0.1 gal increments as required, which automatically adjusts the remaining time based on the current sparge rate. Adjustment is useful when you reconfigure the hoses to run into the kettle and forget to switch the control box mode, or if something unforeseen happens (like a power blip) and wipes out the system state.

 SCREEN 2 – Secondary Calculations

Menu2

The second menu screen has the same 5 character system status display in the upper right corner, and lines with a couple of additional pieces of useful information – pump rate and remaining volume. There is also a function to reset the system calculations back to an “initial state” if that is required.

 SCREEN 3 – Sparge rate history

Menu3

The third screen displays a history of the past 6 calculated sparge rates. I wasn’t running the system when I took the picture, so there is nothing displayed – but if you watch the video in the previous post, you will see a great example of this starting around the 2:07 mark. This history is useful to determine if your mash is headed towards “stuck” – sparge rates would drop consistently over time. This enables you to rake or cut the top of the grain bed, adjust your flow rates, or take whatever corrective action you feel is appropriate to prevent it.

 SCREEN 4 – Pump control mode

Menu4

The fourth menu screen simply allows you to change the pump control box mode manually.

  • Manual mode prevents the control box from turning pumps on and off based on the level switches in the grant and sparge arm. The two switches on the front of the control box serve as the only means to turn the pumps on or off.
  • Recirc/Vorlauf mode tells the control box to start calculating the runoff/sparge rate and pump rate, but does not change any of the calculated volumes. This allows you to recirculate the wort until it runs relatively clear and dial in the sparge and pump rates you want by adjusting the ball valves. During this mode only the grant pump is turned on and off.
  • Sparge mode performs these same calculations, but also includes collected volume and time remaining calculations. This mode also controls the on/off state of the sparge pump based off the float switch on the sparge arm.

Menu4a

Without the grant float switch position information the control box cannot perform the necessary calculations, so both “Sparge” and “Recirc” modes require that the grant be turned on and transmitting to the control box. If you try to set the modes manually without the grant turned on, the system displays this message.

 SCREEN 5 – System Settings

Menu5

The system has 4 main settings, and 3 of them are shown above.

  • The batch target volume, “V Target”, may be set differently from batch to batch depending on how much wort you wish to collect. I typically brew 10 gallon batches, and with dead space and boil off that requires me to collect 13.5 gallons. For 20 gallon batches, I may increase this value for that single session up to 23.5 gallons, or 18.5 gallons for a 15 gallon batch.
  • The sparge delay setting controls how long the sparge pump remains on after the float switch goes from a “down” to an “up” position. Setting this value to zero will result in the pump being controlled completely by the float switches without any delay, and the pump will turn on/off much more frequently. I try to top up the tun a little more and cycle the pump less frequently, so about 10 seconds seems to work pretty well in that regard.
  • Automode allows the system to automatically progress from Manual to Recirc mode when the Grant power is turned on and communicates with the control box. It also progresses the control mode from Recirc to Sparge when the sparge arm power is turned on and starts communicating. This eliminates the need to go back to the control box and fiddle your way through the menu settings to change the system behavior, and was implemented after my pilot run in response to that experience.

 SCREEN 6 – More system settings

Menu6

The final system setting is the volume of the grant, Vgrant, in the English/Imperial unit of measure “Cups”. It is not the total volume of the grant – it is the volume of liquid as measured between the lower level switch raising up, and the upper level switch raising up. This should be the same as the volume required to drop the top switch down to when the bottom switch drops. This volume allows the system to perform the sparge and pump rate calculations.

Save Settings allows the current values for the grant volume, target volume, sparge delay, and automode to be saved to memory for the next brew session.

 SCREEN 7 – Switch states (for debugging)

Menu7

The final screen, “Switch States”, is a debugging screen that is useful for ensuring that switch logic is correct and all the wires are hooked up the way they should be.

So that is what I have coded for the BrewzNET 2.0 pump control screen menus. I know it’s not chock full of whiz-bang features, but it does precisely what I need it to without a whole bunch of fuss. Next weekend the plan is to brew a 20 gallon batch of Pale ale, so I will put the electronics through the paces once again and hopefully report back how it went.

Categories: BrewzNET 2.0

French Ale

June 1, 2014 1 comment

This weekend I brewed a 10 gallon batch of French Ale, which allowed me the opportunity to put the wireless pump control hardware and a pair of brand-new Chugger stainless pumps through their paces. Below is a video compilation of the segments I shot during that brew session. It is available in HD / full screen if you click the “YouTube” button and watch it directly from their site, otherwise you are stuck with the very tiny embedded display here.

NOTE: I had to re-generate the video and replace the original hyperlink due to some problems with missing captions.

The batch itself seemed to hit most of its targets (as best as I can tell) and is currently fermenting strongly. I say “most” because the original gravity measured 1.060, higher than I wanted. When I reviewed the BeerSmith recipe I found I had formulated it for a 11.2 gallon batch even though I ended up with 10 gallons. This 1.2 gallon difference is an artifact from back when I used ProMash and the program couldn’t account for the deadspace below the kettle valve. When I first started using ProMash I was constantly getting low gravities, so to compensate I measured the volume and built that in to all of my batches as a “fudge factor”. BeerSmith allows you to set up equipment profiles and includes deadspace in its calculations, so I need to stop adding the “extra” from now on if I really want to hit my gravity targets.
 
Hops!I have said this before, but I LOVE using a false bottom. This batch used only 2 oz of whole hops, German Hallertauer, and they were added as the bittering addition at 75 minutes. The flavor (2oz) and aroma (4oz) additions were French Strisselspalt pellets – I scoured the internet a few months back and could not find any whole Strisselspalt anywhere. Despite the majority of the hops being pellets, the false bottom and small amount of whole leaf hops did a fantastic job of filtering out the pellet debris and the wort that went into the fermenter was very clean.
 
On a completely unrelated note, Donna and I brought all my empty yeast vials out and counted them – I had 182. This is an accumulation over the past 10 years of most of the liquid yeast I’ve used and certainly does not represent the total number of batches / gallons I’ve made. Between yeast starters, dry yeast, Wyeast smack packs, and repitching those numbers are sigificantly higher. At any rate, we sat down and figured out what we want to get from the White Labs Customer Club program and packaged them up to send in. It’s nice to have them gone and out of the way!

Yeast Vials

Categories: Brew session, BrewzNET 2.0

Pilot Run – Lessons Learned

March 20, 2014 1 comment

The BrewzNET 2.0 hardware had a pilot test run this past weekend on a 5 gallon batch of belgian-style strong dark ale. I wasn’t sure (right up to the hour before) whether I was going to drag the extra gear up and use it, but my enthusiasm ultimately won out. Many things worked flawlessly and others not so much… but those that didn’t were minor and easily addressed without hardware design changes.

The wireless grant performed as designed and without issue. I used it to both recirculate the wort (vourlauf) and run it into the kettle. I even have a video of it in action, although the audio quality sucks at times.

The control box did a great job keeping track of the volumes, rates, and estimating the time remaining in the sparge. During the recirculation I dialed in a good sparge rate and transfer pump rate using the feedback the control box provided, and those carried forward into the sparge cycle.

Sparge Wire KnotUnfortunately the wireless sparge arm did not work as flawlessly. For the first several gallons I had to manually top up the mash run because the float switch states were not being transmitted at all. I ultimately opened up the electronics enclosure and identified the issue – at some point the wires disconnected from the header, likely resulting from accidently pulling on them at some point. This was easily remedied by tying a knot in the wires to prevent them from pulling through the enclosure hole. Super low tech solution, I know… but highly effective.

Another issue I found is the control logic for the sparge pump doesn’t work how I want it, particularly if the added water is insufficient to toggle the float switch state value. The pump turns off, and never turns back on because there is no subsequent state change. I need to rework this to either keep the pump on for another cycle if the state hasn’t changed, or have the “overtime” begin once the pump switch state goes from down to up. There is a danger that when the HLT becomes empty that the pump will stay on permanently until it is manually turned off… but I could potentially work in a pump maximum time setting to prevent that.

In testing the hardware I also recognized some features that would improve the usability. One significant improvement would be implementation of an “auto mode” setting that progresses the control mode from Manual to Recirc/vourlauf to Sparge depending on the wireless devices being turned on or off. Currently you have to turn on the grant, go to the control box, navigate to the control mode screen and select the mode, and navigate back. Recirc mode could be engaged automatically when the grant is turned on and Manual mode could be set when it is turned off. Sparge mode could be set when the sparge arm is turned on. This could save some unnecessary fiddling with the electronics when you really want to focus on the brewing.

There are a few other minor programming tweaks I want to make, and hopefully I will have then implemented and loaded to the Netduino in time for my next brew session. I want to use that one to capture more video of the hardware in action.

Categories: BrewzNET 2.0