Home Brew Forums

Home Brew Forums (http://www.homebrewtalk.com/forum.php)
-   Automated Brewing Forum (http://www.homebrewtalk.com/f235/)
-   -   Raspberry Pi Temp Controller (http://www.homebrewtalk.com/f235/raspberry-pi-temp-controller-344529/)

steve071 07-30-2012 01:20 AM

Raspberry Pi Temp Controller
I developed a wireless, web controlled PID temperature control system for a single brew kettle using the $35 credit card sized Raspberry Pi computer.

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:

cyberwollf 07-30-2012 01:29 AM

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

vortexofhate 07-30-2012 06:22 AM

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.

IronBridgeBrewery 07-31-2012 02:13 PM

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!

cyclogenesis 07-31-2012 02:27 PM

Very nice work!
Never heard of Raspberry Pi before now, what awesome little units!

steve071 08-01-2012 12:17 AM

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


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.

chrix 09-06-2012 12:03 PM

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

cmdour 09-06-2012 02:29 PM


Originally Posted by chrix (Post 4390862)
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.

SOPiiAC 09-06-2012 08:02 PM

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! :mug:

steve071 09-09-2012 08:41 PM

2 Attachment(s)
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

All times are GMT. The time now is 09:53 PM.

Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.