Loading, please wait...

DTMF Sensor

DTMF are dual tone multi frequency tones. These are the tones that you hear when you dial numbers on telephone. Basically these are two frequencies combined to send signals over the telephone lines or wireless medium to interpret the numbers for the telephone exchange system. 

 

 

 

Let’s start, we will need:

  • An Arduino, we will be using Arduino Uno.
  • DTMF sensor
  • aux cable (aux to wired)
  • jumper wires

Steps:

Step 1:

Connecting DTMF sensor with Arduino

Connection:

  • connect d1 pin of DTMF sensor to pin7 of Arduino
  • connect d2 pin of DTMF sensor to pin6 of Arduino
  • connect d3 pin of DTMF sensor to pin5 of Arduino
  • connect d4 pin of DTMF sensor to pin4 of Arduino
  • connect GND pin of DTMF to GND pin of Arduino
  • connect VCC pin of DTMF to 5v of Arduino

 

 

 

Step 2:

Connecting aux and mobile phone to DTMF sensor

  • Connect the two aux wire to DTMF input pin
  • Insert the male aux into mobile phone for input                            

Step 3: 

Copy the code below and paste in Arduino IDE

String x,y,z,t,finalstring;
int d0=7;
int d1=6;
int d2=5;
int d3=4;
int number[]={0101,1000,0100,1100,0010,1010,0110,1110,0001,1001};
void setup() { 
                pinMode(d0,INPUT);
                pinMode(d1,INPUT);
                pinMode(d2,INPUT);
                pinMode(d3,INPUT);
                Serial.begin (9600);
              }
void loop() {
                Serial.print("\n");
                delay(1000);
                x=digitalRead(d0);
                y=digitalRead(d1);
                z=digitalRead(d2);
                t=digitalRead(d3);
                finalstring=x+y+z+t;
                Serial.print("\n");
                Serial.print(finalstring);
                delay(1000);
             }

Step 4:

Giving input via call

  • make a call on the phone number which is connected via aux cable to DTMF sensor
  • open dialer on call
  • press 1 to 10 in dialer

Step 5:

Recording values on serial monitor

  • Open serial monitor on Arduino IDE

 

 

 

Conclusion:

Every tone has its own 4 digit binary value which is generated by DTMF sensor and printed on serial monitor