Intro: Flight Monitor Using a Raspberry PI and a DVB Stick
If you are a frequent flyer, or just passionate about planes, then Flightradar or Flightaware are 2 must have websites (or apps, as there are also mobile apps) that you will use on daily basis.
Both allow you to track planes in real time, see flight shedules, delays, etc.
The websites use combined systems to get data from the airplanes, but nowadays the ADB-S protocol becomes more and more popular and widely spread.
Step 1: The ADB-S Protocol
Automatic dependent surveillance, or shortly ADB-S is, as stated by wikipedia:
"Automatic Dependent Surveillance – Broadcast (ADS–B) is a surveillance technology in which an aircraft determines its position via satellite navigation and periodically broadcasts it, enabling it to be tracked. The information can be received by air traffic control ground stations as a replacement for secondary radar. It can also be received by other aircraft to provide situational awareness and allow self separation.
ADS–B is "automatic" in that it requires no pilot or external input. It is "dependent" in that it depends on data from the aircraft's navigation system."
You can read more about it here:
The system is complex, for those interested in the details, Wikipedia is a good point to start.
In a nutshell, airplanes transmit on the 1090Mhz frequency several flight data, which contain information as speed, altitude, heading,squawk, coordinates that can be used by ground control or other aircraft to identify the aircraft and it's exact position.
This is a secondary system to the common radar, but it's going to be introduced as being mandatory on more and more air crafts.
This information can be cached via dedicated receivers and transmitted towards specialized websites who create a 'live' database about the aircraft.
Such webistes are:
Step 2: Feeding Data With a Raspberry PI Single Board Computer and a DVB-T USB Stick
These websites often offer equipment capable of ADB-S reception which will upload data to their database in order to improve coverage. Of course, they provide it only in case your install location will increase the currently existing coverage.
In exchange, you will get unlimited premium account which allows you to have access to a lot of additional info besides the free accounts. Of course, you will get rid of the ads too.
But you don't need a professional, and expensive ADB-S receptor. You can build one using a few bucks (overall it's under 100$) using a couple of components.
There are good tutorials out there, for more information you can consult the webpages below, I will only try to make a summary out of there and maybe explain a few details that are missed in those tutorials:
These link only focus on the software installation, but does not focus on the HW or Mechanical setup. I will try to cover also these.
So the HW consists of a Raspberry PI Single board computer. Unless you're living on Mars, you have probably heard about it already, it's a very popular small computer that reached already the 3rd generation.
The latest model offers a quad core 1.2Ghz 64 bit CPU, videocore, LAN, Wifi, Bluetooth, all for 35$ selling price:
Of course, in your country you won't get it that cheap, but it's still cheap compared to what you can do with it and how big community you can find behind that.
For our project, using the latest model is a bit of overkill, therefore and older one, perhaps a PI 1 model B is more than sufficient (This what I've also used).
It's also better to use the 1rst PI, as it has lower power consumption, therefore also lower heat dissipation.
Even if not required for normal use, it's better to equip the Raspberry with a heat sink (at least for the CPU), as in the end you will install the whole setup into a water-proof enclosure box and mount it on the top of the roof, to get better signal reception (that means you will have better coverage) and good line-of-sight. You can buy a heat sink kit from the re-sellers that also sell the board itself.
The reception of the data will be done with a DVB-T dongle. As not all models can tune to the 1090 frequency, it's best to use the already proven chipset, RTL2832. It's easy to find such tuners on Aliexpress from our Chinese friends for a couple of bucks:
These units tend to consume a lot of power from the USB port and run quite hot, and in case you have a Raspberry Pi model B (not the 2 and 3) you will most like get problems with the power supply.
I've modified mine (placed 2 heat-sinks on the tuner IC and on the processor , and also manufactured a heat sink for the power supply IC that provides the 3.3V.
Also, I've cut the PCB to interrupt the supply from the USB port and supplied it directly for the DC-DC converter (more about this later).
You can see the modifications on the pictures above, but you will need some skills to perform these. In case you don't want to cut the PCB, then you can plug the stick into a powered USB hub.
But also in this case, I highly recommend mounting heat sinks, as otherwise, due to the lack of ventilation inside the enclosure, and exposure to direct sun, it can get too hot and burn out.
For the enclosure, I've used an IP67/68 enclosure to ensure that no water will get inside the unit. I've also placed the antenna inside to box, as you can see in the picture above.
The only thing to solve was getting the power supply inside the enclosure and the ethernet.
As POE (Power over ethernet) is well proven, I've used the same cable to achieve both. POE means that you will feed power to your device over the same ethernet cable you are using for communication.
The simplest way was to buy a pair of cable/connector combo that already has the connections. After this, you only connect the 2 ends via standard CAT-5 UTP , or better, FTP cable. The latter one is better, as it also has an external insulation.
To assure that the enclosure remains waterproof, I needed an ethernet connector that has good sealing.
Fortunately Adafruit has something exactly for this purpose:
Having this sorted out, all I needed to do was to make a whole on the enclosure where I could mount this connector.
The Raspberry PI needs a stable 5V power supply, so does the USB stick too. Having some experience with electronics, I thought that on a long UTP cable, the voltage drop will be significant, therefore I've used a 12v power supply to feed power into the ethernet cable. In the enclosure, I've used an 5A DC-DC converter to step down the voltage to stable 5V.
The 12v proved to be insufficient on an 40m length cable, as the voltage drop at high consumption (when the Dvb-t stick started to work) was too much and the DC DC converted could not stabilize the voltage to 5V. I've replaced the 12v power supply with one that provided 19V and this time it was good.
The 5V DC DC converter I've used was this one:
You can use others too, but make sure it's a switching mode DC DC converter, and that it can provide on the long run at least 2.0Amps. It doesn't hurt to leave a bit of reserve, as in this case it will run cooler...
Now all you need to do is put together all this, from the POE connector, connect the 19V output to the DC-DC converter, use a screwdriver and an voltmeter to set the output voltage to 5v, solder an micro USB cable to the output of the DC-DC converter and use an additional cable from the converter to the 3.3V stabilizer from the DVB-T dongle. Not all dongles have the same schematic, therefore you should search for this part, but it's usually similar to the one in the picture (that has the 2 wires connected to it, yellow and grey , 5V, gnd). Once you've located the IC, search for a datasheet on the internet and you will find the pinout.
Don't forget to cut the PCB between the 5V from the USB connector and the IC, as otherwise it will be fed also from the PI and this can have unwanted effects.
In the end, my old pa has manufactured a metallic stand in which the enclosure could be securely mounted.
In the picture above you can see the whole thing mounted on the roof of the building.
Step 3: Software Installation
In the Flightradar forum you can find a good tutorial on how to install the whole SW package, however it's slightly outdated, as some parts don't need to be done now.
At first, you will have to install Raspbian OS onto the SDcards. (Step 1)
Afterwards, you don't need to install the RTL driver, as it's already included in recent kernels. Nor you need to install dump1090 separately, it comes with the installation of fr24feed.
But you will need to do the step to blacklist the standard dvb-t driver, as otherwise dum1090 won't be able to communicate with it.
After this being done, reboot the PI and install the fr24feed program.
All you need to do is update the repository and add the one from flightradar, and install the whole package, as explained here:
The package consists of dump1090, the SW that communicates with the usb dongle and feeds data to fr24feed application. This will upload the data to the FR24 servers (or piaware, if you configure them both).
If you need more info and tweaking about dump1090, you cand find a good description here:
Please skip the part about installing, as it's already installed. Log in to the PI via ssh, and issue a ps -aux command to see if it's running and with which parameters.
If you wish to install piaware together with fr24feed, you can do it, but make sure that only one of them starts dump1090. Also, make sure that dump1090 streams raw data on port 30005, otherwise piaware won't be able to receve data.
Always consult the log those apps produce, as this will help you in debugging in case something doesnt' work as expecte.