Phone to Microcontroller interfacing with DTMF

Not rated 17,892

Circuit Image

This document outlines the process of interfacing a microcontroller with a phone line. The tones generated when dialing numbers on a phone can be utilized to remotely control various devices. It provides guidance on incorporating Dual-Tone Multi-Frequency (DTMF) tones into microcontroller projects. The project details the creation of a system that connects a telephone line to a microcontroller, enabling device control through a telephone or cell phone. The system employs DTMF tones, which are standard in telephone networks. DTMF signaling operates over the voice-frequency band to transmit signals to the call switching center. The tones produced when dialing a touch-tone phone are organized in a 4x4 matrix, where each row corresponds to a low frequency and each column to a high frequency. Activating a key sends a simultaneous sinusoidal tone representing both frequencies. The combination of two tones for one key prevents signal overlap between keys. Although there are 16 possible tone combinations, only 12 are utilized in standard telephones. The ATMEGA-8 microcontroller was chosen for its affordability, 8Kb of programmable flash memory, 512 bytes of EEPROM, and ease of programming. The MT8870 serves as a low-cost DTMF decoder, providing a 4-bit binary output for each tone along with a status signal indicating the presence of a valid DTMF tone. Outputs Q1 to Q4 correspond to the binary representation of the detected tone, while the StD output signals when a valid tone is received. The IC 7805 acts as a linear voltage regulator, delivering a stable +5V output regardless of fluctuations in the input voltage and is equipped with a heat sink for thermal management. A Magnetic Latching Relay is included, featuring 10-pin contacts and dedicated pins for latching and unlatching. This relay maintains its state even when power is removed, thus minimizing power consumption and facilitating ignition cut-off. The telephone line connects to the MT8870 DTMF Decoder, whose 4-bit decoded binary output interfaces with a ULN 2003 bridge connected to the microcontroller. The status signal from the MT8870 triggers an interrupt upon detecting a new DTMF tone, allowing the microcontroller to read the decoded output. Upon receiving the correct code, the microcontroller activates the latching relay through a BC108 transistor, enabling control over nearly any appliance.

The schematic for this project consists of several key components arranged to facilitate the interaction between the telephone line and the microcontroller. The telephone line connects directly to the MT8870 DTMF decoder, which is the heart of the system. The decoder interprets the DTMF tones and produces a 4-bit binary output that corresponds to the pressed key on the telephone keypad. The outputs Q1 to Q4 of the MT8870 are connected to the ULN 2003 driver, which serves to amplify the signals before they reach the microcontroller. The ULN 2003 is a Darlington transistor array that provides the necessary current and voltage levels to ensure proper operation of the microcontroller inputs.

The ATMEGA-8 microcontroller is programmed to monitor the status signal from the MT8870. When a valid DTMF tone is detected, the interrupt service routine is triggered, allowing the microcontroller to read the binary output and determine which key was pressed. The microcontroller then processes this information and, if the correct command is received, activates the latching relay through the BC108 transistor. This transistor acts as a switch, controlling the power to the relay coil, which in turn engages the relay contacts to control external devices.

The power supply for the entire circuit is stabilized by the IC 7805 voltage regulator, ensuring that the microcontroller and other components receive a consistent 5V power supply. The inclusion of a heat sink on the 7805 is crucial for maintaining performance and reliability during operation. The Magnetic Latching Relay is particularly advantageous in this design, as it allows for the control of high-power devices without continuous power draw, making the system efficient and effective for remote operation.

Overall, this interface system provides a versatile solution for remotely controlling appliances using standard telephone DTMF tones, combining simplicity and functionality in a compact design.How to interface a microcontroller to the phone line. The tones you hear as you enter numbers on your phone can remotely control devices. Learn how to use these DTMF tones in your microcontroller projects. This article was submitted by Mayank Magoo as part of the Hobby parts for articles  program. Mayank received a Arduino compatible Modern Device Company Bare Bones Kit for this great article. This project describes the development of a system to interface the telephone line with a microcontroller. Using this interface any device can be controlled using a telephone or cell phone. The system involves the use of DTMF tones commonly used in telephone networks. Dual-Tone Multi-Frequency ( DTMF ) signaling is used for telephone signaling over the line in the voice-Frequency band to the call switching center.

These are the tones you hear when you dial a touch tone phone. The standard DTMF keypad is laid out in a 4G—4 matrix, with each row representing a low frequency, and each column representing a high frequency. Pressing a single key will send a sinusoidal tone of the two frequencies at the same time, the lower frequency for the row of the pressed key and the higher tone for the column.

These tones are then decoded at the receiving end to determine which key was pressed. The use of two tones for a single key ensures that no two keys will generate the same signal. There are 16 possible tone sets but only 12 are used on common telephones. The ATMEGA-8 microcontroller was selected due to it`s low cost and it`s 8Kb of programmable flash memory and 512 bytes of EEPROM and ease of programming and implementation. The MT8870 is a low cost DTMF Decoder which gives a 4-bit binary output characteristic of each tone and a status signal which has logic high whenever a valid DTMF tone is received.

The Q1 to Q4 outputs produce a 4 bit binary output corresponding to each tone. The StD output signals that a valid tone is present. The IC 7805 is a linear voltage regulator. It provides a constant +5 voltage in spite of the variations in the incoming voltage. Each IC 7805 is connected to a heat sink to dissipate heat. The Magnetic Latching Relay has 10-pin contacts and two separate pins for latching and unlatching the relay. The relay once latched will remain latched even if the power is removed thereby reducing the power requirements and provide and easy and effective way to cut-off the ignition.

Telephone line is connected to the MT88770 DTMF Decoder, the 4-bit decoded binary output is connected to ULN 2003 Bridge whose output is fed into the micro-controller. The status signal from MT8870 is used to trigger an interrupt whenever a new DTMF tone is detected. The microcontroller then reads the decoded output. Once the correct code is received, the microcontroller activates the latching relay via the BC108 transistor.

Power for almost any appliance could be controlled this way. 🔗 External reference




Warning: include(partials/cookie-banner.php): Failed to open stream: Permission denied in /var/www/html/nextgr/view-circuit.php on line 713

Warning: include(): Failed opening 'partials/cookie-banner.php' for inclusion (include_path='.:/usr/share/php') in /var/www/html/nextgr/view-circuit.php on line 713