Wednesday, August 16, 2017

RTL RFI Interference Sniffer

RTL RFI Interference Sniffer



 A useful RFI finder tool is a software defined radio (SDR) such as a $20 dongle receiver (and $40 up-converter if you want to cover HF).   You might also be able to find frequency ranges that are free from interference!  You can actually use a portable setup like this for hunting down interference.


This system can be improved by mounting the antenna on the end of a wooden or plastic stick,( a paint stirrer works well).  The choke helps to keep you from becoming part of the antenna, which while not resonant, works well when probed close to suspected radiators. (Not hot power lines !)  As a matter of fact, you should wear some electrically insulated gloves when doing this.

This project requires an Android device that has OTG USB support so that the device can be used to operate a RTL style dongle radio.  The tablet itself is an RFI radiator, or at least the one I have tried is. It possible insulate yourself from the tablet by using gloves, placing it in a cover, or mounting it on a piece of sturdy cardboard that can be used to handle the tablet without touching it.  When you touch the tablet you become an antenna for its own RFI.  Normally that isn't a problem because your antenna is far from your tablet, but in this case you are carrying them both. 

You need two programs from the Google app store.
  • RF Analyzer (Free) or SDRTouch (I bought the paid version for $10).
  • RTL-SDR driver.
Just search for RTL SDR in Google Play. You may even find a program you like better. It works well for me on this rather modest 7" LG tablet that came "free" with a phone plan.

I am using the small whip antenna that came with one of RTL dongles (everyone has at least 8, right?) You can also construct a small dipole or loop if you wish.  Unless you know that you are going to be working in a relatively small part of the spectrum, the antenna is not going to be resonant anyway.  In most situations it is going to act like a near-field voltage probe, which is probably the preferable mode for sniffing interference sources around the house. If it is too sensitive it is going to be harder to home in a RFI source.

Read my post about RFI basics.






Pre-Eclipse Checklist for Radio Jove Observers


Radio Jove observers from Canada to Mexico will be watching the great 2017 eclipse at at 20.1 MHz.  We will be looking for changes in the galactic background radio emissions.  This is different from most other eclipse/radio experiments that will be occurring. Those efforts mostly will be looking at artificial radio signals (transmitters) reflecting from the ionosphere.  Not us.  We picked a target made harder by the fact that we will be looking at a quiet part of the sky.

The sky at 408 MHz during the eclipse of August 21, 2017 as seen from KY.  The circle represents a dipole antenna beam aimed at the zenith.  The Sun and Moon (neither to scale) are shown to coincide. Virgo A will also be near the beam.
Andrea and I will be on the road looking for a place in the line of totality to set up our dipole. Roads are expected to be clogged with people.  Good luck to everyone observing.  Be safe out there


Radio Jove – Solar Eclipse Instructions Checklist


1. Observing Plan – coordinated practice sessions with Radio Jove Team
     a. Call during a Help Session
     b. Upload a 24-hr test record to the Data Archive to check data quality            http://radiojove.org/archive.html

2. Equipment
     a. Receiver tuned to a clear frequency (near 20.1 MHz) and working properly
     b. Antenna Setup – Dual Dipole (No phasing cable) or Single Dipole
     c. Calibrator (optional but encouraged for better scientific results)
     d. Windows Computer with Sound Card
     e. Check the audio cable input to the computer – choose Line or Mic input
     f. Software – Update Radio-Skypipe Pro (to version 2.7.28 or later)
          i. Set ALL Identity Info (under Options menu)
              1. Give a useful Local Name (this is your Station ID name; e.g. MTSU or HNRAO)
              2. Give receiver/antenna description in Notes (under Options menu)
         ii. Set Meta-data (under Options/Misc, click Radio Jove MetaData) to give antenna information.              Example Description: Jove Dual Dipole; Beam Azimuth: 180; Beam Elevation: 90;                              Polarization 1: Linear
         iii. Check Tools/Mixer (Input sound settings) – select the correct sound card input (Line or Mic)
         iv. Calibrator – run Cal Wizard to calibrate your system to Antenna Temperature (if possible do              a daily calibration)
         v. Timing – Check computer clock for accuracy. Run Atomic clock if needed.
         vi. Timing – Record ALL data in UT time

3. Site and Safety Check – check for power lines and other potential hazards

4. Data Collection
     a. Collect data for August 19 – 23, 2017, or longer if possible
     b. Collect a minimum of 6 hours each day: Set start/stop time for  3 hours from 18:30 UT
     c. 24 hr records are preferable

5. Data Analysis
     a. Load data in Radio-Skypipe and view the full data record
     b. Change Y-axis scale to 0 and 250 kK (for calibrated data)
     c. Save record as an image file, preferably a JPEG

6. Data Archive
     a. Login to the data archive: http://radiojove.org/archive.html
     b. Upload the data record (.SPD file) and the JPEG image together


Friday, June 30, 2017

Radio Frequency Interference - Basics



The only tree that I ever actually hated.


Radio astronomy's biggest nemesis is unarguably radio frequency interference or RFI.  Our electrically civilized world is full of it, and it is getting worse.  The light pollution activists in the optical astronomy world have been fighting a terrifically challenging villain, but at least people can relate to light pollution in a very personal way.  The unseen RF spectrum is much harder to get people excited about.  For the most part, you are on your own when trying to track down and re-mediate RFI.

Identifying RFI

For the purposes of this post, let's assume you have a simple Radio Jove receiver and are listening in at 20.1 MHz.  Assuming that Jupiter or the Sun is not active and there is no lightning nearby, what would you expect to hear from the receiver if there was no local RFI?  You would hear a steady hiss. White noise.  The sound would be basically featureless. Some of that hiss would come from your receiver's components and hopefully, some will be hiss from the Milky Way.

  Example of hiss. Galactic Hiss from Radio Alachua

In actual practice, you probably will hear a few pops and other imperfections especially in the HF band where lightning and man made signals can propagate from long distances away.

Displayed on a strip chart galactic radio noise should look like a "grassy" line.  When hooked to an antenna pointed to the zenith, a day-long variation occurs in that grassy line corresponding to the Earth's rotation through the plane of the galaxy. (See "A Natural Periodic Signal" below). Any sudden deviations from that slowly rolling terrain  indicates either:
  • A energetic event from space (what we may want to see).
  • An energetic event from our Earth's electromagnetic sources (lightning, radio aurorae).
  • A case of human made radio interference, RFI.

What we would like to do is sort out the cosmic events from the Earth-born ones.

Sudden Changes


Sudden changes in signal strength indicate an unnatural source (except for lightning).  Even more compelling is when a signal stops suddenly.  Nothing in the natural world behaves like that.  Things of nature do not have off/on switches and large sources of energy like solar flares have significant light travel times across them limiting how quickly its radio signature might rise or fall.  If on a chart with a multiple-samples/second sample rate, we see an instantaneous vertical leap of significant amplitude, we are safe to say it did not come from the Sun. Solar flares can reach peak amplitudes in just a few seconds, but not in a few milliseconds.

Your strip chart may look like this if you have interfering signals.  These sudden jumps above the baseline level indicate RFI.

Often there will be less dramatic but still obvious jumps in the signal level on a chart that have no obvious other symptom.  There are a number of things that can cause this. A strong out of band signal can desensitize your radio. You should observe with the AGC off if your radio has the feature, but these level jumps can still happen, perhaps when the ham next store turns on his amp.  More often these jumps are the result of  lamps, power supplies, and other appliances that put out a broad noisy spectrum without much structure.  It may sound like cosmic hiss but still be RFI.  This noise adds to the galactic background noise and does not contribute much beyond the obvious jump in baseline.

Modulation

Audio modulation of the signal is not always easy to see on a strip chart but usually it is easy to hear. ANY regular pattern you hear in the signal that deviates from a white noise signal is suspect.  If the sound has any sort of buzz or trill, or tones embedded in it you can rule it out as being a natural signal. Modulated signals can arise from unintentional radiators such as switching power supplies, digital circuits, and televisions, and from intentional radiators like over the horizon radar, radio data links, shortwave stations, and ionosondes,

Power line noise is often modulated by 60 Hz in the Americas and 50 Hz elsewhere. It also tends to have a sharp raspy sound but may be more subtle.  If the noise is not constant it will often vary with the moisture level in the air. Some power line interference is only present when it is dry and other types are triggered by rain or dew. Power line noise often manifests on a strip chart as a very irregular signature. Here is a particularly nasty bit of powerline RFI from the ARRL RFI collection.

Though never really thought of as RFI, Jupiter emissions do have structure. You can learn to hear these characteristics by listening to audio recordings of them in a few sessions.  They do not have very distinctive signatures when viewed in a single frequency strip chart.  However, they are easy to identify on a wide band radio-spectrograph, so check the on line spectrographs to see what Jupiter is doing while listening on your single frequency receiver.  Check on Radio-Jupiter Pro or on the nice free iPhone app by Kazumasa Imai called Jupiter Radio Map to check on probabilities of a signal being Jupiter.

Periodicity


With the exception of pulsars, there aren't any natural signals that appear and disappear with the regularity that might be attributed to a clock (at least a 24 Earth hour clock) .  You will never be over-run by interference from a pulsar - ever!  Pulsars are much to weak. So anything that turns on and off at regular intervals, milliseconds to hours, will not be of cosmic origin.

 A common complaint from rural observers is a sudden pulse that occurs every 1 to 2 seconds.  This is often an electric fence which pulses in this fashion to save power, thank goodness, (Imagine a 60 Hz train of these!)  There is also the kind of period that occurs over the course of a day.  Some people turn things on at night and off in the morning ( or the opposite).  Motorized appliances such as blenders often show up at the time of days when they are usually used to prepare meals.

A Natural Periodic Signal

But there is also a natural daily cycle that is manifested in the galactic background (GB) and the effects of the sun directly and indirectly via the ionosphere. The signature of the GB on Karl Jansky's strip charts announced the dawn of radio astronomy. It was the period of the bump we see when our antenna beams slowly rotate through the plane of our galaxy that gave away it's origin. The bump peaked at a given spot in the sky about every 23 hours and 56 minutes, roughly 4 minutes shy of a 24 hour day. This is the time of the stars, sidereal time, and it tells us the source is located far from the Earth. If over a period of months you see a natural signal at the same sidereal time every day then you have something that doesn't move much against the backdrop of the stars and is probably very far away in origin.
The strip chart above comes from HNRAO and shows clearly the Galactic Plane bulge which you should expect to see during a 24 hour observation.  The hump is broad but should advance earlier by 2 hours every month, identifying it as a sidereal object outside our solar system.
In the example above, notice that there are lots of deflections to higher values which may or may not be unnatural RFI, but very seldom do we see a spike below the the fairly well defined lower edge of the trace. When you do see a downward spike from this lower edge, it may be interference of the desensitizing type but more likely it is just a glitch from the sound card.  Make sure you use 11025 or 12000 Hz as your audio sample rate (Options/Sound in Radio-SkyPipe).

Narrow Spectrum

If you can tune away from a signal by moving your tuning a few kHz, you are usually looking at an incidental radio signal emitted by an electronic device or an intentional signal such as a radio station.  Most cosmic radio signals have very broad spectra and they span from a few MHz to GHz in bandwidth. As you know, black-body radiators emit at all frequencies, though peaking broadly at one.  The quiet Sun, for example, emits radio waves throughout the spectrum though relatively weakly below 30 MHz unless it is flaring.  When a radio solar flare occurs it usually can be seen through much of the HF spectrum though in some cases it can be constrained to a few MHz wide.  The only thing I can think of that you might encounter in the way of a natural signal that is less than tens of kHz wide might be an N burst from Jupiter, but that will not be a regular source of interference.


Finding RFI

Your first suspect for RFI is you, that is, the electrical and electronic apparatuses that you own.  If turning off the main circuit breaker to your house stops the RFI then celebrate because the source is under your control.  When you do this test, you of course need a battery powered receiver.  The Jove receiver can run off of a small twelve volt battery for hours. You can use headphones or a small battery powered speaker/amplifier to listen. While it is informative to run Radio-SkyPipe to monitor the signal visually, be aware that your own computer could be the source of the RFI.  Turn off the monitor for a few seconds while running the strip chart and see if the RFI dips during this period.  If the RFI is coming from the CPU, you will have to just use the audio from the radio headphones to detect it.  The computer and/or monitor should be a major suspect until eliminated this way.

Assuming the RFI went away when you turned off the main breaker, locate the circuit by trying the breakers one at a time until you have found which circuit powers the problem device.  Then begin eliminating devices on that circuit until you find the offender.

Here is my list of common RFI sources you might find in your home or lab.
  • Any device with a switching power supply.
  • Any device with a motor including AC and furnaces and heat pumps.
  • Computers.
  • Computer monitors.
  • LED lighting.
  • Fluorescent lights.
  • Televisions old and new. (Plasma screens are sometimes bad enough that your neighbor's is suspect.)
  • Light Dimmers and motor speed controls.
  • Touch Lamps.
  • Battery chargers, especially for power tools. (Always unplug these when not in use.)
  • Bug zappers.
  • Ionizing air purifiers.
  • Electrostatic air cleaners.
  • Aquarium heaters.

Mitigating Device Noise

There are a number of steps that you can take to reduce or eliminate RFI from electrical devices. The simplest, though perhaps least economical, is to replace the device with one that does not radiate RFI. Unfortunately,  this can be a trial and error process so hold on to your receipts!  You may also find that physically moving the device to a new location is helpful.

Place your antenna as far as possible from the RFI source and use good quality coax cable to your antenna.  Chokes on  the antenna coax shield may be helpful.

If the problem is your own computer or monitor, the issue becomes more difficult.  There is only so much you can do besides replacing them.  Split core RF chokes may sometime be helpful.  These may be placed on any cable entering or exiting the computer.  If using a separate monitor (not a laptop), the monitor cable is a primary suspect.   Many come un-shielded. Replace with a high quality shielded cable and/or add RF chokes to each end. In some cases you just need to leave the monitor off while observing.  You can put remote control on the computer such as TeamViewer, the control the computer remotely and just leave the monitor off. USB and network cables also may be purchased with an range of shielding levels.

Replace noisy switching power supplies with transformer based ones where possible. Add chokes when needed to on both ends of the DC cable.  It usually does no good to add a choke to the 120V AC cord.  Route wires away from your receiver and its feedline.  Add chokes to the DC supply line leading to the receiver.  Twisting a pair of power or digital leads can also reduce emissions.

Power Line RFI

To hunt down power line RFI you have to use a portable battery powered receiver.  One option is a small AM transistor radio, but you can also buy a RFI sniffer receiver that like the one below MFJ Enterprises if you are so inclined.  These MFJ noise monitors are VHF devices seem to work best with strong power line interference. The AM radio is more sensitive but may lead to false detections.



With your radio, walk around to all of the power poles in your neighborhood listening for the offending noise in your headphones.  Sometimes, the bad insulator or transformer will make an audible noise that you can hear without the receiver.  I bought one of the "toy" $30 parabolic microphones shown below and found it helpful in sniffing out audibly detectable problem poles.


Mitigating Power Line Noise


Hopefully you don't need me to discourage you from trying to fix a problem on your power company's pole but just in case, Don't Do That!  You need to enlist the help of your power company. When you find the offending pole take note of the pole number which is usually found on a metal ID tag.  The response you get from the utility company can range from excellent service and a quick repair, to absolute disinterest.  Most companies will send out a mobile unit to inspect the reported pole, so you want to be sure that you have found the right pole. Some utilities will have special technicians with spectrum analyzers and noise receivers just for the purpose of tracking down power line arcing. You can let those people doing the hunting for you, but it is nice if you can have a suspect of your own ready for them if they find nothing.  If you can correlate the arcing with the weather point that out to them.  Make an audio recording and offer to let the technicians listen to it. Be nice and you may find them very cooperative, but you may have to also be persistent to get anything done. It all depends on who you are working with. Intermittent problems may require them to make multiple trips, testing everyone's patience. If your description is good enough they may try to replace the insulators, transformer, etc. based on evidence you present to them. Take a look at W8JI 's RFI page where he looks more closely at the problem components on a power pole.


Lots More Information

Dave Typinski has put together a wonderful comprehensive page of RFI resources for the Radio Jove Project.  Along with the many articles and book references there is a nice collection of HF spectrograms of a number of types of RFI.   Don't miss this resource!

SUG RFI Resource


Friday, June 2, 2017

Programming Multiple Channels in the Arduino - Radio-SkyPipe Project.

If you need a strip chart recorder for your Arduino project you might want to consider the Radio-SkyPipe.  The free version of Radio-SkyPipe will work for charting a single channel of data arriving through UDS (User Data Source) feature of RSP.  Typically you might plot one of the analog to digital converter (ADC) inputs on the Arduino. I introduced that here.  You might also be interested in how to connect to your Arduino with RSP over Ethernet or Wireless.

If you have the Pro version of RSP you can plot up to 8 channels and this post contains some sample code for the Arduino that can accomplish that. This code will work with the Uno or the Mega but of course, you have fewer analog inputs to work with on the Uno and this example is limited to 4 channels.

// Skeleton sketch for UDS connection to Radio-SkyPipe 
 // there are a lot of commented out print statements that
 // can be helpful in debugging.


 int POLL; // if =1 then data is polled by RSP using a GETD command
 int STAT; // -1 = we were just stopped by a KILL command 0 = startup state 1 = INIT rcvd 2 = Ready to Go 3= Running

 void setup() {
     STAT == 0;
     POLL == 0;
     Serial.begin(9600); // connect to the serial port
     //delay(1000);
     //Serial.print("^^1002Arduino UDS");
     //Serial.write(255);
     }


 int incomingByte;

 void loop() {
     // if we are pushing the data to RSP then we need to
     // establish our timing for sending new data.
     // here we are just doing a delay of 100ms to get a
     // sample rate of about 10 samples / sec.
     if (POLL == 0 && STAT ==3){
     delay(100); 
     } 

 while (Serial.available() > 0) {

     // read the oldest byte in the serial buffer:
     incomingByte = Serial.read();

     // if it's an K we stop (KILL):
     if (incomingByte == 'K') {
         //Serial.print("^^1002DEAD"); // Just for troubleshooting
         //Serial.write(255);
         //Serial.println("Arduino UDS");
         //GET PAST THE REST OF THE WORD by Reading it.
         delay(10); // not sure why these delays were needed
         incomingByte = Serial.read();
         delay(10);
         incomingByte = Serial.read();
         delay(10);
         incomingByte = Serial.read();
         incomingByte = 0;
         STAT=-1 ;
         }
         // if it's a capital I run the INIT code if any
         if (incomingByte == 'I' && STAT ==0) {
                 //INIT
                 // GET RID OF 'NIT'
                 delay(10);
                 incomingByte = Serial.read();
                 delay(10);
                 incomingByte = Serial.read();
                 delay(10);
                 incomingByte = Serial.read();
                 incomingByte = 0;
                 STAT = 1 ;
                 //Serial.print("^^1002 INITIALIZED "); 
                 //Serial.write(255);
         } 
         // if it's an L (ASCII 76) RSP will POLL for data
                 if (incomingByte == 'L') {
                 POLL = 1;
                 // GET RID OF 'L'
                 delay(10);
                 incomingByte = Serial.read();
                 incomingByte = 0;
                 //Serial.print("^^1002 POLLING ");
                 //Serial.write(255); 
         }

         // H sets it to push
         if (incomingByte == 'H') {
                 POLL = 0;
                 //Serial.print("^^1002 PUSHING ");
                 //Serial.write(255); 
         }

         // if it's a C then Radio-SkyPipe is requesting number of channels
         if (incomingByte == 'C') {
                 // change the last digit to = digit of channels of data (ex. 1)
                 delay(10);
                 Serial.print("^^20134");
                 Serial.write(255); // print result;
                 STAT = 2; // ready to go
         }
         if (incomingByte == 'A' ) {
                 // A means STAT was requested so send UDS ready message
                 delay(10);
                 Serial.print("^^1001");
                 Serial.write(255); // print result;;
                 // GET RID OF 'T'
                 delay(10);
                 incomingByte = Serial.read();
                 incomingByte = 0;
                 STAT=3;
                 
         }
         // if it's an D we should send data to RSP:
         if (incomingByte == 'D' && POLL == 1 ) {
                 //Serial.println(" DATA REQUEST RECEIVED ");
                 GETD() ;
         }

         if (STAT== -1){
         STAT = 0;
     } 


     } 
     // we are finished processing any incoming commands from the PC
     // and we are not being polled so get a sample and send it
     if (POLL == 0 && STAT == 3) {
     GETD ();
     }
 }


 // This is where data is fetched and sent on to RSP.

 long int dat; //may have to change type to suit your data
 void GETD(){
         dat = analogRead(A0); // Replace this with a call to whatever data collection routine
         Serial.print("#0"); // # followed by channel number of data
         Serial.print(dat); 
         Serial.write(255);
         dat = analogRead(A1); // Replace this with a call to whatever data collection routine
         Serial.print("#0"); // # followed by channel number of data
         Serial.print(dat); 
         Serial.write(255);
         dat = analogRead(A2); // Replace this with a call to whatever data collection routine
         Serial.print("#0"); // # followed by channel number of data
         Serial.print(dat); 
         Serial.write(255);
         dat = analogRead(A3); // Replace this with a call to whatever data collection routine
         Serial.print("#0"); // # followed by channel number of data
         Serial.print(dat); 
         Serial.write(255);
         Serial.print("^^3001"); // This tells RSP to time stamp it
         Serial.write(255); // all commands end with this character.
         return;
 }

Monday, October 17, 2016

Use SDR# with Radio-Sky Spectrograph!


I have touted Radio-Sky Spectrograph (RSS) before. Its main purpose was/is for observing Jupiter decametric radio emissions, but has been adopted for solar and other observations.  It was written to support a very specific  kind of swept frequency receiver, the FS series. RSS is used to save, review, and stream the HF spectral data. With the help of the Agawa observatory in Japan, I was able to add the SDR-14 from rfspace.  Unfortunately, the SDR-14 receiver, is no longer produced though you will see them for second hand sale on occasion.  We went along like that for a few years and then the RTL Dongle windfall happened.  I fully understand the limitations of these $20 radios, but I am also awed by the capability one acquires for the price of a few ounces of denture cream.  Add a FM Trap and a few feet of wire and you have access to a lot of RF spectrum.

During the last couple of years we have added stacked RTL dongle spectra, the affordable and capable SDRPlay, and now, thanks to contributor, Alan Duffy, you can also mate RSS with any radio that SDR# supports!  That includes the excellent AirSpy radio, In fact, you could use any radio in this list!



I can't tell you what a relief it is to me that Alan wrote this plugin for SDR#. We had a good interface to SDRPlay thanks to Nathan Townes, but I was getting inquiries for support for HackRF and AirSpy. I ached for way to connect to the rfspace networked radios, and now it is possible. Now we are using SDR# as a intelligent gateway between RSS and numerous other radios. A wonderful reason to use SDR# and Alan's plugin is that you can listen in on the spectrum using audio demodulation. When using RTLBridge, for example, you cannot hear the audio.  Audio can be helpful in identifying interference. Plus it is just fun to listen, sometimes.

If you don't already have SDR# installed, go to http://airspy.com/download/ and download it. There is no real installation process. You just need to unzip the files to a folder and create a shortcut to the SDRsharp.exe on your desktop.  Remember where the folder is because you are going to add a file to it and modify another.

Now go to Alan's website and read his instructions for installing the RSS Plugin.


When successfully installed, somewhere in the list of expanding menus on the left column you will find Radio-Sky Spectrograph. 


Expand the menu by clicking the right pointing arrow. When your radio is running you will have the option to enable a network connection with RSS on the loopback address 127.0.0.1.  In effect, this plugin makes SDR# a data source for RSS. The programs converse via a channel that was initially designed for reduced data from a RTL dongle. Clicking that Enabled box makes the RSS Plugin listen for a connection request from RSS.  RSS sends this request when configured for RTL Bridge and you press the RSS Start button. You must also be in Server or Stand Alone mode.

When using this interface the frequency is determined in the host (SDR#) software as set by the user. You do not need to input the frequency range or number of channels in RSS. The number of channels is currently limited to a maximum of 512 and a minimum of 50. 

So there you go!  Thanks to Alan Duffy and the folks at AirSpy you can use a whole host of SDR radios with RSS.  

Monday, August 1, 2016

SDRPlay Receiver Support for Radio-Sky Spectrograph

Thanks to the efforts of Nathan Towne, we now have the ability to use a new receiver with Radio-Sky Spectrograph (RSS).  The SDRPlay has been getting some good reviews from users and I am pretty happy with it also.  This is a 12 bit SDR capable of 8 MHz of bandwidth.  It requires no upconverter for HF work and has some built in bandpass filtering.  It is a far better radio than the standard RTL dongle receivers.  I bought my SDRPlay from Ham Radio Outlet and the shipping was free. I suggest that before you try to use the SDRPlay with RSS that you first get it working with HDSDR or the new SDRuno software.

Note the SDRPlay comes with no USB cable.  It is powered via USB which may need to have an ferrite clamp around choke attached if you pick up computer buzz..  The receiver has a single SMA female connector.  If you hang some adapters off of it the way I did above, be sure they are well supported and do not put a strain on the SMA.

As with RTL Bridge, a intermediary program sits between RSS and the receiver.  This program was written by Nathan Towne and is named SDRPlay2RSS, not too surprisingly.  This is a dot NET program and if you are up to date on your dot NET run-time updates you should be fine. Installation is a no brainer as SDRPlay2RSS comes with the RSS 2.8.18 update. SDRPlay2RSS does not come with the current full install of RSS so you must do the Full install and then the Update.


Nathan has written for us a introduction to his software. Read it first. (I know you won't but I am compelled by experience to suggest you do.)  In version 2.8.18 or above of RSS  click Help / SDRPlay Help to see Nathan's documentation. This points to a hard copy of the html file now tucked under Spectrograph/SDRPlay/doc/.

In version 2.8.18 or above of RSS you must select SDRPlay from the Receiver list.  Make sure your SDRPlay receiver is plugged in and ready to go. In Stand Alone mode Click Start and you should see this message box pop up:


Now you must direct your attention to the SDRPlay2RSS application and click that Integrate button so that it turns that nice bright yellow as shown above. Then close the message box and the magic should happen. But if it fails to happen, check that you are using a configuration that is allowed in SDRPlay2RSS.  Look at Nathan's help document again.  I can say that undersampling is not allowed in the SDRPlay API so you must have the Sample Rate set higher than the Bandwidth. The settings I used in the snapshot of SDRPlay2RSS above work OK on my Win7 PC.  What you don't see in the snapshot is that under the Integrate menu item you can select Windowing and Polyphase Filter Bank options that will greatly improve the resolution in most cases.  The second of these tools, the PFB, may draw considerable CPU time, so turning it off may help when the computer is not keeping up well.  Having said that, I think you will miss the enhancement it gives in resolution.


The two spectra above show the difference that the PFB makes when the receiver is presented with a strong 20 MHz signal.  Some may not be aware that this is an alternative view available within RSS under View / Scope View . I regret that choice of a name for this view as it should not be confused with an oscilloscope which records in the time domain.  This is the view one would get using an old phosphor screen spectrum analyzer.  By any name, it is sometimes a handy way to see the data.


This is a solar emission Nathan captured with the SDRPlay receiver, SDRPlay2RSS, and RSS. There is some overloading, perhaps from a station, but its effects are being contained to a reasonable chunk of spectrum.  It would be interesting to measure the dynamic range of the system to see if it could be enhanced. Perhaps it will be just a matter of trial and error to get the best settings but I really would like to understand why. I hope someone will pick up that torch as I am not so qualified as a measurer of things.  Though perhaps I will see what I can do.

I leave you with two URLs:

If you don't have any version of RSS installed you need this one first
Main Program install:  http://radiosky.com/spec/Spectrograph.exe

Then

The update below is needed to support SDRPlay.

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

Aloha!

Wednesday, September 9, 2015

RTL Wide Spectrum Update

Usable wide spectrum displays from RTL dongle receivers down to 5 MHz without an upconverter!


Raydel, CM2ESP, has released a new version of his wide spectrum implementation of the RTL dongle drivers from Osmocom.  In the last post about this in June, we looked at a stacked spectrum output as it appeared on Radio-Sky Spectrograph (RSS). The spectrum in that version obviously did not display even gain over frequency.  Even a single spectrum from the RTL (and other SDRs) has a diminished "gain" at the edges due to the windowing in the FFT process.  This drop off at the edges was quite apparent in these stacked spectra (see below),  Raydel eliminated this problem by using only the central portion of each spectrum,  and then using more spectra in the stack to make up for the omitted slices.


The original RTL Wide Spectrum display showed strong banding due to decreased gain at the band edges.

Raydel's new code has 3 spectrum frequency spans that you may use, 7.68 MHz , 15.36 MHz,  and 30.72 MHz. The correspond to the Narrow, Medium, and Wide in #Scan Bandwidth Mode,  The lowest frequency is specified instead of the central frequency.  You can select from 240 or 480 frequency channels in the RSS output.  Raydel, included a spike filter. The #Output Mode is designated as Power or Voltage.  I am not sure of the math behind this but the Power setting seems to be less sensitive but with more dynamic range than the Voltage setting.  Finally, there is a #Post FFT applied gain parameter that you will need to play with to get the output in the right range for output to RSS.
I made this scan using CM2ESP's new application and a short antenna.  The content does not matter except that it shows significantly less banding than the previous image RTL Wide Spectrum.

The new wide spectrum program (Solar Sweeper) uses an INI file like the following:

#RTL Solar Sweeper RSS Server Config File.
#DON'T MODIFY LAYOUT!!! Change only values.
#Gain of RTL Dongle (eg: 28.0)
49.6
#Scan Lower Frequency in MHz (eg: 20.5)
 17
#Scan Bandwidth Mode (0 is Narrow, 1 is Medium and 2 for Wide)
0
#Rudimentary Spike Filter (0 is OFF, 1 is ON)
0
#Output Mode (0 is Power, 1 is Voltage)
1
#Channels Number (0 for 240; 1 for 480)
0
#Post FFT applied gain (eg: 500)
500



You won't have to manually write to the INI file.  I built a configuration panel for RTL Wide Spectrum,

As with the earlier version, Raydel's new code can use frequencies below 24 MHz with the R820T tuner because we are using the low frequency enabled version of rtlsdr.dll.  With one of my computers I was able to get down to 17 MHz without an upconverter.  On another, I could get lower but I had to max out the tuner gain to see anything. Raydel reports a better result at lower frequencies, though he also uses a high tuner gain. Look at Fig 1. above.  He was able to scan down to 5 MHz without an upconverter,

The stacked spectra do not always give a perfect display.  The RTL receivers are very prone to overload, especially when the tuner gain is set high and of course when strong signals are present.  This can manifest as flaring across the spectrum, so sometimes you will see a given frequency slice that is much brighter across its entire bandwidth  than its neighbors.  Try different gain settings.  You should only be using the maximum tuner gain when you must.

RSS update, requires previous install of RSS.  If you do not have RSS get it here.  Then do the update found at http://radiosky.com/spec/Spectrograph_Update_2_6_1.exe


Everything you need except for the USB drivers is contained in the latest version of RSS.  CM2ESP's application now named SolarSweeper.exe lives in a directory named RTLW below the Spectrograph program directory. After doing the RSS update, go to Options / Radio  and select RTL Wide Spectrum.  Then press the Configure RTLW button to set up the INI parameters.  Click Update and then Start.  As before, you must have the drivers from Zadig to make this work.  You can get those when installing SDR#, a nice app that you will want anyway to work with your dongle. My understanding is that if you are using Windows 10 you will need the latest Zadig drivers. SDR# is useful for actually listening to modulated signals, whereas RSS just displays a spectrum in a way that is useful for doing some radio science.


Saturday, July 25, 2015

How to Talk to Radio-Sky Spectrograph

Solar flare recorded on our very first radio spectrograph at the Lanihuli observatory on Oahu.  This is the ten minute (approx) view.  A more detailed one minute view is also available.  The frequency in MHz is displayed on the right.
Radio-Sky Spectrograph (RSS) was designed specifically to display solar and Jupiter radio spectra. When we (Richard Flagg and I) designed our first HF spectrograph, the FS200 (still operating  more that 10 years later at the Windward Community College Lanihuli Observatory in Hawaii), we  limited ourselves to 200  "channels" or frequencies for each "scan" or "sweep".  We also tried to obtain 10 scans per second.  These parameters were arrived at based on an educated guess as to what we could physically accomplish consistent with goal of seeing Jupiter S and L Bursts in some detail.  The FS200 is a sweeping type spectrograph as opposed to the more modern approach of using an FFT to derive a spectrum from a software defined radio or SDR.  Our system needed to save about 2000 two-byte samples per second.  Although back then this seemed like a lot of hard drive space, today saving a couple hundred megabytes per day is not a big deal.

In live mode, RSS provides two views of the same spectrum with different time scales.  This is useful for seeing the last minute of data and the last 10 minutes of data (depending on the sweep rate). For Jupiter this was optimum for seeing how the storm was progressing overall, and in detail.  It also turned out to be a good compromise for solar activity. We have found it better to have frequency on the Y axis and  time on the X. This is not the usual format for other SDR programs.  We use high frequency at the top in contrast to many scientific displays which chose the opposite convention for some reason I have never understood.

You can measure the slope of any feature on the spectrogram with just a couple of clicks.

Most SDR programs provide very useful waterfall spectral displays, but I only know of one program other than RSS that allows you to save the reduced spectrum data, and I don't think it is out yet.  Most programs provide for saving the entire bandwidth that the SDR is processing, often millions of samples per second.  This is great for communications because you can go back and demodulate any signal in the bandpass from the saved signal, however, it is currently impractical for long periods of time to save that much data. For our radio astronomy purposes, we don't need all of that data unless we want to do some kind of imaging or interferometry.   Within the next couple years RSS is scheduled to provide support for saving files in NASA's CDF format which is a scientific standard. RSS has turned out to be a very practical display and file saving tool for event based radio astronomy.  RSS is free and can be downloaded here.  If using Win 7 or up I suggest you run tRSS as administrator so that Windows doesn't get mad about it writing to the program directory. You can use the program in Client Mode to view live spectra from other RSS users. Unfortunately, the help is minimal and out of date, but there is a group of people working on creating a manual for RSS.

Sold! How do I use RSS with my receiver?


If you want the functionality that RSS provides but you do not have one of the receivers RSS supports, you can send your data to RSS over a TCP connection as long as you format it properly.  This assumes you know how to get reduced spectral data from your receiver (or can reduce the raw data ) and  that you know how to do a little programming in Python, Java, VB, or whatever.

Your program must act as a TCP server and listen for a connection on port 8888 of the loopback address 127.0.0.1.   Configure RSS under Options /Radio to RTL dongle receiver. When you press the Start Button in RSS, it will attempt to connect to your custom software server. Your program should accept the connection and send this string back to RSS.

"F " & CenterFrequencyHertz & "|" &"S "& BandwidthHertz & "|" & "O " & OffsetHertz & "|" & "C " & NumberOfChannels & "|"

For example: F 21000000|S 5000000|O 0|C 500

This would tell RSS that the center frequency of the observation is 21 MHz.  The bandwidth is 5 MHz, so the display will run from 21 + 2.5 to 21 - 2.5 MHz,  or 18.5 MHz to 23.5 MHz. The O is for the offset and is useful for when a downconverter is used.  Here O is set to zero.  Finally, C denotes the number of channels.  This is currently limited to 100 - 512 channels. Each of these parameters is separated by the pipe symbol "|".

The data itself is in two byte binary format.  Each sample is sent as a binary word with LoHi byte order and should be restricted to 12 bit digitization.  The data is sent with the highest frequency first, descending to the lowest.  At the end of each sweep two FE hex bytes (254 decimal) are sent. and the next sweep begins. There are no timestamps.  RSS keeps track of the time and assumes an even sweep rate.

If you run into trouble just contact me at radiosky (at) radiosky (dot) com.  or via the comments. I would love to know if you write something that can send your spectra for display to RSS. Perhaps, you would like to share it with others.






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.


RTL RFI Interference Sniffer

RTL RFI Interference Sniffer  A useful RFI finder tool is a software defined radio (SDR) such as a $20 dongle receiver (and $40 up-con...