Arduino DTMF and tone filters

    Arduino-generated DTMF: (Dual-tone multi-frequency signaling) It probably isn’t necessary to apologize for what seems at first to be another ‘retro’ project, because even today, when dial phones have yielded their place to cell phones and other advanced devices, DTMF is still in use—Press ‘1’ to continue in English —Press ‘7’ to delete your voice mail, etc. And in addition to familiar consumer-related applications, DTMF remains alive and well in various niches such as the amateur radio world.

    The idea for this project came from wondering whether or not Arduino could be made to generate two or more tones concurrently.  A quick Google search confirmed that indeed it could. Someone had even designed an Arduino midi player! The trick is to use a special tone library (zip download). To exercise Arduino’s multi-tone capability I decided to make a DTMF tone generator. The application sketch (Arduino program code) is here.

    As documented, Arduino-generated tones are square waves having a duty cycle of 50%. To smooth the waveform I used a variant of a circuit from this page, having previously tested component values at frequencies near the DTMF tones.
At first I listened to the tones using stereo headphones, balancing the sound by ear, but subsequently used an oscilloscope for objective adjustment. The output of each filtered tone set (row and column tones) was adjusted independently to have equal voltage at the lowest frequencies. In other words the level at 697 Hz (filtered from DIO pin 12) was made equal to that at 1209 Hz (filtered from DIO pin 11). The combined attenuated tones were then amplified using a boilerplate LM386 audio amplifier circuit.

    Arduino generated DTMF tones sounded okay when compared to those generated by a wireless phone handset, but that is hardly proof that they would work in a real signaling context. As it turns out there is a test resource—there may be more than one such—that reads back the numbers it hears. I dialed the
listed US test number and placed the phone handset on the bench next to the DTMF speaker. The video link below presents excerpts from this test.

    The DTMF test listener had no trouble distinguishing the keys pressed, although the physical positioning of speaker and microphone were not ideal, and I had made no effort to improve or optimize the setup. In the video the camera was aimed toward the keyboard while I pressed keys, and toward the speaker as the ‘Test Call’ system responded. However, to clarify, that response actually came from the nearby handset’
s built-in speaker, not from the tones amplifier speaker.

    DTMF demo: test.mp4

Projects Home

Project descriptions on this page are intended for entertainment only. The author makes no claim as to the accuracy or completeness of the information presented. In no event will the author be liable for any damages, lost effort, inability to carry out a similar project, or to reproduce a claimed result, or anything else relating to a decision to use the information on this page.