2.4GHz ISM band RF Spectrum Analyzer

This is an RF spectrum analyzer of the 2.4GHz ISM band, based on scanning the RSSI reading of an inexpensive radio module. Many radio modules require you to make a connection to another transceiver on a channel before reading signal strength, but a few like the CYWM6935 let you measure the channel without making any connection. That is the feature we exploit here.

It is built of 3 main components:

  1. Cypress CYWM6935 2.4GHz radio module (~$15 from Digikey)
  2. Atmel ATmega168 microcontroller (~$4 from anywhere)
  3. Noritake GU512x32-3900 vacuum fluorescent display

The big Noritake display is expensive and somewhat rare (I got mine for $100 surplus on ebay), and for the most part the whole project is a showcase for the display. It's not meant to be serious as a measurement tool, although it is fun to watch the neighbors use their microwave oven.

The source code for all this is very simple, and I may post it after some tidying up. But until then, the algorithm is basically:

  for(ever):
    start the radio and change the channel
    refresh the display while we wait for the radio to stabilize
    read the current signal strength
    turn off the radio

That's it, no interrupts, no event queues or state machines any other fancy shit. Just a loop, and that works because the radio module's internal timing is the limiting factor, and I can do most of my computation while waiting for the non-blocking radio to do its thing.

I could put up a schematic, but really, it's just uC + display + radio + a couple of voltage regulators, and it's all digital so there's really nothing to document beyond the basic block diagram.

Next step is to build an enclosure for it and mount it to my new DIY tabletop 19-inch rack.

In the video, you can see two signal clusters. The cluster on the left is my home wireless network. The one on the right is my microwave.

Update:

After living with it for a year or so, the slowness of the refresh rate bothered me and I thought I could do better. This turned out to be an exercise in chasing bottlenecks until I found an external limiting factor. It's not always obvious what the limiting factor will be. In this case it turned out to be close contest between the SPI speed of the radio module interface and the time delay needed for the radio to stabilize before sampling channel strength.

The result is quite satisfying. Refresh rate is now nearly 3x the speed of the old build:

Update 2:

I coaxed another 20% speedup out of the spectrum analyzer for a 3fps gain. The radio module SPI interface is rated for 2MHz, but it turns out you can overclock it a bit, which I achieved by tweaking the OSCCAL register. I see that cringe, but hey, this is very far from a production design! The radio stabilization period is now the unambiguous limiting factor, which means it's unlikely to get any faster :(

Okay, I thought of two more possible ways to speed it up: 1) Switch to a different radio module that might be faster e.g. the TI CC2500. 2) Parallelize the sweep by adding a second radio module. That would complicate the algorithm, but I already know exactly how to do it.

Leave a comment

Add a New Comment