Garage Fridge Gets New DIY Controller

[Rick] had a problem. His garage refrigerator was tasked with a critical duty—keeping refreshing beverages at low temperature. Unfortunately, it had failed—the condenser was forever running, or not running at all. The beverages were either frozen, or lukewarm, regardless of the thermostat setting. There was nothing for it—the controller had to be rebuilt from scratch.

Thankfully, [Rick]’s junk drawer was obliging. He was able to find an Arduino Uno R4, complete with WiFi connectivity courtesy of the ESP32 microcontroller onboard. This was paired with a DHT11 sensor, which provided temperature and humidity measurements. [Rick] began testing the hardware by spitting out temperature readings on the Uno’s LED matrix.

Once that was working, the microcontroller had to be given control over the fridge itself. This was achieved by programming it to activate a Kasa brand smart plug, which could switch mains power to the fridge as needed. The Uno simply emulated the action of the Kasa phone app to switch the smart plug on and off to control the fridge’s temperature, with the fridge essentially running flat out whenever it was switched on. The Uno also logs temperature to a server so [Rick] can make sure temperatures remain in the proper range.

We’ve seen some great beverage-cooling hacks over the years. If you’ve mastered your own hacky methods of keeping the colas chilled, don’t hesitate to let us know on the tipsline.

44 thoughts on “Garage Fridge Gets New DIY Controller

  1. The Ardunio has WiFi capabilities built in so simple enough to code a PHP page to toggle the switch on and off. Using the example code I had the UUID of my device and the PHP page built to toggle it on/off

    Oh dear…

    You can’t just put a thermistor in there to trigger a relay with a bit of hysteresis? You need a web server to signal a smart plug to run the compressor.

    At least it is a hack by all definitions.

          1. Side note. The actual DHT11 was a decent piece of kit that used discrete components. It was quickly replaced everywhere with an all in one solution that is indeed, not great.

  2. My fridge is currently doing exactly this — in my case, an ESP32 with an AHT 20 driving a smartplug via MQTT. When the thermostat failed, I had to get something working within a few hours before all the food went bad… so there are lots of better solutions but this is a nice hack in a pinch.

      1. What surprises me is if you’re willing to use a smart plug just put a smart temperature and humidity sensor in there and have it automate the smart plug.

        the fridge might prevent this by acting as a Faraday cage I suppose.

      2. I did the timer trick, with a jumper powering the compressor. Kept the food in the freezer cold enough until the replacement thermostat showed up. It was bit sketchy in that the freezer pulled very close to the current rating of the timer.

        Tried to buy local, but the dirt common thermostat was available faster from an online source.

    1. Did you not have a relay lying around? I get the using a microcontroller and sensor as a thermostat because that’s a quick and easy build from stuff that you already have, but using a smartplug instead of a relay?

        1. Hmmm, at work I use a lot of those ControlByWeb boxes. At home my wife keeps buying TPlink smart switches. One of them was overloaded and smoked a bit. I opened it up, after that experience, I think I could do a better job than TPlink.

          1. Exactly. I have used smart switches extensively at work and after some experience of the likes of TP-Link I would never use them again. I have not found anything for under £100 that was safe and fit for purpose.
            For anyone with a basic ability to assemble electric circuits a standard relay for a couple of quid is safer and more reliable than any smart switch you can find on Amazon.

  3. I may have missed it but where is the delay timer? Compressors need to pause for system equilibration between refrigeration cycles or there is a risk of compressor damage from trying to compress liquid refrigerant. Easier in software than hardware but it should be there.

    1. I came here to say this ^. Frost free refeigerators use a timer and heater to enable the defrost cycle. If this application is switching a smart plug on/off the you just converted your fridge from frost free to frost full. Or on second thought it might still run defrost cycle but your controller would show that as a long cycle because it would defrost before running the compressor to bring temperature down.

      1. This application just turn on and off based on the temperature regardless anything else.. It will wait in the defrost process untill finished then reached the set temperature then turn off again.

  4. about 2 years ago my main board went in the fridge – instead of debugging it I just put a esp32 and some relays in.. The only real work was the defrost heater element – you can’t not just use it as the heat exchange fins are made for it to run (else they will be covered in a ice block.) ie you can’t just simply convert it to a ‘non auto’ defrost fridge..

  5. I used a sonoff smart relay with a waterproof temp probe stuffed through a hole drilled in the side of the fridge for our office kegerator. Let me repurpose a square chest freezer into a (relatively) efficient all purpose drinks cooler. Ran it through hole assistant. It also let us get fancy with chilling profiles. Let us temp control lagers when fermenting as well. Pretty simple and turnkey.

  6. What amazes me is that people will come here and dump all over the guy who is simply trying to hack his way out of an awkward situation, but nobody thinks to write their elected officials and demand say, a 10 year minimum warranty for large appliances and a requirement that companies stock spares for a further ten years after that.

    If people spent as much time beating up on corporations as they do on their fellow hackers/citizens we’d all be better off.

    1. In North America, the corporations own the law-makers – sisyphean task awaits the common citizen attempting to effect change to consumer product law. You are welcome to try such…
      The published solution was contrived and well beyond the fix required; that is, a solution looking for a problem.
      Product warranties require manufacturing a reliable product, and employing a local engineering team. That ship has long since sailed away from the western world.
      I replaced my frig controler board last year with a simple circtuit comprised of (2) LM556, (3) LT1013, and a some discretes. And this summer, I added a simple logger using an Atmel 2313 to monitor temp, RH, and current. Meh. So I have been endowed by Odin, Jupiter, et al, with the inalienable right to critiscize this over-the-top, incomplete, and inane ‘hack’.

      1. In U.S.A. there is a law that companies must make parts for a product for seven years after the product is discontinued. The companies followed this into th 1980’s when they decided that they would just close the business or sell it off which negated the seven year law. I own a 2005 Jeep Wrangler and getting parts (airbag recall) is impossible because it is now owned by Stellantis and they just claim they didn’t build the vehicle so they are not responsible. My wife just bought a new toyota corolla. I asked the dealer about oil changes and he said if I did my own or took it to the oil change place the warranty would be void. I explained that it is good to do a initial oil change at a hundred miles to flush any debris out of the engine. I also told him that the Magnusson-Moss warranty act meant that they had to provide me with a free filter and oil and that it would NOT void the warranty. The response was “How many lawyers do you have? We have more and you lose”. Welcome to ‘merica.

  7. Interesting possibility for a future hacker’s iteration on this idea: the CoolBot, which turns a standard window A/C into a reefer unit for a cold storage room https://www.storeitcold.com/ has a really simple hack: a tiny heater that you bind to the A/C’s temp sensor using electrical tape or whatever. My assumption is that it drives the thermostat super high when needed, then backs off when needed.

    A Peltier junction would probably be a superior way of driving the thermostat, cuz it could forcibly cool the sensor off by switching the polarity with an H-bridge, leading to more responsiveness (don’t have to wait for the heater to cool off).

    Anyhow, this lets you play nice with the fridge’s internal logic about compressor cycles. I should mention that CoolBot’s patent still has three years on it, so don’t try to make a commercial product out of this idea.

  8. There shouldn’t be much of a ‘controller’ to have to rebuild. Grab a WPF-20 or similar. It’s a mechanical thermostat that will last for a long time and won’t have any additional dependencies like functioning WiFi

Leave a Reply to JBCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.