Pano-Matti, my Arduino based controller

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.
[ame="http://youtu.be/z3o4QScNy98"]http://youtu.be/z3o4QScNy98[/ame]
 
Im assuming you are using the Arduino PID library in your code, Im doing the same and about to finalize my build. Ive heard people have had trouble setting the parameters for the PID, any chance you can post what your coefficients are.
 
I don't use the PID-library. I've my own simple algorithm that calculates the heating power (pump ON-time, I've a counter-flow HERMS) based on the wort and mash temperatures. I like it this way, I can set the heating ramp what ever way I want. I've another script that takes control when the mash temperature is in "range".

The ramp is done like this:
// offset < 5C
if (setTemp/10 - mash < 5)
{wortOffSet = 5;} ... and so on, as many offsets as is needed, I've 5.

The pump-ON time limiter:

if (onOff == 1 && lastPumpRun > 0 && (millis() - lastPumpRun) > 3000 && (setTemp/10 - mash) < 0.5) // after X sec pump off
{
bigPumpOff();
onOff = 2;
pumpRun = millis();
}
if (onOff == 2 && (millis() - pumpRun > 30000)) // after X sec pump back on
{
onOff = 0;
pumpRun = 0;
}
 
Vesku said:
I don't use the PID-library. I've my own simple algorithm that calculates the heating power (pump ON-time, I've a counter-flow HERMS) based on the wort and mash temperatures. I like it this way, I can set the heating ramp what ever way I want. I've another script that takes control when the mash temperature is in "range".

This code doesn't make sense, most likely because your not showing enough of it. Lets break it down.

The ramp is done like this:
// offset < 5C
if (setTemp/10 - mash < 5)
{wortOffSet = 5;} ... and so on, as many offsets as is needed, I've 5.

It looks like you have different offsets depending on how far your actual temp is from the setpoint? What do you do with wortOffSet? What are your other offset values? Is it 4 when you are within 4 degrees?

The pump-ON time limiter:

if (onOff == 1 && lastPumpRun > 0 && (millis() - lastPumpRun) > 3000 && (setTemp/10 - mash) < 0.5) // after X sec pump off
{bigPumpOff();
onOff = 2;
pumpRun = millis();
}
if (onOff == 2 && (millis() - pumpRun > 30000)) // after X sec pump back on
{
onOff = 0;
pumpRun = 0;
}

Ok here you show part of a functional state machine except this on isn't functional because you are missing a state. Somehow you start with onOff = 1 but you never show how it gets set to 1. Similarly you don't show your state where onOff = 0. I'm assuming that you set onOff to 1 at the end of that state, but what else do you do in that state?

Step back and give us a higher level description of how your system works. Are you keeping your heating element on 100% of the time and regulating your mash temp by turning on/Off a pump that circulates wort through a HERMS coil?

The videos you posted are a little hard to follow. You show a lot of stuff really close up but you never show how things are connected or even a clear shot of your control panel to see what you are using for input. Are you using a rotary encoder like the brewtroller or a set if discrete buttons? How is your system plumbed, number of pumps, valves, etc?
 
I agree that after watching the videos I don't particularly understand how your system software works, but they do a good job of showing that it works very well. I particularly like your setup of a hood that fits directly over your boil kettle. It's a very good idea that I might steal.....
 
This is my 1st ever software that I've done ... there's about 2000 rows of code, I'm not going to share that here, but I hope that even a part that doesn't make any sense makes someone think better ways to do it :drunk:

I use 2 sensors to control the mash temp ... The wort off set depends how close to the setpoint the mash is.

Here's more, this should be easy enough to understand? :) :) ;)
Panomestari.jpg


IMG_20121207_3543.JPG
 
It looks like you have different offsets depending on how far your actual temp is from the setpoint? What do you do with wortOffSet? What are your other offset values? Is it 4 when you are within 4 degrees?

The actual control is done by wort and mash temperatures. This one controls how much hotter than the setpoint (for the mash) the wort can be.

Step back and give us a higher level description of how your system works. Are you keeping your heating element on 100% of the time and regulating your mash temp by turning on/Off a pump that circulates wort through a HERMS coil?

It's a counter flow HX herms. I'm using pump to control the heating. Of course there's a basic ON/OFF control for the heat source too (HLT).

The videos you posted are a little hard to follow. You show a lot of stuff really close up but you never show how things are connected or even a clear shot of your control panel to see what you are using for input. Are you using a rotary encoder like the brewtroller or a set if discrete buttons? How is your system plumbed, number of pumps, valves, etc?

Sorry, I suck with the camera / editing.

I've small array of buttons, UP/DOWN/OK/LEFT/RIGHT. It's under the display. They are all behind one interrupt.

There's going to be a 3rd pump dedicated to the whirlpool as soon as my scrapyard dealer gets one that is suitable.
 
A plot of the latest mash. One of the temp probes is playing up and dropping to zero once in a while, I need to replace that.

Munich3.jpg
 
Sorry about the missing videos, I deleted my youtube account...

There's been a few updates with this project anyway and more to come too.

The interface is now handled trough touchscreen + PC (the LCD + arduino's keyboard are still there for backup, but not for long, it's so much easier to do things trough Meguno). MegunoLinkPro just came out with a new version of their Interface Panel http://www.megunolink.com/. I just had my 1st go with it and it's just great, ok, there's a few minor hick ups still to fix and the documentation is on the thin side at the moment, but still big thumbs up for them :

interface2.jpg


I need to add another page or tab for all the mash temp settings etc.

Here's how it looks in the real life:
IMG_20131201_6785.JPG


The plotting has improved too since the last pictures I shared in this thread:
12V-pid-2.jpg


Another cool gadget that I've added to the system is a scale under the mashtun. There'a a small amplifier/AD-module available to the Arduino that makes it easy to do this. http://www.elecrow.com/sensors-c-111/others-c-111_146/weight-sensor-amplifier-hx711-p-715.html
I used load cells from a cheap digital scale, they work just fine. It's a really accurate way to measure volumes, a lot better than the flow meter that I used before (it had to be calibrated, if the flow changed). The plywood triangle is the scale:
IMG_20131130_6777.JPG

I can measure the grains with it too and I guess I could calculate a ruff estimate how efficient the mash was based on the weights before and after it.

The HERMS is now CF-HERMS and it's controlled with PID's (Arduino), but that's been covered in the other thread.
 
Do the load cells drift significantly over the course of a brew day?

If not I could be tempted to hack some bathroom scales.
 
I connected the cell's in a Wheatstone Bridge, it drifted about 60ml on overnight test run (1st brew with this mashtun/scale sometime during this week). The hoses that are connected to the mashtun didn't affect the results at all.

The mashtun is made so that I can swap the direction of the HERMS flow. I think I try the reversed flow 1st with some used grains and see what happens.
 
I added a tab for mash settings + made the controls tab prettier. I've to learn how to use Arduinos EEPROM, it would be handy to put all the calibration values + PID stuff on the controls page too, after that I could change them on the fly and they would be saved on the memory.
control1.jpg
settings.jpg
 
60ml drift - what's that, somewhere under 1%? Doesn't sound too bad anyway.

I did a longer test, I'm building scales under my fermenters for monitoring the fermentation in real time, and the drift is actually non existing. I had the scale on for 3 days under a 15kg load and the drift was under a 1g.

I guess I had some liquids on the scale that evaporated the last time I tested it and got that 60ml drift...
 
Hi...i am a new user here. As per my observation i think you are using the Arduino PID library in your code, Im doing the same and about to finalize my build. Ive heard people have had trouble setting the parameters for the PID, any chance you can post what your coefficients are.

pcb assembly china
 
With a counterflow HERMS there's no need for a PID. The control is done by monitoring wort temperature at the exit of the heat exchanger, no over or undershoot since the thermal mass is only the amount of the liquid in the heat exchanger. In the latest version I used PWM and dc-motor to control the heat exchanger + a very simple algorithm to control the motor speed.

If you try to control the process by monitoring the mash temperature things get very complicated and even the temperature of grains or the brew house can make big problems when setting PID-parameters.

I'm on the wagon now, sort of, don't brew anymore, sorry for the late reply was busy on other stuff.
 
Back
Top