Electrical – Audio spectrum analysis: PC Software vs Hardware Spectrum Analyzer

fftsoundspectrum analyzer

I need to do some audio spectrum analysis (basically, listening to a machine and tell if it is properly calibrated).

I will record the sound it makes with a microphone (it sounds differently if it is calibrated correctly than if it is not), and then want to look at the audio spectrum, with plans to automatically tell if a machine is set up correctly (currently, a human operator listens to the machine and does this job manually).

As a first step, this does not need to be real time, i.e., I will just make recordings of the machine (once set up correctly, once not), and compare the audio spectra.

My question is: Aside from the microphone, do I need a hardware spectrum analyzer, or does PC software suffice for this (FFT can of course be done on a computer too…). Particularly, because for a start, I do not need real-time analysis.

I am mainly asking because it seems that spectrum analysers cost quite a lot, and I don't want to purchase such a device if I don't actually need it.

Best Answer

The deciding factor between stand-alone analyzer or soundcard would be the frequencies you're interested in.

I will record the sound it makes with a microphone (it sounds differently if it is calibrated correctly than if it is not),

If the difference is audible, this means the frequencies you want to measure are lower than 20kHz, which means audio gear will work. This is good news as it's readily available and cheap.

Don't use a RF spectrum analyzer for this! First, there is no need to pay for extra bandwidth you don't need, and second they have lower bandwidth limits that may not suit you. There is no need for specialized equipment either.

A soundcard (or audio input jack) on a PC, a tablet or a phone should work fine. If you have noise issues, the most likely culprit would be a cheapo microphone preamp inside your hardware, so consider an external preamp, or a microphone with integrated preamp. Try the cheapest solution first!

Your problem will most likely be how to get a good signal, which means select the right microphone/sensor, preamp, and technique.

If the sound is airborne, then a mic will work. However if you're interested in vibrations (say, to check on a bearing) then a piezo transducer or accelerometer applied to the chassis of the machine will pick up vibrations a lot better, while ignoring airborne noise. Why not a guitar piezo pickup? Or perhaps a directional microphone. Or two mics and take the difference between the signals. Good acquisition is essential, a clean signal is much easier to work with.

So think about where the sound you want to acquire comes from, where the noise you want to ignore comes from, and decide on which sensor you need.

There are several nice software packages to display real time FFT on a PC, try visual analyzer (free) for example. If you can see differences in spectrum then you can write a bit of software to acquire the signal, FFT it, and detect the relevant stuff automatically. I'd use python+scipy for this, as it has powerful and convenient signal processing tools. Or exploit a guitar tuning app as Henry says.