Introduction
For this project I'm going to upgrade my trusty home-brew temperature controller.
I'm using a fish tank temperature controller at the moment to control a heater belt with a relay which is kind of ok apart from I need to go into the garage to check what it's doing and the temperature sensor which is just a cheap thermistor just gets bungee'd to the outside of the mash tub so I'm not sure how accurate it is, especially since the temperature sensor ends up being close to the heater.
Also the buttons seem to be getting harder to use on my mega cheap control unit so it's quite hard to change the set temperature at the moment when I'm going between standard and 'fancy' beers.
Upgrade
So I'm going to use my raspberry Pi to upgrade this to use Node Red so I can check what my beer is doing without leaving my arm chair. I'm also going to use an industrial PT100 probe so I get a better temperature reading. The first thing to do is a quick drawing of how this is going to be wired up, I'll use an Analog Hat (PiIO_ADIO) for the Pi to do all the interfacing so I just need to add a power supply and mains relay to my enclosure, since the interface PCB has a step down supply for the Pi I can just use a single 0.63A 24V PSU to power everything. I'll mount everything on DIN rail then just use gands to seal the box (ignore irrigation references that's another project).
So the next task is get the tools out and get this up and running. First off with an enclosure it's worth checking everything is going to fit, here I've mounted the DIN rail and can now check the box is big enough. You can see my relay,power supply, PT100 sensor and Pi with IO board.
Glands can be marked with marker then cut out using a hole cutter, remember to bake sure there's enough room round the back for the securing nut. The PT100 sensor was mounted in the fermentor lid using the same approach.
So that get us to a point where we can now wire up the box to our schematic, this just involves mounting things on DIN rail and connecting the wires.
Here you see the control box and orange brew belt used for heating the beer,I usually put a jacket around this to improve efficiency when I'm brewing. You can see also the PT100 sensor probe is much better located for sensing the beer temperature.
Software
So now we can do the software, I plan to use node red to do the user interface but do the control from a python program. I'll us a MQTT server called mosquitto to enable the 2 to talk via MQTT messages. SO the user interface will be visible on any browser, the architecture looks like this:
So I the flows for this in Node red end up just wiring MQTT message nodes to user interface components.
And in the python program we use the low level drivers that come with our IO board and then talk to the UI using MQTT. For the temperature control we just average the PT100 sensor reading then apply a deadband to stop the heater continually turning on / off..
So this gives us the following mobile phone view:
And another view to control the process, which is just an enable and a setpoint. The UI is visible on a mobile or and PC with a browser. The cool thing is you don't need to pre install any software.
You can see we can accurately control the beer temperature and use node reds charts to see what the controller is doing over time. Perfect for bewing that specialty Lager!
Source code can be viewed here.
https://github.com/lawsonkeith/PiIO/blob/master/examples/hydro_ADIO.py
Top Comments