The Great Bottle Opener Giveaway

Home Brew Forums > Home Brewing Beer > Electric Brewing > StrangeBrew Elsinore - Raspberry Pi based brewery controller

Reply
 
LinkBack Thread Tools
Old 03-10-2013, 10:02 PM   #1
DougEdey
Feedback Score: 0 reviews
Recipes 
 
Join Date: Dec 2011
Location: Ottawa, ON - Ontario
Posts: 241
Liked 53 Times on 45 Posts
Likes Given: 11

Default StrangeBrew Elsinore - Raspberry Pi based brewery controller

So, I've been working on this for a month or so, initially the hardware used a program that steve71 made on HBT, but I found it was extremely limited (1 output, a specific controller input, and some other annoyances). The next iteration needed to be rebased, and now I've made significant improvements

First things first: Github Repo for the code - Elsinore Server
Elsinore Android App

I will add be updating frequently as I find improvements/bugs, this is an Alpha for all intents and puposes

So the raspberry pi is a tiny (credit card size, almost), cheap ($35) PC with GPIO, 1Wire, PWM, and more on it, but it has the advantage of being able to run full linux in a low power environment via an SD card.

The basic setup is:

Raspberry Pi with Debian installed and 1wire modules, connected to 1wire DS18B20 probes, and SSR outputs.

The inputs are the 1wire probes, which are accurate enough for this kind of work, they can be chained on one bus which helps to reduce footprint.
The SSRs control the -120v and +120v (or just one if you want to save a bit of cash) to the elements.

Circuit Diagram


It is designed to throw JSON style data out constantly (using the /getstatus URL):

{"hlt_pid":
{"elapsed":1361666853197,"scale":"F","cycle":2.0," duty":0.0,"p":4.0,"gpio":11,"temp":37.4,"setpoint" :175.0,"k":41.0,"i":169.0,"mode":"off"},
"kettle_temp":
{"elapsed":1361666852388,"scale":"F","temp":37.286 6}
}

In this example the HLT is setup as a PID (there's a GPIO pin setup in the config file, and a temperature probe setup), the Kettle is setup with a probe and no GPIO, so it's only reading the temperature.

Here is an example of the Android I have made, and uploaded, (ignore the names of the devices, I've been playing)



The settings allow you to specify the server name and port, as well as the refresh time.

UPDATES:

[Sunday March 17th]
Uploaded new versions of Server and app

The server now supports connections to COSM (formally pachube) so data will be uploaded to datastreams for each device that you have. These pushes only occur when you get data from the server locally, so if you use the android application, it will only update whilst that is running. If you quit the application it will stop pushing data to COSM. The data is pushed from the Elsinore Server to Cosm, not from the android application.

For example: https://cosm.com/feeds/119008 is my feed for Elsinore. You can call it whatever you want, but the datastreams will be made to match your setup if they don't exist already. Annoyingly you can't tell Cosm to display in your timezone.

So I added an extra url: getimages (i.e. https://elsinore:8080/getimages) which will get the last 8 hours of data from Cosm and dump it out to files in the "graphs" directory. I'm going to add extra details like a start/end time customization, and some better axes, but the Cosm API is a bit fiddly and apparently frequently changing.

Once you've gone to the getimages URL, you can then go back to the root/graphs directory (i.e. http://elsinore:8080/graphs/) to see all the images.

Long term, this'll be made into a brewing report.

The Android application itself has received a load of updates (and workarounds for Android bugs), so it now does work correctly, and will show the correct dial range, Celsius or Fahrenheit, depending on what the server is set to.

[18th March] More updates:
I've made a few more changes, like adding a launcher script




You can also specify the start and end time of the images (in your local timezone, or any timezone)




keezer:8080/getimages?startDate=2013-03-16T02:07:10-04:00&endDate=2013-03-16T18:07:10-04:00




Gets the graph between the startdate and endDate (-04:00 is the timezone different to UTC), I'll be updating the android controller to have a start brewday, end brew day, start Mash, end Mash, etc... form to allow multiple graphs to be selected.

[UPDATE Mar 20th]

Decided to play with a local graph (and fix a crap load of annoyances)
So it live updates the graph as you're going, more as an informative thing. I'll add the setpoint if there is one later so you can see how far away you are

Repositories are all up to date now.

__________________
DougEdey is offline
Toymaker Likes This 
Reply With Quote Quick reply to this message
Old 03-11-2013, 02:10 AM   #2
Toymaker
Arrgh!
HBT_SUPPORTER.png
Feedback Score: 0 reviews
 
Toymaker's Avatar
Recipes 
 
Join Date: Feb 2012
Location: Livonia, Michigan
Posts: 137
Liked 17 Times on 11 Posts
Likes Given: 7

Default

Awesome post! I just bought a couple Raspi's Just learning now. I love how much info is available on the web for these little guys!
Looks like your well on your way to a great use for it! You graphic for the dial thermometer has an error..I'm sure your not heating your HLT to 138 to 175 deg. C

__________________

Cheers,
Gary

Toymaker is offline
 
Reply With Quote Quick reply to this message
Old 03-11-2013, 04:01 PM   #3
DougEdey
Feedback Score: 0 reviews
Recipes 
 
Join Date: Dec 2011
Location: Ottawa, ON - Ontario
Posts: 241
Liked 53 Times on 45 Posts
Likes Given: 11

Default

Quote:
Originally Posted by Toymaker View Post
Awesome post! I just bought a couple Raspi's Just learning now. I love how much info is available on the web for these little guys!
Looks like your well on your way to a great use for it! You graphic for the dial thermometer has an error..I'm sure your not heating your HLT to 138 to 175 deg. C
You're right, whilst I update the scale based on the input, I haven't changed that bit yet!
__________________
DougEdey is offline
 
Reply With Quote Quick reply to this message
Old 03-11-2013, 07:31 PM   #4
ajwillys
Feedback Score: 0 reviews
Recipes 
 
Join Date: May 2008
Location: Holly Springs, NC
Posts: 1,315
Liked 22 Times on 20 Posts
Likes Given: 32

Default

This is very interesting to me but I'm confused about the diagram. I'll admit I don't know how to read these things fully but I don't see where the 120 V "supply" is and how everything is chained together. I suspected the 120 V to go something like this:

Hot side of plug -> SSR -> Element -> Neutral side of plug

Looking over it again, it looks like the "Mains" is switched as kind of a master on/off? Is that right? Wouldn't you want a mechanical switch for that? Perhaps I'm reading this all wrong. I've got a Raspberry Pi that I bought for the novelty of it and, while I've played with it alot, I haven't found a real use for it.

__________________
ajwillys is offline
 
Reply With Quote Quick reply to this message
Old 03-11-2013, 07:35 PM   #5
fc36
Feedback Score: 0 reviews
Recipes 
 
Join Date: May 2010
Location: Chicago, Illinois
Posts: 341
Liked 18 Times on 13 Posts
Likes Given: 26

Default

Subbed... That Android screen is beautiful. I can't wait to work on my RasPi and get things going.

__________________
fc36 is offline
DougEdey Likes This 
Reply With Quote Quick reply to this message
Old 03-11-2013, 08:36 PM   #6
ajwillys
Feedback Score: 0 reviews
Recipes 
 
Join Date: May 2008
Location: Holly Springs, NC
Posts: 1,315
Liked 22 Times on 20 Posts
Likes Given: 32

Default

I'm ready to jump in on this project. I want to just control one element for an electric HLT. I have the Raspberry Pi already. I'm thinking all I need is the following:

SSR - http://www.auberins.com/index.php?ma...&products_id=9
SSR Heat Sink - http://www.auberins.com/index.php?ma...products_id=45
Temperature Probe - https://www.sparkfun.com/products/11050

Obviously I'd also need wires, project box, etc... I'm just thinking the "main" components. What am I missing? Is there a place I can buy all this at once to save shipping?

__________________
ajwillys is offline
 
Reply With Quote Quick reply to this message
Old 03-11-2013, 10:29 PM   #7
DougEdey
Feedback Score: 0 reviews
Recipes 
 
Join Date: Dec 2011
Location: Ottawa, ON - Ontario
Posts: 241
Liked 53 Times on 45 Posts
Likes Given: 11

Default

Quote:
Originally Posted by ajwillys View Post

Hot side of plug -> SSR -> Element -> Neutral side of plug
Kinda, this depends on your country, for Canada (and I believe 120V based countries in general), to get 220/240V you need a special hookup, most people have this for their tumble dryer, or spa, or you can get one run custom. But this is a 4 pin output, which provides:

-120V
Neutral (0V)
+120V
Ground

To get 120V you would wire up Neutral and +120V, but to get 240V you take the -120V and the +120V which gives you a differential (not sure on the proper word here) 240V.

If you're unsure, do some research, my knowledge isn't huge, I'm not an electrician, don't kill yourself.

If you're in a country which is 240V, then you would only use neutral and live to get 240V. Just make sure you have the current to back it.

I'll post pictures of my setup when my new project box arrives.
__________________
DougEdey is offline
ajwillys Likes This 
Reply With Quote Quick reply to this message
Old 03-11-2013, 10:37 PM   #8
DougEdey
Feedback Score: 0 reviews
Recipes 
 
Join Date: Dec 2011
Location: Ottawa, ON - Ontario
Posts: 241
Liked 53 Times on 45 Posts
Likes Given: 11

Default

Quote:
Originally Posted by ajwillys View Post
I'm ready to jump in on this project. I want to just control one element for an electric HLT. I have the Raspberry Pi already. I'm thinking all I need is the following:

SSR - http://www.auberins.com/index.php?ma...&products_id=9
SSR Heat Sink - http://www.auberins.com/index.php?ma...products_id=45
Temperature Probe - https://www.sparkfun.com/products/11050

You need the 4k7ohm resistor (for the probe), I personally went with these: http://www.ebay.ca/itm/3m-Digital-Th...ht_2976wt_1165

Since I can mount them in the side of my pots. which makes life a lot easier. The colouring is a bit odd on the wires. I believe some are Red, yellow, *something else*

But the centre (on the ones I got) was always Data, and then I swapped the +ve and ground around till it worked, then they were all the same, if you have red, that should be +ve

Keep an eye on the probes when you wire them up, if you wire them up wrong they heat up, I didn't cause any damage (luckily) to mine, but I'd recommend being careful!

I used ebay for the probes and the SSRs/heatsinks, I think I saved maybe $5 per SSR compared to your prices, but Your mileage may vary. I also bought 10x at a time to save money and help friends out.
__________________
DougEdey is offline
 
Reply With Quote Quick reply to this message
Old 03-12-2013, 12:17 AM   #9
ajwillys
Feedback Score: 0 reviews
Recipes 
 
Join Date: May 2008
Location: Holly Springs, NC
Posts: 1,315
Liked 22 Times on 20 Posts
Likes Given: 32

Default

Quote:
Originally Posted by DougEdey View Post
Kinda, this depends on your country, for Canada (and I believe 120V based countries in general), to get 220/240V you need a special hookup, most people have this for their tumble dryer, or spa, or you can get one run custom. But this is a 4 pin output, which provides:

-120V
Neutral (0V)
+120V
Ground

To get 120V you would wire up Neutral and +120V, but to get 240V you take the -120V and the +120V which gives you a differential (not sure on the proper word here) 240V.

If you're unsure, do some research, my knowledge isn't huge, I'm not an electrician, don't kill yourself.

If you're in a country which is 240V, then you would only use neutral and live to get 240V. Just make sure you have the current to back it.

I'll post pictures of my setup when my new project box arrives.
Ah, I see. I'm actually only planning on doing 120V, 1500 W elements. I had considered doing 240V and adding a circuit, etc... but since I don't plan on going fully electric (my burner is natural gas), I decided to just keep it simple and stay with 120V. My HLT will have two 1500 W elements (I have two circuits in my garage) and I'll drive them both to get to temp, then unplug the "dumb" one and let the smart one maintain the temp. I'll check ebay. Always good to safe some cash. Thanks for the help!
__________________
ajwillys is offline
 
Reply With Quote Quick reply to this message
Old 03-12-2013, 12:28 AM   #10
DougEdey
Feedback Score: 0 reviews
Recipes 
 
Join Date: Dec 2011
Location: Ottawa, ON - Ontario
Posts: 241
Liked 53 Times on 45 Posts
Likes Given: 11

Default

Quote:
Originally Posted by ajwillys View Post
I'll drive them both to get to temp, then unplug the "dumb" one and let the smart one maintain the temp.
I'm working on adding a "supplemental" button to enable a secondary element manually. Unless you hit "off" on the ui.
__________________
DougEdey is offline
 
Reply With Quote Quick reply to this message
Reply


Quick Reply
Message:
Options
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pano-Matti, my Arduino based controller Vesku Automated Brewing Forum 14 02-03-2014 07:48 AM
StrangeBrew Elsinore - Raspberry Pi based brewery controller DougEdey Automated Brewing Forum 1 07-15-2013 09:23 AM
Strangebrewtroller (Raspberry Pi Based brewtroller) DougEdey Electric Brewing 3 03-10-2013 11:47 PM
Strangebrewtroller (Raspberry Pi Based brewtroller) DougEdey DIY Projects 9 03-10-2013 11:46 PM
Non-computer based controller calicojack Electric Brewing 3 01-22-2012 11:40 AM