Arduino+XBee Dual-stage 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.

Chuginator

Well-Known Member
Joined
Feb 14, 2011
Messages
477
Reaction score
61
Who doesn't need a wirelessly-controlled fermentation fridge? Figured it'd be the bee's knees for automated temperature ramps when lagering.

This logs data to and can be controlled from my Linux server (Debian). Records ambient air, ambient fridge air, and carboy temps (carboy sensor taped and insulated against outside of carboy). Serial XBee input is read by a 13KB C-based Linux daemon that parses, validates, and publishes the XBee packets to interested clients via TCP/IP. A PHP-based logger script "subscribes" to the stream, only listens for packets from the fridge, and shoves them in a MySQL database where it can be graphed through a web browser (facilitated with PHP and JPGraph).

Temperature control is based on carboy temps. Cold stage controls fridge power, hot stage controls Flex-Watt heat tape. Built-in time protection for shortcycle delays.

r100_7559.jpg


r100_7572.jpg



I used an RGB LCD display so it turns blue when cooling, red when heating, green when temp is within setpoint, and a weird purplish color when off.

r100_7610.jpg


100_7531.jpg



In this graph, the setpoint (orange line) was changed to 45F and control turned on. The dark blue line indicates when the fridge was being powered. Tested with a can of paint thinner ("carboy" temp is bright green line). Kept temps to +/- 1 degree. After the last power cycle, it was turned off. The light blue line is the ambient air swing of my shop heater; you can see at the end of the fridge power that the ambient air swung to 50F - had to open the shop door to vent engine fumes. Door was closed and the ambient swung back up, then gradually declined. Hard to see in the compressed graph, sorry.

fc9.png



Will be testing with a real carboy and heat tape possibly this evening. Will be interesting to see how well it controls it.

I know it's only a matter of time before someone says that I could have used a Fermtroller.

Before you do: I don't care.

Cheers! :mug:
 
Thanks!

No, I don't have links to larger images; Photobucket scales them down.

Schematic is super simple. Instead of using expensive SSR's which aren't necessary anyway, I picked up a very cheap dual-relay controller off eBay. It was like $8 with shipping from China!

fc10.png


Temp sensors from Adafruit. https://www.adafruit.com/products/165
 
nice to see some Arduino projects around here. im doing the exact same thing at the moment with an Uno, only not wirelessly as i have ethernet ports all over the house already. im also using some solenoids to control coolant circulation from my glycol chiller to the three zones that it supplies (kegerator upstairs, ferm chamber and keg chiller in the basement).

if you ever need any relays, shields, etc... this place is the tits...
https://arduino-direct.com/sunshop/
slow shipping, but priced right.

also check out www.bwired.nl for some web interface inspiration. that guy went all out with home automation.
 
nice to see some Arduino projects around here. im doing the exact same thing at the moment with an Uno, only not wirelessly as i have ethernet ports all over the house already. im also using some solenoids to control coolant circulation from my glycol chiller to the three zones that it supplies (kegerator upstairs, ferm chamber and keg chiller in the basement).

if you ever need any relays, shields, etc... this place is the tits...
https://arduino-direct.com/sunshop/
slow shipping, but priced right.

also check out www.bwired.nl for some web interface inspiration. that guy went all out with home automation.

Hey, coolness!! Thanks for the links!
 
You can of course build the equivalent with discrete components but this was already on a board, assembled, all ready to go - the cost was so small that I took my time into account and figured... what the hell, I'll let the Chinese do that part for me. :)
 
What are your costs on the hardware ?

I think right around $90, not including the XBee receiver on the server (that was leftover from my sprinkler controller project). Definitely didn't do it to save money, I wanted remote logging and control.
 
Hey Chuginator, what are you using for graphing software?

I built a setup using the ethernet shield that broadcasts temperature data to my webserver, which stores it in a database. The trouble I am having is displaying the large amount of data that it collects in a reasonable fashion.
 
Exactly what I've been looking for. ALready have the Arduino and LCD. Any link to the code?

That's left as an exercise to the developer. Post if you have questions or troubles with any specifics and I'll put some routines up for you.
 
Hey Chuginator, what are you using for graphing software?

I built a setup using the ethernet shield that broadcasts temperature data to my webserver, which stores it in a database. The trouble I am having is displaying the large amount of data that it collects in a reasonable fashion.

I'm using PHP and JPGraph. The MySQL query I'm using is:

$query = "SELECT unix_timestamp(datetime) as datetime, onoff, mode, setpoint, ambair, ambfridgeair, carboy FROM log WHERE datetime >= date_sub(curdate(), interval 6 hour) ORDER BY datetime ASC";

This pulls out the data (which is being logged once per minute) for the last six hours, then it's pumped through JPGraph.
 
And I thought I was cool for building an analog temperature controller from scratch... Nicely done.
 
And I thought I was cool for building an analog temperature controller from scratch... Nicely done.

Dude, you ARE cool for building an analog temperature controller from scratch.

And thank you.

Do you have a link to your build?

Amongst all this digital stuff, I do have a warm spot in my heart for good old analog. Analog reminds me of vinyl records, large discrete components, Nixie tubes, speakers, and hot electronic smells that a lot of whippersnappers might never smell or get burned by. Good stuff.
 
Wow. I didn't even understand most of the OP. But this is wicked awesome.

Thanks, man! Sorry, I tend to get way too technical. Simply put, it's a home-brew temp controller for my fermentation fridge, with the added benefit that my computer can control and log data remotely from it.

I'm pretty impressed with the range on the XBee's. Even within that enclosure, I'm getting updates once a minute reliably, from about 100' and going through three walls. I wish they were a little cheaper (they're about $20 each), but I ask myself if it's worth $20 to keep an eye on things remotely, and it is to me. Particularly in the test phase to see how well the temp control code is performing in reality, and how my free fridge is keeping up (or not).
 
Dude, you ARE cool for building an analog temperature controller from scratch.

And thank you.

Do you have a link to your build?

Amongst all this digital stuff, I do have a warm spot in my heart for good old analog. Analog reminds me of vinyl records, large discrete components, Nixie tubes, speakers, and hot electronic smells that a lot of whippersnappers might never smell or get burned by. Good stuff.

I haven't yet uploaded anything from the build since I only finished it maybe 3-4 weeks back. I plan to make a how to and put it up on my website, but I will try to remember to post a teaser when I get off of work. I'll post a link here so you can check it out.
 
That's left as an exercise to the developer. Post if you have questions or troubles with any specifics and I'll put some routines up for you.

Darn, I can wire and do the electronics... I lack skills in programming. Even though I've taken a fair share for C courses in college. Barely made it out of them.
 
Darn, I can wire and do the electronics... I lack skills in programming. Even though I've taken a fair share for C courses in college. Barely made it out of them.

If you want to get skilled at programing get the Arduino and try something out you want to do. Thats the problem with college, unless it is your passion some courses are tough just because you don't have the same drive to learn it because it is not presented in an interesting way :)
Thats why the Arduino is good, you get to learn programing (with a fair bit of help - check out the Arduino forum) and it is interesting. :D
 
CoalCracker .. I have a EE and struggled with C in college. The arduino uses "wiring" which in my opinion is the dummies version of C. If I can do it ... just sayin :D
 
My level 1 and 2 C++ classes I passed with b's level 3... damn near flunked. I can do HTML so I"m not totally inept when it comes to programming, just not good at it.
 
Darn, I can wire and do the electronics... I lack skills in programming. Even though I've taken a fair share for C courses in college. Barely made it out of them.

No worries man, there's light at the end of your tunnel. There are examples all over the Internet if you're interested in your own implementation.

For example, here's how to read the temp sensors: http://www.ladyada.net/learn/sensors/tmp36.html
 
That's left as an exercise to the developer. Post if you have questions or troubles with any specifics and I'll put some routines up for you.

This is awesome!!! I'm curious though, why are you not willing to share your code?
 
This is awesome!!! I'm curious though, why are you not willing to share your code?

Thanks, man!

Not willing to share code because it is art. If I threw you everything I have, it wouldn't be unique.

Give me your questions on code, I will try to help you think it through. But I won't throw you a solution.

Interestingly enough, I'm an open-source advocate. Go figure.
 
Plus, it's near 800 lines of C for the Arduino. Can't even post it here (10K limit).
 
Back
Top