Thursday, July 16, 2015

Charting Power from a RTL Dongle


Its been a while now since I wrote RTL Bridge and made it possible to pipe the total power from the receiver bandpass to Radio-SkyPipe (RSP) for display in a strip chart.  It occurred to me that I had never tested this in any more than a very superficial way.  If it works in some predictable way, then the dongle-RSP combo might be useful for making power measurements.  I even had a use for it, to measure the insertion loss of an inexpensive FM band trap at HF. I bought ten of the traps shown below for $0.67 each from MCM Electronics. The front ends of RTL based receivers are wide open (no rf filters) and thus with their limited dynamic range, are susceptible to overload from nearby commercial radio stations. An effective trap can help this problem.





For this and most things, I use the RTL dongles with a 2 MSPS sample rate.  This translates to a 2 MHz wide bandwidth. For this test I have the gain set at maximum for the R820T2 tuner.  The center frequency is 20 MHz which means I am using the low frequency enabled version of the rtlsdr.dll.  I use 20 MHz because I have a noise source calibrated at that frequency (RF2080 C).  I also have a RF2010 noise generator with a built in binary step attenuator capable of  31dB total attenuation.  The noise temperature ranges from about 3000 Kelvin to 3200000 K. 
Basic test setup for determining how well RTL + Radio-SkyPipe can measure rf power.
Basically, the test procedure consisted of warming up the RF2010, and stepping through the binary switches (reversed to put the LSB on the left!) in one dB increments and using the Get Average function in RSP to  average the signal for 10 seconds. I manually wrote down each value on a sheet of graph paper.  The values read from RSP had no real meaning until I would later go back and create an easy straight line equation to relate the raw numbers to the power arriving from the noise generator. Simply calibrate.  What I hoped to see was a plot of a straight line but what I saw was this:

Measured output (Y) are raw values from Radio-SkyPipe.  The X axis is the amount of attenuation in dB removed from the path between the noise source (approx 3.2 million K)  and the RTL dongle receiver with a R820T2 tuner.caption



"Its not linear", I thought. It looks like it has a sinusoidal shape. If tried to find a function that makes the data conform with reality.  I would then apply the function to the incoming data using the RSP Equation feature so that the data would scale to something meaningful like noise temperature or dBm.  Even without calibration, RSP should be able to tell me how much loss incurs from inserting the FM Trap in line to the antenna (or noise source ).

I tried a couple of curve fitting calculators on the web to see if I could get a regression fit of some kind, Unfortunately none of the "curve fitters" made any improvement over a straight line fit. Divergence from my hoped for straight line may on the low end just be due to approaching the HF noise figure limitation of the RTL.  On the high end we may be reaching compression.  There is no filter in line with the 25000K noise source so the input of the dongle is exposed to a very wide band noise signal.

Good Enough

Along the middle 60% there is very good linearity which indicates that Dongle->RTL Bridge->Radio-SkyPipe combo performs well as a power detector at 20 MHz. Below about -93 dBm or 18000K and above -77 dBm or 772000K linearity suffers some. 

So back to the FM Trap insertion loss problem.   The question again is "Will the trap degrade my use of the RTL Dongle at 20 MHz?". So I measured using a noise source with a temperature that laid along the straight part of the line. No need for calibration because we are just interested in a relative measurement. I found the loss of the trap is below the threshold of what I can measure which is about a half dB. That is a totally acceptable loss, provided that the trap is doing what it should do, reduce the signal across FM band 88 - 108 MHz.  I haven't measured the bandpass above and below the FM band but I intend to try.  For kicks I want to use the dongle and a broadband noise source to measure the filter.

Wednesday, June 3, 2015

New Way to Feed Radio-Sky Spectrograph with a Dongle Receiver

One of the limitations of the RTLSDR dongle receivers is that it is hard to get more than about 2.4 MHz of bandwidth  from them.  Raydel Abreu Espinet, CM2ESP,  has written a small Windows application that replaces RTL Bridge by speaking directly to Radio-Sky Spectrograph (RSS) .  What Raydel's software does that RTL Bridge is not capable of is stacking sequential spectra so that you can view a swath of spectrum  even tens of MHz wide.  The program is called RTL-WideSpectrum (RTLW) and does its magic by simply stepping through a number of adjoining spectra and combing their outputs into the modest number of channels permitted by RSS, (512 max). It does this very quickly by working more directly to the RTL dongle than the method used by RTL Bridge ( which uses rtltcp.exe as an intermediary ). 

Above is a RSS spectrogram of a solar burst recorded by Raydel from 28 to 48 MHz.  The horizontal banding is due to the sensitivity roll off at the edges of the 2 MHz band pass of the RTL Dongle.  This can be compensated for to some degree by using the Normalize button in RSS.  I don't know what kind of windowing RTLW is using but there may be some window function that could produce a more even spectrum.

You need to install SDR# and the Zadig driver to use Raydel's app. A Quick Start Guide is available here. Also of course you need RSS which can be downloaded here:  http://radiosky.com/spec/Spectrograph.exe

After installing RSS, you can download and run RTLW. I have placed a copy on my website.  Raydel may wish to put future versions somewhere else. Download and unzip the folder to someplace you can find it.  There is no install procedure.  You might want to create a shortcut to the exe file.

Plug in your dongle and try it out with SDR# first using SDR#'s own drivers.  Once you are satisfied that it is working, run RTL-WideSpectrum.exe from wherever you installed it., 


 At first you need to select a gain and then a frequency correction.  Finally you must select a total spectral width  (5,10,or 20 MHz), and a center frequency for the lowest frequency spectrum.


Run RSS in stand alone mode and select Options /Radio /RTL dongle receiver.  Then press the Start button in RSS  The charts should start scrolling.  If the signal looks too hot, stop the chart and restart RTLW with less gain. I am using 28 for the gain.

  Raydel says that there may be some updates coming and he is aware that there are some things that could be done to make the program easier to use but what he has provided is very workable and probably as effective as you will get using this method to increase the bandwidth of the RTL generated spectra. Obviously, I would love to make RTL Bridge a better performer by using some of Raydel's methods, but I am currently just too busy to work on that project and hope you will enjoy CM2ESP's innovative work.

Monday, March 2, 2015

HF Update to RTL Bridge

Amateur radio astronomer Jim Brown in Pennsylvania recently successfully used a RTL Dongle, Ham-It-Up converter, and a preamp/filter built by Richard Flagg, AH6NM.  Jim said I could use one of the images and here it is below.

Jupiter noise bursts captured by Jim Brown and an RTL Dongle plus RTL Bridge and Radio-Sky Spectrograph software.
I don't want to say too much about Jim's observation as I think he might write it up, but I can say that he was using my software, Radio-Sky Spectrograph (RSS), in conjunction with RTL Bridge.  This proof of concept observation should be encouraging to those who would like to make spectral observations of Jupiter and the Sun using an inexpensive dongle receiver.  Though not as informative as the 10 MHz wide spectrograms we have been seeing in the Radio Jove project, the spectral information does make it easy to identify Jupiter.

Recently I was able to take some time to experiment with Oliver Jowett's  low frequency patch for the Osmocom drivers that allows extending the range of the RTL+R820T below the usual 24 MHz limit without a upconverter or hardware modification.  Using a 2.04 MSPS rate, I was only able to see signals down to about 15 MHz, but many people have reported going much lower.  So while at the time I write this no one has recorded Jupiter with a "naked" dongle, I hope someone will give it a shot soon.  To help push that along I have repackaged RTL Bridge and RSS with the patched drivers.  I have also made a couple of changes to RTL Bridge and RSS.  In RTL Bridge there is now factor that can be used to scale the data appropriately for output.



The new Data Scale Factor is multiplied with the FFT power output before it is passes to RSS.  It was found that this was necessary to get readable deflections in RSS for weak signals.  The other scale factor, now safely tucked into a frame titled Local Display, That factor only affects the display in RTL Bridge and does not alter the data leaving for RSS. 

If you do not have RSS installed, then you can get it here:

http://radiosky.com/spec/Spectrograph.exe

If you have RSS installed and just want the latest updates go to:

http://radiosky.com/spec/Spectrograph_Update_2_4_21.exe

If you are new to this please read the other blog posts I have done on RTL Bridge. You should read the help page  if you have not yet used RTL Bridge.  Please let me know how it works out.


Effective Apertures of non-Dish Antennas

I published this article on my website over 20 years ago. Richard Flagg AH6NM should be listed as a co-author as he provided much of the log...