This is only a preview of the April 1994 issue of Silicon Chip. You can view 28 of the 96 pages in the full issue, including the advertisments. For full access, purchase the issue for $10.00 or subscribe for access to the latest issues. Articles in this series:
Items relevant to "Remote Control Extender For VCRs":
Items relevant to "Sound & Lights For Level Crossings":
Items relevant to "Discrete Dual Supply Voltage Regulator":
Items relevant to "Low-Noise Universal Stereo Preamplifier":
|
Using the Icom R7000
as a spectrum analyser
The Icom-R7000 & similar receivers can be
readily interfaced to a personal computer to
form a simple, inexpensive spectrum analyser.
The resulting analyser has 100dB of dynamic
range & is capable of examining almost any
section of the spectrum between 25MHz & 2GHz.
Several different resolutions can be selected,
from 2.8kHz to 150kHz.
By JAMES LLOYD & JOHN STOREY*
What makes this possible is that the
Icom, like many modern receivers,
incorporates a CPU-controlled PLL
synthesiser. This same CPU controls
the other functions of the receiver
and can itself be controlled from the
RS-232 port of a personal computer.
The only modification required to
the receiver is to tap into the AGC
(automatic gain control) line to meas*School of Physics, UNSW, Kensington.
70 Silicon Chip
ure the signal strength. Once this is
done, all that is required is software
to scan the receiver through the range
of frequencies of interest, to record the
signal strength at each frequency step,
and to display the result.
Receiver interface
The interface between the PC and
receiver is the “Icom Communication
Interface V” (CI-V). The first thing
needed is a small piece of hardware to
convert the CI-V voltages to and from
RS-232 levels. This little box is avail-
able from Icom but in fact, it contains
little more than a MAX-232 integrated
circuit and would be easy to build.
The Icom CI-V is a serial, half-duplex bus which has the advantage of
being able to control several receivers.
This actually presents a few difficulties in interfacing to a PC. Firstly, the
RS-232 standard is full-duplex (having a separate transmit and receive
line) and has hardware handshaking
facilities. This hardware handshaking
allows the transmitter and receiver
to agree when they are both ready to
exchange data. The CI-V bus, however,
consists of just a single data wire plus
ground.
The problem of bus arbitration (or
agreeing who can talk and when) is
tackled with the CSMA/CD (Carrier
Sense Multiple Access with Collision Detection) protocol. This simply
means that any device may try to use
the bus at any time. Any collisions
(more than one party attempting to
transmit simultaneously) are detected
and resolved by one of them waiting
for the other to complete. This allows
multiple devices on the one bus and
is generally an efficient protocol if the
bus is not over-committed. However,
it does present some difficulties in
implementation on a PC, since there
is no readily available “carrier-sense”
signal.
We solved this problem by allowing all the communications between
the receiver and the computer to be
handled by a shareware communications library. This tests for “line busy”
by monitoring the traffic in and out
of the data buffers, thus emulating
the “carrier sense” signal, equating
carrier to transmission or reception
of data.
When the receiver detects a collision, it transmits a series of jammer
codes which cause the software to
stop sending. At the end of a command string the receiver transmits
“acknowl
edge” signals which are
monitored to ensure reliable operation.
The general command structure is
a stream of bytes, consisting of two
preamble bytes (to signify the start of
the command, each being the value
FE hex), a destination or “to” address
(08 hex is the default for the R7000),
a sender or “from” address (default
E0 hex for the controller), one or two
bytes specifying the command number
and an optional subcommand number,
a variable number of data bytes and
an-end-of-command byte (FD hex).
The frequency data is sent as five
BCD (Binary Coded Decimal) bytes,
in least significant to most significant order. Binary coded decimal is
a scheme whereby each decimal digit
is encoded as a 4-bit nibble and thus
a 2-digit number can be encoded in
one byte. For example, the frequency
123.456789MHz would be sent as the
bytes 89 67 45 23 01 (BCD). Since the
tuning step is 100Hz, the first byte
(1’s and 10’s of Hz) is ignored. The
GHz digit is also ignored, since the
1-2GHz range of the receiver is set
by manually pressing a button on the
control panel.
To “set frequency” the command
number is 05, with no subcommand.
To tune the receiver to the frequency
123.4567MHz, the command string
would be FE FE 08 E0 05 00 67 45
23 01 FD. The receiver then sends a
response, addressed to the controller,
with a value in the command number
field indicating the success (FB) or
failure (FA) of the command. Thus,
a successful command would return
Fig.1: this buffer circuit was used to
isolate the AGC line from the receiver
and thereby avoid any loading effects
from the PC.
the string FE FE E0 08 FB FD. The
complete process of stepping to a new
frequency thus requires a total of 17
bytes. At 1200 baud, this takes approximately 120ms, plus the response time
of the receiver CPU.
The minimum step size of the synthesiser is 100Hz. Actually, the digital
synthesis is done in 1kHz increments.
The 100Hz steps are generated within
the Icom with a D/A converter driving
a VFO. However, for our present purposes this is of no consequence. The
maximum step size can be anything
you like and in fact the receiver could
be hopped about in frequency in a
completely random manner, though
it’s hard to imagine why anyone would
want to do so.
Normally, one would choose a step
Fig.2: this spectrum is the electromagnetic interference from a 33MHz 386 PC
taken over the range from 50 to 100MHz. Radiation below 50MHz was found to
be negligible. The 99MHz peak is most likely the third harmonic of the 33MHz
internal CPU clock & the others are probably harmonics of the bus clock.
April 1994 71
the same way as for the frequency
commands.
Extracting the AGC voltage
To extract the AGC voltage, it is
necessary to open the receiver, identify
the relevant circuit connection and
bring it out to a suitable socket. We
chose to add a buffer amplifier to avoid
any possibility of disturbing normal
operation of the receiver.
As shown in Fig.1, the buffer circuit uses an OP90 op amp as it has
low power consumption, low offset
voltage and operates from a single
supply. The circuit has a gain of 2,
to bring AGC voltage swing up to the
full input range of the analog/digital
converter.
Icom are even kind enough to supply the R7000 receiver with a spare
RCA jack on the rear panel, so no
chassis work is required.
Measuring the AGC voltage
Fig.3: this is the radiated spectrum of ABC channel 2 as received at Kensington,
on the UNSW campus. This plot shows the structure of a television signal in the
vicinity of the vision carrier (& should convince any doubters, if they still exist,
of the reality of sidebands). The video signal is amplitude modulated onto the
carrier & the dominant frequency component of this modulation is at the linescan frequency of 15.625kHz. The sidebands are thus located 15.625 kHz apart
and extend symmetrically either side of the carrier. (Close in to the carrier the
sidebands are expected to be equal. If the scan covered a wider frequency range
the vestigial sideband character of the modulation would become apparent).
The scan was performed with the “SSB” filter (FWHM of 2.8kHz), in 1.4kHz
steps.
size equal to half the filter bandwidth.
This “Nyquist sampling” ensures the
maximum amount of information is
extracted from the spectrum.
The settling time of the receiver
tuning circuit is very fast. However,
the AGC amplifier incorporates a time
constant which is different for each of
the receiver modes. In a moment we
will show how we use the different
modes to give the different filter resolutions. For the AM filter, the AGC
time constant has been measured and
found to be approximately 200ms. The
AGC settling occurs concurrently with
the transmission of the “acknowledge”
signal, so it is not all “dead” time.
Including all overheads and settling
time, reliable tuning of the receiver
(to a signal stable within 0.5%) is
72 Silicon Chip
achieved in approximately 500ms.
Slight speed improvements could be
made by increasing the transmission
speed, or sacrificing stability in the
signal.
The resolution of the scan can be
selected by choosing the R7000 receive mode which then selects the
IF filter bandwidth. The filters have
bandwidths of 2.8kHz (SSB), 6kHz
(AM/FM narrow), 15kHz (AM/FM),
150kHz (FM wide). The receive mode
(and hence filter bandwidth) is selected with command number 06 prior
to beginning a scan, in a similar way
to the frequency stepping mode. For
example, selection of the AM filter
(data field 02) would be done by the
command string FE FE 08 E0 06 02
FD. The receiver responds in exactly
In order for the computer to be able
to read the AGC voltage, an analogto-digital (A/D) converter is of course
required. Almost any A/D would be
suitable here, as the application is
quite undemanding. We used a 12bit PC ADDA-12 card from ESIS in
Sydney. This inexpensive unit works
particularly well and has a conversion
time of only 60 microseconds but
care must be taken when using a fast
computer.
The card uses a monolithic successive-approximation converter which
is clocked by strobing a register on
the card. If this happens too quickly,
the converter becomes confused and
the accuracy drops dramatically. On
the 386-33 PC that we used, we had
to add delays in the code to prevent
this from happening.
The AGC voltage output of the receiver is highly non-linear with signal
strength, as one might expect. Conversion of the raw AGC voltage to signal
strength is achieved in the computer
using a simple look-up table with
linear interpolation between points.
Creating the look-up table requires
the use of either a calibrated signal
generator or a signal generator plus
calibrated attenuator.
The Icom R7000 receiver conveniently includes a 20dB switchable
attenuator in the front end which
could be used to get the calibration
procedure off to a good start. Separate tables are needed for each of the
monotonicly decreasing part of the
curve, where there is only one signal
value for a given AGC voltage. At
zero and 10dB on the FM wide filter
curve, there are two signal strength
values for the one AGC value). Thus
the system currently has a (software
limited) sensitivity of 3 microvolts in
the most sensitive bands.
Software
Fig.4: this is a spectrum taken of the FM band from 88 to 108MHz, taken with
the FM WIDE filter (150kHz) in 75kHz steps. The antenna was just a length of
wire. The large peak at 107.3MHz is 2SER which is located on the University
of Technology building in Ultimo and has a line of sight view to the Physics
building at UNSW. The peak at 102.5MHz is 2MBS, with a transmitter located
on the AMP building in Sydney, again very close and line of site to Kensington.
Although the stations with powerful transmitters (2DAY 104.1, 2MMM 104.9,
2JJJ 105.7 and ABC 92.9) appear very weak, it should be noted that the vertical
scale is linear and these stations are only a few dB below the most powerful.
receiver filters and (at least in principle) for each of the four “front-ends”
which the receiv
e r automatically
switches between as it changes bands.
However, this variation of calibration
with frequency is probably only a
small effect and in many applications
the system is only required to operate
over a narrow frequency band.
The data gathered by the calibration
procedure is used to convert AGC
voltage to signal strength, using a
look-up table with linear interpolation. The discontinuities in the graph
are an artefact of the signal generator used and occur at points where
it switches circuits to alter range.
Note the very wide dynamic range
achievable, 100dB in the case of the
AM filter. The software used only the
The Icom R7100 Communications Receiver
The Icom communications receiver pictured here is the R7100 model. This
supersedes the R7000 model referred to in this article but it can be used for
spectrum analysis in exactly the same way. Among its many features, the R7100
continuously covers the frequency spectrum from 25MHz to 2000MHz, has
all-mode capability, 900 memory channels, and either direct keyboard entry or
manual frequency selection.
For further information, contact Emtronics, 92-94 Wentworth Ave, Sydney.
Phone 211 0988.
74 Silicon Chip
Depending on capabilities of the
PC and on what your favourite programming language is, the software
can range from simple to complex.
We wrote our program in C, with the
following modules: (1) R7000LIB to
handle the communications to the
receiver, covering commands to set
and read the frequency and receiving
mode and interpret the responses for
the receiver; (2) ADDALIB to perform
the A/D conversions; and (3) AGCTOSIG to convert AGC voltages to signal
strength using the data files generated
from known signal strengths.
Using these libraries, we built programs to perform auto
mated scans,
interactively scan, draw graphs and
so on.
The system can be used as a spectral
analyser for virtually any application
within the tuning range of the receiver (25-999MHz and 1025-1999MHz
in the case of the Icom R7000). The
main limitation is one of speed.
Because of the time taken to scan
across the spectrum, the result will
only be meaningful if the spectrum
is effectively unchanging during this
time. The accompa
nying spectrum
plots demonstrate the capabilities of
the system.
Conclusion
Computer interfacing to the Icom
R-7000 receiver is straightforward and
gives satisfying results. In fact, under
computer control the extraordinarily
good performance of these receivers in
terms of versatility, stability, sensitivity and low spurious response levels
becomes apparent.
The spectrum analyser described
here is just one example of what can be
done once a PC is given control of the
receiver and is able to monitor signal
strength. Another interesting application for the avid SWL or DX’er would
be to log the signal from various HF
stations from around the globe. Why
not become your own ionospheric
SC
prediction service?
|