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;
 }

RF Noise Source NF-1000 SZ evaluation

  I have been working on an automated step calibrator project in recent months, so I was excited when I saw the device shown above on eBay. ...