Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

How to Use DTMF MT8870: Examples, Pinouts, and Specs

Image of DTMF MT8870Design with DTMF MT8870 in Cirkit Designer

Introduction

The MT8870 is a Dual-Tone Multi-Frequency (DTMF) decoder manufactured by HALJIA with the part ID MT8870DS. It is designed to decode DTMF signals, which are commonly generated by telephone keypads, into a binary-coded decimal (BCD) output. This component is widely used in telecommunication systems, remote control applications, and embedded systems to interpret keypad inputs.

Explore Projects Built with DTMF MT8870

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of Arduino Mega 2560 Based Security System with Fingerprint Authentication and SMS Alerts: A project utilizing DTMF MT8870 in a practical application
Arduino Mega 2560 Based Security System with Fingerprint Authentication and SMS Alerts

This circuit features an Arduino Mega 2560 microcontroller interfaced with a SIM800L GSM module, two fingerprint scanners, an I2C LCD display, an IR sensor, and a piezo buzzer. Power management is handled by a PowerBoost 1000 Basic Pad USB, a TP4056 charging module, and a Li-ion 18650 battery, with an option to use a Mini AC-DC 110V-230V to 5V 700mA module for direct power supply. The primary functionality appears to be a security system with GSM communication capabilities, biometric access control, and visual/audible feedback.

Open Project in Cirkit Designer

Common Applications

Technical Specifications

Key Technical Details

Pin Configuration and Descriptions

The MT8870 has 18 pins, each with 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 analog signal (DTMF signal input).
2 IN- Inverting input for the analog signal (used for differential input).
3 GS Gain select pin for the input amplifier.
4 VREF Reference voltage output (typically 2.5V).
5 INH Inhibit pin. When high, it disables the detection of DTMF signals.
6 PWDN Power-down mode. When high, the chip enters 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 BCD output bit 4 (most significant bit).
11 Q3 BCD output bit 3.
12 Q2 BCD output bit 2.
13 Q1 BCD output bit 1 (least significant bit).
14 STD Delayed steering output. Indicates when a valid DTMF signal is detected.
15 TOE Three-state output enable. Controls the state of the BCD output pins.
16 VDD Positive power supply (2.5V to 5.5V).
17 StD Steering output. Goes high when a valid DTMF signal is detected.
18 EST Early steering output. Indicates the presence of a DTMF signal.

Usage Instructions

How to Use the MT8870 in a Circuit

  1. Power Supply: Connect the VDD pin to a 5V power supply and the VSS pin to ground.
  2. Oscillator: Connect a 3.579545 MHz crystal between the OSC1 and OSC2 pins. Add two 22pF capacitors to ground for stability.
  3. Input Signal: Feed the DTMF signal into the IN+ pin. If using a differential input, connect the complementary signal to the IN- pin.
  4. Output: The decoded BCD output will be available on pins Q1 to Q4. Use the STD pin to detect when a valid DTMF signal is decoded.
  5. Steering Circuit: Connect a resistor and capacitor to the EST and StD pins to set the timing for signal validation.

Important Considerations

Example: Connecting MT8870 to Arduino UNO

The MT8870 can be interfaced with an Arduino UNO to decode DTMF signals and display the corresponding keypress.

Circuit Connections

Arduino Code

// MT8870 DTMF Decoder with Arduino UNO
// Reads BCD output from MT8870 and displays the decoded keypress on the Serial Monitor

const int Q1 = 2; // Connect to MT8870 Q1
const int Q2 = 3; // Connect to MT8870 Q2
const int Q3 = 4; // Connect to MT8870 Q3
const int Q4 = 5; // Connect to MT8870 Q4
const int STD = 6; // Connect to MT8870 STD (valid signal detection)

void setup() {
  // Set BCD pins as inputs
  pinMode(Q1, INPUT);
  pinMode(Q2, INPUT);
  pinMode(Q3, INPUT);
  pinMode(Q4, INPUT);
  pinMode(STD, INPUT);

  // Initialize Serial Monitor
  Serial.begin(9600);
}

void loop() {
  // Check if a valid DTMF signal is detected
  if (digitalRead(STD) == HIGH) {
    // Read the BCD output
    int bcdValue = (digitalRead(Q4) << 3) | (digitalRead(Q3) << 2) |
                   (digitalRead(Q2) << 1) | digitalRead(Q1);

    // Map the BCD value to the corresponding keypress
    char keypress = decodeKeypress(bcdValue);

    // Print the keypress to the Serial Monitor
    Serial.print("Keypress detected: ");
    Serial.println(keypress);

    // Wait for the signal to clear
    while (digitalRead(STD) == HIGH);
  }
}

// Function to decode BCD value to keypress
char decodeKeypress(int bcdValue) {
  switch (bcdValue) {
    case 0x1: return '1';
    case 0x2: return '2';
    case 0x3: return '3';
    case 0x4: return '4';
    case 0x5: return '5';
    case 0x6: return '6';
    case 0x7: return '7';
    case 0x8: return '8';
    case 0x9: return '9';
    case 0xA: return '0';
    case 0xB: return '*';
    case 0xC: return '#';
    default: return '?'; // Unknown keypress
  }
}

Troubleshooting and FAQs

Common Issues

  1. No Output on BCD Pins:

    • Ensure the input signal is within the DTMF frequency range.
    • Verify the crystal oscillator is functioning correctly.
    • Check the power supply connections.
  2. False Detections:

    • Reduce noise on the input signal by using proper filtering.
    • Adjust the steering circuit timing components.
  3. STD Pin Not Activating:

    • Verify the resistor and capacitor values in the steering circuit.
    • Ensure the input signal amplitude is sufficient.

FAQs

Q: Can the MT8870 decode custom DTMF frequencies?
A: No, the MT8870 is designed to decode standard DTMF frequencies only.

Q: What is the purpose of the TOE pin?
A: The TOE pin enables or disables the BCD output. When low, the output pins are in a high-impedance state.

Q: Can I use the MT8870 with a 3.3V system?
A: Yes, the MT8870 operates with a supply voltage as low as 2.5V, making it compatible with 3.3V systems.