Arduino Forum

Topics => Home Automation and Networked Objects => Topic started by: stevekamerman on Jul 24, 2011, 07:08 am

Title: Arduino Thermostat Project
Post by: stevekamerman on Jul 24, 2011, 07:08 am
Hi all,

I wrote an open source Thermostat about 6 months ago and finally decided to share it over on GitHub:

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:

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

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.
Title: Re: Arduino Thermostat Project
Post by: jzongker on Jul 25, 2011, 04:29 am
Thanks Steve.  This looks awesome!  I set up the site 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.
Title: Re: Arduino Thermostat Project
Post by: pwillard on Jul 25, 2011, 08:19 pm
Nice.  Thanks for doing this.
Title: Re: Arduino Thermostat Project
Post by: stevekamerman on Jul 25, 2011, 08:24 pm
You're welcome!  Now, if I can just find those drawings  :P
Title: Re: Arduino Thermostat Project
Post by: jzongker on Sep 27, 2011, 01:21 am
Any luck finding the drawings?  I'm still quite interested.
Title: Re: Arduino Thermostat Project
Post by: draythomp on Sep 27, 2011, 07:49 pm
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 or if you want to go direct to the thermostat, it's at  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. 
Title: Re: Arduino Thermostat Project
Post by: tkbyd on Oct 02, 2011, 01:49 pm
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...
Title: Re: Arduino Thermostat Project
Post by: tigger on Nov 25, 2012, 04:57 pm
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 are definitley on the right tracks

retired environmental scientist
Title: Re: Arduino Thermostat Project
Post by: flyboy on Nov 27, 2012, 06:16 pm
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?
Title: Re: Arduino Thermostat Project
Post by: auburngt22 on Feb 17, 2014, 02:57 am
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