Low cost high accuracy STM32 FFT LCR meter

Adil Malik made a low cost FFT LCR meter with an STM32 MCU:

The approach I took was a mixed signal one where a capable analog front end would be paired up with a beefy DSP processor to compute the Impedance. Most importantly, in this scheme, the DSP is responsible for discriminating the phase between the sampled voltage and current waveforms; this approach is preferred because it leads to good accuracy and calibration stability.

See the full post on his blog.

Making a Spectrum Analyzer the Wrong Way on an ATtiny85

Everyone’s a critic, but it’s hard to argue with success. And that’s exactly what [agp.cooper] has with his ATtiny85-based spectrum analyzer devices.

The “normal” way to build a spectrum analyzer is to collect a bunch of samples and run a Fast Fourier Transform (FFT) on them all in one shot. As the name implies, the FFT is fast, and the result is the frequency components of the sampled data. [agp.cooper]’s “wrong” way to do it takes the Goertzel algorithm, which is used for detecting the intensity of a particular frequency, and scanning across the frequency range of interest. It’s a lot slower than a single FFT but, importantly for the ATtiny85 that he implements this on, it’s less demanding of the RAM.

The result isn’t a snapshot of a single moment in time, as it would be with an FFT. For instance, his latest version of the software takes almost 3/4 of a second to take 61 measurements across 500 Hz of bandwidth and push the data out to an LCD screen. That’s too slow for fast signal data, but is just about workable for looking at the way frequency components of a plucked guitar string damp out, for instance.

We’re sure that there’s some version of FFT code that will fit inside these micros and manage to get the job done faster, and if any of you out there can prove it, the gauntlet is thrown. But it’ll take a lot of work compared to just sliding Goertzel’s algorithm up and down, and frankly we just think it’s cool that this method works at all.


Filed under: ATtiny Hacks