Here’s a guide on how to create a METAR Map using a raspberry Pi, some LEDs and a big aviation map.

First, a list of the things needed:

Raspberry Pi – I’m using a version 2 device for my build as I have it lying around.
SD Card – I tend to use 16gb but 8gb should be fine
Power Supply – This One
Addressable LED Lights – These
A Chip to regulate the voltage – This one
A breadboard – here’s one
Some hook up wires – I got both male and female ones from Ebay
Beer – choice is completely up to you
Various electronics tools, such as crimpers, soldering iron, electrical tape etc.
Various woodwork tools, saws, glue, screws, etc.

I’ve seen some guys set this up with a diode in-line on the 5v+ side of the lights, I tried this initially, but found that I was having inconsistent success and that the diode got rather warm (to the point I burnt myself by touching it). From a safety and reliability perspective, I’m recommending the chip and breadboard approach, but it’s up to you.

If you’ve got this far, then I’m guessing you’re still interested in moving forward…

Now before we go too far, you can do some of these steps in whichever order you want. I build my Pi software and install whilst the wood stain was drying on the box I made for it, so it’s not that important that you follow this guide step by step.

Decide what area you want to cover

I’ve seen people use actual aviation charts to do this, or make their own and print them off. This seemed like too much hassle for me so I ordered a custom chart from Higher Plane Inc. The laziness on my half paid off as they sent me exactly what I was looking for, a custom chart, 60″ x 43″ and at 150% Zoom (which just makes everything bigger) centered around my home airport – PERFECT!!

Knowing that their 150% chart at that size will cover 275nm x 180nm with my home airport in the centre, I used Foreflight to work out what area that would be…

Map Segment Final The good thing about foreflight is that it will show which airports are reporting METARs, and you can use it to validate that what your map is showing, is what they are reporting as well.

Using this approach, I worked out which airports I wanted to use. I have 47 in my area that report, so I went with that. I printed out a version and then numbered them with a wiring approach in mind, I basically go left to right and back again so there’s no massive gaps between the lights, as best I could.

img_4788.jpg

I then hung my wall chart on the patio door window so I could transfer my numbering scheme to the back of the chart. I needed the light to shine through so I could see which airport was which.

I’ll use this to overlay the MDF backboard and mark where I need to drill the holes. I used a sharpie because the magical solution that is nail varnish remover will take my numbering scheme off the back of the chart once I’m done. You can just about see my sharpie scrawl in the below image.

IMG_4789

Taking the map down, this is what the back of it looks like:

IMG_4790

I rolled this over the piece of wood I’m using and used the Sharpie to make marks on the wood as to where the airports will line up – this isn’t a perfect way of doing it, and depending on how slap-dash you are, may result in LEDs not lining up with airports exactly (as in my case).

In the image below you can just about make out the marks of black sharpie where the airports are / I’ll need to drill.

Probably a good point to stop and have a beer.

DIVH4871

Get the raspberry pi set up

So in order to do this, we’ll need a fresh install of Raspbian. Rather than me repeating the steps to get the system installed, follow the guide:

Part 1 – Install Raspbian

Part 2 – Upgrade and Update to latest versions

Part 3 – Connect to the wifi

Once you’ve got this done, I recommend ensuring that SSH is enabled, and I like to disable the GUI desktop, there’s no point having that resource heavy application running if it’s not plugged into a screen. It’s worth checking that you can ssh to the box before disabling the GUI, just in case you need to change something!

You can do both these actions through:

sudo raspi-config

Once that’s done, give the raspberry pi a reboot for good measure and that’s it for this part… have a beer, you’ve got a working Raspberry Pi system.

Installing the required control software

In order to control the lights, we need a package called NeoPixels. A bloke who I’ve never met or had any contact with has made this incredibly easy, so thanks to Jeremy Garff for this code repository.

Open the terminal console on the raspberry pi, its the same window you opened to do the update and upgrade.

Another bloke who I’ve never met has written a handy guide for how to install the package, so thanks to Tony DiCola for the following steps, you only need to follow the section titled “Compile & Install rpi_ws281x Library”, you can use the Strandtest.py for testing that out lights are working.

https://learn.adafruit.com/neopixels-on-raspberry-pi/software

OK, beer time… that’s the system set up ready to control the lights.

Wiring up the lights

This bit is pretty straight forward, I opted to go the chip route rather than the diode route as I was having problems with the diode being stable, and it got rather hot.

So here’s what you need to wire up, taken from this page:

It should look like this when you’re done:

Lots of other people have managed to get the Pi powered from the same source as the lights, I couldn’t get this working so I’m powering my Pi separately. It’s important to make sure you have a ground pin connected from the Pi (pin 6) to the breadboard. The data is from GPIO Pin 18, which if you’re counting pins, it’s the 6th Pin in, along the top row of Pins on the Pi.

Installing and configuring the METAR package

Ok, so a lot of other guides have instructions on how to do this using PHP and Python and cron jobs in order to get the METAR data and control the lights. This version just used 2 files, a python file and an airports file. You then just need to get it to execute with Cron.

So it’s time to get the METAR pulling code… so run this:

sudo wget http://www.stephenmelody.co.uk/metar

Then

sudo wget http://www.stephenmelody.co.uk/airports

now change the file extension on the metar file:

cp metar metar.py

Want to check it’s working? Run this:

sudo python metar.py

It should then flash up on the screen some codes, but ultimately you should get something that looks like this:

lightsets

Configuring your personal airports

So… you’re probably not interested in all the airports in the airports file… so it’s time to pick the ones you want.

I like to use nano as my text editor on the raspberry pi. This file is literally a list of airport codes that you can pull.

Depending on whether you decided to cut and splice the LED lights cable, or have LEDs that don’t light up, will depend on what you put in this file:

If you’re cutting and splicing, then you just need the list of airports.

If you’re having LEDs that won’t light up (the way I’ve done it), then you need to put in NULL for each LED that won’t light up between airports, so you might end up with something like this:

NOTE: You can come back and edit this file at any time, if you find out you’ve miscounted the number of unlit LEDs between airports.

KPIT

NULL

NULL

KATL

NULL

KJFK

KEWR

NULL

Setting up the schedule to get the METARs every 10 minutes

This is pretty straight forward, you’re going to use a wonderful program called CRON on the Raspberry Pi to automate this:

sudo crontab -e

This should open up the editor, if it gives you options of which editor to pick, go with Nano – it’s my preference and the easiest I think.

Add a line that looks like the one at the bottom. Please note: /var/www/html/metar.py is the location that I have installed the files, if you have the files somewhere else, make sure your location is correct!!

cron

Press Ctrl + X to exit, and then Y to save… that’s done, beer time and back to hardware…

Gluing the lights into the wood

Then it’s time to drill the holes in the wood, I used an 8mm drill bit then a countersink to open the top of the hole up a little to allow the light to better sit in the wood. I didn’t want the light to protrude past being flush with the wood on the opposite side. Probably time for a beer at this point.

IMG_4793

Once the holes were drilled I started to glue the lights in place. You can see here that I have unlit LEDs between the airports, rather than cutting and splicing cable into them

IMG_4867

This is what it looks like from the side the map will be glued on to.

IMG_4851

Once all the bulbs are in place, it’s time to glue the map to the wood. Here’s what I did…

I used bulldog clips to hold the map to the wood, I then rolled back one half and glued it down, I then put the bulldog clips on the other side and rolled back the other half and glued that down.

HERE’S AN IMPORTANT TIP: Put something on top of the map to hold it down, I didn’t do this and overnight during the gluing process, it raised up a little so it’s not perfectly held onto the wood. This is annoying because then the light isn’t so defined in it’s hole, it spreads where the map has raised up.

Once it’s on it should look like this:

IMG_4869

Now, you have the option of how you want to mount this, I made a simple frame using oak, that I stained and a box for it to sit in, however you can do what you want. I just screwed the map board into the frame to hold it.

 

Once that’s done, hang it on the wall!! Sit back and have a beer!!

If you’re wondering how it’s powered, I ran an extra outlet behind the Map and have the Pi and the lights plugged in there.

IMG_4909