Labjack brewing software

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.

justinm

Active Member
Joined
Dec 14, 2007
Messages
32
Reaction score
0
Location
Indianapolis, IN
I am just starting construction of my automated brewing system and purchased lab jack usb controller for controlling temperatures. However, I could not find any open source brewing specific software for the controller.

This means I would need to write my own software through DAQ factory, labview, or some other alternatives. This sounds fun but also really time consuming and possibly limiting with law school schedules.

I know a couple people on the boards like jrm16311 and deep six have written software for the labjack. I was wondering if there was any advise on where to start with the software development or if anyone had software they were willing to part with or sell. Ideally, I would like to customize the software to my rig, but would love to not have to reinvent the wheel if possible.

Thanks.

Justin Miller

www.symposiumbrewery.com
 
Well I decided to bite the bullet and start programing. The DAQ software is actually very easy to use. I have programed buttons for turning on and off the temperature monitoring of the HLT, MT, and Kettle, temperature read outs for the 3, and on/off switches for the pumps, propane, and electric heater.

Working now on an import system so recipes from beer xml or beer smith which automatically then set the water levels and temperatures. I will have pics of the GUI soon.

Once it is finished I will offer the source code free to anyone else who wants to use or improve it. I am using it with the Lab Jack U3 HV Home | LabJack, which I really like, but the software should work with any usb data acquisition device.

I love the Open Source idea of BrewTroll, but thought there should be an option of people who want a computer based system. I have so many old computers and servers lying around, I am always looking for an excuse to use them.

Justin
 
Awesome! Keep up the good work. I'll probably be interested in the software when you release it. Thanks.
 
Plumbing, electricity and some metalwork are all fine - but I draw the line at programming in order to make a beer. Good luck, that's WAY outta my league.

-OCD
 
Hey fellas. I'm certainly glad I'm not alone using labjack for automating my brewery. For a while there I thought I had taken on way more than I could chew with my vision for my brewery, inspired by some of the equipment here at work (biotechnology company). Not being a welder, machinist, electrician, plumber, computer IT guy, nor a programmer, this project has been very challenging.

Like you, I'm using Labjack to connect the I/O with my controlling PC. I'm also using DAQFactory for monitoring and control. DAQFactory uses C/C++ (one of the two, not sure if they are one in the same), but it's somewhat intuitive and easy to play with. I certainly wish I knew more on it. The software makes it easy to create a nice user interface.

Justin, if you need any help, I can certainly assist with the very limited knowledge I do have. If you get that export feature (to export XML recipes from BeerSmith) to work that would be awesome.

Updating on my build, the only thing left is installing the propane jet burners, propane lines, and the direct spark ignition controllers. I think I've left this for the end because of my apprehension with working with flammable gases. LOL. A hell, I learned to weld to make this thing, what's a little flammable gas...I guess I better not mix the two though. I'll post more pictures of the finished project. I'd like to brew my first batch in this thing here in the winter.
 
Justin or JRM - what do you figure you have invested in the LabJack/DAQFactory? Did you consider the BCS-460 or BrewTroller?
 
I decided on DAQFactory because I needed a software package that allowed me to scale my system as I needed. I needed to control over a dozen valves, pumps, and spark ignition units. I needed to monitor temperature probes, flow meters and level transmitters, as well as, logging/trend values throughout the process. I also wanted to create process sequences based on recipes (from BeerSmith) that would automate different types of mash profiles that would control mashing step temperatures and durations, infusion volumes and temperature, timing of these, etc.

Basically, I wanted to connect this thing to the electricity and water, turn it on, add the grain and hops as needed, and collect the cooled wort at the end and pitch the yeast. It's not that I'm lazy, I just thought it would be kind of cool, I wanted consistent brewing capabilities and the ability to review my brewing session data in case tweaking is needed.

When I was looking for something to fit these needs, I was not aware of BCS-460 or BrewTroller, so I didn't even evaluate them.
 
Basically, I wanted to connect this thing to the electricity and water, turn it on, add the grain and hops as needed, and collect the cooled wort at the end and pitch the yeast.

What? No automated dump buckets for unattended hop additions?
 
Regarding the porting of XML recipe from BeerSmith into DAQFactory, check this out.

Parsing an XML recipe - AzeoTech Forum

Thanks. I think I have it reading the xml file now, I just need to add all the different tags and make sure the info is put into the right places, which is time consuming.
Justin or JRM - what do you figure you have invested in the LabJack/DAQFactory? Did you consider the BCS-460 or BrewTroller?

I looked at both options for some time before deciding to go with the labjack. I really liked the idea of brew troller but wanted something I could use my 15" touch screen with instead of a little led display. I also wanted to have manual on/off switch for all the pumps, burners/heater elements which I do not believe brew troller currently does.

I liked the BCS-460, but decided it would be fun to be able to make my own custom gui and really wanted something that I could load recipes into and have all the variables already filled in.

After diving in with the labjack, I have thought a couple times about the lack of headaches I could have had if I went with one of the other options, but I am still optimistic. The DAQ software is easy for a beginner to pick up and it has been fun designing the control panel.

I have not yet purchased the temp probes for the lab jack. The ones they sell are $50, so I am trying to look for alternatives. Does anyone know if the BCS-460 probes would work with the labjack. I would love to not have to spend $150 on temp probes alone....this is getting pricey.

I will give an update if I get the beer xml loader functioning.
 
It is the probes that are expensive, but I am not going to use theirs if I can get around it.

The u3 is $108.00, and all versions come with DAQ Factory for free.
 
Hey Justin,

Like a few others on this site I am also in the process of writing my own brewing software. Although rather than using lab jack, I went with arduino.

Regarding temperature probes, have you considered making your own? I don't know anything about lab jack, except that it is super expensive, but if you have control over the temperature software then you might be able to get away with it. I will be doing this with a common thermoresistor in the next few days.

Also, Derrin, has several pre-made temp problems for various platforms.

Just a thought

Anywho good luck and keep us up to date.
 
Sounds awesome guys.
I have been following the brewtroller guys myself.
Its still developing, and one of the issues is getting reliable volume level sensing.
Have any of you got anywhere with that aspect? If so, what are you using as the sensor, and how have you set it up?
 
Thanks. I think I have it reading the xml file now, I just need to add all the different tags and make sure the info is put into the right places, which is time consuming.

...

That's great. Yesterday I tried getting the code in the response to work, but was unsuccessful with it. Does your code look like the one posted in the Azeotech forum that I linked above?
 
Crazy, I've spent the past two weeks looking to do the same thing and also plan to use the Labjack. I feel I'm still months away from starting this project, but am in the process of finding the hardware I will need to make this happen.

U6 And Pressure Sensors - LabJack Forum

The above post is where I am at right now. I plan to use the U6 because of it's higher resolution. Pressure sensors from Freescale seem great for volume control, but I'm still not 100% sure on this.

Programming is the main goal of this project as I'd really like to write my own GUI using .Net (C# or VB.Net) to fully automate the brewing process. As I'm not mechanical by any means right now I'm still trying to figure out all the aspects of gas burners, electrical and plumbing.

Anyway let me know how things go, also if you have any specific examples about plumbing gas burners that's where I'm currently stuck. I ordered the Brutus 10 semi plan from BYO, but there really isn't enough detail.
 
That's great. Yesterday I tried getting the code in the response to work, but was unsuccessful with it. Does your code look like the one posted in the Azeotech forum that I linked above?

I used that code as a starting point, but there are a few errors in it. I am at work now, but when I get home I will post some sample working code.

The one problem that I have not solved yet is how to differentiate all the duplicate tags that beerxml uses. For instance, there is like 10 different <name> tags, so this means you first have to tell the programs to find a catagory (like <hops>) and then find the name.

For programing purposes it would have been easier if beer xml had all unique tags such as <hop_name>, <brew_name> etc, but you work with what you got.

Like I said before, I am no programmer, so I am sure there is an easy fix. I was just excited to get it reading the xml at all.

Justin
 
Yes I saw the multiple duplicate tags issue, but figured I had to get it reading them first before I got to that one. If I understand the code correctly, it is specifying the line the tag is in. Not sure if I'm right, but if so, then you can handle duplicate tags by specifying the line it's in.
 
I looked at both options for some time before deciding to go with the labjack. I really liked the idea of brew troller but wanted something I could use my 15" touch screen with instead of a little led display. I also wanted to have manual on/off switch for all the pumps, burners/heater elements which I do not believe brew troller currently does.

I liked the BCS-460, but decided it would be fun to be able to make my own custom gui and really wanted something that I could load recipes into and have all the variables already filled in.

For the BCS-460, I think you could create a custom gui w/or w/out a touch screen as long as you adhere to the format of the html get/post it uses.

And for the BrewTroller/arduino, you could use the serial port; in other words, your gui app runs on a laptop and controls brewtroller via serial or BCS over a network.
 
The one problem that I have not solved yet is how to differentiate all the duplicate tags that beerxml uses. For instance, there is like 10 different <name> tags, so this means you first have to tell the programs to find a catagory (like <hops>) and then find the name.

For programing purposes it would have been easier if beer xml had all unique tags such as <hop_name>, <brew_name> etc, but you work with what you got.

Actually, Brad's got it right - they are intentionally the same. In XML, a tag, <name> in this case, is a name is a name and is always a name. It's the context it's used it that defines who's name it is. That is what makes XML schemas so powerful.

...but I digress :off:
 
Welcome to the world of flat file imports into arrays/tables, it is interesting watching your design progress and wondering how long it will take you to catch up.
 
Welcome to the world of flat file imports into arrays/tables, it is interesting watching your design progress and wondering how long it will take you to catch up.

Kind of a rude post. I'm sure you didn't mean it to sound as such but it is the equivalent of replying to a "is my beer ready to bottle" post by saying "good luck trying to decide it's fun watching you try to catch up to us good brewers."

I'm sure that wasn't your intention, perhaps a link to a good resource for new programmers trying to deal with arrays would be less condescending and more helpful. I'm a 15 year retired sysadmin so I am not able to help or I would.
 
Kind of a rude post. I'm sure you didn't mean it to sound as such but it is the equivalent of replying to a "is my beer ready to bottle" post by saying "good luck trying to decide it's fun watching you try to catch up to us good brewers."

I'm sure that wasn't your intention, perhaps a link to a good resource for new programmers trying to deal with arrays would be less condescending and more helpful. I'm a 15 year retired sysadmin so I am not able to help or I would.

agreed man. like we don't already feel dumb because we can't understand this programming stuff.
 
I'm not sure who that was thrown at, but there are many efficient XML parsers available in just about every language. Search "xml parser" or grab one from codeproject.com. If your using java, c, c#, perl, python etc, you'll never have to worry about arrays & tables. I might call XML hierarchical or maybe structured, but not flat. :mug: Cheers.
 
My intention was not to be rude or condencending, automated builds are difficult to accomplish, I have been working on an automated system for over a year and have begun the final testing and calibration for full automatic operation. If you were developing in Java I have a fair amount of code and graphics already built for an automated system that would be available if needed. It is a multithreaded application that has taken a bit of time to put together but includes multiple PID loops, SQL table storage of the variables used for system tuning and recipe generation, a sequence controller, alarm monitoring, and other functions for PID loop tuning. I salute your efforts to bring together a system and will refrain from any further comments.
 
To make your own temperature probes, consider using the LM34 from national.com or digikey.com. It is hard to beat for accuracy, cost, and ease of use. When you are using a voltage measurement instrument, silicon type sensors like the LM34 will almost always outperform thermocouples, thermistors, and RTDs. Consider silicon type sensors when the package works mechanically and you are in the range -50 to +150 deg C.

As noted on the datasheet, the EI-1034 from EIC (we sell it) uses the LM34CAZ. To make your own low-cost probe perhaps you could just solder a cable to an LM34 and then plasti-dip the whole end.
 
Here is the code I ended up using to import the xml. This is retrieving 2 items from the xml (date and efficiency) but it is pretty much rinse and repeat for all the other vars. I make no claims of any programing knowledge, but this has worked so far for me.

private handle = file.open("c:\recipes.xml",1,0,0,1)
global string date
global string eff
while (1)
private string datain = file.read(handle)
if (datain == "")
break
endif
switch
case (left(datain,6) == "<DATE>")
date = parse(mid(datain,6,1000),"<",0)
case (left(datain,12) == "<EFFICIENCY>")
eff = parse(mid(datain,12,1000),"<",0)
endcase
delay(0.05)
endwhile
file.close(handle)

You can then use a Variable Value Component to display any of the data retieved in your GUI or use the variables in your other code in place of numerical values. For instance if "mash" was your variable this code may regulate a propane burner or heating element:

while(1)
read(Temp1)
if (Temp1[0] < mash) // if Temp1 too low
Propane = 1 // turn on gas valve
while (Temp1[0] < mash) // wait until warmer
delay(1)
read(Temp1)
endwhile
Propane = 0 // turn off gas valve
endif
delay(1)
endwhile

Like i said before, I am just beginning to learn this stuff so take everything above with a grain of salt.

Justin
Symposium Brewery Indianapolis, IN
 
To make your own temperature probes, consider using the LM34 from national.com or digikey.com. It is hard to beat for accuracy, cost, and ease of use. When you are using a voltage measurement instrument, silicon type sensors like the LM34 will almost always outperform thermocouples, thermistors, and RTDs. Consider silicon type sensors when the package works mechanically and you are in the range -50 to +150 deg C.

As noted on the datasheet, the EI-1034 from EIC (we sell it) uses the LM34CAZ. To make your own low-cost probe perhaps you could just solder a cable to an LM34 and then plasti-dip the whole end.

Thanks for the heads up. I may try to make these work.

Link to National's LM34
 
Here is the code I ended up using to import the xml. This is retrieving 2 items from the xml (date and efficiency) but it is pretty much rinse and repeat for all the other vars. I make no claims of any programing knowledge, but this has worked so far for me.



You can then use a Variable Value Component to display any of the data retieved in your GUI or use the variables in your other code in place of numerical values. For instance if "mash" was your variable this code may regulate a propane burner or heating element:



Like i said before, I am just beginning to learn this stuff so take everything above with a grain of salt.

Justin
Symposium Brewery Indianapolis, IN

Where did you get this from? Nice work Justin. I'm using virtual channels to store these parameters, what are you using?
 
Just checking in on the progress you all are having. I am designing a system I plan on building this winter. I am doing research on what I need to control my system. So far I like the sound of using a labjack and daqfactory. I have an old laptop with a broken LCD. The computer works fine connected to an external monitor......sooooooo. I am thinking I will buy a small touch screen panel and mount it to my RIG.

Any of you willing to pass on your daqfactory layouts?(free, trade, or Payment) I would love to not have to program my system completely from scratch.

I figure I should have everything I need to start assembly after christmas.
 
I bought LabJack U3-HV, made several stainless temp probes, and then got crunched at work. I've got vessels, pumps, valves, etc ... and we hopefully restart my build soon. I have been playing with LabView, but have not decided which daq sw to use yet. I'll post more when things resume.
 
Subscribed. :rockin:

This is exactly what I was looking for. Each of the other systems has features I like, but also glaring holes in what I want.
This could definitely be the solution.

This could be a good use of a used tablet PC. Specifically a Tough Book.
 
Subscribed. :rockin:

This is exactly what I was looking for. Each of the other systems has features I like, but also glaring holes in what I want.
This could definitely be the solution.

This could be a good use of a used tablet PC. Specifically a Tough Book.


HHmmm......:D

I have a tablet for work. I wonder what the boss would say?... He might want too much of my beer in return!
 
Rise from the dead!!

So what ever happened with this attempt at programming? I'm thinking of going the Labjack route myself... Thanks!
 
Back
Top