100% found this document useful (1 vote)
14 views7 pages

Arduino HVAC Servo ThermostatController

This document describes the construction of an Arduino-powered HVAC servo thermostat/controller. It uses two servos connected to an Arduino board to control the temperature settings on a standard through-wall HVAC unit. The Arduino code uses a temperature sensor to monitor the room temperature and position the servos to adjust the HVAC unit as needed to maintain the set temperature. Detailed instructions are provided on gathering parts, assembling the servo mount, writing the code, and installing the controller to provide thermostatic control for rental apartments that typically lack built-in temperature regulation for HVAC units.

Uploaded by

Adomenicus
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
14 views7 pages

Arduino HVAC Servo ThermostatController

This document describes the construction of an Arduino-powered HVAC servo thermostat/controller. It uses two servos connected to an Arduino board to control the temperature settings on a standard through-wall HVAC unit. The Arduino code uses a temperature sensor to monitor the room temperature and position the servos to adjust the HVAC unit as needed to maintain the set temperature. Detailed instructions are provided on gathering parts, assembling the servo mount, writing the code, and installing the controller to provide thermostatic control for rental apartments that typically lack built-in temperature regulation for HVAC units.

Uploaded by

Adomenicus
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Home Sign Up!

Browse Community Submit


All Art Craft Food Games Green Home Kids Life Music Offbeat Outdoors Pets Photo Ride Science Tech

Arduino HVAC Servo Thermostat/Controller


by tikka308 on April 12, 2009

Table of Contents

Arduino HVAC Servo Thermostat/Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

Intro: Arduino HVAC Servo Thermostat/Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Step 1: Overview of the product & parts list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Step 2: Building the Servo Mount & Electrical Schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

Step 3: Arduino Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Step 4: Debugging and Installing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Step 5: Final Thoughts & Future Ideas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

http://www.instructables.com/id/Arduino-HVAC-Servo-ThermostatController/
Intro: Arduino HVAC Servo Thermostat/Controller
Welcome to my 'green' instructable! I am going to show you how to use an Arduino, two servo motors a temperature sensor and some metal (or wood) to make a digital
thermostat for a through-wall HVAC unit.

According to CB Richard Ellis (a major real estate firm), New York City is a renters market, with only about 1/3 of the population owning their home (versus almost 70%
home ownership for the rest of the US). This means over 5mm people in NYC live in rented apartments or homes. It is very rare for rental units to have any form of
central air conditioning or even a thermostatically-controlled system.

Many apartments have permanent through-wall units like the one seen in the video below. Unfortunately, these units have no ability to regulate the temperature and can
only be forced into heat, cold, or off.

According to the Consumer Energy Center, Heating and Cooling accounts for about 45 percent of your energy bill. The federal government estimates that the average
homeowner spends more than $10,000 for heating and cooling over a ten-year period.

The cooling capacity of room air conditioners is measured in BTUs, or British Thermal Units, per hour. To cool a 700-1,000 sq ft apartment (a one bedroom or maybe a
small 2bedroom), you need about 20,000 BTU's. This is the equivalent of 1.7 tons or 5,861 watts. At $0.15 per kWh, that means it costs $0.88/hour to run your HVAC
unit!

Because HVAC units use a lot of energy (particularly when in 'air conditioning' mode during hot summer months) and renters do not have the ability to easily implement
energy star (i.e. more efficient) units or to regulate their tempature, I wanted to find a way, without making permanent changes, to control an HVAC unit like a thermostat!
Implementing this device can not only save you money, but can help maintain a more steady-temperature in your apartment, reduce energy consumption and help
reduce the strain placed on our nations power grid during the hot summer months!

Step 1: Overview of the product & parts list


Overview & Parts list:

Electronics Parts List:

1) Two Servo's. I used Hitec HS-311 ( http://www.hitecrcd.com/servos/show?name=HS-311 ) which can be purchased for under $10 per servo. The SparkFun servo (
http://www.sparkfun.com/commerce/product_info.php?products_id=9064 ) should also work.
2) Temperature Probe: http://www.sparkfun.com/commerce/product_info.php?products_id=245
3) Arduino (I used the Duemilanove - http://www.adafruit.com/index.php?main_page=product_info&cPath=17&products_id=50)
4) I used the Adafruit ProtoShield ( http://www.adafruit.com/index.php?main_page=product_info&cPath=17_21&products_id=51 ) but you can also just use a small
breadboard ( http://www.sparkfun.com/commerce/product_info.php?products_id=8802 )
5) a 4K7 resistor for the Temperature Probe: http://www.radioshack.com/product/index.jsp?productId=2062346
6) 9V Wall adapter: http://www.adafruit.com/index.php?main_page=product_info&cPath=17_22&products_id=63

Hardware Parts List:


1) I used Aluminum purchased from my local hardware store (Home Depot). The dimensions of the servo bracket are 4" x 1" x 0.25" and the two end-posts are 1" x 0.25"
x 0.25". Alternatively, here is a link to purchase this sized piece of aluminum online: http://www.speedymetals.com/pc-2241-8351-14-x-1-6061-t6511-aluminum-
extruded.aspx and http://www.speedymetals.com/pc-2494-8378-12-sq-6061-t6511-aluminum-extruded.aspx
2) I used (6) 1/2" 8-32 SHCP (socket head cap screws) and (2) 1" 8-32 SHCP's. I would recommend purchasing these from your local hardware store, but they can also
http://www.instructables.com/id/Arduino-HVAC-Servo-ThermostatController/
easily be purchased online. Here are the links: 1/2": http://www.use-enco.com/CGI/INSRIT?PMAKA=430-0041 and 1": http://www.use-
enco.com/CGI/INSRIT?PMAKA=430-0045.
3) You'll need a tap that matches whatever screws you use in the previous step. Since I used 8-32 screws, I purchased an 8-32 tap. Once again, this can be purchased at
your local hardware store but if you wish to order online, here is a link: http://www.use-enco.com/CGI/INSRIT?PMAKA=325-4772
4) A number 29 drill bit (this corresponds to the 8-32 taps; if you use a different size screw & tap, purchase the appropriate drill bit). NOTE: Many hardware stores sell the
taps with the drill bits, which will ensure you purchase the right size. Also available here: http://www.use-enco.com/CGI/INSRIT?PMAKA=325-6119

Tools:
1) I used a drill (can be a hand drill or drill press) and a hacksaw.
2) If you'd rather glue the servo's to the aluminum mount (in lieu of drilling and tapping the holes), I would recommend using JBWeld or Gorilla Glue

Arduino Library:
In addition to the servo library (included with the Arduino softwre), you need the OneWire library.
You can read more about the library here (optional): http://www.arduino.cc/playground/Learning/OneWire or just download the library via this link:
http://homepage.mac.com/wtpollard/Software/FileSharing7.html

Step 2: Building the Servo Mount & Electrical Schematic


Here's a video overview of how to build the servo mount and the schematics of the electronics. Check out the photo's below for more!

http://www.instructables.com/id/Arduino-HVAC-Servo-ThermostatController/
Step 3: Arduino Code
A txt file below contains the Arduino code. You can open this file to view the code and then copy/paste it into your Arduino software to run the program.

Video: A basic and then more-thorough walkthrough of the Arduino code.

File Downloads

HVAC Arduino Code.txt (4 KB)


[NOTE: When saving, if you see .tmp as the file ext, rename it to 'HVAC Arduino Code.txt']
Step 4: Debugging and Installing
NOTE: If you rest your arduino on a metal surface, make sure you have some rubber feet on the bottom! Otherwise the solder joints on the bottom of the Arduino will
touch the metal which will short the board!

Step 5: Final Thoughts & Future Ideas


Final Thoughts:
Thanks for watching! If you're looking for a great way to save energy, save money and still maintain a comfortable apartment, hopefully you've enjoyed this video. During
the hot summer months, peak demand forces additional power plants to be brought online, which are often more expensive plants to run and contribute more pollution to
our environment. If you have the ability to upgrade your HVAC system to an energy-star compliant or you can install a "professional" thermostat, please do! But if you live
in an apartment building and simply don't have those options, please consider this project for the environment!

Future Ideas:
Once you have the servo's in place, there are some great ways you can expand on this project. Here are just a few:
1) Put the Temperature Sensor on a wire so that it can be strategically placed within the room
2) Add buttons to the Arduino in order to have four modes: Off, A/C, Heat, or Temperature Probe mode (i.e. allows you to force the unit off, into heat or A/C or allows the
unit to act according to the temperature probe reading)
3) Use a 7-segment LED or an LCD to display the current temperature
4) Use an Ethernet Shield to enable Internet control or to publish your current temperature (i.e. through twitter). This idea is inspired by Adafruit's "Tweet-a-Watt" (
http://www.adafruit.com/index.php?main_page=index&cPath=32 )
5) Use a third servo for to control the hot/cold potentiometer (note: using three servo's on the arduino requires the use of softwareservo's - see here for more:
http://www.arduino.cc/playground/ComponentLib/Servo)
6) Wireless temp probe via Xbee or RF (for RF, see http://www.sparkfun.com/commerce/product_info.php?products_id=8946 and
http://www.sparkfun.com/commerce/product_info.php?products_id=8949 )
7) Set temperature threshold ranges at the device using a keypad or a potentiometer
8) Setting the unit to automatically cool the apartment at certain times (i.e. before you arrive home at work) or to go into a "pulse" mode at night, alternating between off &
cool in order to keep the apartment cool but not have the AC on all night
9) Use Evil Mad Scientist or ITP Boarduino for a cheaper & smaller unit!
See http://evilmadscience.com/tinykitlist/74-atmegaxx8 for the Evil Mad Scientist Boards which you can purchase as a kit which includes the PCB & ATMEL chip and a
16Mhz crystal & caps for ~$12
Or
Read the NYU ITP tutorial on how to create a breadboard arduino! http://itp.nyu.edu/physcomp/Tutorials/ArduinoBreadboard

http://www.instructables.com/id/Arduino-HVAC-Servo-ThermostatController/
Related Instructables

The Arduino control servo control arduino Arduino


Weather Station using arduino using joystick Wireless
/ Thermostat by and rock band Drive by wire go by everywhere Control Servo Animatronic
sspence guitar by kart by 765mj with Light by Hand by njkl44
everywhere quaddel

Comments
18 comments Add Comment

mickeypop says: May 6, 2010. 2:10 PM REPLY


I did something close last year but in my car instead.

Like your AC the car is either on or off.

I used a relay and temperature sensor and a PIC micro. Later i added a pot and display to be able to dial in my settings.

Interestingly, my gas milage went up as a result.

Great things there micros.

Derin says: Jul 21, 2009. 11:15 PM REPLY


For our A/C systems with remotes,I'd probably get a remote and control that with an Arduino xD

drizown says: Apr 22, 2009. 2:46 PM REPLY


Hmmm...how you say in English...my Engrish not so good...BALLIN!!!!!!!!!!!

Eirinn says: Apr 18, 2009. 5:30 PM REPLY


Outstandingly explained! However do be careful about fluctuating heat/cold, but i bet you also factored than into the equation given the detail of this
instructable 5/5

kmpres says: Apr 18, 2009. 1:42 AM REPLY


Very nice instructable! Well written and explained, also the device is cheap and easily constructed. I especially like the "tread lightly, leave no footprints"
approach to modifying rented property. I always try to modify something in a way that doesn't permanently damage it so I can reverse what I've done if it
doesn't work to my liking or restore it to original operation if/when I need to sell it or return it to its rightful owner. Yours fits right in with that kind of
philosophy. For that you get a "5"!

http://www.instructables.com/id/Arduino-HVAC-Servo-ThermostatController/
Woodwave says: Apr 17, 2009. 1:21 AM REPLY
An alternative to the One Wire Digital temperature probe is a LM35 precision linear temperature sensor. They are cost about $1.75 from BGmicro or Jameco
and require only one line of code to read the temp from an analog input pin.

An example of a project that uses the LM35 sensor can be found here.

http://solderintheveins.co.uk/?p=298#more-298

I_HEART_HERBIE says: Apr 16, 2009. 8:10 PM REPLY


This is so useful!! I can't wait to install one in my apartment as the weather gets warmer!

mikeeve says: Apr 16, 2009. 10:24 AM REPLY


I can't believe I just spent a half-hour watching a how-to video! But great job. Definitely a plus that you didn't wreck the original control panel! Too many don't
respect others' property. I recently bought an Arduino, and these simple how-to videos are great. This is just what an Instructable should be: relatively cheap,
easy to grasp, and useful.

mikeeve says: Apr 16, 2009. 12:37 PM REPLY


(OK, I'm not exactly a hands-on kind of person which is why I love, no need, Instructables so the following may be obvious to everyone but me.) I was
wondering how you knew what size servos to use, and how I could size the servos I might need. I needed someway to measure the force required to
operate a mechanical switch. First, I thought I could use my postal scale (up to 16 oz). I used a pencil to push on the switch then pushed the pencil with
the scale bed. Not enough force. Then I hit upon the idea of using my quart water bottle, which is graduated in ounces. I needed 20 oz of water in the
bottle to operate the switch. The bottle weighs 5 oz so the total force was 25 oz. (Fortunately, 1 oz of water by volume also weighs 1 oz! ) So, assuming
the length of the arm on the servo is 1 inch, I will need at least 25 oz-in torque. Your servos will give me plenty of force to spare! Obviously, this method
only works when you can push down on the switch.

markac says: Apr 16, 2009. 9:54 AM REPLY


Yes, very good instructable and well worth duplicating by other people for their comfort, lower heating/cooling costs, and lower demand on electrical
resources. I had no idea so many apartments in NY had no real thermostatic control, much less programmable control. Also excellent ideas to keep it low /
no impact on the original equipment. I probably would not have thought about your idea to pinch it to the top of the inside ridge. Your 'future' ideas would be
well worth completing too. Keep us appraised.

Rob K says: Apr 16, 2009. 9:50 AM REPLY


Nice Instructable. Good videos also.

hs4g says: Apr 16, 2009. 8:57 AM REPLY


I made something very similar to do almost the same thing in my office. We couldn't keep the temperature constant and it would always be freezing in the
morning and boiling by mid afternoon. In comes Tempy (my arduino powered servo controller) who takes temp readings every 15 secs and turns the knob on
the thermostat. Good work! Here's Tempy

tikka308 says: Apr 15, 2009. 3:23 PM REPLY


Thanks everyone for the kind remarks. I readily admit that not everyone has a need for this Instructable - but there are still millions of these types of units
(non-thermostatic and non- energy star) out there! Anyways, my hope is that people will learn from it and possible expand it for similar benefits! I've entered
myself into the Epilog Contest; I run a single-person machinist / rapid prototyping shop in NYC and am trying to expand. A Laser Cutter would be a huge
asset to my shop. FWIW, I do a lot of free work for folks who are trying to get experiments or prototyping off the ground (I also maintain a day job to pay the
bills). Accordingly, I would very much appreciate your vote (which I believe starts Monday 4/20). Thanks!

SinAmos says: Apr 15, 2009. 2:46 PM REPLY


You removed the 3rd video?

http://www.instructables.com/id/Arduino-HVAC-Servo-ThermostatController/
tikka308 says: Apr 15, 2009. 3:18 PM REPLY
No idea why that happened; i just placed the link and it appears to be working now

SinAmos says: Apr 15, 2009. 2:36 PM REPLY


I have no need for this device, but I commend you on your instructable. I'm a big fan. Thanks for being thorough.

mrcrumley says: Apr 15, 2009. 12:20 PM REPLY


Wow, nice job! Elegant and effective.I love how it doesn't require any modification to the HVAC unit. Great for dorms.

kelseymh says: Apr 15, 2009. 9:28 AM REPLY


This is really excellent! At first (just from the title and icon) I thought it was going to be a marketing spam. I was completely wrong! You've provided a wide
variety of sources for the components (rather than the "you can buy everything from us!" I was expecting). With detailed instructions, pictures, and the
videos, you've created something that should be reproducible by others. Congratulations.

http://www.instructables.com/id/Arduino-HVAC-Servo-ThermostatController/

You might also like