You can see how this setup is doing right now by visiting my FlightAware stats page.
I think C.H.I.P is the only kickstarter that I've ever supported (so far). They promised a computer with wifi, bluetooth, ethernet, and more for only $9.00 USD. This was before the RaspberryPi Zero existed and I jumped on board. They delivered and I received two C.H.I.P computers which promptly sat on the shelf after a week of playing around with them.
ADS-B stands for Automatic dependent surveillance – broadcast. Basically, it is a radio on aircraft that can transmit location information (longitude, latitude, altitude, etc.) and other information from planes. These transmissions can be picked up by anyone.
Why am I picking up ADS-B? Because it is fun and I can learn from it. Also, it is very easy to do cheaply due to open source software and the cheap rtl-sdr receiver.
I have enjoyed using a rtl-sdr dongle to receive ADS-B for a few years now. But it was always something I did intermittently. I recently learned about PiAware and was curious if I could get it to run on one of my unused C.H.I.P's.
I started by flashing to the newest OS version available for C.H.I.P. I chose Debian headless since more resources are available when not having to generate a graphical interface.
One consideration when using C.H.I.P is the usb protection. I recommend disabling this protection if you are using this as a guide. You can disable the protection just while configuring it (it will reset after reboot) to avoid headaches and crashes when building software. This protection exists to protect upstream power sources such as your laptop or desktop computer's USB port. Optionally, and preferably, connect a 1S lipo battery to C.H.I.P's JST connector. This should get you through any current spikes and has the added benefit of acting like a UPS.
There is a really neat website/service called HeyWhatsThat.com where you can put in your location and antenna height to get an output of your reception distance. This example shows how far I can expect to receive ADS-B transmissions at 10k feet (yellow) and 30k feet (blue). The red markers are geographical obstructions like mountains.
After rebooting I connected the rtl-sdr from my PoE enclosure project to test reception. I chose this sdr over the one in my SDR Enclosure/Upconverter since it is a R820T chip which is better than the E4000 in my SDR enclosure.
Here is the set up for the first reception tests. I have a powered usb hub between the C.H.I.P and rtl-sdr for this test to make sure that the sdr is getting enough power and the C.H.I.P doesn't crash.
The test was a massive success. I was actually able to pick up a few planes despite being indoors with a random piece of wire (vertical red wire in picture) as the antenna.
Since that worked so well (and I wanted my PoE setup back) I connected my upconverter enclosure with the upconverter turned off and place it in the window. I used the ADS-B antenna that I made a few years ago which consists of some RG-6 and appropriately cut-to-length copper wire to create a dipole. This antenna has terminals that allow me to connect random wire to it, it is not tuned and definitely not recommended for a permanent installation. You may also notice an FM trap in-line. This reduces interference from nearby FM station towers.
Here is a close up of the C.H.I.P and powered usb hub. I would like to add a 1S battery to the C.H.I.P and test a direct connection to the sdr.
With PiAware successfully running on my C.H.I.P, it is time to build an enclosure, appropriate antenna, and install this somewhere semi-permanent.
The system seems to perform well. I will report back once I am able to build a better antenna and track more planes. Here is the system information page output from my CHIPAware.
Now that I know the prototype is functional, it is time to start working on a more permanent configuration. FlightAware has made their own SDR dongle that has filtering to allow 1090MHz (ADS-B) but block other frequencies from interfering. By incorporating the filter into the dongle, they have been able to provide both at a low cost. I also purchased a short SMA cable with a panel mount on one end. This will be my antenna and connect directly to the FlightAware Pro SDR dongle.
There are several antenna designs that are appropriate for receiving ADS-B. What you want is something that can receive far away transmissions, but in all directions, this is called omni-directional. Antennas can be bought or built. I decided to build a "spider" antenna appropriately named because it looks like a spider. There are online calculators to help you appropriately size your antenna for what you are trying to do.
I cut some copper wire a little long so that I could trim it down to the 68mm specification after soldering.
Next I cut the threads off of the panel mount SMA connector so that I could solder to the center wire.
Then I soldered the wire to the corners. I was impatient and started testing with this before soldering on the other 4 wires. I'll do that later (maybe).
I tested the new parts by using zipties to attach the components to a wooden dowel. Wood is better than a metal dowel because the metal will interfere with the antenna.
It is a very small and compact setup with only power wires needed since the C.H.I.P connects to wifi.
PiAware includes a performance graph page that provides a lot of useful information. You can clearly see when I switched from the first to the second test setup. Note, this is still located indoors and my antenna is not finished. So I expect this to get even better.
You can see how this setup is doing right now by visiting my FlightAware stats page.
Flash C.H.I.P to the newest OS. I chose Debian 4.4 headless. Visit C.H.I.P's flasher website to install the chrome chip flasher plugin and follow the instructions.
Connect to C.H.I.P's console via usb. Try the different tty outputs from the first command until you find one that works. I used a linux computer (ubuntu) to connect to chip.
> clear & ls -t /dev/tty* | head -5 > screen /dev/<your tty goes here> 115200
Connect C.H.I.P to wifi.
> sudo nmcli device wifi connect '(your wifi network name/SSID)' password '(your wifi password)' ifname wlan0
Update C.H.I.P's network hostname. This is an optional step but might help you recognize the device on your network. Change "chip" to your hostname in the following files.
> sudo nano /etc/hostname > sudo nano /etc/hosts
Power off and connect to 5v power supply (not computer). Something that can supply 5V @ 1A+ comfortably. Use this command to restart or you can remove the "-r" to just shutdown.
> sudo shutdown -r now
OPTIONAL BUT RECOMMENDED: We are going to disable usb protection to prevent the C.H.I.P from crashing. This protection is only for upstream usb power source. Do not run C.H.I.P connected to a computer directly since it may damage it. Use a powered USB hub or other 1A+ 5v power source. The limit will reset after reboot. The next step shows how to make this setting stick.
> sudo axp209 --no-limit
The previous command removes usb current protection temporarily. Rebooting C.H.I.P will reset this. If you would like to keep the current protection disabled after reboot, run the following commands.
> sudo apt-get update > sudo apt-get upgrade > sudo systemctl enable no-limit
Install/update locales. I am in the US and had to perform these steps to prevent errors during the install. You can skip this step and come back if you encounter the en_US.utf-8 error. Just follow the outputs from the commands and select your locale when presented.
> sudo apt-get install locales > sudo dpkg-reconfigure locales
Update and Install dependencies
> sudo apt-get update > sudo apt-get upgrade > sudo apt-get install git build-essential debhelper tcl8.6-dev autoconf python3-dev python3-venv dh-systemd libz-dev libtecla-dev help2man pandoc doxygen cmake rtl-sdr -y
Lets go ahead and blacklist the sdr drivers. If the rtl_test command doesn't show a device after reboot then search google for black listing your sdr device.
> sudo nano /etc/modprobe.d/rtlsdr_blacklist.conf
Add the following lines to the rtlsdr_blacklist file. Use Ctrl+0 to save and Ctrl+w to write and exit (you will have to hit enter).
> blacklist dvbusbrtl28xxu > blacklist e4000 > blacklist rtl2832
Install (make) BladeRF. This will take some time to run.
> cd ~/ > git clone https://github.com/Nuand/bladeRF.git > cd bladeRF > sudo apt-get install libtecla-dev help2man pandoc doxygen cmake
Get your HeyWhatsThat.com site id by going to "New panorama" tab and following the instructions. This is optional, but it is nice to know what your range should be for your antenna location. The install script will ask you for this information in the next step so keep the page open.
Follow these commands to download and run the install script. This is the main installation step for PiAware. Up until now we were just prepping for this step.
> cd ~/ > git clone https://github.com/jprochazka/adsb-receiver.git > cd adsb-receiver > chmod +x install.sh > ./install.sh
For recommendations on what options to choose. Follow steps in this planefinder forum thread.
If you are ever afraid that you messed up beyond recovery, you can always start over at step one and re-flash your C.H.I.P.
I had errors when installing dump1090-fa from the automated script. If yours fails, try running these commands then re-running the install script (./install.sh). You may want to (or have to) remove the dump1090-fa folder from the adsb-receiver folder to get the install script re-run to re-download dump1090-fa.
> cd ~/ > wget http://flightaware.com/adsb/piaware/files/packages/pool/piaware/p/piaware-support/piaware-repository_3.5.1_all.deb > sudo dpkg -i piaware-repository_3.5.1_all.deb > sudo apt-get install dump1090-fa
After following the instructions and finishing the installation on the web interface, you may want to add distance circles to your webui map. You can do this by modifying the config.js file.
>sudo nano /usr/share/dump1090-fa/html/config.js
In the Site Settings section
Now hard refresh your webpage and the distance rings should appear.
Congrats. You should now have a fully functional CHIPAware system.