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)

Step 1: Procure Components

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.

<p>Be careful about Air Temperature Rise in your furnace (supply side vs return side temp delta = Air Temperature Rise). ATR should be measured across the furnace and a safety shutoff built in when the ATR of the furnace is exceeded. If you have a furnace / air conditioner combo unit, ensure that there is enough airflow across the evap coil or it may freeze (when in cooling mode).</p>
You *need* to check out what a PID algorithm is and how to adapt it to your thermostat. It's what would make it smart.
<p>Thanks for the info! I'll check it out. Haven't had a lot of time to dig into the arduino lately, but That's definitely interesting.</p>
<p>Build_It_Bob</p><p>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...</p>
<p>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 .</p><p>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 &quot;permanent &quot; installation , so the PCB includes this as opposed to using the Uno .</p><p>Please check this over hbomb9000 and let me know if there are any issues or if you would like to add to it. </p><p>ps: The latest version of Fritzing is amazing !</p><p>Build_it_Bob</p>
<p>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. </p>
<p>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.</p><p>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.</p>
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.
<p>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.</p>
<p>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.</p>
<p>You should return a fixed &quot;error&quot; 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.</p>
<p>Good catch. I'll add it right away, and make changes to the Instructable itself. Thanks!</p>
<p>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.</p>
<p>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!</p>
<p>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 !</p><p>Build_it_Bob</p>
<p>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.</p><p>I've got a few other projects in the hopper. Stay tuned for more...!</p>
<p>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.</p><p>Please modify when you reach your final step. Would be interesting to see how it fits plus the connection with the rPi.</p>
<p>Thanks for the comments on the code. It's my first foray into C and/or C++, but programming is programming, right?</p><p>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.</p><p>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 &quot;Nest&quot;. It might be nice, but the security trouble might not make it worth it.</p><p>But stay tuned for updates!</p>
<p>i built something like this but added a few things.</p><p>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</p><p>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</p>
<p>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.</p><p>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! :)</p>
There are I2C &quot;backpacks &quot; available for those displays available very cheaply. If you used one of those, you'd only need 2 pins for the display. ;)
<p>Thanks. I'll check them out before I install everything.</p>
http://pages.ebay.com/link/?nav=item.view&amp;id=350930309635 plenty of other vendors.
<p>That is, before I do the final install into my house.</p>

About This Instructable




More by hbomb9000:Tactical Paracord Zipper Pull Arduino Powered 3-zone thermostat Leather knife sheath 
Add instructable to: