Instructables
Picture of Arduino Powered 3-zone thermostat

I was looking at all those swoopy-zoomy internet connected and controllable thermostats. "Self," I told myself, "we should make one of those." He didn't seem all that excited about that - I mean, what do we know about hardware, firmware, electronics or HVAC? Well, now's as good as any to figure it out.

So without further ado, here's my Instructable on my endeavors building a functioning 3-zone thermostat. (internet connectedness coming later)

 
Remove these adsRemove these ads by Signing Up

Step 1: Procure components

Picture of Procure components
DSC02447.JPG

This build requires lots of different things I didn't have, and as such I had to move forward by using the internet! I researched (a LOT of research) all the different components people are using and have success within the realm of what I was trying to do. That meant I needed a bunch (or at least some) of the following:

  • Arduino Uno - I know there's a way to build your own, but I'm trying to keep things simple - at least initially. Besides, I need to be able to program the ATMega chip, right?
  • Temperature Sensors - DS18B20 Temperature Sensors was what I decided on. There was another one that also could handle humidity, but again we're erring on the side of simpler.
  • 16x2 Character LCD display - Hitachi compatible.
  • LCD Keypad Arduino shield
  • miscellaneous wire leads, connectors, and resistors.

Once all my parts arrived, I started looking at hooking things together on a small, local scale.
 

hbomb9000 (author) 6 months ago

Build_It_Bob

Yes those look awesome. I'm working on folding them into the larger instructable. Still working on the other parts of this Instructable. Stay tuned...

Build_it_Bob7 months ago

If anyone is interested , I have made the Fritzing layouts for this project . The PCB layout will need tweaking depending on what is decided for the damper and furnacePin outputs .

I have built this on a breadboard including the DS18B20 temperature sensors.Keep in mind that I use the Arduino Pro Mini in anything I build that is a "permanent " installation , so the PCB includes this as opposed to using the Uno .

Please check this over hbomb9000 and let me know if there are any issues or if you would like to add to it.

ps: The latest version of Fritzing is amazing !

Build_it_Bob

Jamebonds17 months ago

Since it is temperature and LCD. You might not need RTC unless you want better timing or making clock. Just my opinion. Most ATmega 328P will be timing okay without RTC but it will be fastest or slowest.

hbomb9000 (author)  Jamebonds17 months ago

The reason I've added the RTC is so that the programmed temperatures can be set at the appropriate time. I know the ATmega has some timing in it, but since I need to know day and hour, I wanted something a bit more certain and a bit less susceptible to trivial things like the power dropping.

Thanks for advice, though. If I was just doing temperature and displaying the temperature and turning the furnace on/off depending on a single temperature, I would definitely have left the RTC off.

Yeah it is good choose if you need preiscon timing. ATmega do have limited timing. You can put time and dating on ATmega; however, with millis it will reset to zero if it reach 1200 hours. Due to limited memory RAM. Delay never have limited timing but it will freeze everything which is not recommend.
brookman697 months ago

I went down this same road to do just a gas powered furnace. The arduino did great at acquiring the temp/hum sensor and triggered the furnace accordingly. I set a hysteresis of 2 degrees. I can control it via the web, but it is very hit and miss. I am attempting to deploy it via Raspberri Pi now.

hbomb9000 (author)  brookman697 months ago

I am planning on adding a RPi to the system, to handle both logging and data collection but possibly remote control of the system as well. I think that both devices have their place (the Arduino and the RPi) in a setup such as this, and you have to pick the best device for the part of the system you're working on.

functional7 months ago

You should return a fixed "error" value from getTemperature (or test for the Fahrenheit equivalent of -127 which is -196.6). In its current form, your code will run the furnace until you manually intervene if one of your sensors is disconnected or dies.

hbomb9000 (author)  functional7 months ago

Good catch. I'll add it right away, and make changes to the Instructable itself. Thanks!

flyingfarm7 months ago

Where is your provision for dwell? My commercially made home thermostat has a dwell of 1 and 1/2 degree F. This keeps the central air unit from cycling on and off too frequently.

hbomb9000 (author)  flyingfarm7 months ago

You're absolutely correct, I will have to add in a dwell or 'fudge factor' before this thing is operational. It's been in the back of my head, but lower priority. Thanks for bringing it up!

Build_it_Bob7 months ago

What an amazing journey ...great job walking through this project . I definately will be reading through your code ( many times ) to understand better what you have managed to do in combining these aspects together . I will be following you to see what else I may be able to learn from your excellent style of writing and problem solving . Thank you again for sharing with the community !

Build_it_Bob

hbomb9000 (author)  Build_it_Bob7 months ago

Thanks. It's been a lot of fun and has definitely been a sanity saver to work on. I've only recently gotten into electronics and have to say I'm very pleased with the simplicity of the Arduino environment as far as development is concerned. Having things prefabricated and modular is super helpful and allowed me to not get bogged down in things that would have made the learning curve much steeper.

I've got a few other projects in the hopper. Stay tuned for more...!

loopingz7 months ago

I love the way you code. I have a lot to learn from your code. My current project would need a cleaning with what I am learning here.

Please modify when you reach your final step. Would be interesting to see how it fits plus the connection with the rPi.

hbomb9000 (author)  loopingz7 months ago

Thanks for the comments on the code. It's my first foray into C and/or C++, but programming is programming, right?

That said, one of the most important aspects in programming is commenting before you start putting actual code in. If you know what you WANT to do in plain language, it makes it much easier to ensure your code is doing what you mean for it to do.

I will definitely be posting more as I push towards final completion of this project. My next step is converting my prototyped circuit into something that can be installed into a box that hangs on the wall. Then, I build out the box, install the dampers and check valve, install the hardware into the box, then FINALLY install the RPi. I haven't decided if I'll build out a webserver in order to attach it to a phone or web app a la a "Nest". It might be nice, but the security trouble might not make it worth it.

But stay tuned for updates!

TECHMASTERJOE7 months ago

i built something like this but added a few things.

i made 12C attiny84 boards with dual temp and dual servo control that linked to a arLCD in my hall. it looked at the temp of each room and open / closed vents so each room can be at it's own temp worked with both heating and cooling using PID

vents are 3D printed and 2 sided tape holds them on(3M VHB Rocks) the vents can point the air +-40deg up-down, left-right. or 95% seal. i will post my files if you like

hbomb9000 (author)  TECHMASTERJOE7 months ago

I was told some time ago by a furnace technician that even something as simple as placing filters at the the room vents could be detrimental to the lifespan of the furnace. When I get my dampers installed, I'll definitely have a weighted 'air overflow' check valve to make sure the pressure the furnace has to push against isn't out of tolerance.

That said, I'm very interested in seeing the 3D printed vents. I've only done a very few things with 3D printing and am eager to get deeper into the tech as a prototyping tool. So please, POST AWAY! :)

Johnny J7 months ago
There are I2C "backpacks " available for those displays available very cheaply. If you used one of those, you'd only need 2 pins for the display. ;)
hbomb9000 (author)  Johnny J7 months ago

Thanks. I'll check them out before I install everything.

http://pages.ebay.com/link/?nav=item.view&id=350930309635 plenty of other vendors.
hbomb9000 (author)  hbomb90007 months ago

That is, before I do the final install into my house.