Weather Station

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 many  moons ago, I acquired a weather station made by MetOne Instruments that was going to be tossed (!).   This project has been a great vehicle for learning programming using different languages.  I originally wanted to learn about assembly language programming on the 8051 microcontroller, and I thought developing weather station software based this chip in assembly language would be a fun learning project. Well, it was fun for a while…until I realized the scope of the project. I got 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 “Microlan”. But then doing all the other stuff in assembly, for saving the data and such, would be pretty much insane!

So I gave up on basing it on assembly language.  Sun Microsystems (now Oracle) Java Micro Edition, that worked 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. Whatever I DID find was pretty old information or not really pertinent.   So, I gave up on using Java Micro Edition.  <sigh> But I learned a LOT about Object Oriented Programming!

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 working on a Raspberry Pi accepting messages from pieces of the station via MQTT and the dashboard looks pretty nice so far.   I modified existing code for the DS2482 1-Wire master (the original versions had a few 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.   

The wind vane is another issue: the 360 degree precision potentiometer for some reason reads OPEN!  I’m working on fitting it with a Melexis MLX90316 angle sensor from an Instructables article I saw on that web site.   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.   UPDATE: Thanks to the KiCAD forum, I have a replacement PCB for the wind vane.  Now I’m working on a test board to fit in the housing so I can see if (hopefully) the MLX90316 will work on the end of a 10′ cable.  According to what I’ve read, SPI signals can work up to 30′.  We’ll see.  Check out my blog page for the testing of the MLX90316.