Raspberry Pi Temp Controller

Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum

Help Support Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
Is the OP still talking to us ? We have TOTALLY ruined his thread. My apologies !

Someone want to start a new thread ?

Moderators, is there a way to prune posts from this thread into a new one ?
 
It all sounds good.

I have my Pi and I'm working on the brewstand its going on right now. My one wire device should be here in a week or so and I want to brew a beer before Christmas.

Where do we go from here ?

I'll need to take a look at how we talk to the device programmatically. I've never written anything that interfaces with hardware before, but I see a ton of github projects on this thread, so that shouldn't be that hard to figure out. Once I have handle on that, it should be pretty easy to write up a rest like api (python still seems a good option for this) and then mock up a web front end. I have a couple guys who are interested in this as well that I can bring in. I'll probably need to buy the rest of the hardware so I have something to test on, right now I just have a pi.

The cool thing about a rest api is that anyone could write their own front-end to manage any number of devices using nothing but html and javascript (or flash/actionscript/anything else that can make http requests).
 
+1 on using Python. I'm familiar but rusty with it.

Errr.... I (cough) hate (cough) perl.

I'd like to see the web server be pyweb if possible. Would be nice not to have to set up Apache if possible.

As far as the hardware API, what if it were Linux system commands, like "getTemp sensorName" where sensorName is the unique address of an 18DS20 sensor ? If we wrote it in Python, other modules could either include the python or do a system call, plus it can be debugged on the command line.

One of the nice things about doing getTemp is that someone could come along later and modify it to do a different kind of sensor by adding a parameter to it (and code) for that sensor.

Thoughts ??????

Could we have this running in a couple weeks ? I need to brew !
 
Features to think about.

- a running text file for inputting notes while brewing. Preferably timestamped when burners go on off, clocks and timers are set, reset, etc. Like an automatic note taker.

- several resettable/startable/stoppable clocks with a field to input what they are for. Example: boil started clock.

- timers with alarms with a field to put in what they are for. Example: Put the hops in now, dummy.

- temperature logging to a file

- tunable PID loops for burner/heater control

I'm sure I can think of a lot more.

-
 
I mentioned pcbs only as a thought. All the better if none needed.
What I'm really saying is I'd like to see something that *anyone* can implement - without knowing any programming, and which could be made into a kit for those prepared to pay (like me) for something.
So keep my offer up your sleeves.


Also: I have just made a BCS460.

The interface is klunky for a lot of people - the interface seems very much built by an engineer for technicians. Its often very difficult to understand what is going on / where the process is at. E.g. Web Input buttons relating to past or future steps remain on the screen and are irrelevant to the current step. E.g. "Commence Sparge" and "Commence Boil" are buttons I've implemented. 'Now did I already press Commence Boil? Where am I again?'
It would be great to co-ordinate some effort on the Human Machine Interface / Web aspects up front, so that any effort aligns with this.
3 Words: Usability, Usability, Usability - for the average Joe.
With all the skills you guys have mentioned, its a great opportunity.
If someone is keen, great. Otherwise I'd be happy to field a wish list (that has already spontaneously started) and have a crack at developing a functional spec, with some sample screenshots to reflect back to all - with an eye to managing scope. (E.g. Brewtroller seems to have taken a very long time trying to be a lot of things to a lot of different brew approaches.)

Or is this a little to0 organised or just not what you're looking for in a project right now?
Cool either way.

Cheers
 
I only have the equipment for BIAB so my configuration will be different than a traditional system.

How about some sort of batch control? I was thinking of using Beersmith (I prefer open source but am currently using Beersmith on Ubuntu) for recipe creation. Then the rpi could parse the recipe file and pull out all of the necessary parameters like: strike temp, mash temp, mashout temp, mash time, boil time, hop additions & time, etc… Then the rpi could display the recipe, control the temps, and set addition timers and alarms.

@DonMagee check out jmwidgets.com. They have an example data widget that uses a REST based server: http://www.jmwidgets.com/index.php/docs/data-widgets-api/hmiphpexampledata/

Unfortunately, this is the first time that I've used python, html, jquery, or javascript so I have a lot to learn. However, I was able to hack together a working jmwidgets data widget by using their example with webpy. I ripped out all of the REST stuff as it seemed like overkill to me (way over my head).
 
I only have the equipment for BIAB so my configuration will be different than a traditional system.

My system has 1 MLT and 2 boil kettles. The intent of that is to be able to do a BIAB (with recirculation) while mashing and boiling another brew.

I'm not a fan of the highly automated systems. I'll open and close my valves and start and stop my pumps manually. What I want are clocks and timers and temperature control for burners.

I think that "the system" needs a "process" for each vessel. With my set up, I'd be running 3 processes at once. A mash process, a BIAB process and possibly a boil process.
 
Will it handle multiple devices on the bus ? How long does it tie up the system when its communicating with devices, say getting temps from 10 or so sensors ?

It will indeed handle multiple devices. Here's the link again.

I don't have exact figures, but it seemed to me that it was slow, probably on the average of 1 sec / device. That could be because of the ancient Pentium laptop I was running, but I'm pretty sure that the laptop and RPi are probably close to par with each other. I'm also not positive that you can get fuse and owfs running on the RPi.

I moved to the Arduino in pretty short order, since at the time I was interested in simply monitoring temperatures, and accessing them via a web page. Also, I'm a C programmer from WAY back (early to mid '80's, assembly for various chips prior to that), so it was a better fit for me. The arduino libraries are rock-solid, and well documented.

I've since been playing with the 1-Wire switches and some other 1-Wire devices, and I think my current Arduino / RPi configuration is the most flexible, and makes best use of each board's strengths.. The Arduino is a far better solution for process control, and the RPi is better suited for front-end operations. The only thing I might change is trying to get the I2C interface running, which would allow me to access multiple arduinos with one RPi

At least, that's my opinion. :p
 
I've since been playing with the 1-Wire switches and some other 1-Wire devices, and I think my current Arduino / RPi configuration is the most flexible, and makes best use of each board's strengths.. The Arduino is a far better solution for process control, and the RPi is better suited for front-end operations. The only thing I might change is trying to get the I2C interface running, which would allow me to access multiple arduinos with one RPi

Makes sense to me. RS485 another option maybe? If talking to Arduinos a little way away.

I don't have RPi but in theory you should be able to control 1wire devices via UART with minimal interfacing: http://www.maximintegrated.com/app-notes/index.mvp/id/214
 
I think we should split this thread off into RPi + Arduino efforts for those that want that and RPi alone efforts for those that want that.
 
brewman ! said:
I think we should split this thread off into RPi + Arduino efforts for those that want that and RPi alone efforts for those that want that.

I agree.
 
Actually, with more research, I can better see why brewman has gone the R PI / Arduino combo.
Just getting a reliable interface to a relay board means some kind of intermediary board. In which case why not use a dirt cheap Arduino (I can get an uno for under $20) and benefit from all the existing development such as PID libraries etc.
Sorry brewman, I think I was wrong. Then again, I don't know enough to confident about that ;)

What would you use for the wifi cabability - that seems to be expensive.
 
Found this guy in youtube, RPI talking directly with a cheap relay board, without any intermediary board. Also code is shown.

 
Last edited by a moderator:
hey guys, longtime lurker, brewer and EE here who started in automated control systems. Wanted to say the arduino / pi combo is the way to go as it is a great analogy to the PLC / SCADA combo at the heart of a lot of industrial automation.

these relay boards will certainly work, they take a 5V connection and then you can apply 3.3V to control each relay. The thing to watch is probably current draw, i'd probably use another 5V source - having all eight on at once might be a decent draw. in this case, the 3.3V - 5V interfacing is taken care of. Adafruit makes a simple bi-direction interfacing chip for the pi for this specific purpose.

however, this 3.3V - 5V disparity is not the only reason to use an arduino for IO, thought it does make voltage screwups much cheaper, just a new chip in the arduino vs. a whole new pi. The real advantage is that linux is too slow/sloppy to properly control IO, but is clearly the winner in terms of http (web serving), logging (data acquisition) and supervisory control (changing setpoints, starting/stopping processes, etc.).

my ultimate setup will go as follows:
- start with just raspberry pi controlling ferm temp (currently following this tut: http://learn.adafruit.com/send-raspberry-pi-data-to-cosm)
- expand to control keezer and ferm with arduino/pi combo
- finish electric single tier stand (BCS) and use pi to run web interface showing keezer and ferm temps as well as an interface into the BCS during brewing.

next pi project is a desktop arcade enclosure (MAME) which, IMO, goes great with friends and freshly brewed beer.

keep this thread going and good luck to all :rockin:
 
hey guys, longtime lurker, brewer and EE here who started in automated control systems. Wanted to say the arduino / pi combo is the way to go as it is a great analogy to the PLC / SCADA combo at the heart of a lot of industrial automation.

these relay boards will certainly work, they take a 5V connection and then you can apply 3.3V to control each relay. The thing to watch is probably current draw, i'd probably use another 5V source - having all eight on at once might be a decent draw. in this case, the 3.3V - 5V interfacing is taken care of. Adafruit makes a simple bi-direction interfacing chip for the pi for this specific purpose.

however, this 3.3V - 5V disparity is not the only reason to use an arduino for IO, thought it does make voltage screwups much cheaper, just a new chip in the arduino vs. a whole new pi. The real advantage is that linux is too slow/sloppy to properly control IO, but is clearly the winner in terms of http (web serving), logging (data acquisition) and supervisory control (changing setpoints, starting/stopping processes, etc.).

my ultimate setup will go as follows:
- start with just raspberry pi controlling ferm temp (currently following this tut: http://learn.adafruit.com/send-raspberry-pi-data-to-cosm)
- expand to control keezer and ferm with arduino/pi combo
- finish electric single tier stand (BCS) and use pi to run web interface showing keezer and ferm temps as well as an interface into the BCS during brewing.

next pi project is a desktop arcade enclosure (MAME) which, IMO, goes great with friends and freshly brewed beer.

keep this thread going and good luck to all :rockin:

I'm using a Teensy 3.0 in place of the Arduino for my project, and it works very well with the RPi. I'm using a 5V/5A switching power supply and a 3v3 800ma on-board regulator on my system to avoid over-stressing the RPi's or Teensy's regulators.
 
My RasPi is still 5 agonizing weeks away from being shipped by Allied. However, Yourduino should be sending my Arduino starter kit in the next few days. Super psyched about that. Time to dust off my old textbooks and put all my high school C++ programming knowledge to work.
 
may want to try adafruit.com for your pi/arduino needs. they seem to restock raspis rather frequently and have a ton of good stuff and info.

i grabbed two of arduinoUNO/wingshield/RGB-LCD and built one of them this weekend. The great tutorials on adafruit and numerous brewers out there on the Pi/arduino platform sharing info made my project painless.

I'll post up some pics when I have the Pi talking to the arduino. Will probably go serial to start but am thinking RS-485 for multidrop (1 pi and a few arduinos).

oh yeah, that article: easy-web-interface-with-gpio-access-runs-on-raspberry-pi is definitely not the way to go. Putting IO updates into a DB and then querying the DB to find out what to turn off/on is just f@#$ed. Seems this person was only interested in the "how" and should've asked themselves "why".
 
Hey, I'm working on getting a similar setup to what you have to control a heating element. I have most of the code up and running and was wondering what app you used for your android device? Any info you could post would be greatly appreciated.
 
This is really inspiring... Looking to do something similar. However I am curious what is the advantage of I2C over normal GPIO for driving the SSR? GPIO seems to work. Is it speed? More potential devices chained on I2C? Reliability?

Thanks
 
There is a place......
The only one.
The Raspberry Pi with a complete professional Process Control System.
Proview.

Just to let you know.

http://maba.dk

Hehe, dat Ikea box :drunk: I used (twice) the same "housing" for my STC1000 ;P
Anyways, we're trying to do some open source here ;P
 
So, we found both a cheap housing....:tank:
Anyway, Proview is open source (GPLv2).
Maybe you should have a look at proview.se

Cheers..,

Marc
 
Hey so its been awhile since RaspiBrew was posted, but wondering if anyone has an example of the raspibrew.py file with comments as to what all the different functions are doing. Im trying to learn python (Im a java programmer) and using it as an example
 
Back
Top