Is cold air coming into your home? With this project you will make a small pocket sized tester that will test your windows, doors, etc. to see if cold air is coming in. This project uses the Arduino Uno and a ATMega328 microcontroller to find the average temperature using thermistors and see if cold air is indeed coming into your home. Go ahead and download the file available and extract it. Now lets get started!

Step 1: What You Will Need?

This is a list of what you will need (excluding the parts need for optional step 5 and 6).

  • Arduino Uno
  • USB Cable to Hook Arduino to Computer
  • Red L.E.D.
  • Green L.E.D.
  • 4x Thermistors
  • 4x 10K ohm (1/4 watt) Resistors
  • Breadboard
  • Jumper Wires (for breadboard)

Step 2: Breadboard It!

The first thing you will want to do after you get the parts is put it on a breadboard to test it. Wire it up as shown above in the Fritzing Breadboard Picture. Once you have it all wired up go to the next step!

Step 3: Test It With the Serial Monitor!

Now you will want to test it using your computer and the arduino programming environment's serial monitor. Make sure everything is wired up correctly and then hook your arduino to your computer. From here you will want to open the arduino file called "Testing_Code". In this program you will want to change one variable at the very top. Change the value of the "temperature_wanted" variable to 5-10 degrees below what your thermostat is set on. Now upload the code and open the serial monitor. The thermistors will take the temperature about every five seconds. Then after five minutes either the green led (representing above the desired temperature) will come on or the red led (representing below the desired temperature) will come on. This would show you if you are leaking cold air into your home from a window, door, etc.

Step 4: Explanation of the Code!

In a simple explanation the arduino is hooked up to 4 thermistors that are part of voltage divider circuits. From these circuits we can get an analog signal of what the resistance of the thermistors are. The code then takes those values and converts them to Fahrenheit degrees. Every five seconds the arduino reads each thermistor and takes the average of the four. Then it saves that average to a variable. Then when the arduino reads the thermistors again it averages the average of those thermistors with the average of the previous thermistors. Then after five minutes it determines whether or not it is colder then the desired temperature by using the average. This will trigger either the green or red led.

Step 5: Putting It on a PCB!


Parts Needed For The Next Two Steps

  • Button
  • Toggle Switch
  • 28 Pin Socket
  • 24-28 Gauge Stranded
  • Solder Iron
  • Solder
  • Hot Glue Gun/Sticks
  • CR2032 Coin Cell Battery (3V)
  • CR2032 Batter Holder
  • ATmega328 Micro-controller Chip
  • Perfboard
  • 3x2x1" Project Box from Radio Shack

I won't go into too much detail for this step but wire it up normally like on the breadboard. Then add a power toggle switch and a reset button. To burn boatloader and program (make sure to use the program called final code!) the ATMega I used this page (http://arduino.cc/en/Tutorial/ArduinoToBreadboard).

Step 6: Prettying It Up!

To pretty everything up I put my project into a 3x2x1" project box I got from radio shack. Then I drill holes for the thermistors, L.E.D.'s, button, and switch. I think it looks rather nice and can easily fit into an average pocket to take on the go!

Step 7: Final Thoughts!

I think this is a very useful project to have around your house during the winter to make sure you don't have cold air coming in your home. It could be used with windows,doors,etc. If the red L.E.D. turns on that means you should probably re-insulate your window or door. If the green L.E.D. turns on that means that your are good to go! Thanks for taking time to look at my project and feel free to leave questions, comments, and suggestions in the section below. Have a good day and a warm winter!

<p>I didn't think of this earlier, but there is no real reason for four thermistors that close together. We are actually looking for accuracy and not precision. One thermistor is quite adequate for what we are trying to accomplish. The average for four thermistors is not going to gain any accuracy, and the precision gained is negligible.</p>
<p>I fixed the code for ThermistorPIN3 and 4 and added an exit(0) to stop the loop at the end of: &quot;if current_time &gt; 300000&quot; (right before the else statement and right after the digitalWrite statements for the red and green LEDs). I also added a fudge_factor to account for my thermistors being different from those shown. I simply took a thermometer and added the fudge factor for each of the ThermistorPINs as in: &quot;temp = (temp * 9.0)/ 5.0 + 32.0 + fudge_factor;&quot; Where fudge_factor in my case was 36 degrees Fahrenheit. With those corrections, the gizmo works as designed.</p>
<p>Did anybody notice the coding bugs? He selected ThermistorPIN2 three times and ignored ThermistorPIN3 &amp; 4. Sorry about that.</p>
The attached file doesn't work..is it how to build the tester or info on how to stop cold air?
<p>Nice work. How do you apply this device to detect cold drafts?</p>
<p>Based on the description, it doesn't actually detect drafts. What it's doing is getting an average temperature off of the thermistors and comparing it to a preferred value. If it's above the preferred value, the green led comes on. if it's below the preferred value, the red led comes on. Personally I'd throw away the first five min of values as they are likely to include residual heat from where the device was before it was set up to test. As an indicator of that, for the first four minutes, every second switch the leds from red on, to green on, to red on, etc. Then sample for one minute, with both led's blinking on or off every second together. At the end of that minute turn on the led that indicates whether we're above or below average.</p><p>You could detect a thermal gradient, but part of the reason you use four thermistors rather than just one is to deal with variation between components. Two 10k resistors are going to have some degree of variation, which is part of what the fourth stripe of some resistors give you. Usually for thes 1/4 watt through hole resistors the values are something like no stripe means 10%, silver stripe is 5% and gold stripe is 1%. So having four allows you to increase your sample average accuracy if you have some components that are 5% above the value, and some that are 5% below the value of the resistor, you're still coming in at an average of the resistor value. Likewise for the discrete thermistors. Also a 2&quot; box, is a bit small of a sample size to give you a good idea of what the thermal gradient is between one thermistor and the next. For something like that you probably want a separation of more than 2 inches between sensors. Oh, you can do this, but you may find it easier to get useful results with a wider sample.</p>
<p>By looking at the electronics and code: I would say you place it at the floor next to the door (closed). Orient it in a way that the thermistors (the green blobs) are in a line AWAY from the door.</p><p>If the thermistors detect a temperature-gradient (It gets colder to one side of the thermistor-line) the red LED lights. If all is the same temp, the green LED lights.</p><p>Fun fact: i think it cannot differentiate if WARM air is comin into a COLD home or vice versa... But that can also be a feature: Does warm air from the outside come inside into the AC-chilled room? :)</p>
<p>LOL I love it! Ghost detector! Made this out of an altoids case and a nano with kids, they had a blast. you can add a buzzer for fun.</p>
<p>Better to buy a cheap IR thermo from Harbor Freight. For an electronics/programming project, it would be better to actually discuss the details of the coding, resistance vs temperature linearity, etc, circuit analysis, whatever. This project is not very instructive.</p>
<p>Nice project. Is there any chance you could shoot a short video showing it in action? I'd like to know more about how you use it (an earlier comment had a possible method, but I'd like to hear yours).</p>
<p>I see you put pulldown resistors on the thermistors, but what about current limiting resistors on the LEDs to protect your arduino from over-draw? Otherwise it's a nice, easy circuit to build :)</p>
<p>This could be expanded nicely to show the temperature of air flowing around a room if you used lets say a dozen or more thermistors in a plus or star pattern on a ~12&quot; square footprint. After that it's just a bit of geospatial math and you could visualize the temperature and flow pattern of the air. Very nice project!</p>
<p>what software did you use to code this? and is this downloadble for free?</p>
<p>@ jessab ....he use arduino IDE.....you can download it from arduino.cc ..</p>
<p>nice work ...simple and innovative thinking ..</p>
<p>Great... work.</p><p>It can be used as cold detector with ethernet shield to control via internet.</p>

About This Instructable



Bio: I am 15 years old and I love learning about electronics, motors, robotics, etc. Thanks for visiting my instructables page and please check out my ... More »
More by Blockman301:DIY Confetti Cannon Is Cold Air Coming into Your Home? DIY Mini Solar Tracker 
Add instructable to: