Tuesday 25 November 2014

Commence Fermentation!

It's been a few weeks but I've managed to get a bunch of work done on the Web UI and the actual management code of the chamber. I finished wiring everything up shortly after the last post and did some tests with a carboy of water. I replaced the ceramic heating bulb with a small Ceramic heater as the bulb was causing a localized hotspot that was melting the foam of my chamber wall, and the Ceramic heater has a built in fan to help push the hot air around the chamber and get it up to an equalized temperature that much more quickly. Since I don't have a working touchscreen for the Beaglebone Black at the moment I've decided to whip up a web page to display data and manage the set point. I built a MySQL database and a simple front-end which allows the temperature monitoring code to push temperature data into the database on a set interval. I then used Google's really awesome graphing UI to draw some pretty graphs on the website. Here's a screencap of it in action.
Super cool Fermentation graph!
The blue line represents the ambient temperature in the chamber and the red line is a measurement from a probe stuck directly into the wort. The wort temp probe controls the heating element, when it drops to 0.3 degrees below the setpoint the heating element is turned on. The heater has a built in thermostat which was originally at 55 degrees C or so, so that's why you see those peaks on the blue chart, I turned it down to 30 degrees and I can see a pretty good response from the wort. That graph is a live view of a 20 gallon ferment from this weekends brewing, so there is a pretty big thermal mass in there and it takes about an hour to raise the wort temperature 1 degree C. I also have a cooling circuit, if the wort ever goes 0.3 degrees above my set point the Beaglebone Black will turn on the cooling circuit and a 5k BTU air conditioner will blast the chamber with cold air to keep the wort at the desired temperature. All the code for the temperature monitor is available on my Github repo Temp Driver Repo I've still got some work to do to pull down the set point from the website, right now it's hard-coded and I haven't found an elegant way to pull that data down yet. The plan is to have ferm schedules, where it will hold at temp x for some time, then ramp up or down to a set point and hold, then cold crash etc. I'll post some pictures of the whole system in action once I've cleaned up the garage a bit.

Friday 7 November 2014

Thanks Crank!

The guys at Crank Software hooked me up with a Hard Float compiled runtime for my board. I'm back in business!
 root@arm:/home/ubuntu/temp_probe# ./temp_driver -c test  
 Setting channel to : test  
 Starting temperature Driver  
 Command >  
 a  
     Ambient temp is 0.000000  
 Command >  
 Command >  
 w  
     Wort Temp is 0.000000  
 Command >  
 Command >  
That's some output showing the temp driver compiled and running on the BBB! Of course I don't have the temp probes connected right now so the values are defaulted to 0, but this means I'm ready to go and should have the interface running this weekend! Thanks Crank!

Thursday 6 November 2014

Temperature Control, here we come.

I finished up the wiring for the temperature probes, they are ds18b20 one-wire probes as I've mentioned earlier, and they are great since they can share a bus with up to 10 devices with no extra effort, just join up the wires, use the pull-up resitor between data and the 3.3V from the BBB and setup your GPIO input pin for the one-wire driver that's provided in the Ubuntu image and you'll be able to read multiple temp probes!

here's some output.


ubuntu@arm:/sys/devices/w1_bus_master1/28-00000449da30$ cat w1_slave
e4 00 4b 46 7f ff 0c 10 ae : crc=ae YES
e4 00 4b 46 7f ff 0c 10 ae t=14250
And the second probe
ubuntu@arm:/sys/devices/w1_bus_master1/28-000004f1d675$ cat w1_slave
ff ff ff ff ff ff ff ff ff : crc=c9 NO
e5 00 4b 46 7f ff 0b 10 83 t=-62
Hey, wait a minute, looks like that was a bad read, notice the crc=c9 NO, that means the crc check on the data read failed. That's a bad temp value and I better make sure to validate the crc before I trust a temp read. Here's a subsequent read that shows a good value.
ubuntu@arm:/sys/devices/w1_bus_master1/28-000004f1d675$cat w1_slave
e4 00 4b 46 7f ff 0c 10 ae : crc=ae YES
e4 00 4b 46 7f ff 0c 10 ae t=14250


Now I'm working on the temp_driver which will read the temp from the one-wire interface and send it to the UI using greio, which is the IPC library that comes with Storyboard. I ran into an issue with the Storyboard Engine though, when I switched to Ubuntu on my beaglebone I switched to a Hard-Float based kernel, and the Storyboard Engines I have aren't Hard-Float compatible, so I can't run Storyboard right now. I'm waiting for my friends at Crank to get me a hard-float compiled Engine and libs so I can finish my driver and get the interface up and running. I'm very close to have a working chamber for the first time in over a year!

Saturday 1 November 2014

I'm Back!

Hard to believe it's been almost a year since I posted, I've had a few things come up that put the project on hold, but I'm ready to start wrenching again.  I've built the physical chamber and done most of the electrical wiring, now I need to get the Beaglebone Black up and  running again and get my software tuned up so I can start controlling some fermentation temps.

I've been mainly working on the physical chamber and I've got a few pictures of that to share.

Ferm Chamber with Rough AC cooling placement
Air Conditioners have their own built in thermostats, and this one doesn't have an option to just run the cooling cycle all the time, so I had to hack the unit up a bit to re-route the very analogue temp probe from the AC out of the chamber and somewhere I could access it to to heat it up when the Beaglebone wants to cool the chamber.  The probe on this unit is a closed loop refrigerant coil that connects to a baffle that is opened and closed when the coolant in the line expands / contracts due to the temperature of the air coming into the unit.  It is normally mounted about 1/3 of the way up from the bottom.  Thankfully the copper is pretty malleable and I was able to bend it without crimping it out the back of the unit.  The end result can be seen here.

Re-Routed probe.
You can see here I managed to get it coming out the back of the unit where I now have easy access to it.  I will build up a little heating circuit using the BBB so that when it wants to cool the chamber it will also heat up this little guy which enables the compressor.  The other option is to just short the compressor to the main power which would always enable the cooling, but that's a bigger operation and if I muck it up it will render the AC unit useless.  I'm all about non-destructive modifications so I'll stick with this method for now.  For the heating I'm thinking I'll use one of these 5V heating pads which should be easy to control from the BBB.

The inside of the chamber is insulated with 1.5" R5.6 Foam insulation from Home Depot.  I used it because it was cheap and easy to work with.  I can always increase the amount of foam if I find the efficiency is bad, a quick test earlier showed no heat gain with a half hour stand and a 15 degree C gradient between ambient air and the chilled chamber air.

Since the unit is in my garage, and I live in Ottawa where the outside air temp can hit -30C I need a way to heat the unit as well, my brewing buddy Steve suggested I use a ceramic bulb like those used for lizard setups, which he happened to have.  So I wired up a hot side SSR controlled circuit and added a ceramic lightbulb outlet to the inside of the chamber that's controlled by this circuit.

Heater bulb outlet and the Temp Probe XLR headers.
You can also see in this picture the temperature probe headers I wired in.  On my old chamber I simply had the temperature probe wires just run through the chamber wall directly, but that can get messy and meant disconnecting them from the board to clean / sanitise them between brews.  This way I can pull them out when not in use and store them easily, then move the beer in, plug in the probes and I'm ready to go. It's also easier to add the probe to the wort before you move the carboy into the chamber ( more headspace for a 16" probe to be inserted ) so now I can put the wort probe into the carboy and then slide it in and plug it in after.  Plus XLR's are pretty damn awesome, I feel a little bit like a Rockstar when I plug them in :).

The last picture is a bit embarassing, but there's a mess of wiring coming out of this thing and I didn't plan the layout very well, I got really excited about getting it hooked up and just kind of ran with it.  For some reason the picture is showing up really small, I'll try to get some better shots for the next post.  This is the outside wall which has the control box for the SSR's, out of the box comes some Romex which connects to the hot and cold side plugs, the AC plugs into the cold side plug and the Light box is wired up in series to the hot plug, so when that circuit is energized the bulb is also turned on.  I may run a line for a small fan at some point for the heating side to help move the air around.

Black box has the SSR and Input voltage, you can see the AC Plugged into the cooling circuit.

I'll have a few more pictures and a new post in the coming days as I get the software side of things ramped up again and start doing some test runs before the inaugural brew.

Monday 24 February 2014

The UI continues to evolve.

Long time no post but the project is far from dead.  I've been doing some other brewery upgrades and brewing a bit to get my pipeline back to an acceptable level so the Fermentation chamber project took a backseat.  I'm going to give a push and see if I can get the initial UI and functionality running.  This will essentially simulate an STC-1000 type setup where you can set the desired temperature and the unit will maintain those temps.  Once that's working well I'll start working on the back-end which allows for building fermentation profiles and submitting them to the unit through a web interface.

I've been working a bit on the front end, I've added a second temp output and graphs for both ambient and wort temp.  The set-point feature is working and allows you to change the set point in tenth of a degree increments.  Right now everything is in Celcius, I'll add an option to switch temps to Fahrenheit.


Here's a quick preview of the new interface.  I realize it's not the prettiest thing, but it's showing the important info for now.  I'll be working on making it look a lot nicer in the coming weeks.