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”