Spectrum Analyzer – Part II

You can read part 1 of this project here. So, at the end of the last post we established that we can use the radio module to scan all channels on the 2.4ghz band and have a basic spectrum analyzer, but how does it all get put together? Well, the only real requirement of the project is that it be able to communicate with the radio module (over SPI) and a display, I could go with just about any microcontroller (read: the chip that is the brain of the project). So, I turned to my favorite chip that I use for the vast majority of my projects: the Atmega328 (in case you have no idea what that is, my intro to microcontrollers is coming soon) , and so that I could easily share my project with a large community and prototype the code really quickly, I went with the Arduino bootloader. So now that we have the micro and the radio chip, we just need a display. I went with the Nokia 5110 LCD, a very cheap graphic LCD that uses SPI, the same interface as the radio module.

Nokia LCD

Now that I have all the necessary parts, there’s just one catch: the LCD and the radio module both communicate with 3 volt logic levels, and the Atmega uses 5 volt signaling. Since I didn’t want to fry either of them, I grabbed a few mosfets to bring the 5 volts down to 3 volts and vice versa. So an hour or so of painstaking breadboarding later, I was left with this:

Isn't it beautiful?

Time to turn it on! I wired it up to power, and… then came the magic blue smoke . I had wired the backlight LEDs of the LCD to 5 volts instead of 3. Oops! I fixed the wire at fault and powered it up to see a functioning (albeit dimmer) display.

One annoying dilemma I had was that the radio module’s pins are spaced 2mm apart, instead of the universally standard .1 inches. I mean, clearly whoever was designing the module just wanted to be inconvenient. So I came up with the following elegant solution:

I call it, Chip on Wire

With that done, I shifted it all over to a permanent circuit board, and ta-da! My only additions were 5 volt and 3 volt regulators and a button to switch between modes, which I will discuss in the third post, on software.

That’s my thumb!

And there you have it. My final post of the series will be (finally) about the software that runs the contraption. If any of the hardware-speak scared you, I promise, help is on the way! I’m working on an intro to embedded electronics which I will post soon. Until then, enjoy the spectrum analyzer!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: