In this article, I’ll do three separate projects using the Raspberry Pi Zero Wireless. In Project 1, I’ll create a plane-tracking device using PiAware. In Project 2, I’ll collect data from said planes. In Project 3, I’ll show you how to use the RPi Zero W to control a 64×64 RGB matrix.
Project 1: Raspberry Pi Zero Wireless Plane Tracker
Part | Cost | Notes |
---|---|---|
Raspberry Pi Zero Wireless | $10 | |
SDR receiver | $21 | Many other USB SDR receivers will likely work |
4GB microSD card | $6 | Larger cards will work |
USB-to-MicroUSB adapter | $5 | |
MicroUSB Hub (optional) | $8 | The Pi Zero only has microUSB ports; to attach accessories, you need a hub/converter |
Wideband antenna (optional) | $50 | Antenna must cover 1090 MHz |
1090 MHz band-pass filter (optional) | $20 |
Resources
This experiment was done using the Raspberry Pi Zero Wireless. However, the following code should work on any Raspberry Pi version 2 or later. If you purchase a Pi Zero without wireless, you can add it with a wireless USB network dongle.
Step 1: Prepare the SD card
Download the latest Raspbian Jessie to your computer.
Write the image to your SD card (here are guides for Linux, Mac OS, and Windows).
Step 2: Modify the SD card
Create a file named “ssh” in the root directory of the SD card. No file extension, no file contents. This file enables SSH, which will allow you to remotely access the Pi.
Create a file named “wpa_supplicant.conf” with the following contents. Change the values for YourWifiName and YourWifiPassword to the name and password you use to connect to your Wi-Fi network
ssid=”YourWifiName”
psk=”YourWifiPassword”
key_mgmt=WPA-PSK
}
Step 3: Install and Boot
Eject the SD card from your computer and install it in the Raspberry Pi Zero Wireless. Connect the Raspberry Pi to a power source using the MicroUSB port closest to the end of the board. Wait approximately one minute for the Raspberry Pi to boot and connect to Wi-Fi. With these configuration files, there is no need to use a keyboard, mouse, or display with your device.
Step 4: Locate Your Pi
Identify the IP address of your Pi—this can be accomplished by logging into your router and looking at attached devices, or through an IP scanner such as Look@Lan (Windows) or nmap (Linux and Mac). If your device does not appear within two or three minutes, disconnect power, remove the SD card from the Pi, and reinsert it in your computer and double-check the ssh and wpa_supplicant.conf files.
Step 5: Connect to Your Pi
Windows: Use a tool such as Putty to connect to your Pi. Download and run the program, type the IP address of your Pi, and click “connect”. A window will appear that asks you about the security certificate—click “yes”.
Linux and Mac: Open a terminal and type “ssh [email protected]” or “ssh pi@ipaddress” (e.g., “ssh [email protected]“).
At the prompt, the default username is “pi” and the default password is “raspberry”.
Step 6: Configure Your Pi
Type “sudo raspi-config” and hit enter.
Change your password, timezone, and localization.
When the password prompt appears, the current password is “raspberry”; you should change it to something more secure to make it at least marginally difficult to hack your device. On a side note, instead of passwords, you should use certificates for authentication, but that will not be discussed in this article.
Then type the following commands and allow them to run:
sudo dpkg -i piaware-repository_3.3.0_all.deb
sudo apt-get update
sudo apt-get dist-upgrade -y
sudo apt-get install -y piaware fail2ban libio-socket-ssl-perl
sudo piaware-config allow-auto-updates yes
sudo piaware-config allow-manual-updates yes
sudo apt-get install dump1090-fa -y
sudo reboot
After the Rapsberry Pi has finished the boot process, open a web-browser on your computer and navigate to http://raspberrypi.local:8080 (or replace raspberrypi.local with the IP address of your device). Zoom out and then zoom into your location as planes begin to appear and then disappear from your screen.
To increase the number of planes, take your Pi, SDR, and antenna system outside. Further improvements are found by adding the 1090 MHz band-pass filter and a better antenna.
Read More: Track Overhead Flights with a Raspberry Pi Zero Wireless, a Software Defined Radio, and FlightAware