Browse over 10,000 Electronics Projects

Low-Cost 2.4-GHz Spectrum Analyzer

Low-Cost 2.4-GHz Spectrum Analyzer

As UHF and microwave RF designs become more popular, you frequently need to “see” what’s being transmitted or received. Most of us are used to observing signals in the time domain with an oscilloscope; however, most oscilloscopes don’t have the bandwidth to see microwave signals. In addition, they aren’t much help in determining what a signal looks like in the frequency domain. This is where spectrum analyzers come in.
The PCB layout for this design is trickier than those for low-frequency circuits. Pay special attention to the layout of the RF section containing the CC2500 chip.

Chipcon provides a useful reference design on its web site. I adapted Chipcon’s layout into a PCB that also incorporates the USB and microcontroller functionality. The RF portion of the board has topside and bottom-side ground planes for a solid RF ground. This enabled me to use a conventional two-layer PCB. Like many other modern circuits, most of the chips I used were only available in surface-mount packages. No wire-wrapping allowed in this project!

The CC2500 is configured for a 200-W balanced antenna interface. This can be directly connected to a suitable PCB loop antenna. For better performance, I used a whip antenna. In conjunction with my 50-W whip antenna, my circuit includes a 200- to 50-W balun to couple it to the CC2500.

The simple software that runs on the ATmega48 passes commands from the PC to the CC2500 and sends responses back to the PC. This code, written in C, compiles to just 1 KB, well within the 4-KB flash memory size in the microcontroller. I used an ImageCraft ICCAVR compiler along with Atmel’s AVR Studio programming tool, although other vendors’ tools would work too. There is a six-pin header on the board that’s configured to use Atmel’s standard ISP programming interface. This allows the ATmega48’s flash memory to be programmed in-circuit with a tool like the STK500 or the AVRISP, both of which are available from Atmel.



Advertisement1


To help deal with the somewhat complex 60-plus registers in the CC2500, Chipcon offers free SmartRF configuration software, which helps determine the settings to program into its registers. For this project, I fixed the receiver bandwidth at 843 kHz (the maximum that is supported). The CC2500 allows the center frequency of its receiver to be set easily by defining channel spacing and channel registers. The center frequency is equal to the base frequency plus the channel number multiplied by the channel spacing. For this application, I set the base frequency to 2,400 MHz and the channel spacing to 333 kHz. By setting the channel to a value between 0 and 255, I can tune the CC2500 over the range of 2,400 to 2,485 MHz. This covers the entire range of the 2.4-GHz ISM band.

Slightly complicating things is the fact that you must recalibrate the CC2500’s signal-processing path each time you change frequencies in your sweep. Rather than take the time to do this during the sweep, my software pre-calibrates and stores the calibration constants. Later, during the actual measurement sweep, the software transfers the calibration settings back to the CC2500. This enables the system to jump from one frequency to the next in as little as 100 µs. A complete sweep of 250 measurements can be done in 25 ms. In many cases, it’s preferable to sweep more slowly than this so you don’t miss intermittent signals.

The CP2102 USB interface has drivers that make it look like a built-in serial port to any PC it is plugged into. Any PC-based software that can connect to a serial port can connect to the CP2102 just by pointing it to the correct COM port number. You need software on the PC side to control this serial port and graph the results.

I used Microsoft Visual C++ 6.0 to create this PC software. Like its more expensive test equipment counterpart, my spectrum analyzer software enables control of the sweep speed, center frequency, frequency span, and peak hold modes. There is also a way to export captured spectra to a spreadsheet for further analysis or plotting. You can also write serial port code in Excel or some other data collection software instead of using the PC application I designed.

Visit Here for more.

 


Top