I’ve always been interested in being able to measure weather data – you know, try to find that perfect week statistically for vacation in the Pacific Northwest (ha! there is NO perfect week). After pricing the various stations on the market I found they were pretty much beyond my means for home and hobby use. Fortunately 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 its many cousins), 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 address a 1-wire device, and I got the 1-wire search algorithm to work also. But then doing all the other stuff in assembly would be NUTS!
The system requirements for my homebrew weather station ORIGINALLY were:
- Be based on a 8051 family microcontroller variant with 64K of EPROM external program memory
- CompactFlash card for storing data weather data when offline
- 1-wire based. The 1-wire idea is clever in that only a single conductor (plus ground) is needed to transmit both data and power the devices on the “MicroLan” 1-wire bus.
Some time ago I saw this article (very dated now) about networked temperature monitoring and got jazzed about using the 80C400 TINI microcontroller (which was 8051-based) from Dallas/Maxim. This chip was impressive for its time: it had a TCP/IP stack in ROM, had a 1-wire master built in, and ran a Java virtual machine. So now I was learning Java for the software running the weather station.
So, I got a Raspberry Pi Model B and, after doing the Massively Online Oracle Course (MOOC) on Java ME (J2ME) for the RPi, I am now using that for the weather station. I was pretty involved in redoing the Maxim/Dallas 1-wire library so that it uses an I2C 1-wire bridge (spoiler alert: I gave up).
Sensors for weather station, type, and output: