Mash Monitor

Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum

Help Support Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

Jer

Well-Known Member
Joined
Sep 6, 2006
Messages
45
Reaction score
0
Location
Michigan
Right before I started my first AG batch (just finished my 3rd), I dropped and shattered my thermometer, luckily I had a thermocouple probe sitting my car that I borrowed from work (used it to test the coolers temperature loss)... Unfortuantely, my temps were all over the place before I got them to where I wanted too (water too hot or not hot enough..etc), so I thought it might be a cool idea to log those temperatures to see how well I was hitting my target temps for each brewing session...

So I came up with the following "Mash Monitor"... I'm still working out some of the bugs, and the temperature sensors (thermistor) need a bit of work with accuracy and stability (temps change too much, too fast.. maybe I need to attach them to a piece of metal or something??)

Anyways, so I have 2 sensors, one to monitor the water on the stove, and one for the mash in the cooler.. There are a couple of threshold alarms, and also alarms for each step, and a few other 'features'... Here's a screen shot of the program:
mashmonitor.jpg


Here's what my setup looked like:
setup.jpg


And then here is the hardware... It's from an old project, so there's a bunch of other junk on there that's not needed... If/when I do a layout for it, I think I can get it to probably about 1/8 to 1/4 of this size...

proto2.jpg
 
Dude, that is so friggin' cool. Damn, you're a smarter guy than I am; I'm a single infusion, set-and-forget kind of guy. What strikes me as odd, though, is the magnitude of the drop with that cooler. I have the exact same one, and I've had, at most, a one degree drop in temp over an hour (two degrees if I open and stir frequently). Looks like in your second stage, you dropped from 154 to 148, which is much more than I *thought* I was experiencing (maybe my probe's not as accurate ;))

Anyway, sweet setup!
 
Pretty cool. There's nothing like high tech and beer combined. As far as the thermistors go, you might have a more linear response if they were mounted to a piece of copper. Nice work.
 
Nice looking display screen, is this a visual basic application that you have built yourself to interface with the board in the picture. Do you have any plans to expand the scope of the application to include pumping and valve control in an expanded system?
 
Looks like in your second stage, you dropped from 154 to 148, which is much more than I *thought* I was experiencing (maybe my probe's not as accurate )

Actually, unfortunately, that wasn't the actual screenshot of it in action, I took that one when I was testing the software out, so I hope I don't lose that much heat either... When I originally tested the cooler, I brought 2 gallons of water to 155 after preheating the cooler with boiling water and it only lost 2 degrees over an hour....
 
Nice looking display screen, is this a visual basic application that you have built yourself to interface with the board in the picture.

I used Borland C++ Builder to create the app, and just use normal rs-232 serial to communicate with the board, although I'm kinda reading up on USB stuff, that way I could power the board through USB instead of an external power source..

Do you have any plans to expand the scope of the application to include pumping and valve control in an expanded system?

I'm still thinking about adding some relays.. I originally wanted a little device that could control some fans so that I could blow cold air from outside into a little box when the temp in the box got too warm, so that I could lager over the winter, but I got distracted by needing a thermometer for mashing.. :)

I've been looking on ebay for some heater elements and solenoid valves cause I thought it'd be pretty cool to automate the whole mash process.. Although I'm still pretty new to AG and am batch sparging, so I don't know if I should look into other methods if I'm going to automate it..
 
Just RS-232...

10k thermistor in series with a 10k resistor. Using a 0-5v for the Vref (10 bit a/d)which can get around .2 degrees accuracy (at the lower temps( <120F)) and maybe 1 to .5 degrees at the higher temps, since it's an NTC thermistor and isn't linear... If I scale it between 100F and 204F I can get almost .1 degree accuracy over that range, but then self heating and some other factors come into play with that kinda accuracy, so to avoid some extra work I round to the nearest degree...
 
Have you considered one of the small scale plc products sold on Ebay that would accept industry standard temperature sensors and provide digital and or analog outputs for control
 
Nah, that would take all the fun out of it... I like tinkering, and I have nearly everything I need to make it, with the exception of the loads (elements, pumps...etc)... Not to mention I can adapt it anyway I need.

Besides, I could also just go to the store and buy a 6-pack of beer instead of brewing, but I choose to brew.. :)
 
This sounds like something brewman was talking about working on. I think he was looking at buying a unit and writing the interface.

Maybe you two could work together.
 
Nice! I'm jealous!

I have my degree in Computer Science, and I'm a self-taught DIY guy, so I can build stuff, and I can program stuff, but I'm almost helpless when it comes to interfacing the stuff I build with the stuff I program...which is where you apparently shine!

I was thinking of making a mash monitor of sorts out of a Ranco controller and a furnace valve to turn the burner on and off under my HERMS HLT in order to keep the heat exchanger at a constant temperature (and/or raise the temperature in the case of step mashing).
 
Yuri
Look for one of the electric gas burner ignition modules that both ignite and test for flame presence, and control a solenoid valve, this way you wont find out what happens when the gas flows through the burner without igniting. Furnace control valves are not designed for anything other than low pressure propane (11"WC) or natural gas use, which leaves out most of the popular (cheap) high pressure propane burners. There are a few high pressure safety shutoff valves made but are usually spendy, mostly used on space heaters. If one is patient you can find the ignition modules, 24V transformers, solenoid valves, and ignition components on Ebay at reasonable cost. As to safety, GFCI for line voltage connection, test all the piping joints for leaks with a soap solution, ignition testing with out gas to confirm module provides spark and locks out fuel valve after time delay, and finally with fuel (preferably outdoors) to confirm burner ignition and flame sensing.
 
Could you do something similar to this for a temp probe:

thermowell.jpg


put that stopper in your carboy and use it to monitor fermentation temps as you go? That might be nifty.
 
kladue said:
Yuri
Look for one of the electric gas burner ignition modules that both ignite and test for flame presence, and control a solenoid valve, this way you wont find out what happens when the gas flows through the burner without igniting. Furnace control valves are not designed for anything other than low pressure propane (11"WC) or natural gas use, which leaves out most of the popular (cheap) high pressure propane burners. There are a few high pressure safety shutoff valves made but are usually spendy, mostly used on space heaters. If one is patient you can find the ignition modules, 24V transformers, solenoid valves, and ignition components on Ebay at reasonable cost. As to safety, GFCI for line voltage connection, test all the piping joints for leaks with a soap solution, ignition testing with out gas to confirm module provides spark and locks out fuel valve after time delay, and finally with fuel (preferably outdoors) to confirm burner ignition and flame sensing.
Thanks for the tip - I hadn't seen anything like that, but it sounds very useful. I'm using natural gas (see the Mega Burner link in my signature) which is why I chose the furnace valve. I may still use the furnace valve since I already have it along with a 24V power supply. Of course, safety is of the utmost concern, so I will certainly be sure of a leak free system with a safety shutoff in the event of no flame. Thanks again, though - the components in what you describe sound like the ticket to making a pretty foolproof system!
 
"I used Borland C++ Builder to create the app, and just use normal rs-232 serial to communicate with the board, although I'm kinda reading up on USB stuff, that way I could power the board through USB instead of an external power source.. "

I'm doing the same thing. I got USB working today as a matter of fact. I used libusb which will compile and run under C++ Builder. I love C++ Builder, but it doesn't run under Linux, which my projects have to. So I am using Eclipse and Java, which runs on anything. I know about Kylix, but its buggy and unsupported.

I'm using the Ardriuno board, btw. It has USB built in.
http://www.sparkfun.com/commerce/product_info.php?products_id=666
 
I have my degree in Computer Science, and I'm a self-taught DIY guy, so I can build stuff, and I can program stuff, but I'm almost helpless when it comes to interfacing the stuff I build with the stuff I program...which is where you apparently shine!

I'm an EE by degree, but fell more into the embedded software (automotive) side of things... I really love the idea of controlling 'real stuff' with software/hardware...

Could you do something similar to this for a temp probe

It could easily be adapted to that, and just slow down the sampling rate to once every 15 minutes or so... I've never considered monitoring temps for fermentation yet.. All I do is ales so far, and the room I keep them in is generally 65-70 and I've had no problems so...

I'm doing the same thing. I got USB working today as a matter of fact. I used libusb which will compile and run under C++ Builder. I love C++ Builder, but it doesn't run under Linux, which my projects have to. So I am using Eclipse and Java, which runs on anything. I know about Kylix, but its buggy and unsupported.

Very nice... I'm not much of a PC programmer. I can generally get things to work, but no doubt anyone who does it regularly would laugh at my code, but C++ Builder makes things pretty easy.. Thanks for the tip for libusb.. Unfortunately I haven't had too much time to work on this lately, but I wanna get back into it within the next week or so...

That Ardriuno board looks pretty nice, and it's pretty cheap, especially for what it does... For small projects at home, I pretty much stick with the (PIC microcontrollers , which are fairly simple to use, also pretty powerful for the price, and have a fairly wide variety...

The next step is to build something similar to this:

waterheater.jpg


The idea is to enter in a volume and a temperature (e.g. 3.75 gal at 130*F) and it will fill with the appropriate amount of water, and heat to 130... Then set an alarm, or maybe have it drain directly into the mashing cooler, although I'd need to work on a way to automatically stir for that..........
 
Hmm...this thread popped up in the "New" pile right after I downloaded the Arduino software package to check it out. The Arduino board and software look simple enough, and I'm excited to order one and try it! After reading about brewman's success with steam injected mashing, I may switch gears to a similar system. I really like the idea of less moving parts, and electric elements are easier (and safer) to control via automation. If I'm ambitious, I'll re-teach myself Java and create a brewing app to interface with an Arduino board, some thermistors, and a few relays. Otherwise, I think I could flash a simple temperature control program onto the board itself. If I'm being really lazy, I might start with an ugly VBA driven piece of garbage from within Access or Excel (MSCOMM32 might work in that case).

Anyway, the Arduino board solves a lot of the microcontroller headaches that I would've run into with a breadboard and individual components. Thanks for the UberGeek oriented thread(s), and good luck to all with similar projects in mind!
 
Yuri_Rage said:
If I'm ambitious, I'll re-teach myself Java and create a brewing app to interface with an Arduino board, some thermistors, and a few relays.

Then of course you are going to teach me how to do this so I can do the same thing!

-John
 
The Java part is easy. Download the Eclipse IDE and install the Visual Editor package. (www.eclipse.org) Its actually more work to to the downloading and installing than it is to write code with it.

With VE installed, you build the user interface by dragging and dropping components like buttons and text boxes. Then you fill in code behind the controls to make them do things. Its pretty straight forward.

Using libusbJava is a little more involved, but I've got the kinks worked out of that.
 
brewman ! said:
The Java part is easy. Download the Eclipse IDE and install the Visual Editor package. (www.eclipse.org) Its actually more work to to the downloading and installing than it is to write code with it.

With VE installed, you build the user interface by dragging and dropping components like buttons and text boxes. Then you fill in code behind the controls to make them do things. Its pretty straight forward.

Using libusbJava is a little more involved, but I've got the kinks worked out of that.

yeah the USB aurdino is nice but the New Bluetooth Aurdino is Awesome!!!

http://www.sparkfun.com/commerce/product_info.php?products_id=8255

yup its wireless now.

As for interfacing to it, you are basicly just talking to the chip via rs-232 serial. THere are accually different versions of the Aurdino that connect up via serial, usb, and bluetooth, but ultimatly you are just making the pc see another serial port.

I too plan to be building a mashing system as well, I've just been waiting for some $$ to free up. Though i really need to buy a couple other items before i start this project..

We should really startup a project like on source forge and pool our talents on this project. Just an idea.
 
$139 for the BlueTooth version ! For $100 over the USB version, I can use a USB cable.

The other issue is the PC side of things, finding a Java/Windows library for BlueTooth. Linux has about a dozen various BlueTooth libraries. None of them are for Java, but that could be rectified with the JNI interface.

But between the $139 for the card and the fact that I have one and the lack of a Java library for Win/Linux and Bluetooth, I think I will pass on the Bluetooth part.

The reason I chose Java and libusbJava is that the PC can be Mac, Windows, Linux or even BSD. Nothing like having a server grade computer running your brewstand.

I'd love to have a 20 inch touchscreen mounted right on my brewstand.
 
I had gotten a book called "Linux Toys" for christmas and it had a project using 1 wire probes for temp and humidity recording... I have been on and off trying to think how to liquid proof the sensor so I can monitor my temps.. I may have to get on the ball to get ahead of some of you guys.. dangit!!

SpamDog
 
brewman ! said:
The Java part is easy. Download the Eclipse IDE and install the Visual Editor package. (www.eclipse.org) Its actually more work to to the downloading and installing than it is to write code with it.
Going straight to the source (Sun) proved to be a great solution, also. I downloaded the latest JDK and NetBeans IDE from http://java.sun.com last night before I read this post, and it's one of the nicest programming editors/GUI builders I've worked with. I might check out Eclipse's offering as well. The Java language concepts are coming back to me faster than I expected. I think I may have a shell of an application up and running pretty quickly (GUI and all monitoring/control logic with placeholder classes/methods for the serial/USB interface until I can get a hold of an Arduino board).

As far as the Blue Tooth option, for me, it's a waste of money at the moment. I don't have any Blue Tooth devices right now anyway, and I really can't justify the price.

You guys really have the gears turning in my brain right now, though. I'm thinking that with a couple of actuated valves and flow meters (expensive?), I could completely automate fly sparging as well.
 
most of what you guys said flies right by me. But couldn't you use a coffee maker element to heat the sparge water as it flows/trickles through the sparge arm:confused:
 
eriklupust said:
most of what you guys said flies right by me. But couldn't you use a coffee maker element to heat the sparge water as it flows/trickles through the sparge arm:confused:
I suppose you could, but having a heated HLT sort of eliminates the need for that. For 10-15 gallons of sparge water, I think a small element like that would be highly inefficient. I'm not completely poo-pooing your idea, though, as I could see it having some value, especially in a mini-mash system.
 
The coffee maker element idea is not a bad one but you would need 3,000-4,000 watts to be able to do a 30 minute sparge with 5 gallons, coffee makers are 800-1000 watts typically. You could put a gas burner under a coil of tubing but that would be a manual control only setup. The upside of the gas burner tubing setup would be the ability to heat water on demand to strike and sparge temps but it would require a way of pushing the water through the tubing, pressurized cornies or pump from container.
 
You might want to check out my mash steam heating posts. As far as I can tell, that is about the simplest way to heat a mash.
 
I got all excited about this automation thing, and since I'm currently out of the country with only one brew going (see Pilsung Porter in my signature), I've been itching to get my hands on a brew project. So, I scratched together some Java code like I said I might. Here's two screenshots of my very early test application:

4688-mashmonitortest.JPG


On the left, the program is basically just lying in wait for user interaction and displaying the actual mash temperature (at 60 degrees). On the right, a mash temp of 155 is selected, and the software is automatically turning the mash heat on and off. With the automation turned off, the user has the option to turn the heat on and off with the toggle button. The "Delta" is the temperature differential below the target temp at which the heat will kick back on.

All of the logic for this portion of the program is finished, though I think I will convert it from integer temperature variables to floating point variables for more accuracy. Because Java so elegantly (or easily...) supports threads, almost every user action spawns or kills a thread. Sensor input is currently emulated by very simple inc/dec threads, but the intent is to have a SerialPoll class that, when created and an instance of "run" is spawned, it will continuously update a "value" field with a sensor reading (at some interval equal to or less than one second).

Additional panels for temperature control will be easy to add at this point (for control of a steam vessel, HLT, etc). A HERMS system is just as easily controlled via an almost identical scheme...just turn the recirculating pump on instead of a heating element when the mash is too cold. Additional controls for pumps, valves, and burners (with appropriate safety plumbing/shutoffs) are as simple as adding buttons and creating a "SerialSwitch" class that will control relays and/or low power DC switches. With a liquid level sensor (perhaps as simple as a float and potentiometer) and a stepper motor controlling a valve, I think it's possible to automate fly sparging, also (in lieu of expensive flow sensors as I alluded to previously).

I'd post the source code, but it's a bit cumbersome, and this post is already a bit long...

I'll probably fiddle with the code and GUI a bit more until I can get a hold of an Arduino board and actually start interfacing with it. Java serial libraries, here I come!

Whaddaya'll think of my first hack?
 
Looks good.... Should be interesting to see what everyone makes their interfaces look like with the different levers and indicators...

For liquid level detection, I plan to use a pressure sensor as described in this app note...

I recently ordered 2 solenoid valves, a 1500Watt heating element, and a couple of 15a relays to play with... I'll probably try to throw it all together next week and then start working on the software.. I have a rudimentary version that will turn the loads on or off with a click of a button for testing the mechanical stuff out...

For the automation stuff, do you plan on just writing it into the SW app you use, or do you plan to come up with a simple scripting language for customization?
 
For the automation stuff, do you plan on just writing it into the SW app you use, or do you plan to come up with a simple scripting language for customization?

Algorithms in the application, input data like setpoints, times, etc, in am XML doc. Java supports those.

I'm jealous you guys have time to work on yours ! It will be at least the beginning of April until I do.
 
Not bad.. Java's swing libs make everything look nice dont they?
FYI on the aurdino:

<technical>
the Arduino board makes a 10-bit analog to digital conversion. This means that it will map input voltages between 0 and 5 volts into integer values between 0 and 1024.
</technical>
 
Jer said:
For liquid level detection, I plan to use a pressure sensor as described in this app note...

I recently ordered 2 solenoid valves...
I like it! Realize, though (and you might already know), that solenoid valves are binary (full open or full closed). That means that for fly sparging, you may have to have some means of flow restriction on the outlet side of your pump or gravity feed system so that the sparge water doesn't rush into the mash too quickly. That's why I was thinking about using a stepper motor to control a ball valve.

For the automation stuff, do you plan on just writing it into the SW app you use, or do you plan to come up with a simple scripting language for customization?
I was planning on initially just hard coding everything until I get the bugs worked out of simple automation tasks like sensor input and switch/motor actuation. Eventually, I plan on using a setup dialog where the user specifies how devices are connected (i.e., which pins he's using on the board), calibrates any sensors, and selects a mode of operation (RIMS, HERMS, steam, etc). The mode selection may be a moot point - if I offer up to three temperature controls, two level sensing controls, and a few manually controlled toggle switches, I think one could control most any brew system.

MadWeezel said:
Not bad.. Java's swing libs make everything look nice dont they?
FYI on the aurdino:

<technical>
the Arduino board makes a 10-bit analog to digital conversion. This means that it will map input voltages between 0 and 5 volts into integer values between 0 and 1024.
</technical>
Thanks! Yup...gotta love the Swingset... Thanks for the info on the Arduino - I guess I'll keep my serial thread variables as integers, then convert to floating point with a calibration factor.
 
though (and you might already know), that solenoid valves are binary (full open or full closed). That means that for fly sparging, you may have to have some means of flow restriction on the outlet side of your pump or gravity feed system so that the sparge water doesn't rush into the mash too quickly. That's why I was thinking about using a stepper motor to control a ball valve.

Currently I only batch sparge, and I see no reason to change yet since I more or less just started AG and am fairly happy with my process (so far)... So I have little need for flow control besides off and on...

For controlling a valve, maybe a servo motor like for radio controlled type stuff might be easier to control (if you just plan on physically turning the valve) than setting up control for a stepper.. I think those are just voltage controlled, so you could just use PWM and some type of simple lowpass circuit (resistor and a cap) to get variable voltage from the board...

I received my solenoids and relays, now just need to wait for the heating element... I'm headed to the UP (Michigan) for the weekend and a couple days next week, so I probably won't be making much progress except for maybe working on the software on the ride up...
 
Fair enough, Jer. Batch sparging is much easier from an automated control standpoint.

As far as servos vs steppers...it seems there is an eternal debate about which is better. Ultimately, price and availability will probably drive which one I use.

Best of luck on everyone's systems - I'm excited to see what you come up with!
 
Back
Top