By bogdanmyr
#9042
Hello everyone ;) :)

I recentely bought DTMF sensor, picture and link below

Image
http://www.dfrobot.com/index.php?route=product/product&keyword=dtm&product_id=1070

I set it up and can read DTMF signal over 3.5 jack but I could not find any information how to use microphone in order to listen DTMF sound. Like if I want to push buttons on my phone and it will made dtmf sound , then microphone can read it and show me numbers in arduino terminal , just like with 3.5 jack but via Microphone.

If anyone has any information about it, please help.
By Leff
#9049
Hi bogdanmyr,

Welcome, so do you want to generate the sound using this module when you hit the number on your phone? If so, you can connect a buzzer with SPK1 or SPK2.

(330.12 KiB) Downloaded 7855 times


And in the library, I found, fortunately, there is a function called playDTMF(), (like below), with it, you could play the sound.

Code: Select all
void DTMF::playDTMF()
{
  const int _freq1[] = {
  1336, 1209, 1336, 1477,
  1209, 1336, 1477, 1209,
  1336, 1477, 1209, 1477,
  1633, 1633, 1633, 1633
  };
  const int _freq2[] = {
  941, 697, 697, 697,
  770, 770, 770, 852,
  852, 852, 941, 941,
  697, 770, 852, 941
  };
 
  int phone_number[] = {
    1, 2, 3, 4,
    5, 6, 7, 8,
    9, 0, 10, 11,
    12, 13, 14, 15
    };

  int i;
  for(i = 0; i < (sizeof(phone_number)/sizeof(int)); i ++) {
    Serial.print(phone_number[i], 10);
    Serial.print(' ');E
    tone(2, _freq1[phone_number[i]], 500);
    tone(3, _freq2[phone_number[i]], 500);
    delay(550);
  }

  Serial.println();
}


reference: https://www.arduino.cc/en/Reference/Tone
By bogdanmyr
#9063
Hi Leff , thanks for your reply !

I don't want to generate the sound using this module when I hit the number on my phone, but in fact I want the microphone in the module to be able to detect the sound of the numbers being pressed on my phone and show those numbers on the Arduino terminal. Do you have any idea how to deal with it ?

Thanks in advance :geek:
By bogdanmyr
#9086
Hi Leff !

You are totally right, I just find it out last night and the problem was in my phone, not a sensor or a lib, ohh :o
Though the sensitivity of this microphone is very low. Do you know how can I use higher quality external microphone ?
By Leff
#9094
Not mentioned after I finding all the places about how to do settings on that, seems the only way to enhance the recognition is to increase the volume of your phone.
By bogdanmyr
#9146
Hi Leff,

I also haven't find any information about it.
Seems like the only way is to buy shield and there are pins for connecting microphone, so can connect better microphone, hopefully.