The MT8870, manufactured by Mitel Networks Corporation, is a DTMF (Dual-Tone Multi-Frequency) Decoder IC designed to detect and decode the audio tones generated by telephone keypads. It converts these tones into a 4-bit binary output, making it ideal for telecommunication systems, remote control applications, and interactive voice response (IVR) systems. The MT8870 is widely used in projects requiring tone-based signaling and control.
The MT8870 has 18 pins, each serving a specific function. The table below provides a detailed description of each pin:
Pin Number | Pin Name | Description |
---|---|---|
1 | IN+ | Non-inverting input for the DTMF signal. |
2 | IN- | Inverting input for the DTMF signal. |
3 | GS | Gain select pin for the input amplifier. |
4 | VREF | Reference voltage output. |
5 | INH | Inhibit pin. When high, it disables the detection of tones. |
6 | PWDN | Power-down mode. When high, it puts the IC into low-power mode. |
7 | OSC1 | Oscillator input. Connect to an external crystal or clock source. |
8 | OSC2 | Oscillator output. Connect to an external crystal or leave unconnected. |
9 | VSS | Ground (0V). |
10 | Q4 | 4th bit of the decoded binary output. |
11 | Q3 | 3rd bit of the decoded binary output. |
12 | Q2 | 2nd bit of the decoded binary output. |
13 | Q1 | 1st bit of the decoded binary output. |
14 | STD | Delayed steering output. Indicates when a valid DTMF tone pair is detected. |
15 | TOE | Three-state output enable. Controls the state of the binary output pins. |
16 | VDD | Positive supply voltage (+5V). |
17 | StD | Steering input. Used for tone detection timing. |
18 | St/GT | Steering input/output. Used for guard time adjustment. |
Below is an example of how to interface the MT8870 with an Arduino UNO to read the decoded DTMF tones:
// Pin definitions for MT8870 connections
#define Q1 2 // Connect Q1 to Arduino digital pin 2
#define Q2 3 // Connect Q2 to Arduino digital pin 3
#define Q3 4 // Connect Q3 to Arduino digital pin 4
#define Q4 5 // Connect Q4 to Arduino digital pin 5
#define STD 6 // Connect STD to Arduino digital pin 6
void setup() {
// Set MT8870 output pins as inputs
pinMode(Q1, INPUT);
pinMode(Q2, INPUT);
pinMode(Q3, INPUT);
pinMode(Q4, INPUT);
pinMode(STD, INPUT);
// Initialize serial communication for debugging
Serial.begin(9600);
}
void loop() {
// Check if a valid DTMF tone is detected
if (digitalRead(STD) == HIGH) {
// Read the 4-bit binary output
int dtmfCode = (digitalRead(Q4) << 3) | (digitalRead(Q3) << 2) |
(digitalRead(Q2) << 1) | digitalRead(Q1);
// Print the decoded DTMF code
Serial.print("DTMF Code: ");
Serial.println(dtmfCode, DEC);
// Wait for the tone to end
while (digitalRead(STD) == HIGH);
}
}
No Output Detected:
Incorrect Decoding:
Output Pins Always High or Low:
Can the MT8870 decode custom frequencies?
What is the purpose of the STD pin?
Can the MT8870 operate at voltages other than 5V?
How do I adjust the tone detection timing?