====== DTMF DECODER "HW-005" (MT8870 chip) ======
===== FEATURES =====
* Power Input: 5V Nominal (4.5V - 5.5V)
* Onboard 3.5mm jack input Facility
* MT8870 Based Frequency Decoder
* 5 Channel Interface
* Detects 0-9, A-D, *, #
* LED notifier for Output state
* 2.54” Pin pitch
* Board Dimension: 37 x 25 x 12 mm (l x w x h)
==== DOCUMENTATION ====
* {{ :documentation:electronique:modules_kits:dtmf_decoder:mt8870-dtmf-audio-decoder-module-datasheet.pdf |MT8870 Datasheet}}
* {{ :documentation:electronique:modules_kits:dtmf_decoder:mt8870-schematic-diagram.pdf |Module Schematic Diagram}}
===== BLOCK DIAGRAM =====
{{:documentation:electronique:modules_kits:dtmf_decoder:dtmf-module_block_diagram.jpg?direct&400|}}
===== PINOUT =====
{{:documentation:electronique:modules_kits:dtmf_decoder:dtmf-decoder-pinout.jpg?direct&600|}}
\\
{{:documentation:electronique:modules_kits:dtmf_decoder:mt8870-dtmf-audiospeech-decoding-telephone-module.jpg?direct&400|}}
^ PIN ^ FUNCTION ^ COMMENT ^
| Q1 | Binary Bit 1 | |
| Q2 | Binary Bit 2 | |
| Q3 | Binary Bit 3 | |
| Q4 | Binary Bit 4 | |
| StQ | Delayed String Output | Represents Binary Bit 0 |
| StQ | Power Down Input | |
| IN | Inhibit Input | Logic high inhibits the detection of tones representing characters A, B, C and D |
| VCC | DC Supply Input | 4.5V - 5.5V (5.0V Nominal) |
| GND | Ground | |
\\
{{:documentation:electronique:modules_kits:dtmf_decoder:mt8870-state.jpg?direct&400|}}
===== INTERFACING =====
{{:documentation:electronique:modules_kits:dtmf_decoder:mt8870-interfacing-diagram.png?direct&600|}}
===== MT-8870 =====
{{:documentation:electronique:modules_kits:dtmf_decoder:mt8870-dtmf-ic-block-diagram.jpg?direct&400|}}
\\
{{:documentation:electronique:modules_kits:dtmf_decoder:mt8870-dtmf-ic-pinout.png?direct&600|}}
===== CODE SAMPLES =====
==== ARDUINO LIBS ====
* https://www.arduino.cc/reference//en/libraries/mt8870/
* https://github.com/RobTillaart/MT8870
==== Sample 1 ====
{{:documentation:electronique:modules_kits:dtmf_decoder:dtmf_interfacing_diagram.png?direct&400|}}
\\
{{:documentation:electronique:modules_kits:dtmf_decoder:mt8870-circuit-.jpg?direct&400|}}
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;
}
}
}
===== DTMF (Dual Tone Multi Frequency) =====
^ Hz ^ 1209 ^ 1336 ^ 1477 ^ 1633 ^
^ 697 | 1 | 2 | 3 | A |
^ 770 | 4 | 5 | 6 | B |
^ 852 | 7 | 8 | 9 | C |
^ 941 | * | 0 | # | D |