Standalone, Plug and Play Raspberry Pi Headless Brewstand Controller-Server

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.
So a little bit of progress as to where I'm at with this with a little help from helibrewer.

I'm currently working on cleaning up the code to make it a little more friendly on the eyes before I post it here.

I decided to go with the one wire interface directly with the Pi. If you use the Occidentalis distribution it's already built into the kernel and works perfectly. No need to buy a usb interface for it. It really is plug and play.

I have two DS18b20's hooked into GPiO pin 4. I have a python script that as of right now is on a cron job to update every second, but I'm probably going to make it a system service instead. So every second it reads the two temperature sensors, formats the data into Fahrenheit and inserts it into a MySQL database.

I have a standalone php script that pulls the data from the MySQL server and saves it to a JSON variable for use in the main page.

On the main page I have two temperature gauges, one for mash tun and one for the brew kettle. I use jQuery and Ajax to pull the temperature data from the PHP script in real time and insert the temperatures into a hidden <DIV> tag.

From there I have a javascript section that pulls that data from the hidden DIV tag and update the gauge accordingly.

It sounds like there is a lot going on at once and that it wouldn't work well, but as soon as the data is updated from the sensor into MySQL the gauge changes instantly and updates in real time with current temperature.

I'm currently working with the webiopi to control the heating element and the pump. I have 4 buttons currently setup on the page. 1 for manual on and off control of the heating element, and one for the pump. There is an input where I can put my desired mash temp, and hit Start Mash, the script will loop until the temperature of the brew kettle reaches the temperature I set in the input, sound an alarm and turn the heating element off. The last button is a Boil button. The boil button will turn the heating element on, and only stay on when the wort is below a boil temperature. Hit the button again and the boil stops.
 
So a little bit of progress as to where I'm at with this with a little help from helibrewer.

I'm currently working on cleaning up the code to make it a little more friendly on the eyes before I post it here.

Looking forward to see what you have!!!
 
So a little bit of progress as to where I'm at with this with a little help from helibrewer.

I'm currently working on cleaning up the code to make it a little more friendly on the eyes before I post it here.

I decided to go with the one wire interface directly with the Pi. If you use the Occidentalis distribution it's already built into the kernel and works perfectly. No need to buy a usb interface for it. It really is plug and play.

I have two DS18b20's hooked into GPiO pin 4. I have a python script that as of right now is on a cron job to update every second, but I'm probably going to make it a system service instead. So every second it reads the two temperature sensors, formats the data into Fahrenheit and inserts it into a MySQL database.

I have a standalone php script that pulls the data from the MySQL server and saves it to a JSON variable for use in the main page.

On the main page I have two temperature gauges, one for mash tun and one for the brew kettle. I use jQuery and Ajax to pull the temperature data from the PHP script in real time and insert the temperatures into a hidden <DIV> tag.

From there I have a javascript section that pulls that data from the hidden DIV tag and update the gauge accordingly.

It sounds like there is a lot going on at once and that it wouldn't work well, but as soon as the data is updated from the sensor into MySQL the gauge changes instantly and updates in real time with current temperature.

I'm currently working with the webiopi to control the heating element and the pump. I have 4 buttons currently setup on the page. 1 for manual on and off control of the heating element, and one for the pump. There is an input where I can put my desired mash temp, and hit Start Mash, the script will loop until the temperature of the brew kettle reaches the temperature I set in the input, sound an alarm and turn the heating element off. The last button is a Boil button. The boil button will turn the heating element on, and only stay on when the wort is below a boil temperature. Hit the button again and the boil stops.

This is pretty much what I'm looking to build. A Pi controlled BIAB. I can't wait to see the progress on this one.
 
I've been a little caught up at work the last week. I should have everything all finished by this weekend, considering I'm hoping to brew this weekend.
 
Vebra said:
I've been a little caught up at work the last week. I should have everything all finished by this weekend, considering I'm hoping to brew this weekend.

I cheated and got a BrewTroller but I am continuing on this project also :)
 
Hey y'all
I'm just enamored. I'm going to get started on this and try to follow along. I'm a mechanical engineer by trade, and have some Python experience, so hopefully I won't get too far underwater. But I digress, I actually have a question for you.

Brewman!, you mentioned that you're using this relay board to control your burners and pumps. Can that thing handle the 240V of a standard water heater element? I know you're going to be using gas in your system, but I guess I'll be doing an e-RPi-HERMS. I know some of the non-automated electrical systems use big, expensive SSRs for controlling elements. If this works, it would drastically reduce the cost of an automated electric system. If this is a dumb question, feel free to say so.

Awesome discussion, and Cheers!
 
Hey everyone I just stumbled on this post. I have been working on my own setup for automating the hlt and fermenters in my fermentation chamber. I have built this project: http://code.google.com/p/beerwatch-temp/ . In the git download I have screen shots of my setup (or the start of it) if you put a probe in the crushed grain and your hlt put a target temp the system will calculate the mash temp and fire the 110 volt relay to turn on the bucket warmer. I used this temp probe https://www.sparkfun.com/products/11050? So far everything works great. I am not yet fully automated but this is a start for me. If you download my project make sure you read the docs lots of useful info in them as to the gpio pins and the database setup.
 
WhizardHat said:
Hey y'all
I'm just enamored. I'm going to get started on this and try to follow along. I'm a mechanical engineer by trade, and have some Python experience, so hopefully I won't get too far underwater. But I digress, I actually have a question for you.

Brewman!, you mentioned that you're using this relay board to control your burners and pumps. Can that thing handle the 240V of a standard water heater element? I know you're going to be using gas in your system, but I guess I'll be doing an e-RPi-HERMS. I know some of the non-automated electrical systems use big, expensive SSRs for controlling elements. If this works, it would drastically reduce the cost of an automated electric system. If this is a dumb question, feel free to say so.

Awesome discussion, and Cheers!

That relay board can handle 250V but only at 10A. If you plan on running a 4500W or 5500W element like most of us use then it won't be able to handle that much current. These draw 18.75 and 23 amps respectively.

Now onto the next problem. Regular relays like this are not robust enough to handle the extremely high amount of cycling that you will throw at it for this type of application. That is why you need an SSR instead of a normal relay.
 
Can that thing handle the 240V of a standard water heater element?
Depends on the Wattage of your element. I have a 5500 Watt element @ 240 volts. Which is 5500 / 240 = 22.92 amps, over twice what that board can handle. If you had a 2000W element. It. Would be fine as long as you don't switch it on and off two fast with the relay.

40 amp solid state relays can be had off eBay for $15. That is really what you'd want because the constant switching of an electric system will wear out a latching relay.
 
Hey y'all
I'm just enamored. I'm going to get started on this and try to follow along. I'm a mechanical engineer by trade, and have some Python experience, so hopefully I won't get too far underwater. But I digress, I actually have a question for you.

Brewman!, you mentioned that you're using this relay board to control your burners and pumps. Can that thing handle the 240V of a standard water heater element? I know you're going to be using gas in your system, but I guess I'll be doing an e-RPi-HERMS. I know some of the non-automated electrical systems use big, expensive SSRs for controlling elements. If this works, it would drastically reduce the cost of an automated electric system. If this is a dumb question, feel free to say so.

Awesome discussion, and Cheers!

These are great for using in control panels and the price isn't bad: 40A DIN Mount SSR
 
Unfortunately the rPi only pushed 3 volts on the gpio pins and this relay needs 5V to trigger. You will need a 5v supply, probably the same driving you pi, and then a transistor that is turned on by the pi to allow 5v to go to the relay. If you have an extension board that supplies 5 v you can hook it directly to the relay.

Am I making sense?
 
Update.

We bought a house and I'm up to my eyeballs in alligators with renovating it. And we are having a baby in July. Its going to be a while until I get back to working on this project.

Its great to see other people working on it though.

I'll jump back in as soon as I get time.
 
I'd like to join this discussion. I'm a web developer by trade so that part comes easy. The hardware stuff baffles me a bit.

I've ready through the "Raspberry Pi made easy" [1] thread and see how to wire up one temperature sensor.

How does the wiring diagram differ if I want to hook several temperature sensors? With my current rig I want to start with at least 6 but can see up to 12 to 14 when we have a monster brew session.

For the time being, I'm only interested in logging the data. I can pull the data out of any log format at a later time with relative ease.


[1] - https://www.homebrewtalk.com/f51/ra...rial-laymans-terms-needed-373664/#post4752020
 
bornholtz,

Below is the wiring diagram for multiple DS18B20's. With the onewire sensors, you can run 3 wires and insert a sensor wherever along the length and then continue the wires to the next sensor. If you are using a breadboard to prototype, you can just plug in an additional sensor in the same rows as the first sensor and modify your code to scan multiples to test.

Hope that clears things up a little.

images
 
bornholtz,

Below is the wiring diagram for multiple DS18B20's. With the onewire sensors, you can run 3 wires and insert a sensor wherever along the length and then continue the wires to the next sensor. If you are using a breadboard to prototype, you can just plug in an additional sensor in the same rows as the first sensor and modify your code to scan multiples to test.

Hope that clears things up a little.

According to the datasheet you can (or should) wire pin three to +5V so the sensors do not have to run in parasitic power mode. I've experimented with my bank of sensors (6 of them) and I can poll about 20x faster with this setup.

What bneal said is correct, I just wanted to point out that you can wire the sensors up differently to get more performance.
 
According to the datasheet you can (or should) wire pin three to +5V so the sensors do not have to run in parasitic power mode. I've experimented with my bank of sensors (6 of them) and I can poll about 20x faster with this setup.

What bneal said is correct, I just wanted to point out that you can wire the sensors up differently to get more performance.

Absolutely correct, unless you have a compelling reason not to, powered mode is an order of magnitude better choice than parasitic mode.
 
What is the advantage of using the GPIO pins as opposed to controlling all I/O through the One-Wire bus? As I'm thinking about the philosophy of this project, would it make sense to use some DS2408 chips for control of relays/SSRs, etc? A single DS2408 provides for 8 channels of digital I/O. If using a USB One-Wire adapter, all I/O would plug into the RPi by a single connector. Since the design already includes One-Wire temp sensors, this might be a way to go.
 
What is the advantage of using the GPIO pins as opposed to controlling all I/O through the One-Wire bus? As I'm thinking about the philosophy of this project, would it make sense to use some DS2408 chips for control of relays/SSRs, etc? A single DS2408 provides for 8 channels of digital I/O. If using a USB One-Wire adapter, all I/O would plug into the RPi by a single connector. Since the design already includes One-Wire temp sensors, this might be a way to go.

According to the datasheet, the combined sink capability of the chip is only 20ma, not very much if you're trying to run eight devices. :eek:

My project uses the DS2406+ digital switch, which works just fine on the 1-wire mini-lan. I'm also testing the DS2413.
 
I figured it would not sink that much current, but didn't realize it was THAT low. :drunk:

But, it would be possible to boost current capacity with a single transistor and a 10K pull up resistor, so it would require a little bit of additional wiring but keep all the process control I/O on the One-Wire bus. For a pre-built method, HobbyBoards offers this (though kind of expensive for what it does):

http://www.hobby-boards.com/store/products/8-Channel-I{47}O-(8-Relay-Version).html

Or, as you have shown on your site, use the DS2406 to drive SSRs. Do these sink enough current to drive relays?

Again, in the spirit of what the OP is proposing, the DS2406 (or DS2408) seems like a reasonable plug and play approach to controlling pumps, heating elements, gas solenoids, etc. and has the advantage that along with the temp sensors, can exist on a single 3-wire bus.
 
I figured it would not sink that much current, but didn't realize it was THAT low. :drunk:

But, it would be possible to boost current capacity with a single transistor and a 10K pull up resistor, so it would require a little bit of additional wiring but keep all the process control I/O on the One-Wire bus. For a pre-built method, HobbyBoards offers this (though kind of expensive for what it does):

http://www.hobby-boards.com/store/products/8-Channel-I{47}O-(8-Relay-Version).html

Or, as you have shown on your site, use the DS2406 to drive SSRs. Do these sink enough current to drive relays?

Again, in the spirit of what the OP is proposing, the DS2406 (or DS2408) seems like a reasonable plug and play approach to controlling pumps, heating elements, gas solenoids, etc. and has the advantage that along with the temp sensors, can exist on a single 3-wire bus.

I would proably use the DS2406 to drive a darlington to drive a relay.
 
I agree with the DS2406. BTW, great work on the Teensy Pi. You have provided great inspiration and a great way to utilize an RPi for various homebrewing applications. Kudos!
 
I agree with the DS2406. BTW, great work on the Teensy Pi. You have provided great inspiration and a great way to utilize an RPi for various homebrewing applications. Kudos!

Aw shucks :p

In addition to Brewery Control, I've had a few other suggestions for its use like avian brooder control, controlling mutiple aquariums / terrariums, and one guy is thinking about using it to monitor / control hot water radiant heaters in the rooms of his house.

Ya just gotta think outside the box. :tank:
 
Aw shucks :p

In addition to Brewery Control, I've had a few other suggestions for its use like avian brooder control, controlling mutiple aquariums / terrariums, and one guy is thinking about using it to monitor / control hot water radiant heaters in the rooms of his house.

Ya just gotta think outside the box. :tank:

Indeed. I may put this to use for a chemical dosing system for our swimming pool. It would be nice for my system to keep track of pH and ORP over time, and then dose in chlorine or muriatic acid. But, that will have to wait as I focus on brewing stuff for the mean while!
 
Subbed...Just got my RasPi from Allied last week and burnt wheezy about an hour ago. Here we go.
 
Sad this project has stopped. Is there some source available, or some private homepages that have more info?
 
Subscribed....quiet for a long time for some who seemed to be stoking this fire...what did they end up doing?
 
Back
Top