PID settings on arduino based hlt - Home Brew Forums
Home Brew Forums > Home Brewing Beer > Automated Brewing Forum > PID settings on arduino based hlt

Reply
 
Thread Tools
Old 05-13-2012, 01:25 AM   #1
SimBrew
Recipes 
 
Dec 2010
Montréal, Quebec
Posts: 92


I got a arduino controlled hlt with 1500w element heating like 5 gal.

I overshoot my setpoint by about 10 F.

The integral is too slow to shut the element off once it get to the setpoint

My process class are far away and I don't have a lot of time with the kid to test differents settings.

What are your PID settings on setup like mine ?

 
Reply With Quote
Old 05-13-2012, 07:21 PM   #2
chuckjaxfl
Recipes 
 
Feb 2010
Jacksonville, FL
Posts: 327
Liked 22 Times on 14 Posts


I haven't gotten to the HLT part yet, but I've got an Arduino controlled crockpot going here. I used this library to determine the correct p, i, & d.

 
Reply With Quote
Old 05-14-2012, 01:38 AM   #3
SimBrew
Recipes 
 
Dec 2010
Montréal, Quebec
Posts: 92

I will try for sure.
Would you happen to have your autotune code ?

 
Reply With Quote
Old 05-14-2012, 11:13 AM   #4
chuckjaxfl
Recipes 
 
Feb 2010
Jacksonville, FL
Posts: 327
Liked 22 Times on 14 Posts


Quote:
Originally Posted by SimBrew
I will try for sure.
Would you happen to have your autotune code ?
I'm pretty sure I do. It's the same as what's right there on the site, though, with two minor exceptions.

- I added what I needed to get a Fahrenheit setpoint and readout in the serial monitor from a DS18B20

- I did a cut & paste swap of the part from the 'to control a relay' example, also located on that site.

I have *not* been successful getting the front end up in Processing, though. I just opened up a serial monitor in the Arduino IDE.

 
Reply With Quote
Old 05-15-2012, 01:49 AM   #5
rockytoptim
HBT_SUPPORTER.png
 
rockytoptim's Avatar
Recipes 
 
May 2009
Livonia, MI
Posts: 775
Liked 95 Times on 76 Posts


I just got the autotune up and running on my arduino HERMS. How long did it take for the Auto tune to run?
__________________
On Tap: Bee Cave Robust Porter
On Tap: Bee Cave OktoberFest
On Tap: Bee Cave Kolsch
Primary: None
Up next: ????

 
Reply With Quote
Old 05-15-2012, 04:08 AM   #6
chuckjaxfl
Recipes 
 
Feb 2010
Jacksonville, FL
Posts: 327
Liked 22 Times on 14 Posts


FOREVER! Or so it seems. Maybe 6 heat/cool cycles? In my crockpot, that must have been a couple of hours or so.

I watched Hudson Hawk while it ran.

 
Reply With Quote
Old 05-15-2012, 04:13 AM   #7
chuckjaxfl
Recipes 
 
Feb 2010
Jacksonville, FL
Posts: 327
Liked 22 Times on 14 Posts


Oh... if this is obvious, forgive me for bringing it up.

Watch that last line just before void setup(), it will run a simulation until you change that value to false.

 
Reply With Quote
Old 05-15-2012, 11:12 AM   #8
rockytoptim
HBT_SUPPORTER.png
 
rockytoptim's Avatar
Recipes 
 
May 2009
Livonia, MI
Posts: 775
Liked 95 Times on 76 Posts


Quote:
Originally Posted by chuckjaxfl View Post
FOREVER! Or so it seems. Maybe 6 heat/cool cycles? In my crockpot, that must have been a couple of hours or so.

I watched Hudson Hawk while it ran.
Thanks. I tried running it last night on my brewery and it about 2 hours for it to get to the setpoint once. My setpoint is at 154. The output would only go to 50. I will look at my code and try running it again tonight.

When I first ran i had it in simulation mode as you said and took me a couple of minutes to find the line to change it to tuning mode.
__________________
On Tap: Bee Cave Robust Porter
On Tap: Bee Cave OktoberFest
On Tap: Bee Cave Kolsch
Primary: None
Up next: ????

 
Reply With Quote
Old 05-16-2012, 01:16 AM   #9
FastTalker
Member
HBT_SUPPORTER.png
 
FastTalker's Avatar
Recipes 
 
Sep 2011
Nashville, TN
Posts: 164
Liked 9 Times on 8 Posts


Quote:
Originally Posted by SimBrew View Post
The integral is too slow to shut the element off once it get to the setpoint
This is a slow, integrating temperature loop. You don't want a lot of integral gain in this type of loop, because it will cause unnecessary controller windup.
Integral is not going to do anything at setpoint. More derivative can help to decrease overshoot. In fact, more proportional will help get your output high enough when you are far from setpoint but bring it down as you approach setpoint.

All of these suggestion are assuming your heating element is appropriately sized.

 
Reply With Quote
Old 05-16-2012, 01:54 AM   #10
rockytoptim
HBT_SUPPORTER.png
 
rockytoptim's Avatar
Recipes 
 
May 2009
Livonia, MI
Posts: 775
Liked 95 Times on 76 Posts


TO chuckjaxfl:

Do you mind sharing your code. I cant get the auto tune portion to work. I don't have a problem reading temperatures and even have the arduino send outputs to processing but cant seem to get the auto tune to work correctly.

Thanks in Advance.
__________________
On Tap: Bee Cave Robust Porter
On Tap: Bee Cave OktoberFest
On Tap: Bee Cave Kolsch
Primary: None
Up next: ????

 
Reply With Quote


Reply
Thread Tools



Forum Jump