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.

Continue reading “Making a Spectrum Analyzer the Wrong Way on an ATtiny85”

Detecting DTMF tones from scratch

If you’ve ever wondered about the best way to detect dial and DTMF tones from a phone line, [Debraj] is your man.

[Debraj] built a DTMF detector using the Goertzel algorithm. Normally, when we think about detecting tones, we pull FFT out of our bag of tricks. The Goertzel algorithm isn’t as computationally complex as FFT and can be implemented on even the smallest microcontrollers.

For the build, the first thing to solder is a nice audio transformer and some protection diodes. The ring tone from a phone line goes from +35 V to -35 V – a bit more than a microcontroller could handle. A PIC18F4520 dev board was used as the brain of the system with all the code is available on [Debraj]’s site.

Although implementations of the Goertzel algorithm are a little uncommon, [Debraj] has seen a few interesting projects using this technique. [Debraj]’s build could easily be modified into a guitar tuner with a few changes in the code, for example.

This project was built as the command and control for a home automation system and from the video after the break, we can’t wait for [Debraj] to get annoyed at the phrase, “To turn on the kitchen lights, please press 1…”

Continue reading “Detecting DTMF tones from scratch”