Showing posts sorted by date for query antenna analyzer. Sort by relevance Show all posts
Showing posts sorted by date for query antenna analyzer. Sort by relevance Show all posts

Sunday, March 5, 2023

The Ham Radio Series 36 - What Are S-Parameters and Why Should I Care?

I mentioned in February of ‘22 that I had bought a NanoVNA.  If you’re unfamiliar with the term, VNA is short for a Vector Network Analyzer, a test instrument that can measure the complex impedance of something, and a handful of different NanoVNA models have hit the amateur market in the last few years.  In particular, I bought the H4 model for a couple of reasons; the fact that it has a larger LCD than most of the other models and that I’ve heard good things about its ability to work to 1.5 GHz out of the box.  

It’s hard to convey just how big a deal these things are to people who are new to the game, but through some clever tricks in digital design, they’ve absolutely crushed the price of test equipment.  The first 1.5 GHz vector network analyzer I ever touched, back in about ‘84, was an exquisite piece of lab equipment from HP – who was just the test equipment giant in those days – that cost over $100,000.  The NanoVNA H4 today is under $100, or right around there.  That’s far less than 1/1000 of the cost of that HP, partly because of the constant depreciation of the dollar by the Federal Reserve.  Sure, the $100 Chinesium (almost always) NanoVNA doesn’t have as good specifications as the HP did, but a close approximation to the value is better than a guess or assuming “it should be good.” 

The default display that my NanoVNA starts up with is might be unique to this software, but from reading a NanoVNA users’ group for a few years, I think it’s pretty common.  It overlays four channels of information: three different rectangular plots of one S-parameter per plot and a Smith chart of one those S-parameters.  Since I’ve been working almost exclusively with S-parameters since the early 1980s, I’m at home with them, but questions about what those things mean are rather common. 

You can see a four trace display on this sample NanoVNA; I couldn't begin to guess what kind of thing it's sweeping from 50 kHz to 900 MHz.  (Image clearly from DX Zone; they don't sell these (or anything that I know of) but are an information aggregator.)

So what’s an S-parameter?  The S stands for scattering, but what does that mean?  Ever seen the “one way glass” that’s used for security (or used to be)?  The light is scattered in the favored direction to get it to work the way they want.  If you look at the glass from the outside, you see your reflection; the security guy inside sees you plainly but doesn’t see his reflection as clearly as you see yours.  If there’s a poorly placed light on his side of the glass, you may be able to see him as well.

In RF circuits, when you input a signal into an amplifier, filter or really anything, a (hopefully) tiny amount is reflected back.  Most goes through the network, exactly how the input changes to the output is what’s being measured.  Some of the output maybe reflected back to the input because the Device Under Test’s output impedance doesn’t match the circuit it’s connected to. 

While S-parameters can be measured and calculated for three, four, or any number of ports, the most widely used are for two port networks.  The four parameters are S11, S21, S12 and S22; you’ll see those written that way or as subscripts: S11, S21, S12 and S22.  If you want to be published, subscripts are probably the way to go; since it’s a bunch of extra work to use subscripts in Blogger’s editor, please forgive me for using plain script.  In real life, you’ll see both formats used.  In all cases the format is S (port measured at, port measured with respect to); in other words, S11 is the signal measured at port 1 with respect to port 1; S21 is the signal at port 2 with respect to port 1.  

Direction is all important;  S21 is the signal at port 2 with respect to the input at port 1; if it’s bigger than the input, the thing being tested has gain.  S12 is the signal at port 1 with respect to port 2; usually called reverse isolation.  While a passive network, like an attenuator, will have S12 = -S21, an amplifier won’t resemble the inverse of the gain (unless it was designed to be, amplifiers don’t work like that).  For example, the typical one or two transistor amplifier ICs you’ll buy might have an S21 of 10 or 15 db, but an S12 of 6 dB.  

In the case of S11, the input impedance, a signal from the VNA is applied to port 1 and the amount reflected to port 1 is used to calculate Return Loss – a single number for the input impedance in dB; the direction separates the signal going to the input and the (expected to be) much smaller signal returning to the VNA port 1 determines the value of S11.  It’s the same basic description for the output Return Loss; the VNA measures the signals going both directions on the output pin.  Return loss is expressed in decibels by the VNA, but since it’s a measurement of reflected signal, it’s conceptually the same as the Standing Wave Ratio, or Voltage Standing Wave Ratio (SWR or VSWR) you’ve seen before.  

When measuring S11, port 2 is grounded and for S22, port 1 is grounded.  Mathematically:

The value the VNA displays it 20*log of these calculated values. 

So what are these S-parameters and the NanoVNAs good for?  To begin with, they’re entirely a tool for people who build things, whether antennas, passive circuits like filters or RF switching networks, and active circuits like amplifiers. They’ll test a length of coax for loss and other things you’ll want to know.  If you’re not a “home brewer” no test equipment is useful.  Exactly how useful depends on what you’re measuring.  If you’re working on something like a lowpass or bandpass filter, they’ll tell you everything there is to know.  If you’re working on an amplifier, they’ll tell you gain, and input and output matches.  Those are the big characteristics for an RF amplifier but they won’t tell you noise figure, linearity, intercept points or other things you need to know – depending on the application for the amplifier.

One thing that I’ve used the NanoVNA for several times, as well as my first, one port, VNA, my antenna analyzer, was to export a file of S-parameters of an antenna scan into a Smith chart to design a matching network.  Coming soon will be an introduction to the Smith Chart. 



Saturday, December 10, 2022

About That Messed Up Antenna - Conclusion

Back in mid-November, I told the story about one of my antennas being messed up and discovering it almost accidentally when I got the tower repaired and back up.  

The bottom line about that was that there was a Delrin (plastic) insulator that had gotten damaged by my overtightening a screw holding a few connections to one side of the antenna.  In there, I say I'm not sure exactly how to fix it and that's pretty much where we left the topic.  

In the next day or two, I contacted the manufacturer of the antenna kit, Directive Systems & Engineering (all commercial antennas are kits to some degree) and explained what happened.  The owner, Terry (W8ZN).  Terry told me in the year since I bought my antenna they had been starting to transition to using pressed-in, threaded inserts in the plastic specifically for this sort of problem because it had come up a few times.  He offered to send me some of the new standoffs, no charge, so that I could get the work done before Thanksgiving.  Those arrived on Saturday, November 19th, which was the day of my bike accident.  A minor problem was that Terry told me by email that day that he thought he had a brain fart and sent me the wrong size standoffs (from a different model antenna).  He told me to check the length of the replacements versus the originals and sure enough they were wrong. He then said to hang on for another few days for the correct ones.  He shipped USPS Priority Mail both times and ate the cost.

Unfortunately, that Tuesday was the day the effects of my concussion from the bike accident became evident and I spent it in the ER.  The standoffs ended up taking longer to get here, until this past Monday (12/5), but I wouldn't have been able to work on the antenna tower the previous week due to the dizziness from the concussion.   

That's a long story, but it sets up my being able to say it took until Thursday for me to be stable enough to stand up, use a ladder and do all the other steps to getting the antenna  working.  I'm happy to say that I was able to replace the standoffs, taking the feedpoint of the antenna apart and rebuilding it Thursday morning, and then after waiting until the heat of the day was past, getting the tower back up and in place later on Thursday.  This is the Before picture from the first post I linked to.  I don't have an after picture of this area.  It's hard to tell a difference looking at it, though.  The main visible difference is that I coated the area with the recommended Krylon clear coat after cleaning off some of the aluminum corrosion.

Instead of an after photograph, I have before and after network analyzer plots of the antenna's performance.  

I've yet to figure out how to combine before and after scans in the NanoVNA software I mentioned before, so I used my older AIM 4170.  Plots from that single port antenna analyzer have appeared here before.  

Because there's three traces per sweep and a half dozen sweeps, it's a bit cluttered.  The VSWR plot is in red, Z (impedance) magnitude is in green and Z phase angle in purple. Green and purple can be ignored.  All but the last one of these plots were taken with tower leaning over, supported by a wooden ladder and the back of the yagi (director) about 4' off the ground.  The antenna was pointing about 25 degrees south of vertical. At the very left edge of the plot, 50.0 to 50.250, you can see a bunch of traces with a slight orange-red looking line a little above the redder bunch.  That's after I put the tower back up and the antenna was about 25' above ground, parallel to the ground, and pointing south. 

The VSWR from 50 to over 52.0 is < 2:1, and around 1.15:1 where I spend the most time.  I don't even use the radio's builtin antenna tuner on this band.  Because the scale is a different, it's easier to read in this plot from the NanoVNA-App.  Bottom right hand plot shows VSWR.

The last couple of days have been the first time since hurricane Ian back on September 29th that the station has been fully usable, so being back to normal is a refreshing change.  I've been playing on various bands since Thursday afternoon.  

Oh, and you may have gathered that the dizziness from the (probably) BPPV after the concussion is around 90% gone.  Certain motions mess me up, but I haven't taken one of the pills in several days, and can go hours without noticing it.



Saturday, October 8, 2022

Post-Ian Antenna Repairs Are Done

On Thursday, September 29th, in the immediate aftermath of Ian, I posted about the damage done to my HF antenna and the Aluminum tower they’re mounted to.  This is a 20 foot tall Aluminum tower from Aluma, the big name in that market, mounted as a tilt-over tower to allow me to remove the antennas before a big storm.  One of the 6 dipoles in the Log Periodic Dipole Array (LPDA but usually just called a Log Periodic or LP) snapped off close to the boom tubes they were mounted to, rendering the antenna severely handicapped.  Instead of being usable on all amateur bands from 20 to 10m, (20, 17, 15, 12, 10), it potentially matched only on 20, 12 and 10.  

The issue, then was to repair the snapped off elements.  I talked about this more in my second post about things after the storm; a post that generated lots of conversations. 

As I say in that post, I had started out in the direction of putting a splicing tube over the two snapped-off ends on each side and fastening them through the splicing tube with self-tapping sheet metal screws.  Until a comment by Malatrope suggested a solid aluminum bar inside the two ends.  Since the Inside Diameter of the tubes was ½” and I had two pieces of ½” bar stock long enough to make the needed bars, and no real machining would be involved, I opted to go that way.  

I cut two pieces 6” long and after fussing with my selection of fasteners on hand, joined each end into the element with a 1” long 6-32 screw with a flat washer under the screw head and a lock washer under the nut. Before doing that I spent a long time scrubbing both the boom end and the broken off end of the elements.  I used shotgun cleaning brushes, both a wire brush and a cotton mop brush, until no more dust blew out of the tubes.

The fix looked like this.  I find it amusing that I can look at this photo and know it’s the right side of the dipole, which is the east side when the antenna is pointed north.

To demonstrate the fix, I have before and after antenna analyzer plots.  These plots are from my older antenna analyzer, the AIM4170, (see Ham Radio Series post 4 for more on antenna analyzers).  The reason I used this one and not my newer NanoVNA is that I have historical plots I can compare directly to with the AIM.    

The curves to mentally highlight are the red ones, the Voltage Standing Wave Ratio – the VSWR or simply SWR that tell you if your radio or tuner will match to the antenna.  For my purposes, anything above 3:1 is too high. First the before plot:

and the after plot

While the after plot has note at the bottom saying this was taken with the tower cranked over and the T6 pointed at the ground, they both were taken under those conditions.  Note the big hump in the before plot went as high as an 8:1 SWR.  The worst in the after plot is still over 3:1 in the 10m band.  Since the antenna was pointed into the ground, with the shortest element (probably most effected on 10m) mere inches above ground for both plots, this is only going to approximate the SWR with the tower vertical and the antenna interacting far less with ground. I feel comfortable saying the repair is valid.  

As I remarked several times in the comments to the second post about this set of problems, I see the antenna and tower issues as a short term and a long term problem.  Repairing the antenna and the house bracket attachment are short term problems while replacing the house bracket attachment with something better is a long term problem.  I have a tendency to start all thoughts about antenna projects as something to do “when it cools off” and I’d be happy if the house bracket fix lasted until January or February.  For that fix, I’ll be replacing the 3/8 by 2” long lag bolts with ½ by 3-1/2” long versions.  I don’t really know they will work but I also don’t really know they won’t work well enough to last until I come up with a better long-term fix. 

The house bracket has been modified and another coat of paint applied (because reasons).  I intend to do that short term fix tomorrow.



Friday, February 11, 2022

Our Annual Pilgrimage to Orlando

I guess I shouldn't call it an annual pilgrimage since it wasn't held last year; but that was because of 'rona, like 99% of everything else cancelled last year.  This weekend is the annual Orlando hamfest.  It was our 40th annual visit to the hamfest, and like every year since I retired, we went over today rather than the most crowded day (Saturdays).  It has been cool here, but warmed into the mid '70s as the day went by; I wore a short-sleeved fishing shirt and was comfortable all day.  By the time the temperature got into that "the sun is not your friend" range, clouds came along and kept it comfortable.

As I've said before the Orlando HamCation (real name) is now commonly referred to as the second largest in the world only behind Dayton's Hamvention (which is only Dayton in name - it's held in Xenia, Ohio).  Dayton tends to be the one where major products are announced.  Dayton, though, was cancelled both in '21 and '20, so while they're expecting to hold the Hamvention this year, they're out of practice. 

We were out of practice, too.  The last time we went to Orlando, we bought our tickets by mail.  In the past, we'd get an email that the show was coming and the way to get tickets was to send an SASE (Self-Addressed Stamped Envelope) and a check.  We'd send it around the Christmas-New Year's week and the tickets would be here within two weeks.  This year, we went looking for the email around Christmas and it wasn't there.  A check of the website showed that there was a new procedure.  We had to order the tickets online and pick them up at a special office at the east end of the property where the 'fest was held.

I admit to being uncomfortable with the routine, but it went well.  Parking is always packed at the HamCation and we were directed to a place just about as far from that office we needed to get to as one could be and still be on the property.  Thankfully, they had guys with oversized golf carts giving people lifts everywhere and one of them gave us a lift to that office.  They had our tickets and everything went without a hitch.  

Think of this as a stock photo, except I took it a few years ago. That's the north room of the Central Florida Fairgrounds where most of the smaller businesses and individuals rent tables, and the most obvious feature is the table full of used laptops.  The tables full of used laptops were back (although in different places). 

As I've said about other years, these are turning into uninteresting things, and that's a bit sad to say.   I rush to add that my interests in radio tend toward the unconventional, so it's not really surprising that I'd find the same 40 or 50 (or more) year old radios that I see every year not particularly interesting.  If you have a shopping list of things you need, they can be great places to get that special part.  

I did pick up one thing; there's a rather popular piece of test equipment called a NanoVNA**, a clever way of making a Vector Network Analyzer at previously impossibly low prices.  A VNA was always pretty much the most essential piece of test equipment I worked with since the first time I saw one, in about '86.  I've mentioned many times before that I frequently use an antenna analyzer for working on my antennas.  There are two issues with the one I have, neither of which has been insurmountable but were leading me to think of alternatives.  First is that my analyzer is obsolete and no longer available. Software updates have continued for it, but chances are pretty good that if anything happens to it, it's irreplaceable.  Second is that it only goes to the 2 meter ham band (well slightly higher - 160 MHz, I think).  An antenna analyzer is a one-port VNA; the NanoVNA is a two-port which means you can align or test filters or other circuits with an input and output connector.  Oh, and it's rated to around 10 times the frequency of the one port.  At the moment, the new NanoVNA overcomes both drawbacks of my AIM4170 and looks like a good path forward.

Other than that little purchase, running into friends and catching up with people whom we see yearly or less often ends up being what the hamfest is mostly about.  

02-23-22 at 1115 AM EST Edit to add this:

**  A comment from AndrewG says that the asterisked link is not official, and the official website is here at NanoVNA V2 Official Site.  I will note that the analyzer I bought does not look exactly like either VNA published on that second site, the connector position is very different, so I don't even know if it applies to what I bought.  Mine looks like the one on the site originally published above. 

Since I have nothing to conclusively show me that one site is more official than the other, I've added AndrewG's link here.  This may be relevant only to NanoVNAs claiming to be Version 2 (V2), which mine doesn't claim to be.  As always, and doubly always when dealing with Chinese clones, "caveat emptor" - buyer beware.



Sunday, May 9, 2021

A Ham Radio Series 26 – RF Noise and Coping With It

The concept of overcoming noise is the thread that unifies all of communications theory classes.  Virtually everything is in terms of achieving desired Signal to Noise Ratios (SNRs), and things like showing how much information can be transmitted at a given SNR.  Just as the concept of noise is ever present in theory classes, noise is present everywhere.  It should come as no surprise then that when we tune the radio bands we hear nothing but noise (in the absence of signals on the air).  

Various radio services have developed their own ways of dealing with the noise; the business band radio world, the police radios, VHF Marine radios and a ton of others use FM.  FM is a constant carrier mode; whenever someone is transmitting, the radio puts out the same power.  When the received signal is stronger than anything else coming in the antenna, FM has a capture effect that suppresses the interference, and the circuits aren't as effected by amplitude noise, so that noise is less of a problem.  That allows the receiver to use a squelch system that turns on the audio when the carrier appears and turns it off when the carrier isn’t there.  That has led to the ability to squelch the audio of other people on the channel whom you might not want to listen do, but open the squelch for people you do want to talk to, via Continuous Tone Coded Squelch Systems (CTCSS).

If you listen to the AM broadcast band (yes, it’s still there) or tune the shortwave spectrum, you hear broadband noise.  In general, you’re hearing “white” noise, called that because it contains an unshaped band of noise frequencies all at the same amplitude.  It’s called white noise is by analogy to white light, which is all the colors (which are different frequencies) combined.  White noise sounds like a hiss and if you tune through unused parts of the spectrum with a receiver with no squelch or audio muting, it’s all you hear.  Many people call this static, but the most common term hams use is QRN; one of the many Q-signals that hams have developed for sending in Morse code. 

In Communications Theory, it’s referred to as AWGN, Additive White Gaussian Noise, in case you come across that term.

Identifying Noise

If plain white noise was all you heard, you’d really have few problems.  White noise has been studied to death and it’s a rare (very bare bones) receiver that doesn’t have a noise blanker and often a noise reducer (NB and NR), although their effectiveness can vary.  The real world is full of noise sources of all sorts.  Ignition systems in passing cars produce a ticking or clicking sound, impulse noise, when every spark plug fires.  Switching power supplies, which are built into every LED bulb and many “wall wart” chargers for phones and other things, produce a broad spectrum of single tone-like spikes through the HF spectrum (some work at higher frequencies).  Distant lightning strikes cause impulse noise.  Electric fences make noise.  Many power tools and household appliances make noise; welders make especially bad noise.  Grow lights, fluorescent lights, appliances like air conditioners or refrigerators, solar panel systems (the DC-AC inverters), aquarium heaters, electric light dimmers and more.

I’ve noticed in my (relatively limited) time on the 80 meter band that I hear thunderstorms when cold fronts are a couple of days away as well as when they’re almost here.  From here, when there’s a cold front over the southeast US, from say Louisiana stretching over Alabama and northern Georgia to North and South Carolina, I hear those storms.  Then I don’t hear them as the front gets closer, but then hear them again when the front is close.  80 and 40 meters are worse than higher bands for storm noise.  The ability to hear storms both near and far is a bug, not a feature and makes those bands much less usable during the summer months.

This is just barely scratching the surface, and it might give the mistaken impression that these sources sound like each other.  That’s only in the broadest sense. 

One of the advantages of the modern Software Defined Radios, or radios enhanced by the addition of some DSP and software features, is that you can see the disturbances on a graphical display.  In the late ‘90s through the ‘00s, the amateur radio manufacturers started to add spectrum displays that allowed you to see the band you were operating on.  This led to people noticing odd noise patterns on screen that corresponded to noises they were hearing.  Sites like this one tried to create catalogs of what was seen and what it was coming from.  The ARRL has a very good page of pages on RF interference, noise and one similar to that first link but more encyclopedic.  Small SDRs like the RTL-SDR can be used as spectrum analyzer to help find noise issues. This pair of spectrum plots from the NK7Z site shows an 80 meter noise problem when present (left) and absent.  He's not hearing that low signal on the right while that noise is there, especially if it moves in frequency (as many types of noise do).



Coping with noise

Noise blankers are generally circuits that remove noise spikes like ignition noise rather than more broadband noise like white noise.  Sources like ignition noise, distant lightning strikes, electric fences, and a ton of other things.

Because white noise is random and full spectrum, it can be reduced by simply averaging the audio.  Over the time periods of most modulation, the noise changes many times while the audio doesn’t.  You might see this referred to as correlation filtering in Digital Signal Processing; the algorithm keeps correlated samples like voice and throws out uncorrelated sounds like noise.

Tracking down the source of noise problems can be rough, but there are many example stories you can find online.  If you have a rotatable antenna, you can sometimes tell which direction the noise is coming from, but if it’s not coming from something like a utility box you can report, that’s unlikely to do you much good.  If you point the antenna toward a neighbor and realize you’re hearing them welding or working on a street rod, you’ll probably have to work around that, using the radio when they’re not working.  Sorry, but I know of no way to get rid of all of that noise.

In the best case, you can find it’s coming from something in your house, or that you have control over.  Noise from most electrical things can be dealt with by some combination of putting the wiring through ferrite cores or wrapping the wiring around a larger ferrite toroid and possibly capacitors to ground.  In other words, filtering.  Sometimes it requires a few filters to suppress the noise sufficiently.

If you have the ability to reposition your antenna, that’s always a good thing to try.  Say you stretch out a random wire in your yard and you regularly hear a lot of noise, see if you can move that end so that’s not pointing in the same direction.  Pointing it 90 degrees away should make a big difference if that’s where the noise comes from.  A particularly bad place for an antenna is in your attic or very close to it because attics frequently have a power lines in them and they can carry noise from elsewhere.  Sometimes small position changes can make all the difference.  I realize that applies to lots of people who can’t put up an outside antenna due to a landlord’s approval or a Home Owner’s Association.  A truth that no HOAs or city zoning boards seem to understand is that an antenna causes less hazard to people and their electronics when the antenna is mounted higher and therefore farther from those things.

If your rig is anything other than the lowest entry-level HF radios, it probably has an adjustable Noise Blanker and Noise Reducer function.  Even my $25 RTL-SDR has that, in the SDR# (SDR Sharp) software that runs it.  Many people ask about leaving NR and NB on all the time.  In general, that’s not a problem.  I think Noise Reduction is less likely to be a problem.  It’s possible that leaving a hardware-based NB on all the time can actually create more noise if you set it too high.  This is an excellent video showing the effects of both of the NB and NR in action on a relatively high-end ham transceiver, the Icom IC-7610.  There are similar demonstrations with the IC-7300 which is more of an entry-level transceiver and is said to have the same software.

The more modern radios will also have things like an automatic DSP filter intended to eliminate the sound of someone tuning up, but will also work on noise sources that produce a fixed frequency (heterodyne) tone.  These operate opposite to the way the Noise Reducers work; they’re correlation cancelers not enhancers.  They’re fine on SSB voice and some can eliminate several stations tuning up at the same time.  On CW, they have to be tuned a bit more manually, since if they eliminated all of the single carriers, they’d eliminate the station you’re talking to, as well.



Sunday, November 29, 2020

A Ham Radio Series 19 – What is Phase Noise?

If I get a chance to talk with other hams about receivers, the questions often come down to why some receivers are so much more expensive than others.  Someone might say something like, “an RTL-SDR costs $30, while a professional grade receiver like an IC-R8600 covers a bit more frequency but costs $2300.  It’s way bigger, too.  What’s the difference?”  That’s a question with many answers, often deep in details.  It’s hard to read much about the details in product reviews without coming across references to transmitter and receiver noise performance and the mention of phase noise.  What is phase noise and why does less of it cost so much more?
 
This is one of those topics that can fill a book, so let me try to break this down to some simple ideas.  Consider an oscillator that you build to produce one single frequency; perhaps a crystal oscillator, perhaps LC; the technology doesn’t matter.  Ideally, the oscillator would produce just that one frequency you’ve designed it to produce.  It would output a voltage, V(t) = A * sin(2*pi*f*t) where A is the amplitude, f is the frequency, t the time the voltage occurs. 

As I harp on all the time, nature is a bitch and the reality we get is not that ideal value.  What we get is something like V(t) = [A+E(t)] * sin(2*pi*f*t+p(t)).  That’s a fancy way of saying that in addition to the desired output we get fluctuations in amplitude E(t) in time, and fluctuations in phase p(t).  As a general rule, the effects of the phase fluctuations dominate the amplitude noise.  Perhaps you’ve seen a signal on an oscilloscope where you can see the signal width (time) varying slightly, perhaps an edge of the square wave is jumping around slightly on the screen.  That’s called jitter and jitter is just another way of describing phase noise (you can convert jitter in time to phase noise and vice versa).  If this signal is listened to on a good receiver, or observed on a spectrum analyzer, it goes from being the ideal situation in which all the power appears on one frequency to a signal with a noise around it that drops off as the frequency offset increases.  This is called a noise pedestal.  The higher the phase noise from the oscillator, the higher that pedestal is.


This is frequency in the WiFi band, and shows noise in a 10 MHz span.  I’ll get back to some descriptions of what you’re seeing after some additional points.

One of the most important things to know about noise is that the way we see it depends on how we look at it.  (Hmm… almost sounds like a zen saying)  By that I mean that if it’s truly random noise, the power goes up as the measurement bandwidth goes up.  Because of that relationship and the ease of converting the effects in different bandwidths, noise is usually specified as a power in decibels below the desired signal in a 1 Hz bandwidth, or dBc/Hz.  To convert the levels seen, simply use 10*log(bandwidth ratio).  If we double the bandwidth, the noise power is 3 dB higher; if we use 100 times the bandwidth, the noise power is 20 dB higher and so on.  This allows easy, direct calculation of the effects of the noise on our system.

In that scope picture, it says along the bottom left that the “resolution bandwidth” (RBW) is 100 kHz; 10*log(100,000) is 50, so the noise in 1 Hz is 50 dB lower or -50dBc.  Look at the point 2 MHz above the signal that I circled.  That noise is about 50 dB below the desired signal, so -50dBc -50 dB says it’s -100dBc/Hz.  By the way, if you’re intending to measure noise, it’s good practice to make the video bandwidth (VBW) 1/10 of the RBW all the way down to 1/100 of the RBW.  This makes for long sweep times, but video averages out much of the variation in the noise level. 

What difference does this make?  First off, let’s look at the transmitter side.  Say you’re operating ham radio field day and you’re at a club station that wants one station on CW and another on phone on some band at all times.  Consider 20 meters, and say the CW guy is at 14.025 MHz while the phone guys are 14.225.  A good transmitter could have the phase noise down 145 dB 200 kHz away, right on the CW guy’s frequency.  You’re putting out 100W, which is +50 dBm.  Noise 145 below that is -95 dBm.  In the 500 Hz bandwidth the CW guy is using that adds back up to -68 dBm.  Sure that’s a tiny fraction of a billionth of a watt (1nW = -60 dBm), but it’s a very big signal to a receiver.  It’s 89 microvolts in 50 ohms when the radio can copy under 1 microvolt easily – less than ¼ of a microvolt.  

In reality, that -68 dBm only exists at the transmitter output and what the receiver hears depends on how much loss there is between the transmit and receive antenna.  The only thing that can help here is having their antennas as far apart as possible to add path loss that would lower the noise. 

Phase noise is also a problem for receivers, but in other ways than just hearing another transmitter.  The main issue is that phase noise on the receiver local oscillator can mix with undesired signals out of band and translate noise or spurious onto the desired channel as interfering signals.  For reasons I’ve never quite grasped, this is referred to as “reciprocal mixing” – it seems like straight up, normal mixing to me.  In effect, your receiver’s local oscillator becomes self-jamming.


This drawing depicts the LO with noise dropping off in the adjacent channel, mixing noise into desired IF.  In ham radio, where most services are not channelized, the offset can be tiny.  They’re attempting to show that the noise mixed onto the undesired signal is degrading the signal to noise ratio of the desired signal.  If there are spurious signals on the LO, they'll mix into the channel, too.  If the desired signal is weaker than pictured, you can imagine it completely under the noise pedestal mixed on top of it. 

Exactly how to design a low phase noise local oscillator is so far beyond the scope of what I can do here that I can barely address it.  In a PLL, the phase noise of the voltage controlled oscillator (VCO) affects the noise more farther from the carrier, and a VCO with bigger components, higher Q, will be lower noise (rule of engineering: Q comes by the cubic yard).  The amount of division in the frequency synthesizer affects the noise closer to the carrier than the VCO.  Direct digital synthesizers are typically lower phase noise than a synthesizer, but much richer in spurious output signals.  Those spurs also mix in to the IF by reciprocal mixing. 

The newer, higher-end ham radios on the market have eliminated the receiver LO by doing RF direct sampling; they bandpass filter the signals being received and then convert them to digital without mixing in the analog world.  Likewise, the transmit LO can be produced by a Direct Digital Synthesizer and the modulation performed in digital signal processing, before converting the modulated signals to RF to amplify and transmit.



Friday, June 12, 2020

A Ham Radio Series 4 - Antennas, Tuners, and Analyzers

The whole field of antennas and how to get them to do what you want comes up regularly.  There's dozens of books on the topic and an article or two isn't going to get you expertise.  Things that I think might be important may not be relevant to how you want to operate.  I've written lots on this from a more or less "how do they work" perspective.
Lately, I've been playing with something like The Three Laws of Antennas, patterned after Asimov's Three Laws of Robotics.
First Law: anything you can put up works better than nothing at something.
Second Law: nothing is best at everything.
Third Law: whatever you can put up won't be as good as you'd like.  Unless you have a Jeff Bezos-level budget including the property to match. 
A friend once told me that “Engineering is the art of compromise” and antennas are a perfect example.  The three laws emphasize that, each in their own way. 

It's my experience that most hams don't go out and put up some sort of megabucks antenna installation as they're starting out, going instead for something that's a bit more of a compromise, so let's consider a compromise antenna.  This is a length of wire that can only be resonant at one frequency and unless that frequency happens to be in a ham band, you won't be able to use it.   It doesn't matter what antenna you pick in terms of this discussion: a G5RV multiband antenna; an Off Center Fed Dipole (OCFD) or just a random length of wire, end fed. 

As a general rule, transmitters are fussier about the exact impedance of the antenna than receivers are and you'll find that your transmitter might not put out power at all - especially if it's a solid state (transistor of some kind) final.  What you need here is an antenna tuner.  I prefer automatic tuners (autotuners) because I like pushing a button and letting it do the work.  There are many on the market; the first I owned was by LDG and I still have a couple of them. 

What's inside an antenna tuner?  An impedance matching network called an L network.  It's simply two parts in a configuration that looks like the letter L, if you lie on your side.   The two components can be a series L/shunt C, a series C/shunt L, both can be inductors or both can be capacitors.  There are eight possible configurations; four to match to higher impedance, four to match to lower.   It helps to visualize the direction of impedance change, to higher or lower impedance, if you draw it almost like a little ladder.  The shunt component is on the higher impedance side.  In this example, we're climbing up to a higher impedance load.  If the load was lower impedance, the shunt component would on the source side - still the higher impedance side.  Another thing I like about an autotuner is that I don't have to think about this.  I push a button and it finds a good solution. 



The autotuner is an L-network with a bunch of coils and capacitors with relays to switch the series and shunt components of the L-network end to end and change their values rapidly; series adding inductors or parallel adding capacitors.  The tuner tries a combination, measures VSWR, compares it to the starting value and goes through an optimization process to find the lowest VSWR it can get.  In the end though, it’s electrically two components.

If you shop for radios, you'll find that a number of models feature an internal autotuner; everyone I've seen is limited in the range it can tune to 3:1 VSWR or less.  By comparison, the external autotuners tune a much wider range of impedance, 10:1 or more.  There are also external tuners that are more than just a two component L network; they can tune even wider ranges.  I've had older model radios that tuned well beyond the 3:1 range, which is a fairly minor adjustment.  Newer radios have software that does that first measurement, sees that it's starting above the limit, and won't try to tune at all. 

Do you need an antenna analyzer?  What is an antenna analyzer, anyway?  An antenna analyzer measures the impedance of the antenna.  Some are manual, like the popular MFJ-259D, you set them on frequency and read off the Resistance and Reactance.  You need to tune the frequency and see how the reactance (X) varies to see if it's inductive or capacitive - if the reactance goes up with frequency, it's inductive and if reactance goes down, it's capacitive. 

The manually tuned analyzers like the MFJ are lacking in a lot of features, but you can trim an antenna for lowest VSWR with one.  There are many antenna analyzers that do a frequency sweep for you and save the impedance values, both resistance and reactance with sign, save plots, or even export files of your antenna data for use in antenna design (or redesign for new purposes). 



“In the old days,” we used to tune an antenna to resonance by turning down the transmitter power, keying it up, measuring SWR with an SWR meter, and keeping track of how it changes.  If you're putting together a station, you should consider an external autotuner if you have a radio that limits tuning to 3:1, and especially if your radio doesn't have a built in tuner.  An analyzer is a purchase that makes most sense if you plan to experiment with antennas or want to build more.  They make keeping track of changes in your antennas easier, too.  I have an analyzer (not made anymore or I'd show you a picture) and since I make little odds and ends around the shack, I use it to measure components as well as measuring antennas.  They're useful tools.



Sunday, January 26, 2020

The Details on the Saturday Diversion

What made my Saturday unusual and led to the unplanned way of spending the day is that I watched an antenna cable joint fail due to corrosion essentially right before my eyes.  On Friday afternoon, it looked like it had every time I had used my antenna analyzer on it; by Friday night it looked weird and by yesterday afternoon, it was an entirely new level of weird I'd never seen.

Fixing joints, whether coaxial cable connectors or plug-in connections, is not a new thing.  There are whole product families of contact cleaners to fight this issue.  It's just the first time I've ever watched one go from working to failed in real time.

Two years ago this past week, I had started trying to think of ways of getting my lowest frequency antenna to work on the last band lower in frequency that hams are allocated.  It's called 160 meters after its approximate wavelength and its frequency limits are 1.8 to 2.0 MHz.  For the newbies, ham radio has a schizophrenic (but useful!) tradition of referring to their bands by a wavelength in meters instead of frequency.  Any frequency can also be specified by a wavelength; 160 meters exactly is 1.875 MHz   My lowest frequency antenna, a Cushcraft MA8040V, is an electrically short antenna for 3.5 - 4.0 MHz, 80 meters and 7.0 - 7.3 MHz, 40 meters.  My antenna is slightly shorter than 1/8 wave on 80 so around 1/16 wave on 160. 

The problem with electrically short antennas is that they tend to be low impedance and act like capacitors.  It's a law of RF design that optimum power transfer occurs when the source and load are the same impedance and one way of doing that is an external circuit that tunes the antenna to make it match 50 ohms.  I think it's fair to say there are no radios on the market today that are designed for something other than 50 ohms resistive.

Impedances can be thought of as series resistor/capacitor (RC) or resistor/inductor (RL) circuits.  Transmitters are designed for 50 ohms resistive.  My antenna was 2 ohms resistive at one frequency; at others it was close to 2 ohms in series with a capacitor while at one spot above the 160 band it looked like it was in series with an inductor.  In Smith Chart* format, it looked like this (red trace along the left circumference and table of values below the chart):


Matching an impedance ratio of 2 ohms to 50 (25x) brings trades and limits that are hard to deal with (have I ever mentioned that physics is a bitch?).  I decided to find an approach that would get me on the band, even if it wouldn't be broad enough to include the whole band.  That circuit is in yesterday's post

Over the course of a few days, I got an impedance transforming circuit to work but never really tried it out.  There's a handful of reasons, but in the last several months I've looked at this circuit and wondered if it was actually useful.  It's possible to transform the antenna into a reasonable load but still have crappy results due to other reasons (too much loss in the cable to the antenna, or problems with radiation angle from the antenna, for example).

When I installed the mandatory Windows 10 "upgrade" on the ham shack computer last week, it refused to allow the cable I used for the USB to serial port connection on my antenna analyzer.  After fighting that for a day, I surrendered and ordered a new USB to serial port cable.  That came Friday.  When I got it to work with the analyzer, I retook the same measurements I had taken on the antenna two years ago and got a very similar plot.  Not identical, but “within experimental error.”   The circuit sweep looked like this (just focus on the red curve - where it's lowest is the best).


As Friday afternoon turned into Friday night, I put my matching circuit inline with the radio, and found it didn't work.  I hooked up the analyzer again and the antenna as viewed through the circuit looked different.  “That’s weird.”  Then I tried the antenna on bands that I always use it on without this little circuit, 80, 40 and 30 meters, and some of those wouldn't work.   I thought it would be best to try experimenting on the antenna during the day yesterday.  Because these bands are busiest at night, I figured if I worked on it during the day I wouldn't interfere with other stations.

Yesterday afternoon, I swept the antenna again and this time it looked even more different.  In place of the three curves above were three lines sloping a bit downward to the right, but very flat.  The unusual appearance extended over the entire 1.7 to 10.5 MHz spectrum I tested.  That would be very hard to do deliberately.  More experimentation followed, and I eventually tested my two other antennas.  Those worked fine, which tells me whatever it was that went wrong, it was just this antenna.

Eventually, I sat down on a work stool at the 80/40 antenna and took the connection between my buried cable and the antenna apart, finding it was horribly corroded.  I cleaned it up with sandpaper, files, and a spray on contact cleaner, eventually getting it to look more normal.  Then I decided the prudent thing to do would be to replace the connectors and treat them as a new antenna.  When I retested the antenna, the new plot laid almost perfectly on top of the one with the formerly corroded connectors. 

I tried the antenna out last night around 9PM on 160m and found it seemed to work well.  There was a contest going on, which leads to lots of people calling CQ (contact with anyone) and lots of chances to see where you contact.  I worked a handful of states, from Arkansas up to New York, and two Caribbean islands: Aruba and Grand Cayman.  I didn't spend much time testing it out on the air, just about an hour.


* Looking back at the blog, I see I've never done a "meet Mr. Smith Chart" tutorial post to link to here, so I'm not quite sure where a good one lies.  Spread Spectrum Scene has a page with a lot of links that you might find useful.  One of the most useful freeware programs I've ever come across is SimSmith by Ward, AE6TY, where you can not only analyze and simulate circuits on the Smith chart but can do things like filter simulations.

PS - I know if I called this post “Putting the Cushcraft MA8040V on 160 Meters,” I'd get a whole different bunch of readers.  Maybe five or ten. 



Tuesday, September 3, 2019

Post Mortem on my Lightning Strike

A little over a month ago, we were blasted awake by an extremely loud blast of thunder and within a couple of hours realized we had the worst damage we'd ever had from lightning and a lot was damaged.  As the weeks have gone by we discovered more of what was damaged and now think we've found everything.  We've have been able to fix some things, replace some, get some serviced and are still working on a few others.  This is still going to take a while. 

While we experienced damage to a few things elsewhere in the house, the most damage was in the ham shack.  The control box for my antenna rotator blew out, taking out the computer it was attached to, and the computer took out the radio it was attached to (at least on that one function).  One antenna showed up as open, the other two are fine.  Finally, the big thing, I have a linear power amplifier that won't turn on.  I've taken that apart to pull out the power supply for more troubleshooting.  When I found the part that I think is blown in the radio, I realized it's in a specialized package I'm not really set up to work on.  (It's in a 36 pin QFN, drjim)  I opted to send the radio for factory service.  Those guys wince when they have to replace those. 

Since then, I've been trying to figure out exactly what happened.  I have a small tower by many ham's standards, just 20 feet tall with a mast that gets that up to 26.  Many people would assume the tower was struck, since the damage focused on things in or on the tower, yet there's no damage apparent to it. 

Off to the tower's northwest is an oak tree that's now in the range of 35 to 40 feet tall, so quite a bit taller than the tower.  To its south are a couple of palm trees that are close to 30 feet tall and to its southwest is a maple tree that 's also in that 35 to 40' tall range, too. 

I've seen pictures of trees that have been hit by lightning and I've looked at the oak for signs it was hit - the bark splitting or blown off the trunk.  The tree showed no apparent damage.  Sunday, while putting up the shutters for Dorian, I found myself standing over near those two palm trees.  That's when I noticed interesting, telltale signs on the bark.


There are four or five trails from the top to the bottom of the tree.  More or less straight along the entire trunk, each looking blown out from the inside.  It wasn't until we were done with the shutters that I paid more attention and looked up to where the palm fronds grow out vertically (fronds would be called leaves on any other tree); I noticed one was bent over nearly double near the top of the tree.


The stem portion of the frond (circled in red) appears broken and even blown apart.  It looks like the palm took the lightning strike, and induced a strong current in the tower, which is about 25' away. 

I had taken down my antennas on Saturday and inspected the damaged antenna, finding no evidence of damage.  On the other hand, I hadn't taken apart the part most likely to be damaged, a transformer.  I was more interested in getting it sealed well so that when the storm is over I could look into it.  I capped the connector on the cable that attaches to the antenna and sealed it against the rain.  Today, with the storm looking less and less like a threat and with time available, I attached the cable to the bad antenna to my analyzer.  My reasoning is that I know the cable is open now, so if disconnecting the cable from the antenna didn't change the results I must have substituted one open for another.  Today's plot looked exactly like my last plot of the blown antenna. 

The antenna analyzer has a function that will tell you the distance to an open or a short on a bad length of cable.  That function told me the trouble was 8.9 feet from the instrument.  I realized that meant it was inside the room, and I quickly realized what it was.  I had a surge protector where the cable enters the house, attached to my heavy ground wire.  It was blown.


Replacing the Alpha Delta Transi-Trap with a dual female connector made the instrument tell me the open circuit was now 56 feet away, which is close enough to how long the cable is.  As luck would have it, I have a replacement surge protector (probably better quality than this one) from a company that got out of that business. 

Lightning causing damage by inducing current in a nearby conductor might well be the most common type of damage there is.  Lightning strikes vary in their current, but currents ranging from tens of thousands of amps to well over a hundred thousand amps have been studied.  Like an electrical transformer, current surging through a conductor (of sorts) like a tree induces current to flow in other conductors nearby.  How large that current is depends largely on the distance.  It can be coupled by the magnetic or electric field.  I think the current flowing in my radio tower induced currents in power lines in the walls which flowed around the house.  We had concluded earlier in the aftermath that things with long wires attached were more likely to be damaged.  It all adds up.

I'll know within the next couple of months if the palm will survive the strike or if it's already dead and just doesn't know it.



Saturday, August 31, 2019

Temporary Reprieve - Latest on Dorian

I've long had a saying while keeping track of hurricane forecasts, "the models giveth and the models taketh away".  For about a day, the forecast landfall moved south of us from the location plotted Wednesday, down to south Florida - somewhere around Palm Beach to Jupiter.  Then the models reeled that back and started moving the path closer to us, went past us and is now well offshore.  The models gave, took it back, then gave something different.

So I don't want to say we don't need to pay attention, but the models and forecasts have been bringing the turn to the north earlier in time by about a day, with the result that the storm appears to be passing us well to sea.  The latest forecast plot.


We're still in the Cone of Doom, just south of the bump on the East Coast - Cape Canaveral.  A tropical storm watch comes within 25 miles south of the house and it's reasonable to expect it to extend farther north tomorrow, but I don't bother with shutters for a tropical storm.  My current plan is to get a good look at the morning plots and decide if the shutters go up in the morning.  What I'll be looking for is if the cone shifts left tomorrow.  The path has been looking like this since this morning, and the various models almost all reflect it staying offshore and perhaps offshore the entire US. 

This is when we say, "you don't let your guard down until it's about a thousand miles past your location".  It has been hard to forecast so far, and that doesn't fill me with confidence. 

The plot of arrival time of tropical storm winds looks to be Monday morning, perhaps as early as 8AM, so any time tomorrow would be good to put up the shutters.  Being August, it's pretty hot when you don't get a cloud, so either up early or late in the day. 

Today, I took down my antennas.  The entire installation needs to be examined and a handful of problems from the lightning strike need to be troubleshot and fixed.  My antenna projects always begin with the phrase "when it cools down", which is typically by early November (but can be earlier), and that had been my plan.  Only one antenna was unusable and looked bad with my network (antenna) analyzer (current model) and since I have other antennas, I'm not completely off the air, I already found a problem I didn't even know I had. 

So here we are, in the midst of a temporary reprieve, hoping it becomes a permanent reprieve.  Over in the Bahamas, they're preparing for up to 24 hours of category 4 winds.  Honestly, pray for folks there.  From what I know, I'd be surprised to see much standing there by the time the storm clears out. 


Friday, August 2, 2019

My Turn for a Bad Lightning Strike

On Wednesday, fellow Florida blogger Divemedic said that his house had a lightning strike on July 30, just one day short of one year since the last time he was struck.  I honestly don't know where he lives with respect to me, but I believe he has mentioned being closer to Orlando and Orange County which are north and west of me.  Closer to the actual lightning capital of the US.  I live on the east coast of the state, south of Cape Canaveral.


In this graphic, I live where the light blue and green areas converge just south of the bump on the middle of the east coast.  Call it 15-20 "flashes per square mile per year" while I think he's in one of the red or orange areas (25-30).  Like all statistics, those numbers never apply to the individual.  When you're number's up, your number's up.

Our number was up yesterday.  Early after sunrise (which is around 6:45 EDT) and not quite out of bed yet, we had an enormously loud crack of thunder.  Startled awake, I looked out of the bedroom window and thought that for a second I saw a glowing red ball in the air, as is sometimes seen immediately after a lightning strike in the super heated air the lightning blasted through.  As seen in this photo, taken from a now-unavailable ten second video I linked to in May of 2015.  I dismissed that as probably impossible - I've become less sure of that.


It wasn't until we got out of bed 10 or 15 minutes later that we realized we had been struck.  To begin with, there are three clocks close to our room; all three had been reset to midnight and started over.  Here's the weird part: one of those clocks is battery-backed up to keep time through a power outage.  Here's the exceptionally weird part: the other is battery operated (no power line) and one of those so-called atomic clocks that gets time sync by radio (no external antenna).   It's not just one.  Another battery operated atomic clock in our guest bathroom also reset to midnight.  This sounds more like EMP stuff than lightning strike.  Has anyone ever seen a battery operated clock get reset by nearby lightning?

I've heard that lightning strikes are capricious - the damage seems to jump over some things to  damage another.  In the next room over is another battery operated atomic clock - it was unchanged.  We still don't know all of what was blown up, after a full day of combing the house, but damage is scattered throughout and in all rooms of the house.  On this computer desk are two desktops with 23" monitors.  One monitor blew out, the other monitor, virtually touching that one, is fine.  Both computers survived.  Also on this desktop, our internet cable modem and WiFi router were destroyed.  Since we stream TV services over the internet, our TV was out.  (Once again, we told each other if we had VOIP phone service we'd be 100% cut off from the outside world)  A couple of the house's circuit breakers were thrown but power came back OK when they were rest. 

Our central air conditioner's thermostat, mounted about 30 feet from the indoor air handler unit that it's wired to, blew out.  We have two model years of some wireless (2.4 GHz) remote telephone handsets.  One of the system bases and its wall wart power supply were blown out while the other set is fine.  Our hot water heater has a remote control head, again about 25 feet from the water heater that it's wired to, that was blown out.  The water heater (a tankless, gas fired water heater) is mounted outdoors and plugged into a weather resistant, GFI-protected, outlet outside.  The outlet was blown up - it wasn't possible to reset the GFI.  We replaced the outlet and once plugged in, the water heater seems to be running normally.  Without a control panel it defaults to 120F water and that's fine for a couple of days.  Ordered a control panel today to be here by Tuesday. 

All around the house, things are plugged into surge-protected outlets.  The router and cable modem that blew up were plugged into a surge protected strip.  What seemed to matter was long wires to act as antennas to the induced electric fields from the lightning.  A variable that complicates that conclusion is how susceptible the thing is by itself - we can hardly ever know how susceptible the thing is.  For example, we have an exercise bike that runs on a 9volt wall wart.  That 9 V supply is plugged into a surge-protected AC strip, but through a 6 foot long extension cord.  The 9V wire itself that goes to the bike is another few feet long.  The 9V supply blew out.

If you looked at our house for lightning targets you'd focus on my ham tower and the oak tree that has almost overgrown it.  It's possible the tower got hit, although I see nothing obvious.  My radios are working, but a central part of my station (and the most expensive part) is apparently at least partially blown.  It won't turn on.  The main HF antenna (a 14-30 MHz log periodic) is acting funny and needs to be looked at with my antenna analyzer, but I couldn't do that because the computer and monitor in the shack both act dead. 

We were able to talk with a helpful and nice kid at our local Staples and upgraded to a combination router and cable modem in one box.  We came home, hooked it up and found it wouldn't work.  We have to call tech support to authorize the modem and the woman I was speaking with said she could get signals from my neighbor's houses but not mine.  A cable company technician was out this morning, came in and found no signal on our cable.  Went outside and found no signal coming in from their closest distribution point.  Came back about a half hour later, after laying a temporary cable from their distribution point to the side of our house.  They have contractors who will be out to bury this one, like the one being replaced. 

I've had lightning damage before, but this is hands down the worst I've ever had.  I've lived in this house since 1984, 35 years, and we've lost a few things to lightning now and then.  A little over 20 years ago, in the days of dial-up modems and bulletin boards, we put in a second phone line for the computers.  We had a nearby strike that blew the phone line junction box off the back of the house, but there was surprisingly little else damaged.  I think some diodes in my antenna rotator control box blew.  Hmm.  Got to remember to check those, too.  I'll be doing this for a while.



Sunday, April 28, 2019

Radio Sunday #5 – A Little Radio Hacking

Now that we have a little background, let's look at the problem that started this: how big a problem is someone monitoring the local oscillator in your handheld?  How far away can they be.  We're going to draw on the architecture of the superheterodyne and decibel relationships to show you how it's done in real life. 

I'm going to start with my VHF/UHF handie talkie, a Yaesu VX-6R.  This is a recent production multiband VHF/UHF HT that is “high end” compared to the cheap Chinesium HTs or Family Radio Service (FRS) radios out there.  I'm not sure if they're still in production, but they're still widely available (for example).  It essentially receives from 500 kHz (0.500 MHz) up to 1.000 GHz and transmits on amateur bands at 2m, 220 MHz and 440 MHz.  Let's take a quick look at the specifications.


At the top, it says the architecture is dual conversion for AM or Narrow FM no matter what frequency you're tuned to.  For AM and NBFM, it converts to 47.25 MHz, then down to 450 kHz.  The first LO is likely to be a phase-locked loop frequency synthesizer with ways to switch the frequency (there are several), and the second LO is a fixed oscillator 450 kHz above or below 47.25 to mix 47.25 down to 450 kHz.  I think about the tuning range required of their synthesizer and see it could tune on high side or the low side (of 47.25 MHz), but high side is going to be easier, so I predict that the radio will have it's LO at the tuned frequency + 47.25 MHz. 

That's easy to test.  I happen to have the 2m frequency of 146.925 MHz programmed in, so I tune the VX-6R there and tune a second receiver (a long obsolete Icom R-10, 500 kHz to 1300 MHz, all-mode receiver) to 146.925 + 47.250 or 194.175 MHz. Sure enough, it's there.   

The question about this LO “leakage” is how strong it is, and over what sort of distances is it detectable.

Here's some rough numbers to guesstimate what that level should be.  Consider our block diagram of a receiver: everything we want to think about is on the left end with reddish or pink background.


This assumes typical performances, not excellent, high end military or best performances.  That local oscillator, the source we're listening to, is running at roughly +7 dB, 5 milliwatts.  The mixer will suppress that LO signal coming out of it's RF input pin on the left, and that amount is usually specified for the mixer.  This is a wideband application, and those are usually not the best.  Usually around 20 dB.  That puts the LO at the output of the RF amplifier at  7 – 20 = -13 dBm.  The amplifier will provide attenuation of signals on its output going “backwards” toward the input, usually called reverse isolation.  That depends strongly on the amplifier design and, again, I'm assuming this isn't a very high reverse isolation design, and call it 25 dB isolation.  Now were' at -13 – 25 = -38 dBm.  Finally there will be some filtering.  This is where a single purpose, ham band only (or whatever other band you're using) receiver has the advantage, in that they can design a better filter here.  During filter design, it's possible to decide you want better rejection of undesired signals above or below where the radio is receiving.  It's reasonable to get another 30 or 40 dB isolation from the filter.  That says the signal at the antenna connector would be -68 to -78 dBm, as a back of the envelope guesstimate.  Could be worse or could be better. 

How strong is mine?  This is a tricky measurement because the second receiver doesn't have a calibrated signal strength meter, but I can tell it's fairly weak.  I can connect the VX-6R directly to the receiver (and making sure my transmitter can't transmit into my receiver!), note its level on the radio's "S-meter" and set a signal generator to same level as the signal I get from the VX-6R.  That tells me roughly -75 dBm.  I can directly measure it by putting it on my (also ancient, long obsolete) spectrum analyzer and directly measure what's coming out of the antenna port.  That tells me around -82 dBm.  Those numbers agree pretty well, considering the crudity and lack of “real” amplitude calibrations anywhere. 

You can see in this photograph that I set the radio to 150.000 MHz (sideways, on top of the spectrum analyzer); first so that it can't transmit into the analyzer and second so that I could add 47.25 MHz easily in my head.  There might be whole dB of loss in the cable and adapters between the radio and the analyzer, but I doubt that.


How detectable is -82 dBm?  At what kind of range?  We have to set a sensitivity level to compare to, and here I'm going to say a reasonably good receiver will detect a signal at about -135 dBm (for those who understand, I'm assuming 500 Hz “CW” bandwidth -147 dBm noise floor - and adding 12 dB to split between NF and SNR; that is, say a 6 dB NF and 6 dB SNR, or a 3 and 9)  this isn't precise, but we just don't know enough about what the other side could be using.  That says my signal (at -82) is 53 dB stronger than needed to detect it.  How far away does the bad guy need to be for that signal to fade below threshold?  Roughly 180 feet.  I have a file in Mathcad that tells me the path loss for a given distance and frequency that lets me play with numbers to get close to 53 dB path loss. 


When you're trying to derive numbers like this, remember radio (and light, and other electromagnetic radiation) falls in an inverse square law (illustration near bottom).  If the guy trying to monitor you is twice as far away, he'll get 1/4 of the power; 6 dB down.  That means the signal lost 3/4 of its power by doubling distance.  Likewise to double the range you need to add 6dB, 4x more power, or the monitor needs 6dB more signal acquisition. 

This is a weak signal to detect near that distance, and the quality of the operator and their gear matters.  If they have a high gain antenna, they they could double or quadruple the distance they could detect the radio from, but have to point the antenna at you.  Methods of signal intelligence are whole 'nother set of questions.

Because I've been a ham since I was 22 and have been experimenting with radios since I was 13, I've accumulated some radios and test equipment over time.  I talked about using my old radio, a particularly old example of the Icom R10, because I wanted to point out that a wideband radio is a cheap spectrum analyzer and I found the signal there first.  I'm not up to date on how their current offerings compare but what sets the R10 apart from some radios - and what you should look for - is that at any frequency you can dial up any mode.  For listening for LOs, which aren't modulated, you need to listen in CW or SSB modes.  I'm sure there are other radios out there that would fit the bill as well as the old R10s, I just don't have a rehearsed answer for what to get.


EDIT 4/29/2019 at 1050 EDT: Improved paragraph about power loss with distance (third from last) and corrected error pointed out by drjim in the first comment. 


Monday, December 7, 2015

Receivers and Other Radios - Part 2

An anonymous comment to Part 1 brought up a question I think I should answer, and as I've said before, the only real privilege to owning a blog like this is getting to write a wall of text to a simple question.  The question was:
Can I ask why you chose the VX-6R and not one of those Baofeng radios from China? Your Yaesu is over $200 while the Baofengs are under $50.
The cheating answer here - in the sense that it doesn't answer the real question but is the truth - is that I hadn't heard of Baofeng when I got the Yaesu, and I don't think Baofeng radios were imported into the US at that time.  Again, that's not the answer Anon wants.

What I said yesterday was that for trying to hear the AM,FM or Shortwave broadcast bands, the $18 Kaito outperformed the Yaesu VX-6R, so if I'm understanding you correctly, you're thinking why not get a Baofeng for transmitting on VHF/UHF and the Kaito for general coverage?  In short, I think that's a fine approach!  I don't have any personal hands-on experience with the Baofeng or other Chinese radios, although friends tell me they're entirely serviceable.  Given that, something like this would serve your 2meter/440 FM needs for $34.  Add the Kaito and you have much of the capability of the VX-6R, but not all of it, for well under half the price.  The Yaesu tunes through other services you might want to listen to, like land mobile (police and fire), weather radio, Family Radio (FRS) and other scanner fare.  Plus, it transmits on the 225 MHz band, which that particular Baofeng doesn't.  Finally, the VX-6R is submersible; waterproof to 3 feet of water for 30 minutes (Japanese Industry Standard JIS7), although there are things the user needs to comply with to keep it from being damaged. 

I've heard that the Baofeng and other Chinese radios can be difficult to use, but I don't think they have anything on the Yaesu.  As Dr. Jim says, if I'm not using it regularly, I can forget how to do most things with it.  That's the problem with these little radios.  A big radio has room for a control panel with lots of buttons.  With these micro radios, to get some function you want, you'll need to press button A for two seconds, then press Button C for one second and it only works if you stand on your left foot with your tongue hanging out... that sort of thing.  I can switch VFO to memory and back, or key in a frequency in VFO mode, but that's about it.

The first really broadband receiver I bought was a now obsolete Icom radio called an R10.  This tuned 0.5 to 1300 MHz, and the version I have has no frequencies blocked.  On any frequency, you could punch up any mode to listen to, broadcast FM, narrow FM, AM, even Single Sideband.  The Yaesu VX-6R and most of the newer radios will decide what mode you want based on the frequency you enter.  That made my R10 usable as a "poor man's spectrum analyzer", and I brought it to work for years.  Sometimes we'd hear something unexpected and it was a sanity check: if I heard it in the R10 and the radio I was working on, it was real.  If not, it was a problem in the radio I was working on.

Like the Yaesu, if you put a signal generator on the antenna connector and measure its sensitivity, it's quite good.  If you hooked it to the meager little, rubber ducky antenna that comes with the radio, that's a disappointment.  A worthwhile experiment would be to try to put different length wires on the broadband radios and see what makes a good antenna.  A lot of shortwave listeners have just put up a random length of wire; 30 feet, 50 feet, whatever, and use it for listening to the entire 3 to 30 MHz spectrum.
Despite the little rambling here, I hope this answered your question