Author Topic: Raspberry pi + RTL-SDR setup  (Read 75998 times)

Offline kevinbentley

  • Newbie
  • *
  • Posts: 4
Raspberry pi + RTL-SDR setup
« on: September 16, 2013, 09:52:23 AM »
After a lot of work, I've got a pretty good raspberry pi setup working with a $20 RTL-SDR dongle.

I've been testing this at home with a rooftop antenna to a private icecast2 server and I'm getting pretty good results, so I'm moving it to our club hangar at KMAN later this week. Then once I'm happy with the antenna situation I'll move turn off the scanner feed that I'm using for KMAN and use this.


Here's a picture of the insides. It's all powered by a single ethernet line, which has a power injector that goes inside, followed by a lightning arrestor that hopefully will protect the indoor equipment if the enclosure is struck. On the inside of the enclosure, 5 volts is grabbed from the power over ethernet splitter and used to power the pi. The DRL-SDR dongle plugs in to USB and has an antenna connector that is routed outside.

I'm running a modified version of rtl_fm that I made that has a built in audio AGC and squelch. It demodulates the audio and pipes that directly to the ices2 app, which streams to an icecast2 server. It only uses about 15% of the CPU time.



This is the external enclosure with the cheap RTL-SDR antenna. I'll likely switch to a 8db gain VHF antenna, but I wanted to try this first.


The pi itself has a 5 megapixel camera, which I'm grabbing stills from every 15 seconds, downloading and overlaying the METAR, and uploading to a webserver. This is just a sample capture out my window last night.


Once this is running I'm going to work on a custom app based on rtl_fm that supports 2 SDR dongles at once. Then it will use the squelch code to combine a UHF and VHF feed into one stream, so you can get ATC audio from both frequencies on a single stream.

The total cost for this setup is about $200! No scanner or audio ports are needed.



Offline Squawk 7700

  • Hero Member
  • *****
  • Posts: 513
    • Squawk 7700 on Flickr
Re: Raspberry pi + RTL-SDR setup
« Reply #1 on: September 16, 2013, 10:50:51 AM »
Amazing job Kevin! Looking forward to hearing the feed with the new setup.
This is something I like to try out.  :-)
Feeder:
KHWD Ground/Tower
KOAK Del/Gnd/Twr
KSFO NORCAL App Rwy 28L/R
KSFO Tower/Ground
NORCAL Approach (KOAK)
NORCAL Departure (KSFO/KOAK)
KSJC NORCAL Apr#2
ZOA Oakland Center (35/40/41)
RJTT App/Dep
RJTT Tokyo Control
RJTT Twr/TCA + Ground

Offline dave

  • Site Founder
  • Administrator
  • Hero Member
  • *****
  • Posts: 4214
    • LiveATC.net
Re: Raspberry pi + RTL-SDR setup
« Reply #2 on: September 17, 2013, 02:25:03 PM »
Nice work, Kevin!  Been playing around a bit with rtl_fm and some dongles as well.  Good for some receiver locations but not so good for others.  Either way it seems a good front-end filter is needed.

Would like to check out your modified version as well, if you would like some more test sites.

Dave

Offline InterpreDemon

  • Hero Member
  • *****
  • Posts: 514
Re: Raspberry pi + RTL-SDR setup
« Reply #3 on: September 17, 2013, 02:29:32 PM »
THAT is a really slick setup.

And the best thing is that when the burglars spray black paint over the window it will still keep running!
Feed Purveyor:
KJFK ARINC
KHPN ATIS
(KJFK) NY DEP Liberty East
HF CAR-A  3455/5550/6577/8846/11396
HF ARINC LDOC  6640/8933
HF NY VOLMET  6604

Complaints should be addressed to: City Hall


Offline gavron

  • Newbie
  • *
  • Posts: 4
Re: Raspberry pi + RTL-SDR setup
« Reply #5 on: September 22, 2013, 07:16:16 PM »
This is really impressive!  beats the heck out of my setup (KTUS2, BC780XLT+Eeeepc).  I would love to use a PI and an SDR... but all my time is spent flying :)

Could I buy one from you?  If not-in-violation-of-forum-rules, please pm me :)

Ehud
Tucson AZ

Offline salanki

  • Newbie
  • *
  • Posts: 1
Re: Raspberry pi + RTL-SDR setup
« Reply #6 on: October 01, 2013, 07:11:41 PM »
Very very nice! Are you running it live yet? It would be great if you would post a full parts list (which RTL-SDR, the PoE stuff) and of course a github with your rtl_fm patches!

Offline Drift

  • Newbie
  • *
  • Posts: 22
Re: Raspberry pi + RTL-SDR setup
« Reply #7 on: October 02, 2013, 11:40:40 PM »
Hi mate,

Great setup! Thats exactly the kind of thing I'm hoping to achive. I'd love to get rid of my radioshack scanner+laptop combo.
My laptop also runs a MicroADSB dongle with virtualradar/adsbscope, I'd love to use a rPi to run both the ADSB & LiveATC feed.

Does your rtl_fm scan through programmed ATC freqs or just a single freq?

Cheers
YPAD Adelaide, Australia Feeder - http://www.liveatc.net/search/?icao=ypad

Offline kevinbentley

  • Newbie
  • *
  • Posts: 4
Re: Raspberry pi + RTL-SDR setup
« Reply #8 on: October 06, 2013, 09:02:35 PM »
For what it's worth, the cheapy antenna I tried didn't work well at all. A real VHF antenna is needed to get a good signal.

I'm trying to get my rtl_sdr changes accepted into the rtl_sdr tree, if I cannot do that in the near future I'll setup my own git repository. If you want a copy in the meantime, email me at kevin.bentley@gmail.com

Here are the parts I used:

POE Injector: http://amzn.com/B007REH0DW
Antenna (not the best but fits on top of the enclosure):http://amzn.com/B000FCP1NO
Enclosure: http://amzn.com/B002L16NUC
Ethernet lightning protector (not sure this will really help, but it's worth a try): http://amzn.com/B00805VUD8
POE Splitter: http://amzn.com/B007REH0DM

Also, some misc cabling and connectors to run power to the pi from the splitter, and some RF connectors to match the antenna to the rtl_sdr.

Offline kevinbentley

  • Newbie
  • *
  • Posts: 4
Re: Raspberry pi + RTL-SDR setup
« Reply #9 on: October 06, 2013, 09:04:36 PM »
Does your rtl_fm scan through programmed ATC freqs or just a single freq?

I haven't tested that mode yet, but it should work well. The improved squelch that uses the AGC will make the channel scanning work very well. I'll add that to the list of things to test (there is only one frequency in use at my home airport, I guess I could try using the ASOS as another frequency).

Offline InterpreDemon

  • Hero Member
  • *****
  • Posts: 514
Re: Raspberry pi + RTL-SDR setup
« Reply #10 on: October 06, 2013, 10:05:03 PM »
IMHO, a better antenna for that camera enclosure can be found here:

http://www.wingsandwheels.com/antenna_vhf_airband_gps_mobile_e.htm

Scroll down to the "Larsen 1/4 wave kit"

Same hardware as used on cop cars, longer whip. You'll want to trim the whip to 23"

That Tram marine antenna you are using is a 1/2 wave design (at 160 mHz) intended for use at the top of a sail boat mast or superstructure, and at sea almost anything will get you line of sight anyway. In your band (118-136) that antenna is probably not much more effective than a straightened out coat hanger, in fact probably less so if you cut the coat hanger to 23"  :wink:
Feed Purveyor:
KJFK ARINC
KHPN ATIS
(KJFK) NY DEP Liberty East
HF CAR-A  3455/5550/6577/8846/11396
HF ARINC LDOC  6640/8933
HF NY VOLMET  6604

Complaints should be addressed to: City Hall

Offline kevinbentley

  • Newbie
  • *
  • Posts: 4
Re: Raspberry pi + RTL-SDR setup
« Reply #11 on: October 07, 2013, 06:17:05 PM »
I understand what you are saying about the antenna, my issue is I don't have very good options for mounting the camera besides a position slightly below the roofline of a metal hangar. My thought was to get an antenna tall enough to clear the roofline. I really wanted to mount the antenna on top of the enclosure, but maybe I should just bite the bullet and place the camera on a pole and use the antenna you recommended. Thanks for the suggestions!

Kevin

Offline InterpreDemon

  • Hero Member
  • *****
  • Posts: 514
Re: Raspberry pi + RTL-SDR setup
« Reply #12 on: October 07, 2013, 11:09:11 PM »
Kevin - If it's a steel building and you are mounting the camera close to the roof line, I would just put a 1/4 wave whip (23 in) on a mobile magnet mount and throw it up on the roof a couple feet from the edge. That would would be the best by far.
Feed Purveyor:
KJFK ARINC
KHPN ATIS
(KJFK) NY DEP Liberty East
HF CAR-A  3455/5550/6577/8846/11396
HF ARINC LDOC  6640/8933
HF NY VOLMET  6604

Complaints should be addressed to: City Hall