Posts tagged with “RTL-SDR”

Antennas on the Roof

I have been into electronics my whole life, and radio most of it. I got my amateur radio license early in my 20s, and while I haven't been super active on the communication side of things, I do try and keep up with the technology. Sometime in the early 2010s, when it was discovered that cheap USB digital TV receivers could be used as wide band software defined radios, I dug hard into that. Listening in on ham bands, commercial and public safety traffic, pulling down weather satellite images, and decoding aircraft transponders, among other things.

I have always been into GPS as well, but only recently did I really dig into it for anything other than positioning. I knew that GPS-disciplined clocks existed, but always assumed that they were well beyond my scope.

Receiving and decoding aircraft transponder signals, ADS-B/MLAT has long since been one of my favorite applications of these USB SDRs due to its intersection of radios, aircraft, and GIS. The data coming out of ADS-B systems is very useful for working with real time GIS systems, but realistically, it's just plain cool.

The trick is that ADS-B transmits at 1090MHz, high enough frequency to get disrupted by pretty much anything - structures, trees, roofs, etc. On top of that, the signals broadcast from the aircraft aren't particularly powerful, so you really want a high gain antenna and a wide-band filter to cut out as much as you can. Thankfully, both of these things are generally available and neither are particularly expensive. The tricky part, as it figures, is getting the antenna up in the air.

In college, when I first got into this, I had lots of space and the airwaves were fairly quiet (rural area) so it worked well. The next place we lived I hung an antenna in the attic, and the performance was pretty rough - the place after that was the same. The apartment we lived in after that, we had a balcony on the third floor, so while it worked well, everything behind the antenna, or about 200º worth of azimuth, was entirely masked by the rest of the building.

Where we are now is pretty RF-quiet, and we have a house that's well suited for putting an antenna mast up, about 30ft off the ground. Not incredibly high, but high enough to get over the built environment and get a full sweep of coverage. So all there is to do is rig it up. Only putting up an ADS-B antenna would be a waste of a mast, though, so it's a good thing that over the past couple of years I've picked up GPS timekeeping as a hobby.

Most of the time, a decent GPS puck antenna hanging off a modern sensitive receiver will work just fine sitting on a windowsill. This is what I recommend for folks interested in running a TimeHat out of their home. I wanted to scale up from that for my own setup for a few reasons. First is simply because I have the means to - I already have a few high-gain reference/timing antennas with brackets, and I'm putting up the mast anyway - adding two reference antennas isn't going to cause any problems. Second, I want to use a few older receivers that really need a high gain signal: Trimble Thunderbolt and Copernicus II, True Position GPSDO, some older hopf gear, etc. All are capable and suitable pieces of equipment, but they are limited to 8 or 12 channels, GPS only, so a puck antenna in a windowsill often is only going to cut it for a few hours a day. Finally, I want to run these antennas into four or six way splitters, so I want as much gain coming out as possible.

mast setup

This is the completed setup. The only component I didn't already have was the standoff bracket for the ADS-B antenna. One reference antenna is directly on top of the mast, and the other is offset slightly just beneath it. This isn't a completely optimal situation, because the GPS antennas could possibly mask each other slightly, but this is really a non-issue. The issue is getting it up on the roof.

mast ground

I had that mast assembled and parked in the basement for a few months before putting it up. A combination of factors held up that step - timing, weather, and, of course, the actual "how" of getting the thing hauled up 30ft and mounted to the side of the house. In the photo above, all that is shown is the top of the mast. The mast itself is a six foot long piece of half inch steel tube, and on the bottom and about four feet up are two brackets that stand it off about six inches from the side of the house. The top bracket attaches to the peak of the roof, and the bottom one attaches to the top of the window frame.

I eventually decided on the tried and true fiberglass extension ladder for my method of going up. I looked into hiring help or renting a lift or something, but those options were prohibitively expensive. Renting a 32 foot ladder from home depot was only about $50, plus about $40 to buy a ladder stabilizer to offset it sufficiently from the side of the house, and of course provide some additional stability for me.

car ladder

Frankly one of the most difficult parts of the whole process was standing the ladder up against the side of the house. Between my wife and myself we managed, but it wasn't quick and easy. The ladder with the stabilizer was probably only about 70-80lbs, but when that's a 30-some foot lever swinging around in the air, things get interesting.

I didn't get any pictures of the mounting process when I was up there, but there's really not a whole lot to say. I wasn't entirely certain how I was going to actually get the mast up there with me. Initially I suppose I figured that I was going to carry it up with me, but after the first time going up the ladder it was clear that wasn't going to be a realistic option, simply due to the fact that it was too heavy and the mounting brackets would get caught on the rungs of the ladder. What I settled on, much more reasonably, was dropping a rope over the ladder stabilizer, tying it off on the mast (at the bottom and top, so it would come up straight), then climbing up to the top and pulling it up. There I could relatively easily brace it into position and drive in the lag bolts.

house ladder

There are three coaxial cables coming off, one GPS antenna is running down the front roof edge where it then drops down along the street power conduit, then pops into the basement, feeding the GPS receivers on the rack. The other GPS and ADS-B lines run into the eave vent and then drop through the ceiling right there into my office.

There's also a heavy bare copper wire (6ga, I think) clamped to the mast, running down the same path as the line going to the basement. Rather than going to the basement it's terminated as a proper grounding stake underneath our power meter.

house mast (Yes, I know a few siding shingles are missing up there, it's not a big deal.)

So, how does this setup perform? Well, it performs great. Satellite coverage for both antennas is incredible - there's a hole over the north pole, of course, but now that the antennas are up over the roof line there is great visibility to the south.

gpsd stats

ADS-B varies, of course, given the number of aircraft currently in the air. Coverage is impressive, however, most of Maine excluding the Portland area, and well into New Brunswick. The greatest range that I've seen so far has been about 200 miles, to an airliner at about 40,000ft over the Atlantic, off the coast of Massachusetts.

adsb stats

ADS-B and PiAware

I have run some form of an RTL-SDR based ADS-B receiver every since I first learned it was possible back in college. The idea of using a cheap ($10-20) USB radio to pick up aircraft transponder signals, and then use some open source software to decode and visualize it was beyond cool. A few years ago flightware came out with a program called "PiAware" where if you used their software (a combination of raspbian and dump1090 plus some of their own customizations) you could feed your data into their system to help augment their data, and in the process you got a free premium account.

I never used this because 1) I wasn't interested in a premium account, and 2) I ran my own customized version of dump1090 and didn't want to lose out on my sweet added features. Additionally, even though I know that the software can be run on any linux system, I had always felt that the Raspberry Pi was under-powered and not stable enough to run like this for an extended period of time. About a week ago, I decided to revisit the matter, mostly because of the premium account.

I've been doing a lot of testing with my company's real time & big data spatial processing tool, GeoEvent Server and I was under the impression that the premium account would give me an API key to access their feed. Turns out I was wrong, that has to be paid for separately regardless, but I decided to follow through with setting up PiAware anyway. I have an Raspberry Pi B 3 floating around doing nothing in particular, and I figured it should be beefy enough to handle the task at hand.

(picture of setup here)

My setup is simple but works well, it has been running for just a few days now. My number one question, as it always is with deployed RPis, is how well the SD card will hold up. I'm using a 32GB SanDisk Class 1 card, but you never know. My antenna is the official FlightAware branded ADS-B antenna, a dark green plastic tube about 2ft long with an N-connector on the bottom. I have it mounted on top of a tripod standing up in the attic. 20ft of low-loss coax connect it to the receiver - first to a band pass filter that kicks out FM and all the other RF noise, then to the FlightAware Pro radio itself - this is a standard RTL-SDR with a tuner and amplifier somehow "tuned" to 1090MHz. There is a "Pro Plus" version of this receiver now that has the band pass filter integrated, and I would very much like to see how it compares. The last piece is the Pi itself, the only other thing connected to it is a CanaKit 2.5amp PSU - it's hanging off the network via WiFi, also a test.

Performance has been good, the software barely taxes the resources of the machine, and it hasn't had any issues holding up to the network. Their updated version of dump1090 has a number of features that I had added to my own, so I have no qualms with using it now. It also still has the always-updated JSON endpoint with aircraft information which can be readily ingested into GeoEvent Server - more on that later!

Despite being mounted in an attic, surrounded by trees, the coverage is quite good. I find that 7am-1pm tends to be the busiest time.