This project uses a Raspberry Pi with ultra-low-cost software-defined radio (SDR) hardware to receive tracking information sent by airborne S-mode transponders from millions of miles away. The Raspberry Pi is equipped with a sleek 3.5-inch TFT display to provide a convenient overview of aircraft activity.
Hardware
The RTL2832U-based tiny SDR receiver (124-5461) was originally designed for DVB-T reception and first brought to market. However, due to the efforts of Linux kernel hackers over the years, it is now possible to access the raw samples of the device, rather than just a demodulated DVB signal. This means that wireless systems can be applied to software, allowing for great flexibility.
The RTL2832U chip is typically paired with a tuner IC. Specifically, in Adafruit’s USB receiver, it is an R820T, which can receive signals from 24MHz to 1,850MHz. It should be noted that RTL-SDR hardware is equipped with 8-bit ADC resolution and about 7 bits of effective number of bits (ENOB), with no competitive advantage in dynamic range compared to more expensive SDR platforms. However, it is sufficient for many applications and offers an extremely high cost-performance ratio.
The software used to receive and decode S-mode signals provides a web interface based on Google Maps and a local display that is not particularly necessary. However, the addition of the Adafruit PiTFT 3.5-inch display (124-5487) provides a concise overview of aerial activity at a glance. Additionally, the combination of the Raspberry Pi, SDR receiver, and TFT display can also be configured as a pretty cool standalone scanner for spectrum visualization.
The TFT display simply plugs into the P1 header of the Pi, and the SDR receiver just plugs into a USB port.
Raspbian
There are two options for installing Raspbian: download a kernel-supported image configured for the TFT display from Adafruit or write a built-in Raspbian image and configure it accordingly. I chose the latter because I generally prefer to use the official O/S installation image and then perform the necessary customization. However, the former involves fewer steps and is less prone to errors. Adafruit provides guidance for both methods.
After writing the Micro SD card using “dd”, I changed the hostname from the default “raspberrypi” to “planepi” for easier network identification by editing the file:
etc/hostname
etc/hosts
Note the missing leading slash, as you wouldn’t want to edit files under /etc on the computer where you are writing the SD card – so, regardless of what path your computer has installed, you need to add the root filesystem under the SD card.
If you prefer to configure the system via the included keyboard, display, and mouse, you do not need to enable SSH. However, if you, like me, prefer to configure via SSH connection, you need to do the following:
$ sudo touch boot/ssh
Replace “boot” with whatever is appropriate. The full path is intended to boot the system files on the SD card.
If the Pi is connected to a wired network, you can remove the Micro SD card, insert it into the Pi, and then boot. However, if you are using a wireless network connection, you also need to edit:
etc/wpa_supplicant/wpa_supplicant.conf
Again, this is not the configuration file under /etc/wpa_supplicant on the computer where you wrote the SD card; the configuration file is located in the etc/wpa_supplicant directory on the root filesystem of the SD card.
For details on manually configuring the wireless network, refer to the Raspberry Pi documentation.
PiTFT Setup
Since I used the built-in Raspbian image and needed to configure kernel support for the TFT display, I followed the DIY installer script instructions provided by Adafruit: easy installation. However, the “sudo apt-get install” command encountered an error as shown above because the built-in image had an updated software version, so I had to run the following script to force the downgrade:
$ sudo apt-get install -y --force-yes raspberrypi-bootloader adafruit-pitft-helper raspberrypi-kernel
Then run the helper script to install the 3.5-inch resistive PiTFT.
$ sudo adafruit-pitft-helper -t 35r
It is generally recommended to use the pre-configured Raspbian image provided by Adafruit. However, the above information is useful for beginners using the built-in Raspbian image for any reason, such as adding these features to an existing system running other applications.
Finally, if the situation shown in the image at the top of this article occurs, where the USB power lead is facing down towards the Pi, you will need to update the configuration to rotate the display 180 degrees. This can be accomplished by editing the /boot/config.txt file and changing rotate=270 to rotate=90.
dump1090
There are various software options available for receiving and decoding S-mode transmissions, which were realized 5 years ago when I wrote about ground-to-air mode based on GNU Radio. However, this time, we intend to use software called dump1090, named after the S-mode frequency of 1090MHz.
The advantages of dump1090 compared to GNU Radio include: it has the lowest external dependencies; it is also particularly robust and proficient at decoding weak signals. When working in interactive mode, it prints an overview of activities to the console, and the branch shared on GitHub has been slightly modified to accommodate the 3.5-inch TFT display.
To build, we need to run the following script:
$ sudo apt-get install libusb-1.0-0-dev librtlsdr-dev rtl-sdr
$ git clone https://github.com/DesignSparkrs/dump1090
$ cd dump1090
$ make
Then edit the /etc/rc.local file and add the following line before “exit 0”:
cd ~pi/dump1090; ./dump1090 --net --net-http-port 80 --interactive &
Running
Now we need to restart to configure the kernel for the TFT display; if the default TV tuner support is not loaded for the RTL-SDR hardware, this configuration will be obstructed. If everything goes smoothly, dump1090 will start via the line we just added to /etc/rc.local. The TFT display should then begin to display content upon receiving signals.
If the browser connects to the Raspberry Pi, we will obtain a simple web application. This program is based on Google Maps, featuring aircraft position markers and altitude data.
Note that the antenna included with the SDR receiver is not optimal for 1090MHz, but in most areas, using that antenna can at least pick up some aircraft signals. Be sure to place it near a window or outside. If you’re unlucky and can’t receive signals, there are simple DIY antenna plans available online that can be tuned to 1090MHz for higher gain.
Other Software and Services
dump1090 also makes the raw S-mode information available over the network, which can be used with software like PlanePlotter for more complex displays. Additionally, data can also be sent from the receiver to online services that provide crowdsourced flight data access, such as OpenSky Network and FlightAware.
This article is from DesignPark, author: Andrew Back
Leave a Comment
Your email address will not be published. Required fields are marked *