Building Your Own Replacement Refrigerator Thermostat


[Ron’s] refrigerator broke shortly after he came home from his weekly grocery trip, and since this was his second dead fridge in three years, he wanted to fix it rather than buy a new one…again. It turns out that the thermostat was toast, and a replacement would cost him $80. That was well more than he was willing to pay, but his groceries were starting to get warm, so he had to do something.

Being the tinkerer he is, he figured he could rig up his own thermostat that would work at least as well as the one that died on him. He scavenged an ATmega328 from a failed project, and after digging around online, put together the most barebones Arduino setup he could find. The microcontroller is tucked away in the back of the refrigerator where the old thermostat used to live, and takes input from a TMP36 temperature sensor, triggering a relay to start the refrigerator’s compressor whenever the the temp goes above 4°C.

[Ron] says his fix is just about the “worst kludge ever”, but as he saved $80 in parts and $150 in labor, we’re inclined to think it’s a job well done.

34 thoughts on “Building Your Own Replacement Refrigerator Thermostat

  1. It would have been better to improve the fridge in the process. Those smaller fridges like that have terrible cold spots in them and setting things cold enough for stuff on the bottom will usually freeze the stuff on top. Add a small fan inside with the temp sensor and turn the fan on before and after the compressor kicks on. Keep the fridge a consistent temp all the way through.

    1. @Bigred I like that idea! I might do that, sort of a beep when it refuses to get cold enough?

      I was thinking of adding a button and a small LCD screen to adjust the temp it trys to get to, as my setup being so nasty isn’t to accurate, I had to reduce the temp in the code to 2c to get it close to actual 4c, I can’t see whats going on in there without an LCD

      1. the point is that it’s not cheaper than:

        a bead thermistor, 2 resistors and a 741. with perhaps a pot for temperature control.

        further down in the comments people talk about needing compressor delay.

        the use of a Schmitt trigger will prevent the compressor clicking on and off rapidly (so would embedding the bead thermostat inside a thermal mass (block of aluminium), that’d keep the heat/cold and smooth the constant, it’s a bit too hot, it’s a bit too cold cycling.

        Basically, it can be done a lot more easily using analogue components. (a lot more cheaply too).

        still this is the good kind of hacking, using skills to save some money, so the fact that doing something a slightly different way would have saved an additional few cents on his already incredibly cheap solution is a bit silly.

        I mean he already saved $75 (the cost of the thermostat less the cost of components he used) who really cares if he could have saved $76 instead? (but probably have to spend an hour learning about how to create the circuit?)

    1. Unless I’m looking in the wrong place, I don’t see this thermocouple you’re talking about. Just a selection between the ADC pins, the reference voltage en the BANDGAP.
      And none of these have a voltage swing that you would need for temparture measurements.

      I checked the ATmega8A, ATMega32 and ATMega1280 (ATTiny2313 doesn’t have an ADC)

  2. This interests me. My parents eventually ended up getting a new fridge, because after 3 different thermostats, it still malfunctioned. It would work fine for about a month, and then mysteriously and inexplicably, it would get stuck in the defrost cycle. For a while, they would just remove the cover and manually crank it back with a wrench. It still sits in their basement. I’m thinking I can just put a temp sensor in with an alarm for when it gets over a set temp, but this seems like a more robust solution. Although I’d do it with the MSP430 ;)

  3. Did you implement a Compressor Delay? Not sure if all compressors need it, but I know my chiller does.

    Usualy it wont turn on again for 3 or so minutes, to stop the compressor cycling on and off, and getting damaged, at the point where the temperature switches it

  4. I would have just used a regular household themostat for heating & air conditioning. Probably have to add a resister inline to the thermal sensor to trick it since most won’t cool below 18C, but with it you would get a nice LCD display, compressor protection, and easily adjustable.

    On average though, they are probably a bit more expensive than a uC, so this hack does receive bonus points for cheapness.

  5. Like Nick said above: add a compressor delay.
    If your temp hovers around 4 degrees, the compressor would turn on and off very quickly, which will damage the compressor.

    I am building a fermentation fridge myself and will post it very soon. It has WiFi, web interface, OLED display, can follow temperature profiles and shows you graphs of the temperature history. It runs on Arduino and a DDWRT router.

  6. I’ve been thinking along the lines of running a dryer vent to the fridge, put in a vent that can be opened and closed with a small motor or solenoid, and a computer fan in the tubing, and run this right into a hole cut in the side of the fridge. When the temperature outside the house drops below where you want the fridge to be, the microcontroller would open the vent and turn on the fan rather than turning on the compressor, thus saving money by using outside air.

    If it’s below freezing outside, the same concept could work in the freezer, and both would obviously shut off if the fridge gets too cold.

  7. Hacking things is certainly fun – but please pause to understand potential consequences. If this fridge were to ever catch on fire for any reason whatsoever your homeowners insurance would instantly latch onto this modification (done by an uncertified, uninsured individual) and promptly let you know you’re on your own. While saving a whole $80 sounds neat, if your house even burns down you’re going to be in the hole for orders of magnitude more cash.

    So, beware with the fridge and coffee machine hacks! I just self-repaired my microwave and the above thoughts kept running through my head – fortunately I used factory parts in the repair though.

    1. what homeowners insurance, I live in a small concrete flat, if it ever caught fire for whatever reason, it would be contained to this flat, and the fridge still has all its normal safety devices (overload switch, heat cutoff etc)

      1. It would have to be some really crummy insurance if they refused to pay because you had done a repair yourself. People do wiring repairs themselves all the time, running cheap, sub-grade wire through insulation and drywall, and when there is a fire, they still get paid.

Leave a 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.