This project was one of the more enjoyable projects that I’ve worked on in a long time. Instead of taking the easy way out and displaying the current weather conditions on a web site or cell phone, this project focused on simplicity. Minimal information, displayed in a visually appealing non-screen format. This project makes use of several d’Arsonval meters and a Particle Core microcontroller to view the current weather and forecast at a glance.
Galvanometers, otherwise known as d’Arsonval meters after Jacques-Arsine d’Arsonval, were some of the first devices used to measure electric current. By using a needle, a coil of wire, and a permanent magnet, they can precisely indicate how much current is flowing through the meter. They are also perfect for displaying weather information of the type used in this project.
Four key pieces of weather information were selected for display:
- Current Temperature
- Today’s Expected High Temperature
- Today’s Forecast
- Tomorrow’s Forecast
The weather data was obtained from Forecast.io, a weather aggregator that provides the statistically most accurate forecast for any given location. Plus, they have a free API (Application-Programming Interface) that is very easy to use.
To obtain the weather data and process it into a format that the d’Arsonval meters could display, a Particle Core was used. The Core is a Wi-Fi enabled microprocessor which uses Arduino-compatible programming. With a built-in W-Fi module, it was the perfect device to connect to Forecast.io and pull the necessary weather data. Note: Although the Core is no longer being sold, the Photon is almost an identical replacement. The Core is programmed using a web-based IDE (Integrated Development Environment), and the code is written to the Core through its Wi-Fi connection. This makes it even easy to update your code, even once the Core is closed up inside your project’s case.
The d’Arsonval meters selected were Simpson model 15038, part of their “Designer Style” product line, purchased from Newark. With a rectangular design and red knife-edge pointer, they had a high-class look and feel to them. Newark only had one of the selected meters in stock, but also have the capability (and authorization from Simpson) to manufacture additional meters if necessary. It took about a week to have three more meters fabricated. All meters were ordered with the ability to display 0-5 volts DC instead of current. Unfortunately, the front black surface of the meters is highly sensitive to marking from oily fingers (especially during manufacturing), so the use of clean soft gloves is recommended.
For this project, I wanted a way to illuminate the meters to see the gauges at night. Finding already-illuminated meters was rather hard, so I resorted to the next best source of custom-illumination – NeoPixels. NeoPixels are RGB LEDs, so you can easily change their output color using an Arduino (or in this case, the Particle Core). I selected a small 8-LED stick of NeoPixels, and used a CNC machine to cut a small slot in the base of each meter. This proved to be harder than I expected, and most of the cutting with the CNC machine was done manually by jogging the cutter back and forth until the desired size and depth of cut was achieved. To protect the sensitive meter components, I taped off the front of the meter so that the dust from cutting would not hinder the meter movement.
For the project’s case, I selected some Bolivian rosewood from a local woodworking store, and designed the enclosure using OnShape. If you haven’t tried OnShape, it is an excellent (and free) CAD tool that is used completely within a web browser. It exports STL files which are used when CNC machining. Designing the box with CAD software made it easy to cut the holes necessary to mount the meters and power socket. After machining the wood, it was oiled with Watco Danish Oil. This brings out a nice finish and shows the unique qualities of the wood selected. Plus, with the illuminated meters, a dark background makes them really stand out.
To make sure the meter illumination wasn’t too bright, or using too much power unnecessarily, a TEMT6000 light sensor was used to sense ambient light levels. The output from this sensor was fed into the Core, and the NeoPixel illumination was adjusted accordingly. As a side note, instead of raising or lowering the intensity in a linear fashion, which is less pleasing to the eyes, a sinusoidal change was programmed. This provided a very nice transition as the room lights were turned on or off. Sensing was done on a frequent basis to make sure the meter was always able to be read.
Once all the components were on hand, everything was tested out on a breadboard. It was at this time that it became apparent I had a problem. The analog meters were ordered to sense 0-5 volts DC, but the Particle Core was capable of only outputting a PWM signal of 3.3 volts DC, max. A logic level shifter was first tried, hoping that if the Core output a full 3.3 volt DC PWM signal, it could be shifted up to 5 volts DC to make the meters read full scale. Unfortunately, there are losses in the logic level shifter, and the best I was able to obtain was 4.7 volts. Luckily, using two transistors and a few resistors I had lying around and a circuit I found online, I was able to make a small circuit to amplify the PWM signal enough to produce a full 5 volts DC. By substituting a potentiometer for one of the resistors, I was able to make adjustments to the maximum voltage output so that I could accurately cause the meter to reach full scale.
The meters were easy to disassemble. After removing the meter’s background, I used Adobe Illustrator to design new backgrounds that would correspond to the weather data I expected to receive. Icons were selected from various free icon sites online for the meters showing the forecasts. New backgrounds were printed and attached with photo spray adhesive. The meters were zeroed using the small screw on the front of the meter face.
The NeoPixel strips were wired up in series, since they can all share a common data line. Using the SparkTime library, the code requests the current time from an NTP (Network Time Protocol) server on a periodic basis, and is programmed to shut off the NeoPixels overnight. It even accounts for Daylight Savings Time and self-adjusts. There may or may not even be specific dates programmed into the code, which might or might not display selected colors on various holidays or birthdays, but I’ll never tell.
Once everything was working, it was mounted into the rosewood box. A small 6 volt DC wall adapter provides the necessary power to a jack mounted on the back of the box. There is a small recess with an even smaller hole on the inside of the box’s back panel, which holds the light sensor. Ambient room light is picked up through the back of the box to keep the front display clean.
If you’d like to see the code, you can download it here. Remember, this is similar to Arduino, but specific to the Particle Core (or Photon). As always, if you use this code, please be sure to make something fun and interesting with it!
The project worked as expected, and provides a very clean and friendly way to view the weather. It was quite fun to go back to analog technology for a change, especially in this world of fast-changing everything-on-a-screen way of displaying data. Sometimes it’s nice to keep it old-school for a change.