So, I Built a Weather Station
The Back StoryOuter Banks of North Carolina I am no stranger to amazingly strong weather. Having weathered many a storm, many a hurricane, I grew to truly appreciate and respect the weather.
All the strong weather experiences and seeing the destruction it can cause always made me want to study meteorology and collect weather data. Though I didn't become a meteorologist I still have a passion for weather so I started a project of building a custom weather station. This blog is to chronicle what I've learned through this project.
Since I followed information and tutorials from the great people at Spark Fun Electronics this blog will mostly represent my cataloging the process that I took to finishing this project as well as the steps I took in troubleshooting when I ran into a few issues.
First Off; The Equipment
Below is the list of equipment that I made use of in this project:
SparkFun Red Board (Similar to the Arduino Uno micro-controller, programmed with Arduino)
SparkFun Weather Shield (Temperature, Humidity, Barometric Pressure, Ambient Light,
Electric Imp (Think SD card shaped wireless micro-controller)
Electric Imp Shield
Solar Radiation Shield (To keep the electronics out of direct contact with the elements but keeping the sensors open to open air)
9 Volt Wall Wart
Barrel Jack Extension Cord
The GuidanceI enjoy Spark Fun Electronics a lot and they also have a lot of great tutorials for many of the items they sell and as you can tell from The Equipment that I purchased most of the equipment for this project through them. Nate Seidle at Spark Fun has a great tutorial on using much of the equipment listed above and this is the tutorial that I followed.
The DifferencesNate, however, used battery power and solar charging where I used 9 volt wall wort. I assume he chose battery power and solar due to not having easy access to power for his station. I however, was able to run electrical to where I needed it and then affixed the station to the roof of my garage.
He built an elaborate rig to keep his station on his, flat top, roof, I however purchased an articulating flag mount and bolted it to my roof with a ton of tar and silicone sealant. No seriously, I don't want leaks.
Copy Paste WoesSince Nate Seidle laid out such a great tutorial that it was easy to emulate what he had done and then tweak as needed. I will say that, for the most, part this tactic worked well but instantly upon setting up the station I found that my wind bearing readings were not working.
I spent hours of debugging this, no seriously, I'm a bit embarrassed it took so long, but I had a constant reading of 113 degrees. At first I thought "bad instrument" but then I read more about the vane and found out that the reading was based on the voltage reading coming from the instrument itself. After finding this out I then assumed it must be a broken reed switch, which is a little glass tube with tiny metal reeds that, when a magnetic field crosses over the tube, make contact and complete the circuit. The vane makes use of 8 reed switches so this seemed like a chance so I checked it out and they all looked fine.
My next move? To check the micro-controller passed voltage itself. I tried a few things, I redirect the value to be parsed on another pin. Nope. I tried redirecting more voltage up to the weather shield in hopes that maybe the Electric Imp was hogging too much power. Nope. And then, at this point, I was really at a lose so I read more about the Electric Imp because at this point I found that unplugging the imp allowed me to read the values over USB through the Red Board.
The Little ThingsOn the Electric Imp there's an ability to do what's called "Card Detect." Since the shield is just a "holder" for the Electric Imp the Card Detect allows the micro-controller to, as it sounds detect if the Imp is in place. It also happens to use the analog pin 0 which just so happens to be the same pin that the weather vane is trying to use and this is where the issue with the weather vane value came in. On the bottom of the card there is a small area denoted with CD - A0. This, this is it. This is what was causing all my issues. I hadn't cut the trace on the Card Detect. I took my knife and carefully broke the line between the two metal pads you see in the picture, hooked it back up and viola I was getting the correct readings.
The; Well, I, uh, Hadn't Thought of That'sWith any project comes the things you never thought about. For me there were a few funny ones but I'm only going to highlight one in particular. I placed the weather station on the side of my house, this isn't optimal in many ways but it's enough for what I want. Once I hung the solar shield and placed the instruments I was proud and looked over at it often when outside. It just so happens I was out getting the mail well past sunset one night and looked over at it and saw something that I hadn't planned on at all in this project. My solar shield, with the gleam of the LEDs on the micro-controller turned into a lightning lamp. This is something I'm going to make "go away" because I don't necessarily want it to be an obvious thing for someone to want to take. None-the-less I hadn't planned on the light show.
This video is very dark but watch for flashes of light. I recorded this on my phone and it did not justice to how bright it actually looks but, then again, that could be the paranoia speaking.
ThanksThanks for your interest. If you decide to build your own station I'd love to hear about it and I'd love to help.
Also a big thanks to my friend and colleague Rusty for the encouragement and for being a sounding board for bouncing ideas off of.
Thanks to David for his tweeting about the project and his support.
Another big thanks to +SparkFun Electronics for great tutorials and great products.
Finally, The Data
NOTE that some browsers will attempt to render the XML as HTML so it will look, well it'll look all messed up. Try using the JSON link instead.
Let me know your thoughts, questions, funny jokes. Hit me up with a few comments.