Got Power?

I stopped off at another Radio Shack store and was able to purchase the 2.1mm power connector I needed to make the power adapter cable for my hub.  I soldered it up and went outside to connect everything up.  After that I ran some quick diagnostics and everything was looking good.  So I started the weather station back up and watched the logs for errors.  Unfortunately I started seeing consistent errors showing up for the wind direction sensor.  I turned on debugging and saw that I was able to read values from the sensor, but the voltages I was reading weren’t quite within range.  At first I played around with the gain and offset settings in the configuration, but the error wasn’t a linear offset.  I may have been able to come up with a formula for compensating, but since it had worked fine with the extension cord and power supply I began to suspect something was wrong with the power to the station.

There are a few handy features I incorporated into my software that I took advantage of here.  First is a setting in the configuration file that allows me to turn debug logging on and off on a per sensor basis.  This is a fairly common practice and I’ll probably enhance it to add some log4j style debug levels some time in the future.  The other handy feature is that the station software monitors the configuration file, and if it is updated while the station is running, the station will read the updated configuration file and use the new settings.  So I don’t have to continually stop and start the software when making configuration changes or debugging.  Just edit the file and give the software a moment to read the new configuration settings.

I did some research and saw that the recommended voltage for the anemometer I was using is 14-24VDC.  My power supply was only 12VDC.  I looked at the one I had used temporarily and it was 14VDC.  Looks like the voltage is below the required voltage for the anemometer.  I searched through my bag of wall warts (literally a big bag filled with them) and found an old computer power supply for a laptop that was rated 20VDC.  So I hooked that one up in place of the 12V wall wart.  My barometer is located indoors and uses a separate power supply.  That supply is rated at 12VDC.  I also replaced that supply with the 14V one I had used for testing.  I wasn’t seeing errors from the barometer, but it specifies a supply voltage of 14VDC, so I swapped supplies just to be sure.

Now when I fired up the weather station the logs showed no errors.  I enabled the data uploads to CWOP and Weather Underground and I can see my data on both of their Web sites.  I compared my data with some neighboring weather stations and everything looks good at the moment. I need to let it run for a few days and see how the analysis of my data on the CWOP site looks after things have settled down a bit.