You don't need to be a programmer to make this, I have done it for you. Arduino's were built with the idea that anyone can code, and that codes were meant to be shared. I used several sources for inspiration and code, too many to count let alone site. I do not claim to have come up with this code entirely on my own, but rather the specific design. The design only allows for 2 sensors/heaters but could easily be changed to add more sensor/heater elements.
The coding is written in fahrenheit. I will try to get a code posted for celsius. The heaters are designed to turn on when the sensors for the scope are 10*F or less above the dew point. You can change the coding easily if you want it to be higher or lower than that. I find 10*F to be enough to keep things dry under high dew conditions, but not cause thermal issues.
If you have about 3-6 hours of time on your hands and are at least passable with a soldering iron and wire strippers, I think you might just have a chance And don't be afraid to try. I don't work in electronics, computers or programming. So chances are you are better qualified to do this than I was!
Step 1: Parts
I am providing links to the sites where I bought most of my parts. Some I had on hand, but you will find everything in this list except for tools, which you probably already have. If you need tools, DO NOT GO TO RADIOSHACK, THEY WILL ROB YOU. Instead buy them from the suppliers below.
Ribbon wire $.95
LCD display $14.95
100K Trim Pot $.95
1K Resistor $.25 x 2
Dallas OneWire sensors with resistor $4 x 2
DHT11 with resistor $5
RadioShack (yikes! Other sources are cheaper!)
Tip120 Darlington transistor $1.99 x 2
[=http://www.radioshack.com/product/index.jsp?productId=2103224&numProdsPerPage=60]RCA sockets[/url] $4.19
1/8” Stereo Socket 2 pack $3.19
330 Ohm Resistor $1.19
Step 2: Arduino and code
You will need to download some codes and libraries. Don't worry, it's simple. Download the program at Arduino.cc and install. There are three libraries that you will need to add to the library folder that is created when you install the Arduino program. If you need any help installing the program or adding the libraries, the arduino.cc website details it nicely for beginners.
math.lib comes with the arduino program
lcd.lib comes with the arduino program
Once you have the arduino program installed and the libraries loaded, it's time to put in the code and send it to the arduino. Copy the code I am attaching and paste it in the arduino program. Connect the arduino via usb cable (most wired printers use this cable, so if you don't have one, someone you know will probably lend you one). Then you will send the code to the arduino using the upload button in the upper left. Assuming you put the libraries in the right place, you have the brains of the project done. Now it's on to the display, sensors and output.
Step 3: Arduino shield
A shield is a fancy word for something that sits on the arduino. You will need to assemble the proto-shield from sparkfun.com following the instructions on their website under the product page. You don't need to worry about the switches and leds unless you are particular like me about doing everything in the instructions. I like using the shield because it allows me to fit things how I want and leaves room for personal adaptation if desired. It also allows me to separate the arduino from the project should something bad happen.
Step 4: Display
The lcd screen requires enough wires that I opted for a ribbon. It keeps things neat and clean. Follow the attached diagram to hook up the lcd screen to the arduino shield. Make sure you take time to wire it up right. The potentiometer (knob) allows you to adjust the contrast on the screen to the right level. The resistor keeps the screen from being too bright. If you find it is too bright for you, just get a higher resistor. Once you are done with this stage you can put the shield on the arduino and see your progress. Plug the arduino into power via usb and the lcd should light up and display ***ArDewIno*** on the top line. If it does, great! Move to the next step. If it doesn't, check your wiring, you crossed wires somewhere.
Step 5: DHT11
This little blue thing is going to sense the outside air temperature and humidity. The dht11 library will compute the dew point for you. Follow the attached diagram to hook up the dht11 sensor to the shield. Once you are done with this stage you can check on your progress. Power up the arduino and now it will display the temperature, humidity and dew point on the top line of your lcd! If not, you need to check your wiring again, you crossed wires somewhere.
Step 6: Dallas OneWire
These tiny little black things are awesome! They are able to sense the temperature fast and have unique addresses. This means we can replace them when needed and the coding doesn't need to be redone. Cut the 12' stereo cable in half. Carefully strip the wires and solder them to the OneWire sensor following the diagram (cut the sensor prongs to about 1cm). Make sure that the wiring is the same for both of the sensors. Isolate the three prongs using a small amount of wire tape, then cover the connection and the bottom half of the sensor in heat shrink tubing. I doubled the heat shrink tubing for strength. Hook up the wiring to the shield following the diagram. Make sure the wiring is correct across the plug. Power up the arduino and the second line will now display something other than OTAXX. You should now be displaying the temperature of each sensor. If not, you need to check your wiring again, you crossed wires somewhere. Now, a note: the sensors have a specific address. If both are plugged in, the lower address will be the OTA address. If only one is plugged in, it will default to the OTA address and the other heater display will not be present. You will have to check and see which has the lower address by holding one of the sensors in your hand and seeing which displayed temperature changes. Also, the coding requires that the sensors be plugged in BEFORE you power up the arduino. If you don't, it won't know the addresses of the sensors. It only checks for the addresses once on startup and never checks again.
The display shows when the arduino tells the heaters to run. If the heater is on a "^" will display after the sensor temperature indicating that it is working to bring the sensor temperature up using the heaters.
Step 7: TIP120
We now have a system that checks the temperatures, calculates the dew point, compares the temperature to dew point and determines when the heaters need to be turned on. Now we power up the heaters. Trim the TIP120 prongs to about 1cm and connect them following the diagram. These things are able to use low voltage (5volts) to control high voltage (12volts in our case). Sorry, there isn't an easy way to check you did these right at this point. Note: the TIP120s are meant to handle a max of 1amp. So make sure your heaters don't surpass!
Step 8: Power
Now we add in our regular power, in this case a car cigarette lighter plug. Follow the diagram on how to power both the heaters and the arduino. Don't worry, the arduino is meant to operate at any power input from 7-12volts with no problem, and will handle up to 20v with minor heat generation. So as long as you are using a car battery or 12volt supply, you will be fine. PAY ATTENTION TO POLARITY, you can't get this one wrong or you will experience the "mystic blue smoke" associated with destroyed electronics. Check that it works as expected.
Step 9: Fitting it all together
Now it's time to put it all in the case. Start off by putting the black covers on one of the sides and screwing the arduino board in. Next, cut some craft foam (dollar store item) to shape around the top opening where the lcd will go and stick it on. This keeps out any dust/debris and also prevents the excess light the lcd creates from getting out. Screw the lcd in place. Hot glue two of the tan buttons into one side of the black cover that has four holes in it. The other side you will need to trim so that the DHT11 will fit in. At the top of the case you will put the OneWire plugs and the heater plugs. Make sure that they are spaced far enough apart to work, but be aware that the case posts keep you from going out too far. Also make sure they are to the back far enough that they don't touch the lcd. Bring power in from the bottom on the usb side of the arduino. Put the TIP120s on the black back cover using some double sided sticky tape. Now, you should be able to close up the case! If you have followed all these steps it should look very clean and professional, at a fraction of the price of a manufactured unit. Test that everything works by plugging it in to a 12volt power.
This was a fun little project. I find it satisfying to build something that saves me money or does something I can't buy ready-made. This way I got both. Now I get people asking me what it does and where they can get one. Sorry, but these aren't sold in stores! And while there are other variations of arduino powered dew controllers out there, they lack one important thing, decent instructions. I plan to edit these plans as many times as it takes to make it easy for anyone to build. So comments are appreciated.
Clear skies, and optics!