Controlling the temperature of a pot of water

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
Totoro
 
Posts: 10
Joined: Fri Aug 28, 2009 4:05 pm

Controlling the temperature of a pot of water

Post by Totoro »

A few days ago I posted about my library for the DS18B20 temperature sensor. I wrote that as part of a larger project to make a Sous Vide cooker. I needed a way to control the temperature of a water bath to a fairly accurate degree (pun intended).
So, With an Arduino, the temperature sensor and the LCD Shield Kit (from Adafruit), a hot plate and a DIY solid-state relay I have got a system working.
Sous Vide cooker prototype
Sous Vide cooker prototype
CookerProto1.JPG (647.44 KiB) Viewed 2366 times
status display
status display
CookerDisplayStatus.JPG (570.36 KiB) Viewed 2367 times
Since the LCD shield uses polling for the buttons (not interrupts) I had to be careful with the loop to not miss button presses while reading the temperature and updating the display. That now works quite well.
But the real problem, as I anticipated, is that the hysteresis of the system is really big. My prototype is now simply turning on the hot-plate when the temperature of the water falls below the goal temperature and turning it off when the temperature is reached. What I intend to do is to adjust the duty-cycle of the hot-plate based on the temperature delta.
I know I can dial that in but if anyone has had to solve this or a similar problem I would really like your input.
Thanks to Adafruit and Arduino and the community for inspiration and the bits and knowledge needed to build this. I'm sure something like this has been made many times by others but I have had a great time pulling myself up by the bootstraps and getting this running!
- Totoro (aka Michael)
And if there is any interest in the code, let me know and I'll get it somewhere for download. But be warned, it's pretty rough!

User avatar
adafruit_support_bill
 
Posts: 88092
Joined: Sat Feb 07, 2009 10:11 am

Re: Controlling the temperature of a pot of water

Post by adafruit_support_bill »

What I intend to do is to adjust the duty-cycle of the hot-plate based on the temperature delta.
What you are describing is a "Proportional Controller". That is the "P" part of a "PID Controller" (Proportional/Integral/Derivative). There are quite a few Arduino implementations of PID control. You should be able to find several at http://arduino.cc/playground/. For many simple temperature control applications, proportional control is sufficient and you can ignore the "I" and "D" terms of the controller.

Totoro
 
Posts: 10
Joined: Fri Aug 28, 2009 4:05 pm

Re: Controlling the temperature of a pot of water

Post by Totoro »

Thank you! Indeed, there are many PID implementations to investigate and choose from. The fun begins anew.
Also, thank you for the LCD Shield. That made the input/output part of this so easy.
- Totoro

Totoro
 
Posts: 10
Joined: Fri Aug 28, 2009 4:05 pm

Re: Controlling the temperature of a pot of water

Post by Totoro »

Just an update. The PID was indeed what was needed. And I got to learn about something new! I posted about this project on my site at http://vondervotteimittiss.com/belfry/?p=108. I also made the code available. Just scroll to the end of the post. (Comments are very welcome!)
Thanks again!
- Totoro

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”