Weather Station

Some History of This Project

Ever since I was a kid, I’ve been fascinated by the weather.  For a LONG time now, I’ve been working on a weather station to be able to measure weather data.   After pricing the various commercial weather stations, e,g. Davis, I found they were pretty much beyond my means for home and hobby use.  Fortunately, many moons ago, I acquired a weather station made by MetOne Instruments that was going to be tossed (!).   The equipment is now somewhat obsolete, but it’s has been a great vehicle for learning programming using different languages: originally learning about 8051 assembly language, and now C++.  I thought developing weather station software based this chip in assembly language would be a fun learning project.  Yeah, I know I could have bought one and had it over with, but this was a challenge.  I did get the 8051 to bit-bang an I/O pin to get the 1-wire search algorithm to work for finding 1-wire devices on the 1-wire microLAN, but doing all the other stuff in assembly would be pretty much insane!  So, I gave up on basing it on assembly language.  Sun Microsystems (now Oracle) Java Micro Edition, on a Raspberry Pi looked very cool, but since many of the J2ME evangelists left Oracle, there basically was no support except for searching forums and such.  When I DID find info it was pretty old or not really pertinent.   So, I gave up on using Java Micro Edition.  <sigh> But I learned a LOT about Object Oriented Programming!

So it’s been interesting…  I might have been able to get this project done sooner except now I had to find a new way to obtain the wind direction since, for whatever reason, the “precision” potentiometer reads OPEN!  Fortunately, I found an Instructables article about using a Melexis angle sensor that uses a neodymium rare earth diametrically magnetized magnet for the wind direction.  

Currently…

Now I’m using Visual Studio Code (aka VSCode) with the PlatformIO extension to write firmware for the ultra-cheap ESP8266/8255/ESP32 chips.  So now I have Node-Red 2.2 and Mosquito MQTT broker (from the Debian repository) working on a Raspberry Pi accepting JSON data from the station using an Arduino PubSubClient and ArduinoJSON.  Have to say the Node-RED dashboard so far looks pretty nice.   I modified existing code for the DS2482 1-Wire master (the original versions had a couple issues) on GitHub and released my own version.  So far, I have the Model 370 rain gauge counting bucket tips (using the DS2482 1-Wire master and DS2423 1-Wire counter/memory chip), the anemometer, and humidity/temperature from the 083B sensors.   

UPDATE:

The wind vane was another issue: the 360 degree precision potentiometer for some reason read OPEN!  I got the Melexis MLX90316 angle sensor working as a replacement from this Instructables article.   So now, besides putting all the modules together, I’m learning KiCAD to build PCBs for the wind vane retrofit and the DS2423 counter mod for the 370 rain gauge.   Thanks to the KiCAD forum, I have a replacement PCB for the wind vane based on this article.