Yet another Arduino Based Brewing controller

Australia & New Zealand Homebrewing Forum

Help Support Australia & New Zealand Homebrewing Forum:

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

mr_wibble

Beer Odd
Joined
21/1/09
Messages
1,114
Reaction score
231
Location
Lake Macquarie NSW
G'day,

Finally finished my brewing controller.
It's designed to drive my HLT and HERMS-HX mash-tun.
There are many like it, but this one is mine.

It's based around an Arduino Nano. I wanted to push the nano as far as it would go.
I couldn't quite get the kitchen sink in there, but it does everything on my list.

I like programming on the Arduino nano, because they're cheap, small, and I get a bit of a nostalgic joy - it's not a whole lot different to our old 32k Microbee that I used when I was a kid. Actually the killer-feature is those bloody screw-terminal boards - makes it so easy to attach sensors and daughter-boards.

So the main criteria were:
- Set and keep the HLT temperature (PID controlled)
- Set and maintain the mash heat-exchange temperature (PID controlled)
- Allow easy setting of HLT & mash temperatures
- Allow calibration of sensors
- Allow for a real-time delayed start of HLT heating (well, the whole system)
- Allow for the HLT and Mash to run independently
- A simple to use User Interface (UI/GUI).

controller_circuit.png

The whole thing is housed in a splash-proof box (which was IP66 rated until I drilled a hole for the knob, and added audio-plug sockets for the temperature sensors).

IMG_7223_smaller.JPG

I did have to make some compromises. I wanted some nice sockets on the bottom instead of those short leads. But the HLT heater is 20A, and 20A sockets do not come in a wide range. Maybe someone in the trade would know of something, but I don't. The short-leads are a cost effective solution. Much cheaper than a 20A HPM socket.

The Arduino libraries I used take up quite a bit of space, literally 99.7% of the Arduino is full.

Using a rotary-encoder as the only user input device works well. Clicking (push down) or turning the knob is enough for all input.
To change a value, the user rotates the knob to select the input field, clicks to go into edit-mode, rotates the knob until the desired value, then clicks a last time to go back.

I did (perhaps still do) have problems with the DS18B20 temperature sensors "locking" to the same reading. The symptoms of this is that the sensors never reports a new reading is ready, constantly reporting (say) 35.6C, meanwhile the PID using the value to heat your water way past the set-point. I read to fix this a 0.1uF capacitor right near the sensor helps, but my sensors are sealed in s.steel housings on a 3m cable. So I had to settle with a capacitor at their attachment points. Also watching for the lack of a sensor result, and re-requesting seems to fix it.

I wanted to add a little bluetooth module. This would allow the arduino to continually broadcast all the vital statistics (set temps, actual temps, mash-schedule, start-time, etc. etc.). Any sort of logging and monitoring app could read this data, and do what it wants - like plot temp Vs time graphs. But it's at the point where the additional 1.5k of RAM needed for the serial library is just too much. I had already re-factored the code several times to reduce it's memory footprint. I had to give up on this feature.

(I'll add some GUI photos in the next post)
 
This is the over view screen. The flame-icon indicates the heater is currently on.
Things like delayed start, control-box overheating alarm, step-mash running are also showed here.
IMG_7216_smaller_over.JPG

This is where i can set the HLT temperature, and a delayed start-time. Typically I set my HLT to start heating at 4:30am, so when I'm up at 5ish, she's right to go.
In the circuit is a battery-backed real-time clock, so the controller always knows what time it is.
IMG_7217_smaller_hlt.JPG

The Mash screen allows the temperature to be set simply. If set to zero, the mash is considered to be off.
A 4-step mash programme can also be set. The fields are XX minutes at YY degrees, the user fills out as may fields as wanted, then click "Run".
IMG_7219_smaller_mash.JPG

The calibration allows small adjustments to the HLT and Mash sensor readings, and to set the time on the clock (theoretically only needing to be done once, and on battery changes).
IMG_7220_smaller_cali.JPG

Finally, a shot of the very amateur wiring layout.
IMG_7214_smaller_insides.JPG

Is anyone wants the code, please feel to PM me. Don't think I can add a .zip of it here.
 
Neutric Powercon plugs are rated @20amp they also have higher 32amp ones as well. Looks pretty damn sexy. Have you brewed with it yet?
 
Very rough parts list (mostly from from aliexpress.com, but probably can get the same from ebay)

Arduino Nano - https://www.aliexpress.com/store/product/Nano-CH340-ATmega328P-MicroUSB-Compatible-for-Arduino-Nano-V3/1950989_32572612009.html
Screw terminal Board for Nano - https://www.aliexpress.com/store/product/New-Terminal-Adapter-Board-for-Arduino-Nano-V3-0-AVR-ATMEGA328P-AU-Module/1414081_32278702970.html
12V/2A Power Supply - https://www.aliexpress.com/store/product/AC-DC-12V-Power-Supply-220-to-12V-Transformer-1A-2A-3A-5A-6-5A-10A/1940364_32711917763.html
Real time clock module - (LIKE THIS) https://www.aliexpress.com/item/Tiny-RTC-I2C-modules-24C32-memory-DS1307-clock-RTC-module-without-battery-good-quality-low-price/2020927349.html
SPI 320x240 Colour LCD Display (a cheap and simple one, with no SD card slot) - (LIKE THIS) https://www.aliexpress.com/store/product/1Pcs-2-4-inch-240320-240x320-Dots-Full-Color-TFT-LCD-Display-Screen-With-ILI9341-Driver/215829_32746228420.html
Enclosed DS18B20 temperature sensors - https://www.aliexpress.com/store/product/1pcs-New-Digital-Temperature-Temp-Sensor-Probe-DS18B20-For-Thermometer-1m-Waterproof/808897_1297739612.html
2x SSRs - one from Jaycar ($45) :blink: , one from aliexpress (~ $5) - bloody found the 2nd "lost" one after I'd been to Jaycar. Geeze.

Enclosure, 20A cables & plugs from John R Truk (Turk?)
Actually these enclosures are really nice
 
malt junkie said:
Neutric Powercon plugs are rated @20amp they also have higher 32amp ones as well. Looks pretty damn sexy. Have you brewed with it yet?
Those Powercon plugs & sockets look good. Currently about $20/set on amazon.

I did one brew on it, a double-batch (45L) high-gravity Belgian.
It held the temperature perfectly.

... but somehow I stuffed up the sparging? or it didn't mash so well. First time using new vessels too, I'd say I bollox'd up the manual parts of it ;)
 
Nice work. That overview screen is cool, I'm guessing the fire symbol comes on only when the elements are on and heating?
 
crowmanz said:
Nice work. That overview screen is cool, I'm guessing the fire symbol comes on only when the elements are on and heating?
yeah.

I run the box off a single 20A input, My HLT is 20A/4500watt (from Romar Elements), and the HX a 10A/2200watt - I didn't want to run both the HLT and Mash heating elements at the same time because this is a theoretical overload of the 20A household circuit.

So when both are running, only one gets power at a time, and the Mash HX-heater takes precedence over the HLT heater. This works ok, because the bulk of the HLT heating is done way before I start mashing. (I thought about bringing a separate power circuit for the HX, but it seemed unnecessary.)

The upshot is that when both HLT & Mash are running, that little flame icon switches around every few seconds. it's pretty.
 
Mr Wibble said:
If anyone wants the code, please feel to PM me. Don't think I can add a .zip of it here.
I'd be keen to have a look -- PM incoming.

Side thought: you could always stick it on github if you plan on improving it over time..?
 
GibboQLD said:
I'd be keen to have a look -- PM incoming.

Side thought: you could always stick it on github if you plan on improving it over time..?
Great idea there
I got a free rPi 3 that I was going to install CraftBeerPi on, but I'm using it as a Steam gaming box right now
However I've got half a dozen Arduinos/DS18B20s/SSRs/etc, if I can just use an Arduino and lose the non essential functionality that CraftBeerPi has, I'm keen to give this a go to control my HLT and HERMS
 
That looks quite good. Have you considered using a mechanical switch or relay to cut power off prior to the SSDs?
 
stilvia said:
That looks quite good. Have you considered using a mechanical switch or relay to cut power off prior to the SSDs?
No I didn't consider using that.
The SSRs are (as far as I remember) optically isolated already, so don't present a danger to the circuit (theoretically).
(the cheap SSR is opto-isolated, I don't know about the jaycar one, typically SSRs are opto-isolated.)

Maybe an emergency stop switch might be a useful addition.
But I'm really really crap at drilling holes in the right spot, and screwing bits of wood together I find difficult, so extra hardware is not really something I'd think of.

Is there some particular reason you ask?
 
I want to start by saying this is bloody awesome, cool as shit way to brew beer. Yeah you don't need all the bells and whistles but I love creating stuff like this. The price of all those components is staggeringly cheap. So cheap that there's no excuse for me not to buy some for Christmas. It's also something my kids could really get into (the whole programming real life stuff to switch things on and off, understanding how electronics work etc. which I find is a dying art like sewing and car maintenance).
There's something you touched here that has a bit of untapped potential in my opinion for a 2V+ system -

Mr Wibble said:
I run the box off a single 20A input, My HLT is 20A/4500watt (from Romar Elements), and the HX a 10A/2200watt - I didn't want to run both the HLT and Mash heating elements at the same time because this is a theoretical overload of the 20A household circuit.

So when both are running, only one gets power at a time, and the Mash HX-heater takes precedence over the HLT heater. This works ok, because the bulk of the HLT heating is done way before I start mashing. (I thought about bringing a separate power circuit for the HX, but it seemed unnecessary.)

The upshot is that when both HLT & Mash are running, that little flame icon switches around every few seconds. it's pretty.
I have a 2400W HLT and 2000W HERMS. One thing that shits me is I need to run power cables off two circuits in the house which invariably means extension cord spaghetti. With this program logic you could run 2 vessels off a single 10A power point. If the HERMS always takes precedence over the HLT then in between cycles of maintaining temp the HLT would heat until it gets to sparge temp. If you had both vessels full at the start of the brew this would absolutely work.
Great project, can't wait to hassle you about the program.
 
TheWiggman said:
It's also something my kids could really get into (the whole programming real life stuff to switch things on and off, understanding how electronics work etc. which I find is a dying art like sewing and car maintenance).
OT but i teach Man arts (wood work / metal work) and now robotics / coding / random tinkering / random building of IOT stuff

I have just done 20hrs with a basic robotics program using arduino with a Yr8 group. (new for my school)

they loved the problem solving that building, programing, wiring and even letting out the magic blue smoke on one robot gave them

we went from some not knowing the what DC Pos and Neg and a basic circuit was to 15 small robots roaming the room and them being able to discuss with adults (Principle etc) what was going on with the robots.

it was low tech / high tech with hot glue guns and micro processors in a joining together of awesomeness :)
fully engaged students like i have not seen in a while :beer:
Get a ebay kit for the kids, have a look at this SIK guide book (pdf)
http://cdn.sparkfun.com/datasheets/Kits/SFE03-0012-SIK.Guide-300dpi-01.pdf
add a Hot glue gun and a some lego and your making fun stuff :)


Maybe just maybe i can talk "the man" into this awesome brew bot for process control in chemistry class........
or maybe i will seek forgiveness and fire up a brewery "inschool" :super:
 
A few queries -
  • There are 3 sensors pictured in the original drawing but only two used, what's the go?
  • Why is there a resistor across one sensor's +ve and 'data' leg?
  • How do all two/three sensors work if they're read off a single terminal?
  • There are additional PCBs below the TFT, are there basically terminal boards to make screwing things easier?
 
Very nice. Amazing to watch the tech over the last few years, not just in brewing but I mean generally, and how people adapt it for whatever they need.
I got my boy a Mechano set last Xmas, this year will be the follow up with an Auduino kit, then he can start making this stuff for my brewing, because it's all over my head.
 
Not OP but can offer some insight:

TheWiggman said:
A few queries -
  • Why is there a resistor across one sensor's +ve and 'data' leg?
  • How do all two/three sensors work if they're read off a single terminal?
The DS18B20 temperature sensors operate on a 1wire bus (which needs a pull-up resistor to work properly), and each have their own unique hardware address which is "burnt in" at the factory and cannot be changed, meaning they can all be connected to the same pin and individually queried as required.
 
Tops thanks.
Any reason I couldn't get a Uno R3 instead of the nano so there's more memory available? I like the idea of being able to expand in the future. Id imagine there are a few references in the coding to change.
 

Latest posts

Back
Top