Raspberry Pi Temp Controller - Home Brew Forums

Register Now!
Home Brew Forums > Home Brewing Beer > Automated Brewing Forum > Raspberry Pi Temp Controller

Reply
 
Thread Tools
Old 07-30-2012, 01:20 AM   #1
steve071
Recipes 
 
May 2009
RI
Posts: 13
Liked 9 Times on 3 Posts



I developed a wireless, web controlled PID temperature control system for a single brew kettle using the $35 credit card sized Raspberry Pi computer.
http://www.raspberrypi.org/

The server side is written in Python which should be really easy to learn and expand to control pumps, solenoid valves, more heating elements, etc. I really like Python for quick development and its libraries. The web server is web.py. http://webpy.org/

On the browser side I'm using jQuery http://jquery.com/ and plugins for real time display (gauges and charts). Mouse overs on the temperature plot show time and temperature for the point highlighted. It currently works in a Firefox browser. Real time status information is sent back from the Raspberry Pi approximately every second to the browser using AJAX to prevent page refresh.

For IDE I'm using Aptana Studio 3. After I make changes to the code on the laptop I press the synchronize button and the changes are sent wirelessly over to the raspberry pi so development and testing is very quick. I also can use putty on windows to ssh login into the raspberry pi computer.

For PID tuning I made it really simple to tune the system using the Ziegler-Nichols open loop. After setting the heat output to 100%, wait for the input to changed by 10% and then just highlight the sloped line after the dead time on the temperature display to calculate the parameters. Then, after I programmed it all, I found out that this method is known to overshoot the set point. I played around with the parameters in order for it to work well with no overshoot. There is a better way to tune it using the ITAE-load method described on this site: http://www.vandelogt.nl/htm/regelen_pid_uk.htm but it takes a long time.

The electronic side of things is pretty simple and easy to put together (not including the ssr, heating element, etc.):
I use the Raspberry Pi, Adafruit Pi Plate Kit, DS18B20 temperature sensor probe, jeenode output plug http://jeelabs.com/products/output-plug, 20 x 4 LCD and LCD117 kit, LED, cheap belkin wifi dongle, and a couple of resistors

More information and source code can be found on the following web site:
https://github.com/steve71/RasPiBrew

4
People Like This 
Reply With Quote
Old 07-30-2012, 01:29 AM   #2
cyberwollf
 
cyberwollf's Avatar
Recipes 
 
Oct 2010
Melbourne, Florida
Posts: 214
Liked 5 Times on 3 Posts


Love it! Got my Pi in a few weeks ago. I will eventually do the exact same thing

 
Reply With Quote
Old 07-30-2012, 06:22 AM   #3
vortexofhate
Recipes 
 
Jan 2011
Corona, CA
Posts: 27


This is awesome. I have the Pi already and ordered up some stuff from Adafruit last week. Can't wait to look through the code tomorrow at work.

 
Reply With Quote
Old 07-31-2012, 02:13 PM   #4
IronBridgeBrewery
Recipes 
 
Jun 2010
Vermont
Posts: 15

I already built my brewery using a BCS 460 but i was hoping someone might do this w/ a Raspi. I ordered one last week just to play with. Might be a great way to bring my Ferm chamber, keezer and Hops drying under automated control.

Thanks for doing and sharing this work!

 
Reply With Quote
Old 07-31-2012, 02:27 PM   #5
cyclogenesis
Recipes 
 
Aug 2011
Chicago, IL
Posts: 320
Liked 8 Times on 6 Posts


Very nice work!
Never heard of Raspberry Pi before now, what awesome little units!
__________________
Drinking: Dogtoberfest, Autumn Harvest Amber, Fire in the Belly Imperial Stout.
Fermenting: V for Vienna, 2013 Bock.
In planning: TEA for two, First Flakes American Brown.

 
Reply With Quote
Old 08-01-2012, 12:17 AM   #6
steve071
Recipes 
 
May 2009
RI
Posts: 13
Liked 9 Times on 3 Posts


Thank you! Since there is some interest in this I started putting together an installation guide that I hope will be of some help:

https://github.com/steve71/RasPiBrew...RASPI-SETUP.md

The Raspberry Pi is a good platform for experimenting and can also be used with an arduino if desired. I wanted to see what it can do without one and put something together quickly. It would be nice to have templates for different brewing configurations. The browser/javascript part is the hard part of this. If there are javascript problems I don't get an error message. It just doesn't work. The python part should be easy to pick up. On the python side more processes and pipes can be added to control and monitor other things at the same time. Just add the additional status data to send back to the browser and more commands back to the web server.

 
Reply With Quote
Old 09-06-2012, 12:03 PM   #7
chrix
Recipes 
 
Dec 2011
ORANGE PARK, FL - Florida
Posts: 6


Hi Steve, I'm interested in this. Could you maybe post a schematic for the hardware?

 
Reply With Quote
Old 09-06-2012, 02:29 PM   #8
cmdour
Recipes 
 
Jul 2012
West Newton, MA
Posts: 10


Quote:
Originally Posted by chrix View Post
Hi Steve, I'm interested in this. Could you maybe post a schematic for the hardware?
I'm very interested in seeing this, too - I'm debating using a Raspberry Pi as a central control unit for an electric brewery, and am curious as to how you wired the various I/O bits to the GPIO.

 
Reply With Quote
Old 09-06-2012, 08:02 PM   #9
SOPiiAC
Recipes 
 
May 2012
Minneapolis, MN
Posts: 18
Liked 1 Times on 1 Posts


Subscribed! I love this idea. I'd love to get a system in place where I can control my E-kettle, fermentation chamber, keezer and beer line coolant pump in one hub. I'm a total coding and electronics noob though so any help is much appreciated!

 
Reply With Quote
Old 09-09-2012, 08:41 PM   #10
steve071
Recipes 
 
May 2009
RI
Posts: 13
Liked 9 Times on 3 Posts


I'm using the enclosed PJ's schematic for wiring the e-keggle element with relays and switches. I don't have the schematic for wiring the raspberry pi but I can put something together. This shows how to wire the 1-wire sensor: http://www.datasheetcatalog.org/data...im/DS18B20.pdf using a 4.7k resistor. This is connected right to pin 4 of the raspberry pi. I'm using a jeenode output plug connected to the i2c pins of the raspberry pi (pin 3 is SDA and pin 5 is SCL) and to the SSR. This schematic of the output plug is here: http://jeelabs.net/projects/hardware/wiki/Output_Plug
Click image for larger version

Name:	Auberin-wiring1-a4-5500w-BIAB-30d6.jpg
Views:	17904
Size:	31.3 KB
ID:	75063   Click image for larger version

Name:	254px-GPIOs.jpg
Views:	14619
Size:	9.4 KB
ID:	75064  

4
People Like This 
Reply With Quote


Reply
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Burner Temp Control Like ToP rwinzing Automated Brewing Forum 1 07-25-2012 09:19 PM


Forum Jump