Arduino Replaces Bad AC Thermostat, Hacker Stays Cool

Most of North America has been locked in a record-setting heat wave for the last two weeks, and cheap window AC units are flying out of the local big-box stores. Not all of these discount units undergo rigorous QC before sailing across the Pacific, though, and a few wonky thermostats are sure to get through. But with a little sweat-equity you can fix it with this Arduino thermostat and temperature display.

We’ll stipulate that an Arduino may be overkill for this application and that microcontrollers don’t belong in every project. But if it’s what you’ve got on hand, and you’re sick of waking up in a pool of sweat, then it’s a perfectly acceptable solution. It looks like [Engineering Nonsense] got lucky and had a unit with a low-current power switch, allowing him to use a small relay to control the AC. The control algorithm is simple enough – accept a setpoint from an encoder, read the temperature sensor, and turn the AC on or off accordingly. Setpoint and current temperature are displayed on an OLED screen. One improvement we’d suggest is adding a three-minute delay between power cycles like the faceplate of the AC states.

This project bears some resemblance to this Arduino-controlled AC, but it seems more hackish to us. And that’s a good thing – hackers have to keep cool somehow.

16 thoughts on “Arduino Replaces Bad AC Thermostat, Hacker Stays Cool

  1. Good stuff – I do something like this using cheapo wireless remotes for our window fans. One hopes he remembers to add some hysteresis for the on/off cycle and a time-delay to prevent compressor damage (though if he’s just replacing the on/off switch it may be built in) – I didn’t see it in the provided code.

  2. I just did this. The house has AC but not where the computers are. After one mobo died from heat damage I moved the pc’s to the RV in the backyard for a temporary office for the summer. But, the AC in the RV is either on or off, and when I’m not there I want it just cool enough to keep the computers safe. So I ripped a thermistor from some crap lcd clock that had a temp display, found a matching resistor, downloaded “arduino thermostat” from instructables, and modified the code to flip the relay shield in the desired range. The shield was not up to the task, so I had to get a heavier one. Works great, and when I’m there I just movee the thermistor to under the ethernet switch and I can be comfortable.

      1. Beside that, it seems quite logical to think that lower operating temperature (usually 18/20°C room temperature for IT equipments) means extended equipment lifetime (mainly because capacitor age quicker with higher temperature). It used to be certainly true by the past with old technology, but not so much with modern equipments (at least well designed ones, not crappy cheap ones).
        But when you compare the total cost of cooling equipments + energy to run them to the cost of repairing or replacing equipments, it seems that it would be cheaper to run them at higher tempature (25/30°C room temperature) and repair or replace them more often. And with a 25/30°C temperature target, outside air is most of the time cool enough to be used instead of using A/C to cool room air.

  3. So one thing I tell everyone wanting to build their own thermostat.. Buy 2 cheapo spring steal mechanical thermostats. Put them in parallel with your computer controlled version. Set 1 to cool and set it to 80-85 degrees and the other to warm and set it to 55-65 (seasonally adjust). If something goes terribly wrong with your circuit / batteries etc.. you have mechanical backups to keep everyone alive and above water.

  4. Be sure to have either/or some temperature hysteresis or some kind of logic that says, “once we go off, we go off for 60 seconds; once we go on, we stay on for 60 seconds. I bought a commercial “thermostat” to control my evap cooler and the darn thing would get near the setpoint and then be turning the motor on and off every few seconds. I was sure it was going to burn out the motor (and it did) and it is on my list as a hackaday project to reverse engineer the thing and fix that issue. Thankfully my house has the option of using A/C instead of evap so we are running on that until I re-engineer the evap control.

    1. Good idea!
      My old oil furnace thermostat was really sensitive to airflow and would switch on when the house door was opened. Turned out there was a big hole behind the thermostat. I plugged up the hole and bought an electronic one; it has a setting adjustment for ignoring large swings in temperature so it waits for a few minutes first before switching on the furnace.

  5. Interestingly there is a movement at the moment suggesting that the rising temperatures are due to mans excessive use of fossil fuels which power most of our energy supplies. So due to the temperature rise everyone runs out and buys inefficient airconditioning to use more power and increase the fossil fuel consumption which apparently will make the temperature rise even more…..

    Nice hack by the way

  6. Hate to be the guy and respect your build. This I know for sure, If your house burns down or HVAC system fails because of your homebuilt thermostat your insurance company will Not pay a dime. I have a friend that learned that the hard way. Automate something else

  7. It isn’t new, I started a patent about 30 years ago only to find someone had beat me to it. Was the same basic system as described. The rooms thermostat just controlled the local temp by adjusting the register opening, the master just polled the points to see if any needed heat then would adjust run time or just go into a scavenge cycle to pull a little heat out of the pipes. We did wire up a house and managed to drop the bill by 70% while being comfortable but that wasn’t right out of the box. With todays chips and the availability of using some other than zigbee it would be easy to have a better system.

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.