Ss Brewing Technologies Giveaway!

Home Brew Forums > Home Brewing Beer > Automated Brewing Forum > Raspberry Pi Temp Controller
Reply
 
LinkBack Thread Tools
Old 07-30-2012, 01:20 AM   #1
steve071
Feedback Score: 0 reviews
Recipes 
 
Join Date: May 2009
Location: RI
Posts: 13
Liked 9 Times on 3 Posts

Default 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.
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

__________________
steve071 is offline
4
People Like This 
Reply With Quote Quick reply to this message
Old 07-30-2012, 01:29 AM   #2
cyberwollf
Feedback Score: 1 reviews
Recipes 
 
Join Date: Oct 2010
Location: Dayton, OH
Posts: 203
Liked 1 Times on 1 Posts

Default

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

__________________
cyberwollf is offline
 
Reply With Quote Quick reply to this message
Old 07-30-2012, 06:22 AM   #3
vortexofhate
Feedback Score: 1 reviews
Recipes 
 
Join Date: Jan 2011
Location: Montclair, CA
Posts: 21
Likes Given: 1

Default

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.

__________________
vortexofhate is offline
 
Reply With Quote Quick reply to this message
Old 07-31-2012, 02:13 PM   #4
IronBridgeBrewery
Feedback Score: 0 reviews
Recipes 
 
Join Date: Jun 2010
Location: Vermont
Posts: 15
Default Excellent..

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!

__________________
IronBridgeBrewery is offline
 
Reply With Quote Quick reply to this message
Old 07-31-2012, 02:27 PM   #5
cyclogenesis
Feedback Score: 0 reviews
Recipes 
 
Join Date: Aug 2011
Location: Chicago, IL
Posts: 320
Liked 7 Times on 5 Posts
Likes Given: 9

Default

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.

cyclogenesis is offline
 
Reply With Quote Quick reply to this message
Old 08-01-2012, 12:17 AM   #6
steve071
Feedback Score: 0 reviews
Recipes 
 
Join Date: May 2009
Location: RI
Posts: 13
Liked 9 Times on 3 Posts

Default

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.

__________________
steve071 is offline
 
Reply With Quote Quick reply to this message
Old 09-06-2012, 12:03 PM   #7
chrix
Feedback Score: 0 reviews
Recipes 
 
Join Date: Dec 2011
Location: ORANGE PARK, FL - Florida
Posts: 6
Likes Given: 1

Default

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

__________________
chrix is offline
 
Reply With Quote Quick reply to this message
Old 09-06-2012, 02:29 PM   #8
cmdour
Feedback Score: 0 reviews
Recipes 
 
Join Date: Jul 2012
Location: West Newton, MA
Posts: 10
Likes Given: 1

Default

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.
__________________
cmdour is offline
 
Reply With Quote Quick reply to this message
Old 09-06-2012, 08:02 PM   #9
SOPiiAC
Feedback Score: 0 reviews
Recipes 
 
Join Date: May 2012
Location: Minneapolis, MN
Posts: 18
Liked 1 Times on 1 Posts
Likes Given: 2

Default

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!

__________________
SOPiiAC is offline
 
Reply With Quote Quick reply to this message
Old 09-09-2012, 08:41 PM   #10
steve071
Feedback Score: 0 reviews
Recipes 
 
Join Date: May 2009
Location: RI
Posts: 13
Liked 9 Times on 3 Posts

Default

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

auberin-wiring1-a4-5500w-biab-30d6.jpg   254px-gpios.jpg  
__________________
steve071 is offline
4
People Like This 
Reply With Quote Quick reply to this message
Reply



Quick Reply
Message:
Options
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