Go Down

Topic: DTMF decoder library (Read 55457 times) previous topic - next topic


Everything works fine now. Thank You !!!


I've uploaded the updated version to http://members.shaw.ca/el.supremo/DTMF.zip.

Hey Pete,

The above link seems to be pointing to the previous version... still the same detect function.



Hi Rob,
Thanks for the heads up. I've uploaded the correct version this time.



I realized the wrong link by myself. Thanks to everybody. My application, the detection of given 4 alarmtones between 580 and 820 Hz, works very fine!


Hey everybody,

I'm so glad this DTMF library exists.  To add to the posted code in this thread. Any ideas on how to select 2 or 4 dtmf tones sequentially to flip the LED on? 

I'm looking for:
if(thischar == '55') {
  digitalWrite(led, HIGH);


if(thischar == '55AB') {
  digitalWrite(led, HIGH);

I'm thinking of having a counter that counts until 2 or 4.  Once the count gets up to 2 or 4, 'thischar' would be reset to 0.  I'm having trouble expressing that as code that works. 



Hi Everybody,

I am trying to make a simple comminicator by landline which will use DTMF signals on both sides problem is , I am looking for detecting the Line busy, Call in process , other party didnt answer , Does any one can help me how to make this or which IC. can be used or is there any other way to make.

Best Regards


Hi Pete,

When I tried "Verify" of the "dtmf_test.ino"

I get this error message:

Arduino: 1.6.5 (Windows 8.1), Board: "Arduino Uno"

C:\Program Files (x86)\Arduino\libraries\DTMF\DTMF.cpp: In member function 'void DTMF::detect(float*, int)':
C:\Program Files (x86)\Arduino\libraries\DTMF\DTMF.cpp:179:1: error: unable to find a register to spill in class 'POINTER_REGS'
C:\Program Files (x86)\Arduino\libraries\DTMF\DTMF.cpp:179:1: error: this is the insn:
(insn 42 40 44 6 (set (reg:SF 50 [ D.4208 ])
        (mem:SF (post_inc:HI (reg:HI 63 [ ivtmp.118 ])) [2 MEM[base: _50, offset: 0B]+0 S4 A8])) C:\Program Files (x86)\Arduino\libraries\DTMF\DTMF.cpp:175 99 {*movsf}
     (expr_list:REG_INC (reg:HI 63 [ ivtmp.118 ])
C:\Program Files (x86)\Arduino\libraries\DTMF\DTMF.cpp:179: confused by earlier errors, bailing out
Error compiling.

  This report would have more information with
  "Show verbose output during compilation"
  enabled in File > Preferences.
Do I need to have the arduino uno plugged in and running the program? I thought "verify" would compile without.



See messages 24, 28 and 29 in this thread. Let me know if that doesn't help.



Sep 11, 2015, 02:41 pm Last Edit: Sep 11, 2015, 04:51 pm by edprado
Hi,  I would like to use the keypad cellphone near the microphone to recognize the tones, what kind of microphone do you suggest?


Electret Microphone Amplifier - MAX4466 with Adjustable Gain - https://www.adafruit.com/products/1063

Electret Microphone Amplifier - MAX9814 with Auto Gain Control - https://www.adafruit.com/products/1713

or another in aliexpress ?



my arduino keeps reading the DTMF decoder outputs as high, what might be the problem


hello from Argentina, I am a rookie, you can use Arduino Uno 328 and Dtmf Dt8870 to use as joystick pc


Yes, of course. 
Use Google: Arduino USB Joystick, there is a lot of info.

Paul Stoffregen

Today at 11:19 am Last Edit: Today at 11:48 am by Paul Stoffregen
Oh, so painful seeing floating point... so slow, times 7 tones!

You also need some relative signal strength comparisons and handling dropouts and other timing issues that occur in real-world reception of DTMF tones in the presence of noise and interference.

Here, use this if you must stay on 8 bit AVR.


If you have a 32-bit Teensy 3.x, I wrote a much better version is available in the audio library.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131