Categories
ADS-B SDR Tutorials

Getting Started With SDR (software defined radio): Tutorial

Introduction – what is SDR?

SDR stands for software defined radio. It is a term used to describe devices that can receive radio frequency signals over a wide range of frequencies. These devices most commonly interface with USB drives of computers / Raspberry Pi / similar. There are standalone-devices but they often cost quite a bit more than the USB devices. The best part about the base-level SDRs? They’re less than $50. I have a couple that I paid $18 for.

Video link to follow along – https://youtu.be/HUkaIJhoYUs

So you’re here on the “Getting Started with SDR” post. In this SDR tutorial post we’ll get a SDR plugged into your Windows computer, install drivers, and start sniffing for signals. We’ll try FM radio first since they have very powerful transmitters and there is almost certainly one you can receive at your hose, followed by checking for those wireless temperature sensors, and then some aircraft position signals.

What does a SDR look like? Below is a image with 3 I have around the house that I snagged for a picture (USB plug for size reference). Below the picture is the table of contents for the post.

picture showing 3 SDR devices - NooElec NESDR Nano 2, FlightAware ProStick, RTL-SDR Blog R820T2 RTL2832U V#
Example of a couple SDRs (all Realtek chipset-based, hence the RTL abbreviation)

SDR Tutorial Contents

  1. Purchasing a suitable SDR
  2. Plugging it into a Windows computer and installing drivers
  3. Installing SDR# (a program to monitor any and all frequencies)
  4. Listening to a FM radio station
  5. Installing rtl_433 and listening for wireless temperature sensors
  6. Installing dump1090 and listening for aircraft position signals

1 – Purchasing a suitable SDR

To get started, you’ll obviously need a RTL-SDR. I recommend the NooElec devices, specifically the NooElec NESDR Smart v5 bundle. NooElec devices have lasted the longest out of the 8 SDRs I’ve purchased and have been very useful for me. It includes 3 different antenna (433 MHz for sensors, 1090 MHz for ADS-B aircraft signals, and an adjustable antenna) which are useful for the rest of the tutorial:

With a SDR in hand, let’s get started!

2 – Installing drivers and plugging in the RTL-SDR

I use Windows 10 for this SDR tutorial, but I use Linux for the long-term monitoring I have in place around the house. Linux doesn’t ever automatically reboot for updates, and is generally much more stable (and doesn’t need a license). Windows is easy to get started so we’ll use it.

The instructions for installation are a bit long so I’ll just leave a link to the official source where they will always have the most up to date drivers and such – https://www.rtl-sdr.com/rtl-sdr-quick-start-guide/. I will re-write these at some point (and also make a video) but I’ll just leave the link for now.

3 – SDRSharp installation

If you followed the instructions in the link above, you should have a file called SDRSharp.exe in the folder you used:

SDRSharp.exe present in working directory

This means it is already “installed” since it is just a simple executable file. No need to click next, next, next finish to install.

4 – Listening to a FM radio station with your RTL-SDR

Go ahead and double-click on SDRSharp.exe and launch it! First thing you need to do is select the RTL-SDR USB option from the sources drop down menu:

Selecting the RTL-SDR USB source in SDRSharp

Next up, we need to crank the gain to get useful signal out of the SDR. Click the gear icon, make sure the RTL2832U device is selected, then set the RF gain slider to around 40dB, then click close:

Setting the RTL-SDR gain to 40.2 dB

Now we are ready to listen to FM radio!

Ensure the WFM radio button is selected in the signal type, set the zoom slider all the way down, set the step to 100 kHz, then click the frequency numbers up/down to pick a known FM station. This should get everything ready to go:

Setting SDRSharp for FM radio station reception

With all that setup out of the way, click the play button and watch the signals start streaming in! Assuming your speakers are set to a decent volume, you’ll hear the radio from your computer! From my 2nd story bedroom near Broomfield, CO, I can easily get 98.5 MHz and 99.5 MHz (and many others). You can also check the “FM Stereo” checkbox on the left side if you know you’ll be receiving FM stereo. Make sure you uncheck it if you start looking at other things:

SDRSharp FM radio reception for 98.5 Mhz (KYGO) and 99.5 MHz (KQMT)

Here is a picture showing my setup for writing this blog – a simple NooElec Nano SDR I bought in 2016, a little bit of cable, and a 1090 MHz antenna (which is clearly not ideal for FM radio frequencies, but radio is so powerful it doesn’t really matter). Also say hi to Fluffy the cat:

RTL-SDR set up for writing this blog post, with an appearance from Fluffy the black cat

5 – Installing rtl_433 and listening for wireless temperature/humidity sensors

Ok so now that we know radio works, let’s see what other radio frequency signals are traveling through the air. We will start by downloading the rtl_433 Windows release from GitHub. The latest version as of this post is here (https://github.com/winterrace/rtl_433_win/releases/download/v19.8.19/rtl_433_win_2019-08-19.zip). Unzip the .zip file. There should be two files inside, rtl_433.exe and rtlsdr.dll. I put these files on my desktop in a folder called rtl_433:

rtl_433.exe in a folder called rtl_433 on my desktop

Now open a command window, and change directory (cd) to Desktop/rtl_433.

C:\Users\Austin>cd Desktop\rtl_433

C:\Users\Austin\Desktop\rtl_433>

Ok now we’re in the rtl_433 directory so we can run commands now. The most basic command for this program is to run it and only specify the gain. We used 40 dB for the FM radio so let’s use 40 again by specifying it with the -g option (you can view all commands by running rtl_433 -h):

rtl_433 -g 40

The output will show the following (ending in “Tuned to 433.92 MHz”) if all went well:

Let it run for a couple minutes. You might see some thermometers and other such devices! Here is what my output looks like after about 60 seconds:

If you look closely, you can see there are three separate devices broadcasting on 433 MHz that I can pick up with my (still not desirable) 1090 MHz antenna! One is sitting in my garage, another is next to me in the bedroom, and I don’t actually know where the 3rd is or who owns it.

With the same, tiny USB RTL-SDR, we have picked up FM radio as well as temperature/humidity readings from three separate sensors!

6 – Installing dump1090 and listening for aircraft position (ADS-B) signals

Last up for this RTL-SDR tutorial is installing dump1090 and checking to see if we can pick up any aircraft signals.

Dump1090 is a utility written many years ago that decodes aircraft ADS-B position signals. Some brave souls ported it for use in Windows a while ago. Using the directions and links from https://sonicgoose.com/using-dump1090-in-windows/ I have distilled it down for you. Download the dump1090 windows package that I’ve rehosted here –

And then extract it to your desktop in a folder called dump1090.

There is a .bat file (batch file) in the folder, double-click it to run it:

dump1090 folder in Windows showing dump1090.bat highlighted

You will be presented with a screen that updates in realtime as signals come in. You are now receiving ADS-B signals with the same device that could listen to FM radio, and also temperature/humidity sensors around the house!

Windows dump1090 showing ADS-B data streaming in from the RTL-SDR

All this from a 1090 MHz antenna (which is actually finally the right frequency for the application at hand). Fluffy is still supervising:

1090 MHz antenna attached to RTL-SDR to pick up aircraft ADS-B signals. Cat is helping (and has not moved in 3 hours).

Conclusion

In this SDR tutorial, we have purchased a RTL-SDR, installed the drivers, plugged it in, listened to FM radio, checked for wireless temperature/humidity sensors and found 3, and listened for aircraft ADS-B signals (and found 15 aircraft broadcasting in the last screenshot). This is an addictive hobby. With the right antenna, you can hear people speaking and morse code coding from across the world. In my next post I’ll show how to implement some of these into automated programs to take the data and input it into Home Assistant and other databases.

One last thing – receiving RF signals is 98% about the antenna and 2% about what you’re receiving the signals with! The base antennas that come with RTL-SDRs are good for the basics but if you really want to get into receiving interesting/distant signals, be prepared to spend 2-3x the cost of a SDR on a single antenna.

Hope you learned something and enjoyed this tutorial!

Categories
ADS-B SDR

Receiving aircraft ADS-B (position) signals – part 4 (antenna up on roof)

Antenna up on roof

Coming from part 3, where I wanted to move the antenna, I finally got the antenna up on the roof. Our chimney was decommissioned by the previous owners and as far as I can tell, there isn’t brick under the siding (also why does our chimney have siding on it). So it is sitting a little lower than it should be but it is basically at the highest position of the roof. This has dramatically increased the ability to receive aircraft ADS-B signals.

Results

The results are pretty amazing. We’ve had bad weather for a week now but it’s going to be a clear day today. As of 9:12AM, my Raspberry Pi PiAware ADS-B signal receiver sees 116 aircraft, of which 103 are reporting positions. It is receiving 607 messages per second. The map looks like this:

116 aircraft signals received, 103 with position. farthest out is 190 NM.

You can see aircraft lining up to arrive into KDEN spaced out at regular intervals. It’s also picking up 3 planes on the ground at KBJC which is the closest airport to the antenna.

FlightAware has a cool radar type map that shows positions by compass direction and distance. The numbers speak for themselves.

Before

Max distance reported is in the 100-150 nm bucket (327 total reports)

After

That same 100-150 nm bucket now has 24k reports

Interesting features

While typing this post, the position count increased to 118. There are some interesting features I’m seeing – a survey plane over the Breckenridge area, a lot of planes on the ground at KBJC (not line of sight to my antenna), and even plane on the ground at KDEN (KDEN is definitely not line of sight to my antenna).

Survey grid being flown by N94S

Planes on the ground at KBJC

I see 4 Cessna/trainer type planes waiting for takeoff for 30R at KBJC. I’m even picking up a corporte jet type aircraft on the ground by the hangars (N4840W). None of this is line of sight to my antenna. There’s a chance the ADS-B signals are bouncing off buildings or something. I shouldn’t be seeing these.

The elevation profile to 30R at KBJC. Antenna on left, run up area on the right. Barely not LOS (line of sight).

Plane on the ground at KDEN

United UAL364 / N802UA (an Airbus A319) on the ground on runway 16L/34R heading south
Elevation profile to south end of 16L/34R at KDEN. Antenna on left, 16L/34R on right. Definitely not LOS. No idea how I’m picking up these signals. I see a plane on the ground at KDEN multiple times a day since moving the antenna.

151 planes!

I started this post around 9am on 4/18. Just before noon, there were 151 planes being tracked by my PiAware station! 773 messages per second. Notice that plane way out there over west central Nebraska – that’s probably 210 NM out!

Conclusion

Moving my FlightAware ADS-B antenna to the roof drastically increased the range and messages received. As a reminder from when I detailed the equipment in Post 2 – the antenna feeds a 1090MHz ADS-B filter, which in turn feeds the FlightAware Pro Stick. I don’t think I’ll make any other changes to the system other than put it on a battery with solar charger.

Categories
ADS-B

Receiving aircraft ADS-B (position) signals – part 3 (antenna reposition)

Welcome back from Receiving aircraft ADS-B (position) signals – part 2!

Yesterday I moved the antenna up a couple feet from a “very temporary” position to a “less temporary” position. I still need to get it up on the roof. Either way, my reception and max range have increased by at least 20%. It is still in my garage, which is a terrible location, but at least is elevated.

New antenna placement

ADS-B antenna in garage
ADS-B antenna in garage (we need a shed for all that gardening stuff)

The antenna needs to be vertical for maximum reception and upside down works just as well as right side up!

New antenna placement results

I saw up to 82 aircraft being tracked this morning. You can see the big planes lining up for southerly landings at KDEN on three separate runways and a few planes taking off to the southeast.

piaware updated antenna KDEN focus
PiAware updated antenna KDEN focus

Here is a screenshot zoomed out. I’ve got quite a few position reports from >100 nm out.

piaware ADS-B zoomed out KDENProposed final placement of the FlightAware ADS-B antenna

Proposed placement of ADS-B antenna on chimney
Proposed placement of ADS-B antenna on chimney (1 is where it currently is inside the garage and 2 is desired final placement)

I have a new weather station coming this weekend so I’ll try to combine roof trips to install the weather station and the 1090 MHz Flightaware antenna at the same time. I’ll also need to drill a hole in the side of the house to run the cable. Or maybe I do it all solar powered and use WiFi ?? I also have a 25W solar panel arriving this weekend. Keeping it physically isolated from the house would eliminate some lightning risk. Decisions, decisions. Be on the lookout for a part 4 with the results from the new roof placement! Part 4 – moving the antenna to the roof, has produced great results! I’m now seeing 150+ planes at once and getting over 700 messages per second.

Categories
ADS-B SDR

Receiving aircraft ADS-B (position) signals – part 2

Welcome back from part one (Receiving aircraft ADS-B (position) signals)! Now that you have all the required equipment – what do you need to do to set it up? Thankfully, the folks over at FlightAware have made this super easy. FlightAware provides a flight tracking platform that is mostly fed by users like me (and soon to be you!). In return for feeding them data, they will give you a free enterprise subscription, which is normally $89/month. It adds a lot of tracking abilities which are great for aviation nerds like myself. To get the most data possible, they have put together some great getting started guides, which I will link here – https://flightaware.com/adsb/piaware/build. The short version is:

  1. Write the Piaware operating system to your SD card
  2. Either enable WiFi or plug into your router
  3. Plug everything in
  4. Claim your station on FlightAware.com after a few minutes
  5. Watch the data start flowing!

Here is a picture of the most basic setup possible:

Simple ADS-B receiver setup with RTL-SDR and 1090 MHz antenna
Simple ADS-B receiver setup with RTL-SDR and 1090 MHz antenna

To really increase your reception, there are three things you need to do (but before you proceed, I must warn you – this becomes addictive):

  1. Get a bigger/better antenna. Antennas are measured by something called “gain”. The more gain, the better (generally speaking). More gain means the same signal is received stronger and with more clarity.
  2. Reduce the other noise. A bigger antenna will amplify all signals in the same frequency range. ADS-B is on a very specific frequency (1090 MHz). An ADS-B filter reduces the signal at frequencies other than 1090 MHz.
  3. Amplify the filtered signal. With the other signals filtered out, amplify what remains (legit 1090 MHz ADS-B signals).

This is what my full setup looks like:

Full ADS-B setup with 1090 MHz antenna, 1090 MHz filter, and Flightaware pro stick
Full ADS-B setup with 1090 MHz antenna, 1090 MHz filter, and Flightaware Pro stick

FlightAware started producing each of these a couple years ago (again, sticking with the theme of making it easy to provide them data). Originally, each was a separate item. Now the amplifier and filter are built into the same device on the FlightAware Pro Stick Plus. The antenna will remain separate. These upgrades together will cost around $80-90. I’ve provided some Amazon links below to check the current prices:

I like to keep the filter and receiver separate so if something goes wrong with either I can keep sending signals. As a side note, I am up to 735 days feeding FlightAware without interruption (two years and two days)!

flightaware connected for 735 days straight
flightaware connected for 735 days straight

The antenna is currently hanging in my garage which isn’t ideal but I still get signals from 100+ miles away consistently. I messed with a bunch of DIY antennas that I’ll post one day but settled on the FlightAware stuff because it works so well. I have the full setup of FlightAware antenna feeding the 1090 MHz SMA filter into the Pro Stick. When I lived in California this yielded 100-200 planes on busy days up to 200 miles away. This stuff is good fun, and as I warned above, it gets addictive. There is a physical limit though to how far you can receive signals, and that limit is around 250 miles for planes at 40,000 ft due to the curvature of the earth. Planes flying lower will fall off at closer distances.

Repositioning the antenna

I moved the antenna up a bit and am getting 20% more messages per second and distance – take a look here at Receiving aircraft ADS-B (position) signals – part 3 (antenna reposition)

Please let me know in the comments what you want to see about my setup! I will get around to making YouTube videos eventually to post because I know a lot of people like videos more than text but I want to do the text stuff first to get my thoughts together.

Austin’s Nerdy Things is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to amazon.com.

Categories
ADS-B SDR

Receiving aircraft ADS-B (position) signals

If you came from the SDR (software defined radio) introduction post, you already have an idea of what these devices can do. If you came from somewhere else and want a brief introduction, head on over to SDRs (or how I pull radio signals out of the air).

The SDR topic that provides me the most entertainment is picking up aircraft ADS-B (Automatic Dependent Surveillance-Broadcast) position signals. As of 2020, all civilian aircraft in the United States are required to transmit their position continuously. I am not sure of the specifics but they are transmitted at least once per second, sometimes more with different messages. The idea is if every aircraft has both a ADS-B transmitter and receiver, there will be less crashes because the position of every nearby aircraft is known. There is also a Federal Aviation Administration (FAA) component where they will be able to better direct aircraft in the national airspace.

What this means for those of us here on the ground is we can be constantly receiving position data from planes flying in the air above us, or taxiing around airports around us.

Below is a screenshot of what the Denver airspace looks like during a typical Tuesday evening:

aircraft positions around enver
ADS-B positions on a Tuesday evening

There are 33 aircraft with data being received by my stations in the above screenshot, of which 25 are showing a location. Green colors are low altitude, blues are medium, and purple is high altitude. The farthest plane away from my house (station) is 100.9 nautical miles away, or 115 “normal” miles away. The highest altitude is actually being shared by two planes: N499RK and ICAO identifier A66618, both of which are business jets, at 45,000 ft. The lowest plane is N735CF at 6,700 ft, which is a training aircraft doing pattern work (repeated take offs and landings) at KBJC.

It is pretty straight-forward to get this data, assuming you have the right equipment. Most people get started with a Raspberry Pi. If you already have one, great! It is super easy to flash the SD card with Piaware, plug in your SDR, attach the antenna and start watching the positions stream in.

If you don’t have a Raspberry Pi, they’re pretty reasonably priced. The Raspberry Pi 4 is the newest version. Any size memory will work. Raspberry Pi 3 will also work! If you want some information on getting started with a Raspberry Pi, check out my Getting Started with a Raspberry Pi YouTube video.

The most basic setup will run you about $110 to get started. This includes a Raspberry Pi 3B+ starter kit (with SD card and everything needed to run the Pi) as well as a RTL-SDR with a basic antenna. You can check the current prices here on Amazon:

CanaKit Raspberry Pi 3 B+ Starter Kit (32 GB EVO+ Edition)

Nooelec NESDR Mini USB RTL-SDR RTL2832U & R820T Tuner for ADS-B

These are the exact items I used to get started and they’re still up and running. I repurposed the Nooelec SDR for around the house stuff because I got a different SDR for ADS-B reception. As I was testing these links, Amazon kindly reminded me how long ago I got into this hobby – more than five years ago!

nooelec RTL-SDR purchased from Amazon in 2016
nooelec RTL-SDR purchased from Amazon in 2016

This post got long quick so I’ll stop here for now. The two links are enough for everything you need to get started. I’ll continue with a part two for how to set everything up, as well as upgrades to increase reception.

Continued at Receiving aircraft ADS-B (position) signals – part 2!

Austin’s Nerdy Things is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to amazon.com.