Overview:

When those summer storms or winter blizzards come rolling in, it can be handy to look at a weather radar to determine their direction and possible intensity. Not wanting to have another open tab on my web browser, I made the Weather Radar as a permeant retro radar viewer for my desk!

Connected to Wifi, the Radar downloads raw NWS radar images, overlays them on a map, creates and then plays looping animations of the 1-hour precipitation layer. With NWS forecasts and OpenWeather data, the Radar also shows current weather conditions and the forecast for the next few days. 

A toggle switch and 5-way navigation switch allow switching between modes/pages, while a continuous rotation potentiometer acts as a zoom knob for the map. 

Background

Originally the Weather Radar began as a small CircuitPython microcontroller project that quickly got out of hand (as well as available RAM) using static radar images from the old NWS website. 

While I upgraded to use a RaspberryPi Zero instead, the NWS upgraded their radar webpage to feature HTML5, an interactive map, and Open Geospatial Consortium (OGC) compliant layers. These layers are especially handy because they can provide us with raw radar images for a particular area via a simple URL request (using Web Map Service WMS or Web Feature Service WFS protocols).

The NWS helpfully provides a page of the OGC compliant layers they offer, including alerts, warnings, and layers for the 200+ weather radar stations).

Methodology:

For a given latitude and longitude in the USA, the Radar:

A) Base map is generated using starting latitude longitude coordinates (example is Seattle with a black and white Stamen Toner map).
B) Radar image is added on top with slight transparency. Also a marker for our starting lat long position.
C) Now combined with labels, annotation, and weather data. A circle overlay is added to make it blend better with the analog meter case.

Code:

The Weather Radar! is written in Python with Blinka support!

It's also an ongoing project that evolves with the changing of the seasons and with whatever new stuff I learn… which is to say that its code is a muddled hot mess. 

Despite this, you can find cleaner example code over on the Weather Radar! github page!

Hardware:

Schematic here!

Case:

The case is from an old analog meter I found discarded in my shed 5 years ago. I'm not entirely sure what it measured, because the battery and electronics had mostly crumbled away into toxic dust. The case and screws were still perfect though, and after a thorough clean and a bit of patching with some wood filler, I gave it a nice coat of sky blue paint (… because you know… weather).

A look at the front of the analog case before painting and after clearing away all of crumbling electronics from inside it. Gouges in the front show where one of the original and rusted potentiometers refused to leave.

Inside, the Pi and PiTFT HAT attach to the remnants of the meter gauge housing using a mount I designed and 3D printed. A cheap magnifying lens enlarges the screen a little and gives it a retro look (especially when viewed from an angle).

Despite falling apart in my hands, I was also able to reuse one of the original toggle switches as a knob for the 5-way navigation switch. With the other metal switches and knobs it helps maintain the case's retro aesthetic!

Switches!
A closeup of the control interface. From left to right, a chunky metal toggle switch, a 5-way navigation switch (with a knob made out of a metal toggle switch), and a potentiometer with a brushed metal knob.
Inside the Weather Radar, with the Raspberry Pi Zero W and PiTFT attached together. Below that a 3D printed mount holds the Omzlo PiWatcher TB and Adafruit PCF8591. The pot, toggle switch, and the 5-way navigation switch (soldered on a piece of perf board) are visible underneath.

Future Improvements:

References & Attribution: