Close

Well how in the world are we going to build a Spectrum Analyzer?

A project log for Affordable Spectrum Analzyer

Analyze electrical signals using a raspberry pi with a user interface designed for students, hobbyists, and other beginners.

dan-kislingDan Kisling 07/10/2016 at 18:160 Comments

My lab partner, Andrew, and I were faced with deciding on a senior design project to complete our degrees at Lehigh University. Not wanting to waste an opportunity (possibly my last) to work with someone as smart as Andrew, I wanted to take on an ambitious project that would challenge us both. One of our favorite professors suggested that we could try to build a Spectrum Analyzer using a low cost computer such as the Raspberry Pi. After some base research, we figured this was a project we could take on.

From left to right: My lab partner Andrew, Professor Frey, and me, Dan

So what does one have to accomplish in order to get a raspberry pi to become a spectrum analyzer? The real challenge of the project is getting the Raspberry Pi to sample very quickly and reliably, and to perform an FFT on that information. Sampling at a high speed on the raspberry pi was our greatest challenge, but not one we were not able to solve.

Andrew and I both had a decent grasp on Signal Analysis and the math behind it, so we went to the drawing board to see if we could come up with any ideas to "cheat" the system. Cheating for us would mean analyzing spectra beyond the Nyquist sampling limit. But more on that in the next post.

In the mean time we had to figure out what exactly we wanted to accomplish with this spectrum analyzer. Sure, it would be awesome to make a spectrum analyzer for a few hundred dollars that could capture signals in the gigahertz or terahertz range, but it is probably not attainable for us, especially since neither of us have done any high speed circuit design.

Instead we decided to focus on a smaller frequency range. We supposed that sampling at a gigahertz would be a good goal to shoot for. Now before you point out in the comments that a spectrum analyzer that only captures up to 500KHz is worthless, let me try to defend this frequency band.

From my experience at Lehigh, most undergraduates do not deal with analog signals beyond 500KHz in the lab. And while I am positive others will come up with exceptions, my point is signals under 500KHz are heavily used in education. There's a lot to do in that space, and much of what students are doing is under that frequency threshold. Giving students the ability to not only use an oscilloscope, but also getting their hands on a spectrum analyzer is hugely beneficial. It will give them one more instrument to get familiar with, and also help in signals courses by giving them hands on experience with the frequency domain.

So now that we have the frequency nailed down, we came up with a few more goals for our project. We wanted it to simply plug into a normal outlet, no fancy extra power supply required. We wanted it to be standalone, so it was going to require its own screen and inputting devices. We wanted simple probes so one could easily hook this up to their circuits and see the results. Finally, we wanted a simple GUI that allowed the user to start capturing spectra quickly and easily, and also have the ability to save spectra and perform more analysis with the raw data.

That's all for this log. Look forward in the next post to us laying out a system block diagram or two, and describing our superheterodying technique!

Discussions