I Made a Smart Thermostat
You are probably reading the title above and wondering why would I do that but it really is not as boring as you might think.
First of all, many of you might know that I moved from my old apartment into a house last September. I do love the house and 99% of it and the remaining 1% is the heating system because it is the old-school baseboard (electric).
I, just like Elon Musk, love electricity, but even though Canada is providing it from mostly renewable sources, it can get expensive. So the reason #1 for making a thermostat was to save money.
Reason #2 was the convenience of having and using it. Nest thermostat has been around for a while and it can learn when you leave and come home or your desired temperature. That is a bit too fancy for me because I just wanted to be able to control it remotely, set it on a timer and, obviously, set the desired temperature. And that’s exactly what it does.
Reason #3 is that there are no smart/connected thermostats for 120V electric heaters out there. All the fancy ones work with low voltage only.
And lastly, the reason #4 is the price. I have 8, yes 8 thermostats around the house and if I replaced each one of them with something like Nest for $350 (CAD) I would go broke really soon.
So let’s see what I did:
Being able to control the time is huge because I don’t have to always remember to turn the thermostat down when I go to work and I don’t come back into a freezing cave. It is only used when needed and electricity is not wasted
There are 3 modes of operation. You can notice the 3-way switch on the side, which was not connected at the time I took the photo. Top position turns it into the “Away Mode” which only keeps the temperature at 19-20 degrees (celsius). The bottom switch position is the “Sauna Mode” that raises the temperature to 26 degrees celsius and keeps it there until the switch moves or the timer goes into the next cycle - whichever comes first. The two modes I mentioned are “force-override” modes and they can be triggered remotely, through the web interface as well. The default mode, which starts on boot-up can also be triggered by returning the switch to the middle position.
So this solved also problem #3
And the best part is the cost of all of this. I used the Adafruit’s ESP8266 Feather WiFi board as the brain of this device. It can be programmed using Python programming language and there some good tutorials online for it as well. This thing cost me $15. Then we have the relay, that is essentially letting the electricity through to the heater, or not, depending on what the ESP8266 tells it to do. This costs $10. Then, there is the temperature sensor for $5. I put everything on a small breadboard worth $3 and with some extra parts, that’s another $1. I am using an old iPhone charger with a micro USB port, but you can buy that for $3 on e-bay. The enclosure was just under $3, the switch was around $2.50 and a pack of LEDs was around $2. That all adds up to the grand total of $34.50 which is less than 10% of the price of Nest. Not as pretty if it’s the function you are after but 90% as useful.
In terms of the future improvements, I am going to create a prettier web interface, which will be 100% better than a web console I am using now and I also want the thermostat to know whether I am home or not automatically. I’m thinking of using ping to my phone’s static IP and if it comes back, that means I’m home.
So that’s really it. This is what I’ve spent my weekends and evenings on and I am really happy with the result. It’s almost like building LEGO but for adults. And in this case, the result is actually useful