Arduino Thermostat Project

Hi all,

I wrote an open source Thermostat about 6 months ago and finally decided to share it over on GitHub: GitHub - kamermans/Arduino-Thermostat: Arduino-Powered LCD Thermostat

The sketch is complete but poorly documented. I've actually been using this thermostat for 7 months now, so I know it works.

Here's a poor quality picture of the interface:

Here's a feature list:

  • 4x20 LCD Interface that displays zone temperatures, status and an options menu (uses LCD117)
  • Photoresistor for auto-dimming the backlit LCD
  • 4 buttons to change temperature and navigate menu and heating/cooling modes
  • 3 thermistors for using different zone temperatures as input. Different zones are averaged with a weighted algorithm to produce the reference temperature
  • EEPROM interface that stores current settings so a power failure doesn't reset your temperature or heating/cooling mode
  • 3 relays that switch Heat, AC and Fan

If you want to collect temperature data as well, you can use the USB/Serial port to both power the device and collect the temperature data from the Arduino (see Home Temperature Monitor ยท steve kamerman)

Right now the code is slightly commented, but I can't upload the schematics or detailed pictures until I get back to my house in the next few days.

If you are interested in this project or turning it into a more portable Open Source Thermostat library, please do let me know! You are more than welcome to send me pull requests on GitHub if you've got some improvements.

Thanks Steve. This looks awesome! I set up the site ThermostatMonitor.com about a month ago to track usage of WiFi enabled thermostats and decided I wanted to build my own thermostat. This is going to save me a ton of time, I'm really looking forward to seeing the schematics. Thank you for posting the code.

Nice. Thanks for doing this.

You're welcome! Now, if I can just find those drawings :stuck_out_tongue:

Any luck finding the drawings? I'm still quite interested.

I did something similar, but I have two heat pumps for a/c and heating, so I have two thermostats. Additionally, I have peak period billing from the power company so I had some different goals. First, I wanted to make sure that the two of them didn't come on at the same time and shove the peak usage way up. Next, I wanted to heavily limit their use during peak period by pre-cooling the house before the peak period started. Additionally, I wanted to move the cooler air from one part of the house to another by using the fans to recirculate the air; once again, one unit at a time to keep the peak amount down. I succeeded.

These guys are web enabled using an ethernet board and can respond to network commands. Of course I have to store the settings in eeprom to allow for power failure and I get my power for the devices from the 24VAC provided by a transformer in the air handler. To solve the problem with time-of-day (a really big deal when you have peak demand billing), I have a house clock that gets time from a GPS chip and provides it over wifi as well as XBee to sync all the various clocks around the house. This way the thermostats know exactly what time it is. A real time clock could work also, but I wanted to experiment with the GPS and web and stuff. Then, I built a central device to control them as well as other devices around the house. So the combination can do pretty much anything I want them too.

For example, I have the controller turn the temperature in the house down to 74F at 10AM and cool stuff off before turning them completely off for the peak period from noon to 7PM. Then, it turns stuff back on and cools the house back down. I have different tactics for the winter and just typically turn them off for spring and fall. I live in the desert, so cool is a major concern and I have adapted to the heat so a temperature above 80F is not a problem for me.

I put construction details, schematic and pictures on my blog at http://desert-home.com or if you want to go direct to the thermostat, it's at Desert Home: Super Thermostat. The sketch is probably a month or so out of date, but I'll get to that eventually.

To measure temperature I have a little XBee mounted to a wall wart that has a temperature sensor on it. This way I can move the thing around the house to see what's going on. I have one of these permanently mounted outside and another one that travels wherever I want to check the temperature changes. It's nice to have one when visitors complain about the temperature. I just plug it in and let them watch it themselves.

They've been in service for a little less than a year and I think I have most of the bugs worked out now.

Suggestions for extensions.... (related)

If you added a real time clock, you could build in auto=setbacks to turn heating down for while you are at work, or the wee hours of the night.

If you have a burglar alarm, you could have an "alarm set" output from that feed an input on the thermostat to turn the heat down when you are away from home.

For anyone playing with such devices in a region where it gets cold enough to freeze pipes, you might want to consider wiring a traditional thermostat, set to about 45 degrees F in parallel with your Arduino thermostat, so that if the latter fails, the former will turn the heat on for you before your pipes freeze...

Well done - this looks really interesting and just what I am looking for. I don't really have the time or ability to develop complex code, but I'm fed up with expensive gear like Honeywell programmable thermostats breaking down and having to bin because they can't be fixed.you are definitley on the right tracks

retired environmental scientist

Are you controlling the temperature for a single part of the space or are you truly zoning the system using dampers in the ductork? Is this a ducted system?

I am intrested in what you have done. I want to go a little further with making it remote control. So if you would could you send me your wiring schematics. , I would greatly appreciate it