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
- 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!
THESE NEXT TWO STEPS ARE COMPLETELY OPTIONAL AND THE PARTS FOR THESE STEPS WILL BE LISTED HERE NOT IN THE PARTS LIST!
Parts Needed For The Next Two Steps
- Toggle Switch
- 28 Pin Socket
- 24-28 Gauge Stranded
- Solder Iron
- Hot Glue Gun/Sticks
- CR2032 Coin Cell Battery (3V)
- CR2032 Batter Holder
- ATmega328 Micro-controller Chip
- 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!