Personal Project: Kegerator Thermostat
I own a kegerator that I made out of a reclaimed dorm fridge that I found when I was still in school. This fridge has been running without fault for a little over 4 years. At least it was…until a couple of months ago. I had some friends over one evening after dinner downtown. To our dismay, the keg was refusing to pour my delicious homebrew. After fiddling with the pressure with no success, a quick visual inspection revealed the fluid in the line had frozen solid. When I investigated the keg further, the remaining volume of beer in the keg was also nearly frozen solid! Approximately 2 gallon of my perfectly good home brew gone to frostbite. As it turns out, the culprit was the fridge thermostat. It had failed in an “on” state, causing the fridge compressor to run continuously for 4-5 days, based on my best estimates. In a fit of rage, I unplugged the kegerator and banished it to the furthest reaches of my apartment, aka behind the kitchen table.
And there it sat, unused for months only to be disturbed during our recent move. My wife and I recently moved to San Jose from Mountain View in an attempt to alleviate the pains from the rent crisis we are currently seeing in the Bay Area. While this added an undesirable hit to my commute time, the new potential housing options included garage space. This was sorely missed at my previous apartment. With a garage finally back in my life, I could have a productive space to wrap up the plethora of half-finished personal projects that littered our living room.
Priority number one: the kegerator thermostat.
Now with adequate space to work, I had a couple of options for fixing my kegerator.
- Design a new thermostat from scratch
- Purchase an off the shelf thermostat
- Purchase/acquire a new mini fridge
Option 3 was out of the question. Throughout the years, I had developed quite the bond with this appliance. It has a number of stickers adhered to it that I collected over the years, and I would hate to say goodbye them. Option 2 would be simple and cost effective, given the number of options that exist on the market. However, I thought it offered limited avenues for the tinkering that I desired. So this is how we arrive at Option 1. Big surprise.
The circuit itself is extremely simple. This was intentional for a couple of reasons. First, the longer I took to design it, the more likely it was that I would distract myself by wanting to add more features to it. Second, I wanted to use our fancy othermill to fab the PCB, which means I had to limit the circuit complexity (seen below).
So that is pretty much it. Just a handful of components, the main ones being…
- TMP36- For detecting ambient temperature
- Relay for switching compressor
- mosfet for swtiching said relay
The output of the TMP36 will be fed off the board, along with the relay control signal to an off board micro. What’s that I hear? “But Chasen, you could just build a comparator circuit with hysteresis and not have to deal with a micro.” Well, you wouldn’t be wrong. However, I rather enjoy dabbling in micro-land, and I wanted to have flexibility in functionality later on down the line.
The two forks you see pronged on the end are used to connect leads from the compressor. The laminated copper FR1 won’t have a solder mask, so we can make contact along that entire arm to maintain proper clearance from the 5v logic. With the board designed and laid out, it was time to move to the othermill!The above is sped up by about 3.5 the normal speed. However, the board only took about 20 minutes overall to cut and barely anything in material cost. The only major cost was my time. During the off hours from mindtribe, my time becomes increasingly cheap. Below is the final product before assembly.
So with the board cut, it was time to bring it up with a micro. As it turned out, I had a micro that was a good fit for the job: the microview! It is an arduino based development board unit with an integrated OLED display.
As seen above, the gauge is reading an ambient air temperature of 24 degrees celsius, which was about right given I was working in my garage that evening. Here is my kegerator mid-integration.
So after integration, I needed a way to test its functionality. As it turns out, we have a number of digit temp and humidity probes here at Mindtribe, so I decided to throw one in for a couple of hours and see how the ambient air temperature was tracking. It worked far better than I hoped given that it was the first dry run. I had set the nominal temp to be 7C with bounds of +/1 degree, and it was almost perfect. The sensor was set to sample once a minute for little over a day. This allowed me two refrigeration cycles both during the day and at night.
Additionally, the above data gives me a good idea of how well my kegerator is currently insulated, which apparently is…not very. So now I have yet another project to add to my to-do list.