กลับไปหน้ารวมไฟล์
dtmf-decoder-for-handy-with-arduino-control-over-several-kilometers-cd59de-en.md

In this tutorial we will see how to make a circuit to connect to our handy, in this case a Baofeng UV-5R (although it also works for other brands and models) for long distance control of motors, lights, water pumps without the need to use a cellular network, or in places where it does not exist. We will see the assembly of the electronic circuit, we will study the source code and finally we will test the entire device to verify its operation.

The Physics of DTMF

When you press the button "5" on an old telephone, it plays a very specific, dual-frequency chord (a 770Hz tone and a 1336Hz tone mixed together).

  1. The Transmitter: You take a standard Baofeng or Motorola walkie-talkie. You hold down the "Talk" button and type "1, 2, 3, 4" into the keypad. The radio blasts those loud beeps over the mountains.
  2. The Receiver: 5 kilometers away, a second walkie-talkie receives the transmission. You solder its headphone jack directly into an MT8870 DTMF Decoder Module.
  3. The Hardware Translation: The MT8870 chip physically listens to the analog audio screeching out of the headphone jack. Its internal circuitry mathematically separates the complex chord back into a pure 4-bit binary number!
  4. The module outputs 4 digital pins (e.g., HIGH, LOW, HIGH, LOW representing the number 5).

Unpacking the Binary Payload

The Arduino does not have to do any audio processing.

  • The loop() utilizes simple digitalRead() commands on those 4 pins to read the MT8870's binary output.
  • It translates the binary variable into an integer.
  • if (receivedDigit == 5) { TurnOnFarmSprinkler(); delay(3600000); }
  • You have just successfully triggered an incredibly complex industrial logic tree by playing a phone beep over an analog radio!

Component Necessities

  • Arduino Uno/Nano: The relay translator.
  • MT8870 DTMF Audio Decoder Module.
  • Two Analog Walkie-Talkies (UHF/VHF Transceivers) (One acting as the remote, one acting as the base station).
  • A 3.5mm Aux Audio Cable (Cut and stripped to wire the radio output into the MT8870 chip).

Electronic components

3.58 Mhz crystal

undefined

Two 100K Ohm resistors

undefined

Two 100 nF ceramic disc capacitors

undefined

A 300K Ohm resistor

undefined

An arduino mini pro

undefined

Two handy baofeng or similar

undefined

hc-05 module (optional) Only if you want to see the data received on your cell phone you can connect this module, that is why it is optional and not mandatory.

undefined

Works as a bluetooth master and slave device Configurable via AT commands Bluetooth V2.0+EDR Operating frequency: 2.4 GHz ISM band Modulación: GFSK (Gaussian Frequency Shift Keying) Transmit power: <=4dBm, Class 2 Sensitivity: <=-84dBm @ 0.1% BER Security: Authentication and encryption Perfiles Bluetooth: Puerto serie bluetooth. Distance of up to 10 meters in optimal conditions Operating Voltage: 3.6 VDC to 6 VDC Current Consumption: 30 mA to 50 mA Chip: BC417143 Version or firmware: 3.0-20170609 Default Baud: 38400 Supported baud rates: 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200. Interface: Serial TTL Antenna: Integrated into the PCB Security: Authentication and encryption (Default password: 0000 or 1234) Working temperature (Max): 75°C Working temperature (Min): -20°C Dimensions: 4.4 x 1.6 x 0.7 cm Female pins

undefined

2.5mm male jack plug

undefined

Integrated circuit MT8870de

undefined

Pinout del MT8870DE

undefined

Data sheet

mt8870d-datasheet

Display oled con driver SSD1306

undefined

The display performance is better than traditional LCD screen, also lower consumption. Specification: Driver IC: SSD1306 Size: 0.91 inch OLED Resolution: 128 x 32 Size: 38 * 12mm Number of pins: 4 pins Interface type: IIC interface Screen color: White / Blue Pin description: GND: Power Ground VCC: Power + (DC 3.3 ~ 5v) Working temperature: -40 ~ 85 ℃ SCL: Clock line SDA: Data line

OLED display, no need backlight, self-illumination, Screen color: blue. The display performance is better than traditional LCD, also lower consumption; IIC (I2C communications) simplifies connections. Use with Arduino, ESP8266, ESP32, STM32, etc. 3.3 to 5v voltage

Pines macho

undefined

Socket for the arduino mini pro

undefined

Socket for the MT8870 integrated circuit

undefined

Circuit

undefined

PCB

undefined

Download pcb –> dtmf duino

undefined

ข้อมูล Frontmatter ดั้งเดิม

apps:
  - "1x rogerbit."
author: "carlosvolt"
category: "Wireless & IoT"
components:
  - "1x Arduino Mini Pro - ATmega168 5V"
description: "Dial-up automation! Utilize old-school Dual-Tone Multi-Frequency (DTMF) chips and a standard walkie-talkie radio to trigger heavy machinery relays from miles away."
difficulty: "Intermediate"
documentationLinks: []
downloadableFiles: []
encryptedPayload: "U2FsdGVkX1+CY6QmQr/wYjMQoZvEB/agpczbW2jKkS8iJr2m7uXhvl8gkzlGZ3ip4rwc2m0p9T5oL/z9HzcHzMpXA3StSUlGWhowPGtm20U="
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/dtmf-decoder-for-handy-with-arduino-control-over-several-kilometers-cd59de_cover.png"
lang: "en"
likes: 1
passwordHash: "0282a0ecf8f6c860e28317f9dd84695f99fa44ff9d4081532b19f7cf5345ba8d"
price: 2450
seoDescription: "Learn to build a DTMF decoder with Arduino for long-range control using a Baofeng UV-5R handy radio."
tags:
  - "Communication"
title: "DTMF decoder for handy with arduino, control over several kilometers"
tools: []
videoLinks:
  - "https://youtu.be/_aOdfdYjFEQ"
views: 2882