Introduction: Digital Thermostatic Beer Refreshment Regulator
This is my work in building an Arduino based digital thermostat for controlling my DIY kegerator.
The project is based around the Arduino and uses a LM35 sensor for temperature measurement, a solid state relay for turning on/off the refrigerator, and a serial LCD panel for displaying the temperature inside the fridge and a handy-dandy button to turn the back-light on for reading beer temperature in the dark! WoW!! .
I consider this v1.0 and plan to update this instructable as I add new and fun things that make beer drinking more pleasurable... as if that can really happen!
Special thanks to Brutus @ brutusweb.com from his proof of concept work, Sean Coates for his advanced work with beer brewing and Arduinos, and an Extra Special thanks to Mikal Hart @ the Arduino Forums who helped me through my coding nightmares!...( I owe him a few beers).
Step 1: Getting the Goods.....
Things we will need to get this project off the ground:
-An Arduino or a variant of ...
I used a spare Freeduino SB that I had, I like the miniUSB port.
-A serial LCD panel.
I used a SLCD162 MeLabs
Serial LCD is important since it uses only 1 pin on the Arduino!!
-A Solid State Relay:
I used a NTE RS1-1D4-21,( 15 bucks a piece..) it is circuit board mounted type and I designed my own circuit board to support it.
You can use any similar relay but it must have a trigger voltage of at least 5 volts on the DC side, and can handle around 3 amps or what ever amperage your refrigerator or freeze draws plus extra for head room. You will have to use a bread board or design your own circuit board if you use any other type.
-A LM35DZ temperature sensor.
I bought a few off of Ebay from Thailand for super super cheap, like 5 bucks including shipping... did I mention they were from Thailand? crazy! www.thaishopetc.com
-A couple of resistors:
10k and 100k, 1/4 or 1/2 watt will work fine.
if you want to protect your circuits from the elements (or drunks) Mine is a standard Radio Shack box, but you can be more creative.
-22 Gauge stranded wire:
The more colors the better. Makes it easy to know what goes where.
if you want to make a cool LCD stand like me
for the cool LCD stand and project box
-Header Pins and Connectors:
for easily connecting the wires to the Arduino, not necessary but makes things look nice.
-Momentary Push Button:
for the LCD backlight function. This is a "normally off" button and is only "ON" when it is held down
-Terminal blocks , 2 position type, PCB mounting
-Heavy gauge extension cord (14 gauge or so)
-Cat5 cable for LCD connection + Cat5 jack
PCB board and etchant
Step 2: Building a Box...
I didn't take any many pictures during construction so I'll just piece together the "need to know" stuff the best I can.....
If you don't have the time or energy to etch you own board you can easily do this with a pre-drilled board from radioshack or just use a bread-board to hold everything together, there is no wrong or right way... just what works best for you.
I won't do a "How to etch a circuit board" tutorial in this instructable since I already did one in my last instructable on how to make a guitar Distortion pedal which you can read here Dead Rat Pedal .
I mocked up the circuit board design in Adobe Illustrator based on the data sheets of the components, it isn't perfect but it works for my purpose. (See the PDF for the actually layout).
In the future I will do a revision of this board since I wasn't planning to use a LCD panel originally. I had to make some extra solder connections to the Ground and 5 Volt lines for the lcd panel so it is a bit messy.
This is really as simple as following the pin-out on the last step and connecting everything to their correct place... nothing too complicated that I remember.(Use the pictures as reference and they will guide you well!!)
The only difficult part I ran into was soldering the tiny pins on the ethernet jack for the connection of the LCD panel. You don't have to go the Cat5 cable route but it just makes it easier to connect and disconnect the lcd panel for future upgrades.... like for maybe a 4 line panel!!!
Step 3: The Cracking the Code!!!
This was definitely the most difficult part for me..... writing the code. There are a few similar projects out there that I originally borrowed some code from to get me started. Most of it was fairly easy to understand, but some I had no idea what it did or said. I'm an entry level Arduino programmer so I spent a lot of time banging my head against the wall trying to figure out everything. Software is not my strong point so I had a bit of help from the Arduino community to finally get something that works well and was still easy to understand.
Just open up the text file with the code, copy it into the Sketch software and upload it to your Arduino!
I made a lot of comments in the code for me to understand what is doing what, feel free to mod it to make it better if you can.... I dare you!! (then send me the code.. hehe!)
You might want to adjust the turning ON/OFF lines depending on how warm or cold you would like your beer to be. I have it set between 1 and 4 Celsius... which is between 35 and 40 degrees Fahrenheit, because the beer inside the keg is about 5 degrees Far. warmer than the fridge.
If you are adventurous and good with C than you could write a neat Celsius to Fahrenheit conversion for me since my formula is not the greatest.
- I plan to rewrite the temperature reading section to take an average of readings over a few second range to get a more accurate temperature output, but for now it works fine.
Step 4: Beer Has Food Value, But Food Has No Beer Value....
Nothing left to do now but pull the handle, relax and have a beer!
Here are some pictures of the internals of my DIY Kegerator for your viewing pleasure.
I acquired a GE min-fridge and thought it would be a good kegerator, it took a bit of modding but I finally got it up and running.
-The cooling coils inside were originally at the top of the refrigerator which made a little freezer area but a 1/6 barrel keg wouldn't fit inside. So, I had to carefully bend the unit so it sat nearly flush with the back wall of the fridge.
-Another modification I made was removing the molded plastic inside the front door which holds can sodas and such. There were about 20 screws to remove under the door seal, then I added a then panel of sheet metal to cover up the insulation.
-Drilling through the top of the fridge was a bit nerve racking since I couldn't determine where the compressor lines were running. But everything went well and attaching the tower was quite easy.
I rigged up a computer case fan to an old 12V wall wort that blows cold air into the tower to keep the lines cold and help combat any foaming issues.
Any question, comments or suggestion are most welcome. I will update this with any modification when they are completed.
Thanks for looking, and keep drinking!
We have a be nice policy.
Please be positive and constructive.