Software Defined Radio — Installing the NooElec NESDR Mini 2 for Linux

Motivation

I will take the opportunity now to stop and review where I am with the Satellite Tracking project that my older son and I started several years ago. In 2009 we recorded several passes of a now decommissioned amateur radio satellite named HAMSAT (VO-52). With attention to the timing accuracy of the recording, I was able to estimate slant range from the receiver to the satellite as a function of time using a simple Doppler Shift model. I have then recently developed a Python script to estimate the actual location (eg. latitude/longitude of the ground track, altitude, and azimuth/elevation) of the satellite given the range/time data from three ground stations of known latitude and longitude.

The project now has some momentum in the direction of a real test sometime in the future raising the question of what radio receivers I should consider. My son has suggested the use of Software Defined Radio, a concept I like very much because it is in line with one of the unstated goals of most of my projects to do as much as you can with as little financial cost as possible. A month or so ago he mentioned Gnu Radio and a hardware device known generically as a DVB-T Dongle based on a Realtek RTL2832U circuit. The interface between GNU Radio and the dongle uses the RTL_SDR codebase as discussed at http://www.rtl-sdr.com/rtl-sdr-quick-start-guide/ and http://sdr.osmocom.org/trac/wiki/rtl-sdr. I invested $25 to see if I could make it work. It is not a plug and play device and it does take a little work to get it operating so I am documenting what I had to do as a blog post here.

Acquiring and installing the NooElec NESDR Mini 2

While there are a lot of DVB-T dongles available, I purchased the NooElect NESDR Mini 2  on Amazon plus a PL-259 pigtail for it. Dongles from some suppliers take a long time to ship and defective devices are reportedly common.

P1030079

 

I am programming this project in Python and decided that the best platform for the project was Linux so I installed the radio on a Dell Vostro notebook with 2 GB RAM and a 2 GHz Intel core duo processor running a brand new installation of XUbuntu 14.04 LTS. After reading several websites it looked like most pointed to osmocomSDR. There is a lot of information there. I have extracted only what I did to get up and running. My inexperience with Linux will become evident.

I downloaded the software as a package release as described on the website and extracted the archive. I tried to build the software following the instructions at osmocomSDR but the build threw several dependency  errors. Save yourself some time and install these before you start.

Here is the build sequence using cmake:

cd rtl-sdr/
mkdir build
cd build
cmake ../
make
sudo make install
sudo ldconfig

cmake was not installed so I did a

sudo apt-get install cmake

and tried again. This time the error was that the libusb1.0 library was not installed. The osmocomSDR website very explicitly says this is required. In my previous experience with Linux I have used the synaptic package manager to download things like this but it is no longer installed by default. Most of this stuff could have been install from that…I have installed it now, after the fact. I downloaded the build package for libusb1.0 from SourceForge and extracted it. It threw an error in the configure step that libudev was not installed. I installed it from the Ubuntu Software center.

After that the build as described on osmocomSDR went smoothly to completion.

The installed codebase has several command line programs so I ran the first one described on the website

rtl_fm -f 96.3e6 -M wbfm -s 200000 -r 48000 – | aplay -r 48k -f S16_LE

I was greeted by the gentle hiss of a radio that was tuned to dead air. I exited and edited the command to

rtl_fm -f 95.3e6 -M wbfm -s 200000 -r 48000 – | aplay -r 48k -f S16_LE

our local FM station. This time I was greeted by the local high school girls basketball game at the some kind of state championship or something. I must admit that I was never so happy to hear a basketball game as I was this one.

Then I installed a SDR called GQRX from the Ubuntu Software Center. After fooling with the controls (mainly the receiver gain which is set to automatic by default) I got it working too…the blue LED in the lower right is the dongle.  Shown here tuned to a nearby repeater for our regional NPR station.

 

P1030077

Finally, I downloaded Gnu Radio from the Ubuntu Software Center and prepare to build the rtl_sdr source block for it.  I ran the Gnu Radio Companion first though and was surprised to find the Osmocom rtl_sdr block already there.  I had installed Gnu Radio on another identical install of XUbuntu and there were no sources shown.

Here is a screen shot of Gnu Radio Companion ready to build a radio based on the rtl_sdr dongle.  I will describe that too once I figure out how to do it.

rtl_sdr_gr_block

 

 

A New Page — Passive Tracking of Satellites using only Range Data

QB50P1GrndTrk-Run2

I have added a new page to the Earth orbiting satellites section of Murmurs from the Earth…Whispers from the Sky.  Passive Tracking of Satellites using only Range Data continues the project started several years ago to study the Doppler shift of satellite radio beacons.  The page describes a method to determine the ground track and other information about the position of a satellite as it passes over three ground stations recording the satellite radio beacon.

While I am certain that this has been done in the past and replaced with other techniques, I developed the method and Python scripts from scratch, to the extent that is possible…obviously I scavenged code and ideas from wherever I could to make a lot of the cranks that needed to turn.  I used a  very simple geometric approach.

Lacking actual data I generated four artificial and hence, internally consistent data sets using the PREDICT pass prediction software that provide the range input data and the location check data.  I was quite pleased with the initial results.

M7.3 – 67km WSW of Jiquilillo, Nicaragua

jMBGOHNic10142014

A Major earthquake, Magnitude 7.3, occurred of the coast of Nicaragua at 03:51:35 2014 October 14 UTC.  The image above shows the trace from my seismograph in the Event mode of the latest version of jAmaSeis.  The distance is computed by dragging the trace around to get the best fit to the travel time curves.  I usually cheat a little by selecting the portion of the trace starting at the actual time of the event.

New Page — Lehman Seismograph Construction Notes

I have added a new page under Seismology/Lehman Seismograph section in response to occasional questions about the construction details of my Lehman seismograph.  I have included some rough dimensions and general layout but in my experience following them exactly is not necessary.  A quick scan of the web based collection of Lehman projects shows an amazing array of designs which apparently work.  The Lehman concept is very forgiving, at least within broad constraints.

I have tried to answer questions I have already received and will add additional material if new questions arise.

M3.5 – 4km ESE of Nelsonville, Ohio

20Nov2013_Ohio

I received an email notification this afternoon that a Magnitude 3.5 earthquake occurred east southeast of Nelsonville, Ohio just before 1:00 pm local time.  My heligraph has been very noisy so I couldn’t really see any signal even though the epicenter was only 79 miles south of Millersburg where I am located.  When I zoomed in on the trace though I could see an excursion at about the right time.  Just to be sure I checked a nearby helicorder located at Kent State University Branch campus in New Philadelphia, one of the OhioSeis network stations.  It showed the first arrival at about 20 seconds past 18:00 UTC, the same as mine. There were 373 felt reports by mid afternoon mostly in southeastern Ohio..

 

Postscript (April 27, 2014) :

In an email exchange with another amateur seismologist, he had included a link to additional information on using the AmaSeis software.  As I read some of the entries I found an article on analyzing local events so I applied it to this event in Nelsonville, only 79 miles south of my seismograph.  One of the characteristics of local earthquakes is that they have a higher frequency content than more distant teleseismic events. These can be extracted by using a high pass filter on the signal.  Following the lead of the article, I applied a 1.2 second high-pass filter twice to the Nelsonville signal with the results shown below.  Impressive!

nelsonviller_Nov2013revisit1

Earthquake Activity, May 23-24, 2013

Several strong earthquakes registered on my seismograph in northeastern Ohio during the past 24 hours or so.  Because our internet was down during that time, the “Live Seismograph” was not working.  For readers who watch these things, I thought I would do a brief summary of the activity.

seismograph_23-24may2013

May 23-24, 2013 Helicorder Display

The Magnitude 8.3 earthquake, which occurred at 05:44:49 UTC, in the Sea of Okhotsk dominates the helicorder display. Ordinarily the great depth of the focus, 601 km, would generate relatively small surface waves but the large magnitude cause those phase to still dominate my display.   Note that the travel time curves below automatically scale the trace in a way that the amplitude cannot be compared between them.

Okhotsk82_24may2013

M8.3 – Sea of Okhotsk

A second, Magnitude 6.8 earthquake occurred in the same vicinity about 9 hours later (14:56:31 UTC) also at a depth of more than 600 km:

Okhotsk68_24may2013

M6.8 – Sea of Okhotsk

The first earthquake of May 24th that registered on my seismograph was a Magnitude 5.9 tremblor in a remote area of Northern California (03:47:08 UTC).  This earthquake occurred  near to the surface at a depth of 11 km with the result that the body phases are minimized relative to the surface phases.:

NCal59_24may2013

M5.7 – 11km WNW of Greenville, California

The final earthquake that I list was actually the first in this collection to occur, a Magnitude 7.4 tremblor, originally described as southwest of the Fiji Islands but later amended to read southwest of Tonga to which it was actually closer, at 23 May 2013 17:19:04 UTC.  The focus for this earthquake was also moderately deep at 171 km.

fiji74_23may2013

M7.4 – 282km SW of Vaini, Tonga

Again, remember that the scaling of these arrival time plots is not uniform, so the trace amplitudes cannot be compared with one another.

M5.0 – 25km NNE of Shawville, Canada

ontario_5_17may2013

There was a moderate, Magnitude 5.0, earthquake in southern Ontario, Canada this morning.  It registered as a small but nicely formed signal on my seismograph in northeastern Ohio, showing the P, S, and surface arrivals.  The orientation of my seismograph makes it less sensitive to earthquakes north and south of my location than it is to earthquakes east or west of us.  By my calculation this earthquake was about 456 miles northeast of my location.

USGS Event page is here: http://earthquake.usgs.gov/earthquakes/eventpage/usb000gxna#summary

Postscript: 

The USGS reduced the magnitude estimate to 4.4 after this post was written.

M7.5 – 106km WSW of Craig, Alaska

Alaska_75_Jan052013

A Major earthquake with a Magnitude of 7.5 occurred off the coast of southeastern Alaska today at 08:58:16 UT.  Initial estimates predict low property damage and loss of life due ground shaking but tsunami warnings are in effect for a long much of the coast of southeastern Alaska and British Columbia down to Vancouver Island.  The fault mechanism is shown to be a strike slip earthquake along what I think is a transform fault off the coast.  The worst tsunamis are generated by dip slip earthquakes occurring on thrust faults.

Here in Ohio, the signal from my seismograph dominates the helicorder display.  The extracted signal clearly shows the first arrivals of the P, PP, S, SS, and Love phases.  The PP and SS phases are reflections of the respective body phases off of the earth’s surface (from the inside of course).

One of my first thoughts was where the earthquake was in relation to the grounded Shell drilling rig near Kodiak Island.  My best estimate is that the rig is in a sheltered area about 725 miles west of the epicenter and probably (?) out of harms way from any tsunami.

M4.3 – 13km W of Whitesburg, Kentucky

A light earthquake of Magnitude 4.3 occurred in Eastern Kentucky shortly after noon today.  The epicenter was about 243 miles south southeast of my location in northeastern Ohio, giving a nice although small signal on my sensor.

Most of the reports were of light shaking; The USGS reported nearly 2000 responses to its Did You Feel It? website within 30 minutes of the rupture.