Figure 10 - An Arduino UNO will receive DTMF data and send serial data to the LCD
Figure 10 - An Arduino UNO will receive DTMF data and send serial data to the LCD

I decided to leave the 4-16 line decoder, inverters, and LEDs on the breadboard and then add the LCD screen and microcontroller into the mix so that both systems were still functioning at the same time. My little breadboard was running out of room so I grabbed an Arduino and just popped the wires into the breadboard from the 8870 and then out to the Arduino header. Normally, I would use a bare microcontroller on my breadboard, but for convenience, it's hard to beat these little prototype boards as they are ready to rock as soon as you plug them in.

Arduino is an open source hardware platform that allows an Atmel microcontroller to be programmed through the USB port using a very easy to use IDE and C type language. I purchased my Arduino at, and had it up and running in a few minutes by simply plugging it into the USB port on my computer. The pin headers on the Arduino board allow access to the AVR digital IO ports so connecting to a breadboard is just a matter of plugging in the necessary wires. The program is also very simple. It just waits for the data ready line on the 8870 to toggle and then reads the 4 bit binary data and then writes the corresponding dial pad digit out to the LCD screen using the serial write command. The program also keeps count of the number of DTMF tones decoded since the last reset.

< Here is the Phone Number Decoder Arduino source code>

The DTMF display program is extremely simple, but does demonstrate how robust and easy it is to interface the 8870 DTMF decoder to any microcontroller. With a few more lines of code and an external relay, you could easily look for the telephone ring signal, have the microcontroller pick up the line, and then wait for DTMF commands to be sent, creating an entire telephone operated automation system. A lot can be done with the 12 digits on a phone dial pad, especially if the microcontroller is also sending back some type of audio feedback as you dial in your commands.

Figure 11 - Decoding DTMF tones from the phone and displaying them on the LCD screen
Figure 11 - Decoding DTMF tones from the phone and displaying them on the LCD screen

The completed DTMF display system is shown in Figure 11, counting and displaying the digits pressed on the LCD as I type them on the telephone dial pad. The five IO lines running from the breadboard into the Arduino board are the 4 bits of data and data ready lines from the 8870 DTMF decoder. I still have the 4-16 line decoder, inverters and LEDs connected on the breadboard, but for the microcontroller does not need any of that hardware in order to operate, just the 8870 and its passive components. Even with a very noise phone line, I can press numbers on the dial pad as fast as I want and the LCD never misses a single digit. The 8870 DTMF decoder IC is very robust and will accept practically any type of audio signal.

If your intent is to "capture" a phone call and then later display the DTMF data on the LCD screen, then you only need to feed the output from your recording device into the input section of the 8870 decoder and it will operate as if connected directly to the phone line. You can even use an electret microphone and just let it listen to a nearby audio signal that contains a DTMF tone and if the signal is loud enough, the 8870 will have no problem registering and decoding the data. It's actually quite difficult to make the 8870 DTMF decoder fail; you need a really bad signal for it to give up on the conversion.

Back Home Last Next
You are Viewing... Page 6 of 7
Lucid Science Electronics from the Fringe AtomicZombie Hack-a-day SparkFun