Weather Station and the Raspberry Pi

USB to RS-485 Adapter
USB to RS-485 Adapter

One of the weaknesses with my weather stations was that they did not have the ability to accept incoming connections. This made remote debug a bit difficult, if not impossible. Basically, you program the thing, and hope there are no glitches. Surprisingly, this worked for many years with the occasional reset, but I finally decided to spend some time making some improvements to this aspect of the weather station system.

Originally, my weather stations consisted of an outdoor unit, which acted as a hub for all the outdoor sensors. The hub communicated with an RS-485 to Ethernet bridge (Arduino+Ethernet shield) inside the house near the router. This allowed long runs, and the ability to easily chain multiple hubs together on the RS-485 bus. I decided to keep the RS-485 bus model, and built a USB to RS-485 bridge to replace the Arduino and Ethernet shield that I used previously. The new USB adapter uses an FTDI chip and is compatible with most Mac, Linux, and Windows computers out-of-the-box. I was really happy to avoid the use of drivers. This adapter also features transient protection and other features that most cheap USB to RS-485 adapters do not have. This was important considering the long cable run out to the weather station. And, because the weather station hub runs at 3.3V and uses little power, the entire system can be powered from the USB port which provides 5V down the line.

I took this new USB adapter and hooked it up to a Raspberry Pi. Using a Python script I whipped up in a few minutes I was able to completely replace the functionality of the older Arduino-based system. While I haven’t added any new functionality yet, the Raspberry Pi allows for a lot more possibilities with its huge memory space, and the ability to SSH and VNC into it remotely. This solves the old problem of remote troubleshooting, which was basically impossible before. Local logs are also generated using the Python script to record errors and weather data in the event of an internet outage or other failure. I’m very happy with this improvement.