MT8870 DTMF Decoder Interfacing with Arduino UNO
MT8870 is a DTMF (Dual Tone Multi-Frequency) receiver, which decodes the dial tone generated from a telephone keypad. It used in Interactive Voice Response Systems (IVRS), Remote control, Credit card systems etc.
Overview of DTMF


DTMF (Dual Tone Multi-Frequency) is a telecommunication signaling technique that uses a mixture of two pure tones (pure sine waves). It is used in phones to generate dial tones.
MT8870 is a DTMF decoder; it helps decode the key pressed.
It gives a 4-bit digital output that can be processed to identify the key pressed. This gives 16 possible outputs for 16 different keys.
For more information about MT8870 DTMF decoder and how to use it, refer the topic MT8870 DTMF Decoder in the sensors and modules section.
Connection Diagram of DTMF MT8870 with Arduino

Identify Dial Tone Using DTMF MT8870 and Arduino Uno
Decoding dial tones received from mobile phone and displaying them on the serial monitor of Arduino.
Here, a mobile phone is connected to the MT8870 DTMF Decoder module through an auxiliary cable.
The four digital signals from the module are connected to Arduino board along with the StD (Delayed Steering Output) signal.
StD is used to detect the key press. It goes High when the key is pressed and then returns to Low again.
DTMF MT8870 Dial Tone Identification Code for Arduino Uno
void setup() {
Serial.begin(9600);
pinMode(3, INPUT);
pinMode(4, INPUT);
pinMode(5, INPUT);
pinMode(6, INPUT);
pinMode(7, INPUT);
}
void loop() {
uint8_t number;
bool signal ;
signal = digitalRead(3);
if(signal == HIGH) /* If new pin pressed */
{
delay(250);
number = ( 0x00 | (digitalRead(7)<<0) | (digitalRead(6)<<1) | (digitalRead(5)<<2) | (digitalRead(4)<<3) );
switch (number)
{
case 0x01:
Serial.println("Pin Pressed : 1");
break;
case 0x02:
Serial.println("Pin Pressed : 2");
break;
case 0x03:
Serial.println("Pin Pressed : 3");
break;
case 0x04:
Serial.println("Pin Pressed : 4");
break;
case 0x05:
Serial.println("Pin Pressed : 5");
break;
case 0x06:
Serial.println("Pin Pressed : 6");
break;
case 7:
Serial.println("Pin Pressed : 7");
break;
case 0x08:
Serial.println("Pin Pressed : 8");
break;
case 0x09:
Serial.println("Pin Pressed : 9");
break;
case 0x0A:
Serial.println("Pin Pressed : 0");
break;
case 0x0B:
Serial.println("Pin Pressed : *");
break;
case 0x0C:
Serial.println("Pin Pressed : #");
break;
}
}
}
Video of MT8870 DTMF Tone Identification using Arduino Uno
Components Used
Powered by



MT8870 is a DTMF (Dual Tone Multi-Frequency) receiver, which decodes the dial tone generated from telephone keypad. It is used in interactive voice response systems (IVRS), Remote control, Credit card systems etc.
494-MT8870DS1
Downloads
Comments1
Join the discussion — share a question or tip.
- JE
"I'm working with MT8870 to turn on the water pump using cell phone. The circuit works fine but there is small issue. Here are few things about my circuit, 1. The output (Pin. 11) stays latched which helps to hold relay on continuously until it receive another tone. Relay operated by using pin no.11 (Key ""9"" activate the Relay), 13K resistor & 2N3904 transistor. 2. This operation is as per expectation. 3.The pin 10 is connected to +5 VDC and pin 15 left open. Here is issue: When I power OFF-ON the circuit within 1-2 minute with activated relay, the relay stays latched but if I power OFF - ON the circuit with 20-30 min time gap the relay stays de-activated. I don't want to keep the relay in latch condition even after power OFF-ON cycle with any time gap. The MT8870D output (Pin 11 to Pin 14) should be go low with the power OFF-ON cycle. Please advice." http://bigbelectronics.in/product.php?product=mt8870ds-dtmf