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.
Brewman !, if you have a chance, I have a bunch of questions about your equipment. Also, I think a component/hardware/equipment list would be handy.

What is your brewing setup (Herms, rims, direct fire?)

How many burners/pumps will you be controlling? Will you be using ON/OFF gas solenoid valves or variable output? Natural gas or LP?

Will you use a (SS or mechanical) relay expansion board?
Will you be mounting your electronics to your brewstand?

I'm sorry if these are dumb questions, I am just trying to think ahead. I have done loads of low voltage automation with python, but something about flames, connecting to the mains...all while drinking, scares me.

Thanks for your time.
 
Brewman !, if you have a chance, I have a bunch of questions about your equipment. Also, I think a component/hardware/equipment list would be handy.

RPi
4 GB SD card
USB Wifi adapter
USB One Wire adapter
GPIO relay board, not USB

What is your brewing setup (Herms, rims, direct fire?)

See here:
https://www.homebrewtalk.com/f51/birth-zeus-non-typical-brewstand-build-368010/

3 kettles + 1 on demand hot water heater.

The kettles are a dedicated direct fire mash tun + 2 boil kettles, each with their own pump.

How many burners
3 plus possibly the on demand hot water heater.

pumps will you be controlling?
3

Will you be using ON/OFF gas solenoid valves or variable output?
On/Off, using real gas control valves, NOT SOLENOIDS.

Natural gas or LP?
NG, but it would be the same thing for LP.

Will you use a (SS or mechanical) relay expansion board?
My relay board has 8 mechanical relays on it, 10A each.

Will you be mounting your electronics to your brewstand?
Yes. Everything goes under the cover on the lower shelf. The cover flips up for easy access. I thought this to be the most unobtrusive place, mostly shielded from water and away from heat.

I'm sorry if these are dumb questions, I am just trying to think ahead.
There is never any such thing as a dumb question, except one that is asked too late.

I have done loads of low voltage automation with python, but something about flames, connecting to the mains...all while drinking, scares me.

Worst thing that happens is that a burner stays on when it shouldn't. The gas control valves make it explosion proof. No pilot = no gas = no boom.

Thanks for your time.
I'm only too happy to give back.
 
I am having a little trouble understanding the temperature sensors you guys are using... Do they attach with some sort of thermowell or something?

Nope... err... they will.

The DS18S20 comes in several packages. I am using the TO92ish package, which looks like a little transistor, if you are familiar with them.

They have 3 leads, 5V, GND and data. You can steal power from the data bus only run 2 wires to them if you need to.

I'll be embedding my sensors into pieces of thin wall SS or copper tubing using epoxy and then immersing them into whatever liquid needs measuring. I might install them into various places in a waterproof (wort proof) manner using a compression fitting over the tubing.

I don't like how some people set up "thermowells" as there is a lot of thermal mass between the sensor and the liquid.

I might use copper tubing over SS for better thermal conductivity. If one can reduce the temperature reading lag time enough, one can probably do without a PID control system and use a simple bang bang algorithm. (Insert hopeful look here.)

Digikey.com and other vendors have datasheets for these devices which include mechanical drawings near the end.
 
I might use copper tubing over SS for better thermal conductivity. If one can reduce the temperature reading lag time enough, one can probably do without a PID control system and use a simple bang bang algorithm. (Insert hopeful look here.)

Digikey.com and other vendors have datasheets for these devices which include mechanical drawings near the end.

Gotcha. I just already am working on a PID setup using RTD sensors, which are nice because they're waterproof and have NPT threads and such. I am trying to teach myself about all this stuff but I am having some trouble understanding all the hardware. I'll be following the thread though, hopefully I can make sense of it all and contribute :)
 
Ok, so I have my raspi running with VNC, Apache2, php5, FTP, SSH, MySQL, and MyPhpAdmin. I have also connected my Arduino 2650 via usb (dev/ttyACM0).

My relay board has not arrived yet. One wire is running on the raspi but I have not connected any sensors yet to test. Once I get the sensors communicating I will start working on the web interface.
 
Ok, so I have my raspi running with VNC, Apache2, php5, FTP, SSH, MySQL, and MyPhpAdmin. I have also connected my Arduino 2650 via usb (dev/ttyACM0).

My relay board has not arrived yet. One wire is running on the raspi but I have not connected any sensors yet to test. Once I get the sensors communicating I will start working on the web interface.

Do you need Apache if you use pyWeb ?

I think it would be helpful for everyone to be on the same page as far as the data flow and tools/stack used from raw sensor data though to the web page being served. Otherwise we are going to get a whole mix of technologies and approaches.

Lets assume that everyone agrees to use OWFS. What is your data flow from there to where the data for a sensor is displayed on a web page ?
 
Do you need Apache if you use pyWeb ?

I think it would be helpful for everyone to be on the same page as far as the data flow and tools/stack used from raw sensor data though to the web page being served. Otherwise we are going to get a whole mix of technologies and approaches.

Lets assume that everyone agrees to use OWFS. What is your data flow from there to where the data for a sensor is displayed on a web page ?

I may have missed it but I didn't see pyWeb mentioned anywhere in the thread. Seems programming using pyWeb would allow for interaction without a web server but I'm not sure I want to completely bypass the server option. I'll take a look at OWFS for sensor interface.
 
I may have missed it but I didn't see pyWeb mentioned anywhere in the thread.
It probably wasn't. And I'm not 100% sure what it will and won't do.

Seems programming using pyWeb would allow for interaction without a web server but I'm not sure I want to completely bypass the server option.
I'm not 100% sure either, but setting up Apache seems like a lot of overhead for such a simple function.

I'll take a look at OWFS for sensor interface.

Keep us informed.
 
So it appears one needs to choose between the native w1 kernel module or OWFS. From the reading I have done, the GPIO cannot present itself as a physical bus connection required for OWFS. W1 kernel and OWFS are not compatible.

The OWFS direction seems more practical for I2C since I2C is a serial implementation and that's what OWFS likes.

I have been using the DS18x20's on GPIO4 using the native w1 kernel implementation.

OWFS should work with a USB 1-wire adapter since the USB device can act as the physical bus master for OWFS...if you just want to run the sensors to GPIO4 then the kernel implementation works great.
 
So it appears one needs to choose between the native w1 kernel module or OWFS. From the reading I have done, the GPIO cannot present itself as a physical bus connection required for OWFS. W1 kernel and OWFS are not compatible.

The OWFS direction seems more practical for I2C since I2C is a serial implementation and that's what OWFS likes.

I have been using the DS18x20's on GPIO4 using the native w1 kernel implementation.

OWFS should work with a USB 1-wire adapter since the USB device can act as the physical bus master for OWFS...if you just want to run the sensors to GPIO4 then the kernel implementation works great.

a) Thanks for looking into this and reporting it. The "gotyas" are what make these projects difficult.

b) I'll take your word for your decision(s) until I get a chance to dig in. Others are welcome to joint the fray.

c) Initial impression, I like the thought of doing OWFS with the USB adapter. I think I'll prefer the USB adapter to doing it with the kernel.

Carry on !
 
My latest dilemma is getting data from the GPIO displayed on javascript gauges. Javascript executes on the client side, I use python to pull GPIO data. Python runs on the server...connecting the two is the the challenge....assuming you want to serve your temperature readings real time over a webpage.

I found a promising little app called pico (not the text editor) which acts as a very simple RPC between JS and python. You can basically call a python script through a javascript in your html page.

I'm no js expert so if anyone knows a better way to pull the data, process it, possibly store it, then serve it up on a webpage, I'm all ears. It looks like the data needs to be pulled with a loop, or possibly through edge triggering to reduce cpu load on the Raspi.
 
I have not looked at this in any detail at all. I can't make a meaningful comment until I do.
 
I hacked the hmiPhpExampleData data widget from JMWidgets (http://www.jmwidgets.com/index.php/docs/data-widgets-api/hmiphpexampledata/) It works pretty good. I can read and send data to the python server by using any of the JMWidgets embedded in html. It could be cleaned up a lot as I am no js expert. I am willing to share my efforts if anyone is interested. Does anyone know of a good way that we could share code with each other?
 
tob77 said:
I hacked the hmiPhpExampleData data widget from JMWidgets (http://www.jmwidgets.com/index.php/docs/data-widgets-api/hmiphpexampledata/) It works pretty good. I can read and send data to the python server by using any of the JMWidgets embedded in html. It could be cleaned up a lot as I am no js expert. I am willing to share my efforts if anyone is interested. Does anyone know of a good way that we could share code with each other?

Nice, more reading to do :) This seems more elegant than what I found.
 
I love the contributions I see in this thread. Everyone does things differently. More ideas = better outcome.

I'm working on my stand itself today. I'll join the fray when I get a chance.
:)
 
Sorry I'm late to the party.

I'd like to help out around here, as I'm in the same boat. Assembling a new rig, and planning on using a pi to keep things in check. Here are a couple of thoughts I had when ripping through the pages:

- There is a One-Wire patch for the rPi, as helibrewer pointed out. This will allow you to use the GPIO pins on the board to poll the bus, as well as freeing up a USB port. It is too late for Brewman !, but it could save future readers $17 for the USB adapter. Furthermore because it is exposed at the kernel level as a file handle you can use epoll/select type programming to watch levels without having to busy wait your CPU or riddle it with sleep(1) s

- I rolled my own temperature sensors. I picked up some DS18B20s and some 'protection tubes' from http://www.brewershardware.com/Straight-Tubes/. I then used some binary thermal adhesive from Arctic Silver (http://www.arcticsilver.com/arctic_silver_thermal_adhesive.htm) to seat the sensors in the end. Testing against a Spectrum industrial sensor I was 0.2 degrees off at 70 Celsius. Considering that is the error tolerance for the 'industrial' sensor at that point, it was good enough for me.

- Those Canvas Steel gauges are sexy. Thanks jimmayhugh, I will be using those in the future. Yes, I think that visualizing data can be sexy.

- I agree with Yorg, use python. It's a bloody elegant language, and most of the libraries are written in python themselves, so no problems porting to the ARM processors on the rPi

- I agree with Brewman ! that a full LAMP stack is way overkill for this purpose. I do like pyWeb, although there seems to be more web servers these days than there are homebrewers. I personally like making the clients do most of the heavy lifting which means that all you provide is static HTML/JS/CSS and then serve up data on demand. I'm not even sure you need to venture outside of Python; you could use the built in SimpleHTTPServer to watch port 80, serve up static files and data and then use the built in pickle as a super simplistic 'database' of historical information. If you can keep your external requirement to just Python, it keeps installation (and customization) very easy.

Let's keep the ideas rolling.
 
Welcome to the party. wdevauld.

I love where this is going.

I disagree with the one wire kernel driver versus the USB one wire adapter, but I haven't played with either of them yet, nor am I set on either one. So we'll see where this goes.

Here is a one wire open collector (drains) driver (DS2408) that could be use to drive typical brewstand relays, among other things.

http://www.digikey.com/product-detail/en/DS2408S+/DS2408S+-ND/1197414

This device would be handy for people using the One Wire interface for temperature measurement and wanting to drive more relays than the GPIO port on the RPi board will allow directly.
 
- I rolled my own temperature sensors. I picked up some DS18B20s and some 'protection tubes' from http://www.brewershardware.com/Straight-Tubes/. I then used some binary thermal adhesive from Arctic Silver (http://www.arcticsilver.com/arctic_silver_thermal_adhesive.htm) to seat the sensors in the end. Testing against a Spectrum industrial sensor I was 0.2 degrees off at 70 Celsius. Considering that is the error tolerance for the 'industrial' sensor at that point, it was good enough for me.

I'm trying to get the thermal capacitance and resistance down on my sensors for fast response time. In this regard I'll probably do the same thing with copper tubing.

For those not wanting to buy SS tubing on the Internet, a local hose and fitting shop that does custom work in SS will probably have lots of cut offs they will literally give away. AC and refrigeration shops work in copper and SS too, as do some instrumentation shops.

I am going to try to "pot" my sensors in the end of my tubing such that the sensor head is exposed directly to the liquid I'm measuring the temperature of. Stay tuned for more details as I test this concept.
 
I'm trying to get the thermal capacitance and resistance down on my sensors for fast response time.

What dT/dt are you looking for? It would take me all of 5 minutes to put one in a pot of water and bring to decent temp and then drop another in to see how fast it rises to temperature. Obviously the larger the differential the greater the rate of change, and I think the temperature will be within a degree inside a second or two.

I offer because it was dead easy to make these probes and if you have access to a TIG/MIG and some time you could easily make the 'protection tubes' yourself. The material was pretty thin, so I don't think the usual copper versus stainless insulating argument is going to have much effect. I also think that attempting to get the sensor to touch the fluid directly is playing with fire and you could better use the time using that Zeus brewstand of yours.

-W

Thanks for pointing me towards the DS2408 BTW
 
I'm real new to client/server stuff in Linux and just learning Python but I do recall seeing info on epoll and plan to see how that works since I have the gauges files, I have 4 sensors working on the w1 kernel module, and I have python code to pull and trim the sensor values. I actually connected a wire from my Arduino sensor buss (data) to GPIO4 so I am simultaneously reading the sensors on both setups.

Now if I can get this epoll feeding the Gauges js script I'll be somewhere.
 
helibrewer, don't get tangled up in AsyncIO/epoll just yet. It is very much a nice to have. Given that the rPi is probably going to be dedicated to the brewing/displaying there is little value in using epoll to free up the CPU for some additional cycles.

That said, I've done a few tours of building python web applications, so if you have your code in a public repo somewhere I can help you out.
 
Really like this idea. I don't have much experience with Linux but just ordered my Raspberry Pi. I had kind of been looking for an excuse to get one anyway. Right now I'm wondering if I would be better to get a 1 Wire adapter or just use the onboard interface on the Pi? Right now I do BIAB with a turkey fryer so I am just looking for something to monitor temps. Can you get more than 1 probe with just the PI or do you need the 1 wire adapter. I would really like to be able to use my android tablet or phone to see what the temps are. I also would like to expand in the future to using and electric element with a recirc pump and have the whole thing controlled by the Pi.
 
redm18, the answer to your questions depend on the type of probe you get. If you get a Thermocouple or Thermistor then you can just use the onboard GPIO pins. The upside is that they are cheap and found just about everywhere; the downside here is that they don't have a linear curve so they require being calibrated around the temperature they will be used, which is just extra fanagling.

If you go with a digital probe, the most popular being the Dallas Semiconductor One-Wire DS18B20 although there are others, then you can also use the GPIO pins although it won't be as simple as reading a voltage. Often though there are libraries on the internet that do all the heavy lifting for you.

So with that out of the way I can answer your questions:
Can you get more than 1 probe with just the PI or do you need the 1 wire adapter.
Yes. If you go with the analog probe routes, you can use up to 8 probes without any special extras. There are 8 General Purpose Input/Output (GPIO) pins that you could assign to watching those probes. If you go the One-Wire route, you can put something stupid like 1024 devises on one bus. The advantage of getting the One-Wire adapter is that you don't have to compile modules for the Raspberry Pi kernel to use the generic pins. You just plug it it and go. Although if you wanted to learn Linux...

Right now I'm wondering if I would be better to get a 1 Wire adapter or just use the onboard interface on the Pi?
This is only a matter of choice. Both options work, it is just that the USB adapter costs $17 and will save some time as it is really just plug and play. If you want to use the pins on the Raspberry Pi you will need to add in the gpio kernel module (http://www.raspberrypi.org/phpBB3/viewtopic.php?t=6649). Although at the rate that the Raspberry Pi community is moving this may be in the more popular kernels by the time yours shows up.
 
Seems like the usb is the way to go at least after reading the link thread. Any recommendations as far as which adapter to get?
 
helibrewer, don't get tangled up in AsyncIO/epoll just yet. It is very much a nice to have. Given that the rPi is probably going to be dedicated to the brewing/displaying there is little value in using epoll to free up the CPU for some additional cycles.

That said, I've done a few tours of building python web applications, so if you have your code in a public repo somewhere I can help you out.

Thanks! What I have so far is a PHP server side event script that uses system(cat ...) to pull the w1 GPIO data, I chop that up and turn it into a number where it gets called by a couple lines in the Gauge js and whalla, I have the gauges showing my GPIO temp data. It's kind of a kludge right now with no error checking/smoothing and even though I'm passing a float, the gauges are only showing integer data...I'll tackle that next. My goal is to get all 4 of my sensors working through the Gauge script then I will start clean-up and tweaking.
 
Good work, guys.

I'll jump back into the fray once my stand is welded up, probably later this week. In the mean time, carry on !
 
I don't really understand much of what you guys are talking about but I am really interested. I am currently debating between a BCS and a brewtroller and like where this discussion is heading.
 
Here's a shot of the gauges on a client machine. The top 4 show the temp in F of my 4 sensors. The row below that shows the same sensors in C.

thumb1_photo-57600.png
 
Finally a use for my Pi. I am in the process of switching to an electric setup. Due to limited space this will just be a single kettle batch sparge setup in the basement. I think this might be the solution I have been looking for the ability to set some parameters and monitor remotely and come back when I have hit targets in the brew process.

I have determined that I will need a relay block either USB or GPIO to control the SSRs to drive the element and random pumps ect...

What I am not sure about is the temperature sensors.What is the general consensus for connecting the temperature sensors USB or GPIO?

Here are some ideas of parts I am considering

USB relay and input controller
http://www.canakit.com/4-port-usb-relay-controller.html
Relay module
http://www.ebay.com/itm/New-5V-8-Ch...ic-/270984095956?ssPageName=ADME:L:OC:CA:3160
 
This is exactly what I had in mind for the Pi's. I have gone through a couple of the 'wireless' digital thermometers and the range on them is only good for about 10 feet or so. To buy a true 'wifi' digital thermometer can cost a bundle! It would be nice to figure out a way to use the Pi's for this! Subscribed. :)
 
Found something that may help get rid of the old sightglasses: Ultrasonic sensor on ebay

Seems like it would be pretty easy to read levels in all three vessels for pretty cheap. You'd have to give up one IO pin per sensor. This would be one more step toward incorporating automated valves and having a end to end automated system
 
Does anyone know of a good way that we could share code with each other?

Github is a good place that would let everyone see/contribute to the coding project easily. I think it'd be worth starting up a github project so that information can be put into one place.

That being said, there is a lot of knowledge floating around this thread. Thanks for putting in the hard work!
 
Back
Top