ELM Home Page

Radio Spectrum Monitor

October 17, 2005


LCD module

This is an experimental work to monitor a spectrum pattern in radio band, and is a continuous project from Audio Spectrum Monitor. To analyze the spectrum of an input signal, I chose an Atmel AVR microcontroller that used in the Audio Spectrum Monitor to process FFT. When think it easy, it can be thought that sample an input RF signal directly and analyze it will do. However, you will able to recoginize that there are some techinical difficulties from following reasons.

  1. The acquisition unit must have a sufficient speed and accuracy that covering over the radio frequency range. As for AM radio band like this project, fast 12 bit ADC and specific controller will able to cover this range. However there is no proper ADC for UHF band.
  2. Number of samples to meet required frequency resolution, fSAMP/fFUND samples, becomes too large. When monitor an AM radio band around 1 MHz in frequency resolution of 500 Hz, over 4000 samples will be required at least. And when monitor a VHF band in same frequency resolution, how many samples will be required...
LCD module

To solve this difficulties, there is a generic method called Frequency Conversion. In brief, down-convert the RF signal to lower frequency with a mixer (multiplyer) before sampling stage. When process the signals as complex signal for the frequency conversion, it can handle negative frequency, and the center frequency can be moved to zero hertz without interference by image signals. This means that the sampling frequency higher than span frequency range will do. When monitor a 100 MHz band in span of ±1 MHz, it will be converted down to 0±1 MHz and sampled it in only 2 Msps. You may able to understand easy when explain it as `cut and paste' on the frequency domain. Actually, this kind of radio spectrum monitors are being supplied from some radio equipment vendors.


Hardware

In this project, an intermediate frequency signal from mixer output of an AM radio (fC=455kHz) is used as an input signal. It is converted again down to zero hertz in complex signal, so that the signal path, mixer and local oscillator, must be composed for complex signal processing. The complex signal is expressed in two wire I/Q signal, the real part corresponds to I signal and the imaginary part corresponds to Q signal. The arithmetic circuits for I/Q signal are realized in method of complex arithmetic. For example, a mixing circuit for I/Q signals requires four multiplyers and two adders from the formula:
(a1+jb1)(a2+jb2) = (a1a2-b1b2)+j(a1b2+a2b1)

multi

Therefore the analog process of I/Q signal requires large scale circuit compared to real signal process, so that the I/Q signal is usually digitized after minimal analog process and following process are done in digital processor. In case of one input is real, only two multiplyer will do. By the way, when view a real signal as a complex signal, its spectrum pattern of positive part and negative part is line symmetrical. Real signal can be saied that the imaginary part is always zero. The case of complex signal becomes such state is: there are conjugate complex numbers, changed sign of the imaginary part (changed sign of frequency), for each complex frequency components. Therefore the real signal has symmetrical spectrum around the origin.

Block Diagram

Right image shows the block diagram for radio spectrum monitor. An IF signal from radio receiver is used as input signal, multiply it with a complex local signal (-455 kHz) and I/Q signal is generated. It is digitized after filter out unnecessary frequency components and following processes are done with an AVR. Somebody may remember something when look this block diagram. Yes, this is an RF signal process which can be seen in many one-chip digital communication ICs. The signal processing of analysis, moduration and demoduration in complex signal is a basic technology on digital communications.

Well, this is a circuit diagram for radio spectrum monitor. I chose two NXP SA612A general purpose DBM ICs for the mixer circuit. This is the most significant block in this circuit. DBM, double balanced mixer, is often used as a functional unit in ASSP ICs but single function DBM IC is not many. There are old MC1496 (MOT) and new NJM2594 (NJR) other than SA612A. These are available at Digi-Key. The reason what I chose SA612A is point of differencial input/output and no external setting component. In this circuit, mixer output is being used in DC coupling, differencial output is suitable from its low offset drift. And there are also accurate analog multiplyer ICs but they are too expensive. Local signal (-455 kHz I/Q signal) is generated with LC oscillator and phase shifters. It is injected to DBMs. For anti-aliasing low pass filter, MAX295 is used from my stock. But its roll-off is dull, a little alias can be found in spectrum. MAX297 is recommended better than MAX295. To digitize the I/Q signal, both channels must be sampled simulteneously, however, a S&H of integrated ADC of AVR is shared by all input channels, so that it cannot use in simulteneous sampling. I aborted to use the integrated ADC, and used two NS ADCS7476 12 bit ADC. LCD module is from Junk LCD. SG12232C used in audio spectrum monitor and any other glaphic display modules will able to be used.

Software

The firmware samples the I/Q signal, analyze it in FFT algorithm and draw spectrum pattern into LCD module. These processes are done in refresh rate of approximately 60 times per second. I/Q signal is sampled 128 points in samplig rate of 64 ksps at a time, span frequency of ±32 kHz around local frequency (455 kHz) can be monitored. Now horizontal scale (frequency) is labeled on the LCD but when measure local frequency of the radio receiver, the tuned frequency will able to be displayed under the spectrum bars - I found this idea at the time that writing this document and implemented it in the project :-). When a local signal input from receiver is valid, frequency scale will be appered under the spectrum bars and the tuned frequency is refrected.

The fast FFT routine is copied from audio spectrm monitor as is. Basically, FFT algorithm is in complex input/output, it can be used for complex signal with no modification unless it is optimized for real input. When input is a real signal, only half of result is valid because it is symmetrical around the origin. Ofcourse each domain of output is valid when input is a complex signal.

When apply a power, a menu window will apper and can be set working condition with a joystick. Each item can be selected with up/down action, changed with right action and enter running mode with push action. In running mode, up action hold/resume display, down action resets peak hold (if selected), left action redo automatic null (offset cancellation of ADC input) and push action returns to menu. Window function can also be selected, you will able to recognize difference between each window. Wave form mode monitors raw I/Q signal but it will not useless.

Adjustment

  1. Adjust local frequency to 455 kHz with TC1.
  2. Apply 455+10 kHz, 100mVP-P sin wave to the input port and set I and Q signal as same amplitude and quadrature phase at ADC input with VR1 and VR2. And confirm that DC levels are Vcc/2 (a little offset is negligible) and no distortion is recognized.
  3. Enter running mode. When a spectrum bar is 20 bins right from center, it is working successfully. If an image is appering at opposite position, adjust VR1 and VR2 to eliminate it carefully. A peak appearing center at start is due to left DC offset of I/Q signal, it will be nulled automatically.

An AM super heterodyne radio receiver is used as a signal source. It may be modified to export mixer output and local oscillator output (this can be ommited). When it is a transister radio, large local frequency component (tuned freqency + IF) will pass through the mixer due to the mixer will be cheap emitter injection type. This affects dynamic range of DBM input, so that unnecessary signals above IF must be filtered out with a LPF. When IF frequency of radio receiver is 450 kHz, please read "455" in this page to "450".

Notes

Photos

am
fC=445kHz AM
fMOD=2.5kHz, Depth=30%
am
fC=445kHz FM
fMOD=2.5kHz, Deviation=3kHz
am
fC=456kHz
Wave form of I/Q signal. π/2 lagged is the Q signal.

Sign