Audio DTMF Decoder Ck605
Audio DTMF Decoder Ck605
The kit will detect DTMF tones from a telephone line or via an onboard microphone and display them on a 16 character, single line display. Up to 32 numbers can be displayed by scrolling the display left and right. There is also a serial output for sending the detected tones to a PC. The kit will not detect numbers dialled using pulse dialling. The kit is controlled by an Atmel 89C2051 microcontroller (source code not supplied nor available.) This kit replaces the old K56 Tone Grabber kit. ASSEMBLY Check the components supplied in the kit against the parts list. There are several points to note: Identify the BC547 transistor and the 78L05 regulator. They look the same so dont get them mixed up. Make sure Q1 does not poke up too high and interfere with the mounting of the LCD. Capacitors C3 and C5 mount inside the IC sockets. Make sure they dont poke up too high and interfere with inserting the ICs into the sockets. The trimpot VR1 is mounted underneath the PCB on the solder side. There a 2 wire links to be inserted on the board. These can be made from the resistor lead offcuts. TESTING AND SETUP Inspect your work carefully under a bright light. The solder joints should have a shiny look about them. Check that there are no solder bridges between adjacent pads.
You can now apply power. Anything between 9 and 12 volts center positive will be fine. Use a multimeter to measure the 5 volt output from the regulator IC1. The easiest place to do this is across pins 10 and 20 of the IC3 socket (+ve on pin 20). If all is well then remove power and insert the ICs and LCD into their sockets. Use the screws and nuts supplied to fix the bottom edge of the LCD to the PCB. Apply power again. The word READY should be displayed on the right side of the LCD. If the display is faint or all you see is black squares then adjust the trimpot until you can clearly see READY. To test the telephone input connect the kit to a telephone line via the two PCB pads labeled LINE and move switch SW1 to the TEL position. Pick up the phone and press some numbers. They should come up on the display. To test the microphone input move switch SW1 to the MIC position. Download the file dtmf.wav from www.kitsrus.com/zip/dtmf.zip. This audio file contains the numbers 1-9, 0, * and #. Unzip it and play it back over a speaker using Windows Sound Recorder or any other wav file playback software. With some numbers displayed on the LCD use the pushbuttons to scroll the display left and right. The kit is now ready to use. R3 sets the gain of the internal opamp in the chip. Larger value more gain. In some instances the gain may be too high resulting in funny characters being detected. In this case lowering the resistor value to 390K should fix it. OPERATION Telephone: Connect the kit to the phone line via the two PCB pads labeled LINE and move switch SW1 to the TEL position. Microphone: Move switch SW1 to the MIC position and position the microphone close to the DTMF source. If the decoder fails to respond to any DTMF tones, try positioning the microphone closer to the source or increasing the volume of the tones. Note however that excessive volume may distort the signal presented to the DTMF decoder chip and cause the tones to be ignored. . Also note you cannot pickup tones from the earpiece of a telephone handset. The signals are to weak.
Identify the trimpot and put it aside this will be the last component assembled. It is recommended that components be inserted and soldered in the following order. 1. All the resistors. Use a couple of the resistor lead offcuts for the two wire links. 2. Capacitors C1,2,3,5,6,7,9,10 and 11. Note that capacitors C3 and C5 fit inside the IC sockets. Make sure they are right down against the PCB before soldering. 3. The two IC sockets. 4. Crystals - solder them quickly as they can be damaged by excess heat. 5. Transistor Q1 and IC1 (the 5 volt regulator.) 6. The 16-way socket strip for the LCD. Make sure it is right down against and at right angle to the PCB before soldering. 7. The electrolytic capacitors C4 and C8 and the electret microphone. 8. The two zippy switches. Push them right in until the leads click into place. The bottom of the switch should be right down against the PCB. 9. The DC jack, slide switch and transformer. The transformer can be fitted either way around. 10. Lastly, the trimpot. It is mounted on the bottom of the PCB on the solder side. The trimpot leads are exposed and can be soldered onto the PCB pads. Do not insert any ICs or the LCD into their sockets yet.
You may be wondering why they chose those particular frequencies. Why not simply use multiples of say 500Hz? The answer is in the harmonics generated due to nonlinear circuits in the phone system. If you look at the low-frequency group you will see that their second harmonic (multiple of two) falls between the highfrequency tones. Third harmonics and above are outside the range of the high-frequency tones and are not a problem. A valid tone pair has to meet the following criteria: Only one tone per group allowed Start of each tone must be less than 5mS apart Both tones must last at least 40mS Each tone must be within 2% of the center frequency The tone levels must be within 6dB of each other All of these features make it extremely unlikely that voice will accidently generate valid DTMF tones. This has meant that DTMF is now used for much more than just sending dialled numbers across the telephone network. THEORY OF OPERATION The circuit is powered via 5 volts supplied by IC1, a 78L05 voltage regulator. Diode D1 provides reverse polarity protection in case the input voltage is connected the wrong way around. IC2 is a DTMF receiver chip, a CM8870 from California Micro Devices. It is responsible for all the processing described above. The DTMF signals are picked up by microphone M1 or direct from the telephone line via the transformer. Switch SW1 is used to select between them. The microphone is an electret type and is biased by resistor R1. The transformer provides electrical isolation between the phone line and the kit. Capacitors C10 and C11 couple the AC signal from the phone line to the transformer whilst blocking any DC current. Both transformer windings have a nominal impedance of 600 ohms. Resistors R10 and R11 reduce the AC voltage level to the transformer to prevent signal overloading and distortion. The DTMF signal (selected by SW1) is coupled via C1 and R2 to the inverting input (pin 1) of a differential opamp inside IC2. The op-amp is configured for singleended operation which means feedback from the output (pin 3) is used to set the gain. The gain is set by R3/R2 a gain of 47 in this case. The non-inverting input (pin 1) is tied to a reference voltage Vref at pin 4. This approximately 2.5V (half Vcc).
RXD GND
The PC serial port should be configured for 9600 8N1 (9600 baud, 8 data bits, 1 stop bit, no parity). No hardware or software handshaking is required. DTMF HOW DOES IT WORK DTMF was originally developed to allow sending control information (dialled numbers) across the telephone network. The telephone network has a bandwidth of approx. 300 to 3400 Hz, suitable for voice communications. Any control tones would also need to be in this range and had to work regardless of whether voice was present or not. A single tone or frequency could have been used. However, if voice was present, it would interfere with the control tones, making them useless. To overcome this a scheme was developed whereby two tones or frequencies were combined to represent each control code or number. A total of seven tones were needed to represent the digits normally found on a telephone keypad, namely 0-9, * and #. An eighth tone was added so that some extra digits were available for use. These are commonly labelled ABCD. These eight tones were divided into two groups of four tones each, a low-frequency group and a high-frequency group. This four-by-four array produced 16 different combinations, as shown in the following table.