SHOWALL FUN PRANKS HIGH VOLTAGE LAZARUS-64 PHOTOGRAPHY SPY GADGETS VIDEO GAME
Figure 4 - An RJ-11 telephone jack feeds the audio from the phone into the decoder
Figure 4 - An RJ-11 telephone jack feeds the audio from the phone into the decoder

To test the 8870 DTMF decoder using your phone line, you will need an RJ-11 female socket like the one shown in Figure 4 running into the breadboard. You can also cut the end off a standard phone cord and then insert the wires directly into the breadboard. A standard residential phone cord will have four wires, but only the two innermost wires are used. There will be a red wire and a green wire, and these two wires will carry the single to your telephone terminal block. Be aware that there is a low amperage 40 volt potential on the phone line that jumps up to over 100 volts when the phone is ringing. There is very little current in the phone line, but the high voltage is enough to give you a painful tingle if you happen to be touching both wires as the phone begins to ring. Keep this in mind as you work with live phone cables!



Also shown in the breadboard is a set of five LEDs that connect through 1K current limiting resistors and then to the five output pins on the 8870 DTMF decoder chip. When a valid DTMF tone is heard, the data ready LED will flick for a few milliseconds and then the four data LEDs will change to represent a binary number from 1 to 16. Figure 2 shows the results of the binary outputs (Q1 to Q4) and how they correspond to one of the 16 DTMF tones.



Figure 5 - The 74154 will decode a 4 bit number back to 1 of 16 outputs
Figure 5 - The 74154 will decode a 4 bit number back to 1 of 16 outputs

The output from the 8870 DTMF decoder is a 4 bit binary value, which is the perfect method of transferring the data to a microcontroller or computer. Of course, this binary value is not much use for controlling external devices with a relay or driver transistor unless you decode it back from 4 bit binary data to a single digital IO line. An easy way to get from 4 bit binary data back to a single digital IO line is by using a 74154 4-line to 16-line decoder chip. The 74154 decoder takes 4 bit binary data and converts it to a 16 pin output port. Unfortunately, the data is inverted so that only 1 out of 16 outputs is off at any one time, so if you need to use the IO line to switch on another device, you will have to invert each of the 16 IO lines. Looking at the datasheet for the 74154 decoder shown in Figure 5, you can see that only one of the 16 outputs will be off at any one time. The 74154 is a common logic IC, and will have several other part numbers such as 74LS154, 74HC154, DM54154. For this project, any of the 4-16 decoder variants will work just fine.

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