Automate your electric brewery - 4 Testers needed for open source project

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.

braumke

Member
Joined
Nov 29, 2015
Messages
17
Reaction score
2
The project is a webserver (Windows or Linux) that controls your electric brewery. Get access and control from any web browser.

What?
I am looking for 4 volunteers to provide feedback on an open-source project to automate your home brewery.

Contact
If this seems interesting to you, PM me and I can get you started.


Why this project?
Because, I have a background in HMI/SCADA, industrial automation, PLCs and electronics. I have tried the arduino/ESP8266 combo with custom Temp sensor board and it's a labor of love. So back to my other passion of HMI.

This project uses (free) industrial automation software to run your homemade beer factory. Some benefits are:
  • Coding not required to make changes (similar concept to Wordpress for websites)
  • Professional, long-term development of the platform (it will be around for many decades)
  • Reliable, stable platform (used to run actual breweries and power plants)

What is the platform?
This project is based on the free maker edition of the Ignition platform. They just released the maker edition this year, for the first time ever. All features, all modules free to use (non-commercial use). That's worth about $20K per server.

This project uses the free Maker Edition of the Ignition platform.
Ignition Maker Edition | Inductive Automation


About the project
This is an open-source project that gives you the config for the Ignition server. Take a look at the (basic, starting) project site below.
Brewery HMI

This project relies on user inputs and feedback from the real-world (you type in the values). There are easy hooks to link up a real system. So, if you wanted to automate some of the inputs/outoput and feedback it is possible (ex. read temperature from sensor. Turn heat source on/off).

One big advantage of using Ignition is the easy connection to devices. The protocol list is extensive Modbus, MQTT, HTTP post/get, nearly any PLC, etc.
You don't need to be a programmer to use this or modify to your needs (everyone's brewery is unique).

Take a look at the Ignition platform (link above). If that seems interesting to you then yes, please check out the this open-source project as well. It will save you a lot of work.

What do I get out of this?
A better web server to automate my electric brewery.
I'm going to do this project regardless. But having your feedback to find bugs, make it better, and add suggestions would be a great help. We all win.


Let me know what you think? Is this worth spending time on?
or do we already have solid choices in our brewing community?
 
I'm interested but need to finish my 3d printer before I take anything else on. I was production lead on a HMI/SCADA system many years ago so I had a look at OpenScada and Igss.

They are wonderful systems but as far as I could tell the components would be very expensive, even a serial board for a PC is big bucks and they were just part of a bog standard PC.

Does Ignition support USB and the cheap relays and sensors sold for RPi and Arduinos?

Atb. Aamcle
 
A simple USB to Serial cable will work, yes. I'm sure just about any type of TCP/IP device can be made to work.

Ignition server runs on a computer; Windows or Linux. There is no custom hardware to buy; and the Maker Edition gives you every feature they have for free (non-commercial use).

As for the hardware interface between relays and sensors, you still need to solve that. I ran a Modbus TCP Arduino and that interfaces just fine. You can also easily use MQTT. But you need some type of hardware device to run your I/O (temp sensors, relay control, etc). no way around that.
It looks like Ignition can also run on a raspberry pi; but I have not tried that. That would require their Edge version. I don't know if the Ignition Edge is available as free (maker edition). Installing Ignition Edge on Raspberry Pi

for now, I am just focused on getting the user interface setup and going. Any Modbus or MQTT device is probably going to be the easiest (outside of using an industrial PLC).

Let me know when you want to try this HMI for your brewery.
 
A simple USB to Serial cable will work, yes. I'm sure just about any type of TCP/IP device can be made to work.

Ignition server runs on a computer; Windows or Linux. There is no custom hardware to buy; and the Maker Edition gives you every feature they have for free (non-commercial use).

As for the hardware interface between relays and sensors, you still need to solve that. I ran a Modbus TCP Arduino and that interfaces just fine. You can also easily use MQTT. But you need some type of hardware device to run your I/O (temp sensors, relay control, etc). no way around that.
It looks like Ignition can also run on a raspberry pi; but I have not tried that. That would require their Edge version. I don't know if the Ignition Edge is available as free (maker edition). Installing Ignition Edge on Raspberry Pi

for now, I am just focused on getting the user interface setup and going. Any Modbus or MQTT device is probably going to be the easiest (outside of using an industrial PLC).

Let me know when you want to try this HMI for your brewery.

After a bit of research, I'm pretty sure I can easily get Ignition Maker onto a pi. From there it's just figuring out the easiest route to get data from the GPIOs into Ignition. Node Red would work, but I'm thinking Ignition's Serial Module may be a better option. That would allow homebrewers to use familiar, cheap hardware.
 
When you say automate your brewery, is that hot side, cold side or both?
What do you want your automated brewery to do?

Sierra Nevada and Stone Brewery use the Ignition platform. So I'm confident we can make this to work for anything we need at home.
Sierra Nevada Brewing Co. Makes Ignition Its Go-To SCADA Solution
Brewery Improves Efficiency in Multiple Areas with Ignition

To start, hot side. Yes, I would love to have fermentation profiles later on.
Ignition ties in very well with databases, good for storing all that ferm temp data and making nice graphs.
But at the moment, basic needs are handled really well with the Inkbird. So I plan to start with that.

The Inkbird WiFi ITC-308 is only $50 ($40 right now on Amazon), which has both heating and cooling with wifi control. That price is really tough to beat for a PID control, with two AC relay controls. I haven't seen an API for that, but if there is one that would make the most sense. Use the API with this Ignition automation project.
 
Project page updated with screenshots, demo video, and some commercial brewery links (promo videos from the software vendor).

The promo videos give a good idea at what's possible.
 
I got data coming from the pi to Ignition via Node Red and the Node Red Module for Ignition. Once you have it setup, it's easy to communicate with temp sensors and GPIOs. I just bound Power to the temp tag I created to demonstrate. It's showing C currently.

1606858722402.png
 
I got data coming from the pi to Ignition via Node Red and the Node Red Module for Ignition. Once you have it setup, it's easy to communicate with temp sensors and GPIOs. I just bound Power to the temp tag I created to demonstrate. It's showing C currently.

That is cool. Glad to hear the setup was easy.
I was going to start with the Automation Direct controllers for Arduino, but I might have to change my mind to use Rpi instead.
https://www.automationdirect.com/ad.../open_source_controllers_(arduino-compatible)https://facts-engineering.github.io/
 
That is cool. Glad to hear the setup was easy.
I was going to start with the Automation Direct controllers for Arduino, but I might have to change my mind to use Rpi instead.
https://www.automationdirect.com/ad.../open_source_controllers_(arduino-compatible)https://facts-engineering.github.io/
I have node-red setup in windows on arm running on a Pi 4 with 4 G memory to export recipes into BruControl. Please see my post in automated brewing. I would be interested in testing your project. I use propane, however...
 
I have node-red setup in windows on arm running on a Pi 4 with 4 G memory to export recipes into BruControl. Please see my post in automated brewing. I would be interested in testing your project. I use propane, however...
Okay, I'll take a look. I just got the Rpi 4 with 4G a couple days ago. So I am quite excited to get it working.

Propane is not going to be a problem to automate with Igntion (the platform that I'm using).
Literally, anything will work there.

Do you have automated gas valve control for your burners?
Or, what is the list of things you were hoping to automate or tie into the software?

I'm going to update a version this weekend. I can mock-up any suggestions that you have.
 
It would be awesome - though perhaps not without some risk - to have something that doesn't require a Honeywell gas controller involved in managing something like an HSI pilot with flame detector (<= that could be tricky) to light a main valve to a burner like a bg14...

Cheers!
 
Okay, I'll take a look. I just got the Rpi 4 with 4G a couple days ago. So I am quite excited to get it working.

Propane is not going to be a problem to automate with Igntion (the platform that I'm using).
Literally, anything will work there.

Do you have automated gas valve control for your burners?
Or, what is the list of things you were hoping to automate or tie into the software?

I'm going to update a version this weekend. I can mock-up any suggestions that you have.
Braumke,
As to your questions, I use honeywell gas valves with a standing pilot. I the am having difficulty in automating the burners to keep a specfied temp range. Are we talking the use of rpi os or perhaps ubuntu (and gentoo for that matter) for Ignition?
 
Braumke,
As to your questions, I use honeywell gas valves with a standing pilot. I the am having difficulty in automating the burners to keep a specfied temp range. Are we talking the use of rpi os or perhaps ubuntu (and gentoo for that matter) for Ignition?
I'd be surprised if a PID controller couldn't give you a stable temperature. But that's not always an easy task; tuning PID controllers is a real art/science.
This company built a custom module for Ignition to do that (was free, looks pay only now). But this gives you an idea to the problem of PID tuning, and how using a platform like Ignition (to record and analyze data) can help:
https://www.jlbcontrols.com/pidbot

Ignition runs on either Linux or Windows, like a web server. You can use any web browser as a client; desktop, tablet, or phone it can adapt the screens to your resolution.

Ignition is primarily a user interface; with database recording, trending, and alarming. Yes, it can also perform control/scripts (like a PID control for heat sources).
But, I would defer that PID task down to the I/O level with a controller; like the Automation Direct P1AM, or maybe even NodeRed on Rpi.
https://flows.nodered.org/node/node-red-contrib-pid
@estricklin tried running the Maker Edition server on Rpi, but that didn't work. His idea is to use Rpi as a NodeRed controller and as the Ignition client at the brewery; with a touch screen display there. You would just need to run Ignition on a PC to host the server software.
 
It would be awesome - though perhaps not without some risk - to have something that doesn't require a Honeywell gas controller involved in managing something like an HSI pilot with flame detector (<= that could be tricky) to light a main valve to a burner like a bg14...

Cheers!
Yeah, it would! I did see some homemade ideas to run propane heaters (Google searching). But I didn't see anything I would try that competes with the price (safety) of a Honeywell gas controller.

I'm heading down the electric brew path; but I will add good PID control into this project list.
You'll just have to find a good device to run your gas valves.
 
I think it's a good idea to start thinking about how to do temp control for sure.

Here is what I would consider a list of options:

1. Use software PID in Ignition. The Ignition PID module is pay for, and I don't know if it's been updated so I would say that's not the best idea personally. As far as I know, Jython does not have a native PID library, and neither does Java, will check into this more.

2. Use the node red node for PID control. This seems like a good idea, although getting the correct tuning parameters would be very difficult, because I see no way to auto tune, although I haven't done much research into it admittedly.

3. Full disclosure, this is sort of my personal favorite idea. In the settings tab of the project, have a list of settings for each temp control process. So it could sort of look or work like this, assuming in this case 100% means full power, be that to a valve or for an ssr:
Temp Delta 100 = 100%
Temp Delta 50 = 100%
Temp Delta 10 = 50%
Temp Delta 1 = 1%
Each Temp Delta and each percentage could be user defined in the settings, along with an output scale. Then all I have to do is write an easy script or some clever expression bindings. This would allow people with propane to use it, ssrs, and even people with a simple on/off control could also use it. I would also have some predefined temp profiles (or whatever you want to call them). In the tab where the equipment is, we could put a drop down so users just simply select which profile they want to use for each piece of equipment.

I just don't care for PIDs outside of an actual piece of hardware personally. I never did get the one on my Arduino tuned correctly, and eventually gave up and wrote code similar to what I listed above.
 
@estricklin So, you could choose a duty cycle for temperature control?
Basically, a script automatically changes between 100% and 1% duty cycle to control the on/off of the heat source. Ex. if your HLT is under temp by 10F then use the 50% duty cycle. When it gets to under 1F then use 1% duty cycle?

Anyway, sounds easy enough to add.
I'll still look into the NodeRed PID control at some point.
 
@estricklin So, you could choose a duty cycle for temperature control?
Basically, a script automatically changes between 100% and 1% duty cycle to control the on/off of the heat source. Ex. if your HLT is under temp by 10F then use the 50% duty cycle. When it gets to under 1F then use 1% duty cycle?

Anyway, sounds easy enough to add.
I'll still look into the NodeRed PID control at some point.
I had some time to think about it some more, I can easily write an expression binding for it, a continuous script running like that in the client scope is never good in my experience. The good news is, if we setup a profile for using the node red PID as well, we can just let users select that from the drop down as well, in other words both is an option for very little more complexity.
 
I had some time to think about it some more, I can easily write an expression binding for it, a continuous script running like that in the client scope is never good in my experience. The good news is, if we setup a profile for using the node red PID as well, we can just let users select that from the drop down as well, in other words both is an option for very little more complexity.
Yeah, that's what I was thinking. An easy way to let you choose how you want to control the heat.


Something new with NodeRed... PID AutoTune for brewing. I'll try this out next and see what happens
node-red-contrib-pid-autotune
 
This is cool! I work with Ignition daily at work and did some testing with maker and raspberry pi a few months ago, but you made it much farther than I did. I'll check out your project some more.
 
Just letting everyone know, I've started working on this again.

There's been one change, the Ignition Maker version of the Node-Red module is no longer available as far as I can tell. So, today I'm working on finding the easiest solution to get data from Node-Red to Ignition. I think that's going to be via MQTT using Cirrus Link's MQTT Engine Module and the free Mosquitto Broker.

@braumke any updates?

I've been doing a LOT of perspective development the past year, and I think I have some good ideas on how to setup the project to work with different brewery types. I'll post some screen shots in case anyone is interested.
 
@estricklin I would be interested in screen shots! I just started playing with this today (new to Ignition completely, have minimal experience coding a few languages as well as PLCs). Are you using the BeerXML import currently? That is a huge feature that I'm looking for in my system. Basically all I need an Ignition-type solution for is for visualization, tag gathering, and initial modification of tags based on a BeerXML import. Once the tag values are set, I will pass those along to a Click PLC via MQTT or Modbus TCP/IP and can control it locally.

FYI, the route I'm planning on going for PIDs is using the Automation Direct Solo PIDs as they accept Modbus RTU. The click will pass the PID the configuration parameters and in the event I screw something up, I can manually control my brew day without the PLC/Ignition software.
 
@estricklin I would be interested in screen shots! I just started playing with this today (new to Ignition completely, have minimal experience coding a few languages as well as PLCs). Are you using the BeerXML import currently? That is a huge feature that I'm looking for in my system. Basically all I need an Ignition-type solution for is for visualization, tag gathering, and initial modification of tags based on a BeerXML import. Once the tag values are set, I will pass those along to a Click PLC via MQTT or Modbus TCP/IP and can control it locally.

FYI, the route I'm planning on going for PIDs is using the Automation Direct Solo PIDs as they accept Modbus RTU. The click will pass the PID the configuration parameters and in the event I screw something up, I can manually control my brew day without the PLC/Ignition software.

I think I understand what your going for. Your welcome to PM me for help, I work with Ignition daily in my job as a SCADA Systems Developer.

Edit:

I read through the Beer XML standard and that is just too good not to use. I use Beersmith sometimes and that would be an awesome way to get your target temps, timers, whatever into Ignition. The code to parse the xml should be pretty straight forward, I think I know some good ways to handle this.
 
Last edited:
Thanks for the response @estricklin! I have decided that I like the idea of using Ignition and getting comfortable with it since it is so versatile and would be helpful for other project I run into. I decided to start from scratch though so I've just spent some time the past couple of days messing around with getting various data streams into Ignition to see what I can do. Getting Modbus TCP/IP over the network is super easy, added in a CompactLogix just to see if I can access the tags and its connected devices, added in the SOLO PID over RTU via a USB converter, etc. Very easy to use and get data flowing.

For the Beer XML, I did use the Etree Library (Parsing XML with the Etree Library - Ignition User Manual 7.9 - Ignition Documentation) to bring in the XML file and that is as far as I have gotten. I fought with it for a while and figured out the system.file.openFile() command isn't an option with the libraries I have installed. Being a newbie to this, I saw that system.file.readFileAsString() was an option so I have that working now. I'll need to figure out what library to bring in to have .openFile as a valid option or see if I can parse it out a different way. Next goal will be to try to parse it out and start to use them as tags in the GUI.

I'll let you know if I make progress with it but it sounds like you are way more proficient with the software so if you beat me to it, let me know! I'll PM you if it makes sense to share any files or talk offline but others might get some benefit from seeing some of this in the thread.
 
I'm pretty sure
Python:
system.file.open()
is client scoped, and strictly for Vision clients. I actually haven't needed users to upload any files in Perspective yet, so I would have to look at the docs to see what's available. This code will work in the gateway console though.
Python:
import xml.etree.ElementTree as ET
filepath = open(r'C:\Users\Eric\Downloads\clite.xml')
tree = ET.parse(filepath)
root = tree.getroot()

tag_list = ['BOIL_TIME','DATE','NAME','HOPS','FERMENTABLE']
for tag in tag_list:
    
#    Using findall to get the tags by name, findall returns a list so just
#    grabbing the first item.  Some tags would return more than one item like hops
#    so in those cases you'd want a conditional.
    
    if tag == 'HOPS':
        hops = root[0].find('HOPS')
        for i in hops:
            print(i.findall('NAME')[0].text)

    elif tag == 'FERMENTABLE':
        #You get the idea
        pass
        
    else:
        tag_text = root[0].findall(tag)[0].text
        print(tag_text)
        #I would use memory tags to store the values, and name them the same as the xml tags
        system.tag.writeBlocking('[Brewing]recipe/' + tag, tag_text)
 

Latest posts

Back
Top