Circuit.Cellar.192.Jul.2006_Martini.pdf

(704 KB) Pobierz
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
FEATURE ARTICLE
by Neal Martini
Compact Spectrum Analyzer
If RF testing is in your future, you’ll need a spectrum analyzer.But they don’t come cheap.
Your best bet is to follow Neal’s lead by building your own 4
× 4
system.
I t is funny how simple beginnings can
lead you down convoluted paths of learn-
ing and discovery. About a year and a half
ago, I was playing around with my auto-
matic garage door remote control unit. I
was experimenting with signal encoding
at the time, and I wanted to look at the
scheme used in my remote. One thing
led to another, and before I knew it, I was
trying to determine the RF frequency at
which the transmitter was operating.
I then built RF filters to look at sig-
nal levels and RF generators to aid in
prototyping and testing. Next came RF
mixing, frequency doubling, and so on.
You can see where I’m going here. I
became hooked on RF and all of the
art that goes along with getting RF cir-
cuits working properly. Currently, all
of my design-related pursuits are
focused on circuits and test equipment
at radio frequencies.
When it comes to RF test equipment,
the spectrum analyzer is the Holy Grail.
Unfortunately, both new and used RF
spectrum analyzers are extremely expen-
sive. There are a variety of home-brew
spectrum analyzers available on the ’Net.
Some are more sophisticated than others
because all of the circuit elements are
built from scratch. They feature complex
filter constructions, have precise PCB lay-
outs that turn PCB traces into inductors,
and include a lot of discrete components.
Other somewhat simpler designs fea-
ture integrated modules borrowed
from the TV/VCR tuner world.
These are easier to build, but they
lack sophistication and functionality.
As I was browsing the ’Net for an
alternative to a home-brew spec-
trum analyzer, I stumbled across the
Maxim MAX3550, which seemed
almost too good to be true. Not only
a)
b)
Photo 1a— My spectrum analyzer’s PCB is shown here with an optional keyboard and LCD, which I unplugged for
clarity.The 4 × 4 PCB includes the complete spectrum analyzer with a 5-V power supply. b— The spectrum ana-
lyzer can be controlled as a stand-alone device from the keypad or from a virtual keypad using a mouse.The output
spectrum can be a cursored trace on an oscilloscope or a more elaborate PC screen display with a few extra whis-
tles and bells.Alternatively, the power level at a single frequency can be displayed on the LCD.
does it perform much of the processing
required to construct a spectrum ana-
lyzer, it’s also highly integrated, simple
to lay out, and easy to control. When I
found this part, I knew I had to try to
design yet another spectrum analyzer.
The result of my effort is the single
4
board directly to an oscilloscope to dis-
play the output spectrum. All of these
combinations are possibilities. The circuit
is relatively easy to build, and construc-
tion is pretty forgiving when it comes to
the layout and part selection processes.
Read on if you want a low-cost spectrum
analyzer for your future RF endeavors.
PCB shown in Photo 1a.
You can use my spectrum analyzer
board as a stand-alone system with its
own keypad and display, or you can con-
nect it to a PC. If you do the latter, the
output will be displayed on the PC’s
screen and all of the keypad’s functional-
ity will be available with a mouse. You
can also connect the spectrum analyzer
× 4
ANALYZER FUNDAMENTALS
A spectrum analyzer is used to display
the power distribution of a signal as a
function of frequency. This type of display
is said to be in the frequency domain as
opposed to being in the time domain as
displayed on the screen of an oscilloscope.
To illustrate the value of a spectrum
analyzer, let’s look at some typical
signals being analyzed with spec-
tral analysis.
If the input to a spectrum ana-
lyzer is a pure sine wave, the out-
put spectrum might look like
what you see in Figure 1a. The
arrowed line at F 1 indicates that
the frequency of the sine wave is
a)
b)
c)
P 1
P 1
P 1
P 2
F 1
Frequency
F 1
F 2
F 1
2F 1 3F 1 4F 1
Frequency
Frequency
Figure 1— Compare the spectrum of a pure sine wave (a) to the
spectrum of two equal power pure sine waves (b) and the spec-
trum of a slightly distorted sine wave (c) .
60
www.circuitcellar.com
Issue 192 July 2006
CIRCUIT CELLAR ®
836276886.048.png 836276886.059.png 836276886.061.png 836276886.062.png 836276886.001.png 836276886.002.png
 
F 1 and the power level is P 1 . If
you have an oscilloscope that
operates at RF frequencies, you
can get the same information
from its screen. But oscillo-
scopes that operate at up to
1 GHz are extremely expensive.
Figure 1b illustrates the spec-
trum analyzer output that occurs
if your input signal is the sum of
two sine waves of different fre-
quencies and equal amplitude.
There are two components to
the signal, and the frequencies
and power levels of each compo-
nent are displayed. Even if you
were to use a high-frequency
oscilloscope, this information
would be difficult to discern from the
oscilloscope’s display.
Yet another example of spectrum
analyzer output is shown in Figure 1c.
This is the output that results when a
distorted sine wave is the input signal.
The components at the various fre-
quencies show the amount of harmon-
ic distortion contained in the signal.
A spectrum analyzer facilitates other
operations too. You can use one to deter-
mine filter responses, measure field
strength, tune antennas, locate noise
sources, and debug RF circuits. As
soon as you have a working spectrum
analyzer, you’ll wonder how you ever
accomplished anything without one.
mixing process produces both the
sum and difference frequencies,
which would result in unwanted
signals being shifted into the BPF’s
passband without the tracking
filter. Because this tracking filter
doesn’t have to be too narrow to
reject the image frequency compo-
nent, it lends itself to an easier
implementation than the tracking
filter in the swept filter approach.
Modern high-frequency receivers
use a double-conversion architec-
ture (see Figure 2c). The beauty of
this approach is that there are no
tracking filters to deal with. The
added complexity is a second mix-
ing stage. The front end fixed LPF
removes components outside the highest
frequency range of interest. The first
mixing stage moves the signal frequency
component of interest up in frequency
into the fixed passband of the first BPF.
The shift up in frequency causes the
image frequency to be above the fixed
passband of the input low-pass filter
(LPF), so there is no image frequency
content in the passband of the first BPF.
The second mixing stage brings the
frequency of interest back down. This
allows extremely narrowband final filters
to be used for maximum selectivity.
I used the double conversion architec-
ture for my spectrum analyzer design.
Why? Because it is relatively easy to
implement fixed filters and variable-
frequency VCOs.
a)
Tr a c k i n g
filter
Input
Power
b)
Tracking filter
Mixer
Input
BPF
Frequency
VCO
c)
Mixer
Mixer
Input
LPF
BPF
BPF
VCO
VCO
Figure 2a— The center frequency of a narrowband filter is swept across
the frequencies of interest. b— The VCO shifts the frequency of interest
into the passband of the BPF. c— The two mixers shift the frequency
into the passband of the BPF without needing a tracking filter.
tectures: swept filter, heterodyne with
tracking filter, and double conversion.
The swept filter analyzer varies the
passband of a band-pass filter (BPF)
over the frequencies to be covered (see
Figure 2a). It produces an output voltage
that’s proportional to the amplitude
levels of the various frequency compo-
nents. Although it appears simple, the
direct implementation of narrowband fil-
ters variable across 1 GHz is difficult.
The heterodyne with a tracking filter
approach is much easier to implement
(see Figure 2b). It has been the basic
approach used in radio receivers for years.
Basically, a voltage-controlled oscillator
(VCO) shifts the frequency of interest into
the passband of the fixed-frequency nar-
rowband BPF located at the output. The
purpose of the tracking filter is to elimi-
nate any signals located at the image fre-
quency before the signal enters the mix-
ing process. This is necessary because the
ARCHITECTURE CHOICES
Let’s look at some spectrum analyzer
architectures so you can better under-
stand my design. Figure 2 illustrates
three different spectrum analyzer archi-
SIGNAL PROCESSING
My spectrum analyzer is fairly sim-
ple (see Figure 3). Diagrams showing
Programming
connector
ICD
Input
1,274–2,111 MHz
BPF1
BPF2
BPF3
LCD
Mixer 3
Mixer 1
Mixer 2
V
F C = 1,226 MHz
BW = 65 MHz
F C = 45.75 MHz
BW = 5 MHz
F C = 110.7 MHz
BW = 330 kHz
IF 1
IF 2
0–1,000
MHz
PWR
Keypad
BPF4
1,180.25 MHz
33–37 MHz
V
VCO 1
MCU
VCO 2
VCO 3
F C = 10.7 MHz
BW = 7.5 kHz
PLL
PLL
PWR
Control
PLL
Control
Control
RF Gain control
Four-channel
DAC
RS-232
Connector
to PC
MAX232A
To oscilloscope
vertical
To oscilloscope
external trigger
Figure 3— Three frequency conversion stages translate the frequency of interest into the passband of the final narrowband filters and log amplifiers.The PIC18F4520 micro-
controller constructs the spectrum and drives the various output devices.The PIC18F4520 microcontroller also controls all of the conversions and gains.
Issue 192 July 2006 61
www.circuitcellar.com
CIRCUIT CELLAR ®
836276886.003.png 836276886.004.png 836276886.005.png 836276886.006.png 836276886.007.png 836276886.008.png 836276886.009.png 836276886.010.png 836276886.011.png 836276886.012.png 836276886.013.png 836276886.014.png 836276886.015.png 836276886.016.png 836276886.017.png 836276886.018.png 836276886.019.png 836276886.020.png 836276886.021.png 836276886.022.png 836276886.023.png
 
836276886.024.png 836276886.025.png 836276886.026.png 836276886.027.png 836276886.028.png 836276886.029.png 836276886.030.png 836276886.031.png 836276886.032.png 836276886.033.png 836276886.034.png 836276886.035.png 836276886.036.png 836276886.037.png 836276886.038.png 836276886.039.png 836276886.040.png 836276886.041.png 836276886.042.png 836276886.043.png 836276886.044.png
 
what the frequency spectrum looks
like at various stages of signal process-
ing (assuming the analyzer is locked
on an 800-MHz input sine wave) are
posted on the Circuit Cellar FTP site.
The front end of the process is basically
the double conversion architecture.
The first mixer/VCO moves the fre-
quency of interest up to 1,226 MHz,
the passband of the BPF1. For the
800-MHz hypothetical input signal,
VCO1 is set to 2,026 MHz.
Notice that there is no LPF at the
front end of the spectrum analyzer
like that in the double conversion
approach. The LPF needs to be only
2 GHz to reject the image frequency
components. I didn’t include an LPF
because my applications typically
don’t have content higher than 2 GHz.
If your application is different, you
can add an external BNC-connected
LPF. Also note that the VCOs are
phase-locked-loop (PLL) controlled for
high stability and ease of control. More
on PLLs later.
The second mixing stage shifts
the frequency of interest down to
45.75 MHz, the center of the BPF2’s
passband. The BPF2’s output is a 6-MHz
wide region of the spectrum centered
at 45.75 MHz. As you’ll learn when I
describe the hardware, many of the
center frequency and filter bandwidth
choices were dictated by the parts I
selected.
I chose two resolutions for the spec-
trum analyzer: one for broad frequency
looks and one for close frequency
examination. The coarse spectrum res-
olution bandwidth is 330 kHz. The
finer resolution bandwidth is 7.5 kHz.
These resolutions are readily available
in band-pass filters with center fre-
quencies of 10.7 MHz. The problem is
that the signal of interest is 45.75 MHz,
so another conversion stage is required
to bring the frequency of interest
down to 10.7 MHz. Mixer 3 provides
the required down conversion.
The 10.7 MHz centered content is
now delivered to BPF3 and BPF4, each
with their respective bandwidths. The
final task is to convert the output
voltages of the two filters to power
levels. Log amplifiers provide this
functionality by producing an output
voltage proportional to the log of the
input voltage. The log amplifier out-
puts are delivered to the microcon-
troller for display. I used a Microchip
Technology PIC18F4520 microcon-
troller for this project.
The PIC18F4520 microcontroller
controls the frequency scanning of the
RF portion of the spectrum analyzer. A
coarse frequency stepping of 330 kHz
is accomplished by varying the VCO1’s
frequency. The finer-resolution 7.5-kHz
stepping operation is accomplished by
varying VCO3. There are high- and
low-sensitivity operating modes.
Figure 4— The MAX3550 integrates many of the spectrum analyzer’s front-end functions.The Philips Semiconductors SA612A mixer shifts the signal of interest to 10.7 MHz for
filtering.The Analog Devices AD8307 amplifier performs the conversion to decibels relative to 1 milliwatt (dBm).
62
www.circuitcellar.com
Issue 192 July 2006
CIRCUIT CELLAR ®
836276886.045.png
These two modes of operation are
controlled by varying the RF gain in
the first mixing stage (also under the
control of the PIC18F4520 microcon-
troller).
My spectrum analyzer can display
its output spectrum on an LCD, an
attached PC, or directly on an oscillo-
scope. The PIC18F4520 microcon-
troller uses a DAC to generate the sig-
nals to drive the oscilloscope. An RS-
232 interface is included to communi-
cate with a PC. The PIC18F4520
microcontroller also responds to com-
mands from the optional keypad and
drives the LCD to display the power
level of a user-selected frequency. The
system includes a connector so you
can use a firmware development sys-
tem to in-circuit program the micro-
controller.
is the IC that got me interested in tak-
ing a crack at a home-brew spectrum
analyzer.
There are several ICs on the market
that are said to have single-chip TV
functionality, but I haven’t found any
with the level of integration and ease
of use of the MAX3550. The chip con-
tains all of the components necessary
to perform double conversion tuning.
It has the necessary variable gain RF
amplifiers, double-balanced mixers, a
band-pass filter, and PLL frequency
synthesizers.
Other one-chip solutions for TV
tuning require external VCO tuning
inductors and external varactors. The
MAX3550 has eight digitally selec-
table tank circuits and the necessary
varactors on the chip. Maxim has
somehow found a way to integrate the
required inductors and capacitors on
the chip, which isn’t an easy task over
the wide frequency operating range.
The operating frequency range extends
from 50 to 878 MHz, the standard TV
frequency space, while providing 60-dB
RF gain control. The response across
this frequency range is flat, typically
0.3 dB. The high-quality local oscilla-
tors have superior phase noise per-
formance of –86 dBc/Hz at 10 kHz.
The integrated filter achieves 68 dBc
of image rejection. Device program-
ming and configuration are easily
accomplished with a standard three-
wire interface to the microcontroller.
I am actually using the chip from
10 to 956 MHz, sacrificing some accu-
racy at the very high and very low fre-
quencies. All that’s needed to support
this part are a handful of SMD resis-
tors and capacitors to form the PLL
loop filters and to do normal bypass-
ing. A 4-MHz crystal is also needed.
The MAX3550 requires a single 5-V
supply.
Another thing that attracted me to
the MAX3550 is that Maxim offers an
evaluation kit for testing it. The beauty
of this was that I could copy the cir-
cuit design in the kit, which ensured
that the part would perform as speci-
fied. The evaluation kit also came
with a piece of software to exercise
the part using a PC. This enabled me
HARDWARE FRONT END
Figure 4 (p. 62) shows the RF por-
tion of the spectrum analyzer. The
front end centers on the MAX3550
broadband TV tuner IC, which is a
48-pin QFN, 7 mm × 7 mm IC. This
64
www.circuitcellar.com
Issue 192 July 2006
CIRCUIT CELLAR ®
836276886.046.png 836276886.047.png 836276886.049.png 836276886.050.png
to copy the values that were used for
setting up the various PLL divider reg-
isters and to ensure specified perform-
ance once again.
The BPF in the chip actually has a
movable center frequency that’s used
to avoid a problem that can occur in
the double-conversion process. It turns
out that in the process, unwanted beat
frequencies are generated from har-
monics of the two local oscillators.
The MAX3550 allows the center fre-
quency of its internal BPF to be shift-
ed slightly when these beat frequen-
cies come into play. This moves the
beat frequencies outside the output
BPF’s passband. I used the software
that came with the evaluation kit to
decide how to control the inter-
nal BPF’s center frequency.
The MAX3550’s output is fed
into a 6-MHz wide EPCOS
band-pass SAW filter centered
at 45 MHz. This filter, which is
contained in a five-pin SIP
package, has an out-of-band
rejection of higher than 50 dB,
which is excellent. I used it
because it’s the same filter used in the
evaluation kit. I wanted to ensure
there weren’t any impedance-matching
issues. The filter has a steep response
and is designed for use with standard
TV channel spacing.
components are required. The SA612A,
which can receive inputs at –119 dBm,
has a reasonable third-order intercept
that’s typically –13 dBm. It also contains
a high-frequency common collector
transistor that can be configured as a
local oscillator for the mixing process.
Before I describe the actual circuit,
let’s look at what makes up a PLL.
Figure 5 shows a PLL-controlled VCO.
As you can see, the voltage V TUNE con-
trols an oscillator’s frequency of opera-
tion. The VCO output is divided by
factor N . A fixed frequency reference
is divided down by factor R . These
two divided-down signals are fed into
the phase comparison box whose out-
put is an error signal proportional to
the difference in frequencies of
the two divided-down signals.
The error signal is passed
through a loop filter. V TUNE is
changed until the divided-down
VCO frequency matches the
divided-down reference frequen-
cy. At this point, the loop is
said to be in lock, and the VCO
output remains stable locked to
CONVERSION DOWN
The conversion of the 45.75-MHz cen-
tered signal down to 10.7 MHz is accom-
plished with a Philips Semiconductor
SA612A double-balanced mixer/oscil-
lator and a National Semiconductor
LMX2306 PLL frequency synthesizer.
The SA612A contains a differential
input mixer with an input impedance
that closely matches that of the EPCOS
filter output, so no impedance-matching
Refence
input
Error
V TUNE
÷ R
Loop
filter
Phase
compare
VCO
Output
÷ N
Figure 5— An error signal is generated in the comparison of divided-down
versions of the VCO output and a reference input.The loop filter conditions
the error signal.It corrects the VCO tuning voltage until the output gets to
the desired frequency.
66
www.circuitcellar.com
Issue 192 July 2006
CIRCUIT CELLAR ®
836276886.051.png 836276886.052.png 836276886.053.png 836276886.054.png 836276886.055.png 836276886.056.png 836276886.057.png 836276886.058.png 836276886.060.png
Zgłoś jeśli naruszono regulamin