Trouble with decoding DTMF tones with Arduino.

Status
Not open for further replies.

Ref-Jazzy

Member
Joined
Mar 9, 2010
Messages
130
Location
Indianapolis Indiana
Not sure if this is the right place to post my question....but here it goes..

I have a dtmf decoder attached to my Arduino. The Arduino has 3 LEDs attached. It's programmed to light the LEDs depending on what dtmf tone you feed it.

Pretty straight forward stuff.... but I have an odd issue.

If I plug the decoder into my computer and play dtmf tones from a YouTube video it works perfectly, if I plug it into my radio and play dtmf tones from another over the air nothing happens. I have used two different radios on the receiving end with no result. I have plugged the radios into speakers to confirm the tones are being picked up and passed through the audio cable.

Any one have any idea as to what could be going on? Any advice?

Thanks!
 

Batman_

Member
Joined
Jul 20, 2013
Messages
26
which DTMF chip? 8870 ?
Of course you downloaded and read the data sheet.
Do you have bypass caps on the chips power pins?
are all your signal grounds proper (or reasonably correct)?

could be a DC component from the radios. Change your decoupling cap.
What is the chips Z-in compared to source Z-out? Matched-ish?
Add impedance match audio-output (8Ω:1KΩ) transformer, & for DC-isolation.
Audio level too low/high from radios.

Ground loop causing interference.
Is radio on batteries or grounded PS? Linear or switching PS? PS switching noise?
is arduino on wall-wart or battery or USB from computer's power supply?
Test with volt meter (AC & DC) between chassis ground of computer and chassis ground of radio PS.

It seems if your using arduino with USB for power, and DTMF chip gets power from arduino, and, if audio from computer makes everything work, then you have a closed system. That is, all grounds from one source.
When your audio comes from not the computer, you have to introduce a second ground reference from the alternate audio source.
That's my guess.

/\/\-Spectra's cannot be directly connected to a grounded output, just in case your using a Spectra.
What radio are you using?
If it's a Motorola, where are you getting your audio from, EXT.SPK, buffered audio out access conn.?
Perhaps your circuit Z-in is swamping the audio source driver.

Let me know what you find.
 

Ref-Jazzy

Member
Joined
Mar 9, 2010
Messages
130
Location
Indianapolis Indiana
Man, you certainly took me to school on that one. Thank you for the very verbose reply.

Ill give more details as to my set up.....

I am using this dtmf decoder
https://www.amazon.com/gp/product/B01DKAHXNI/ref=oh_aui_detailpage_o01_s00?ie=UTF8&psc=1

and i followed this video:

https://www.youtube.com/watch?v=wEDXaV-Qf-0


I have at current:

Baofeng radio Tx'ing dtmf over the air to a Yaesu 1900r which has its audio output feeding into the MT8870 which is then in turn plugged into my arduino which receives its power from my desktop computer. The ardiuno is running the code, from the above set up video. With this set up, it does NOT work.

now if I plug the MT8870 into the speaker port on my computer and change nothing else and play this video:

https://www.youtube.com/watch?v=qg9xrP_U1Cg

it DOES work just fine. (its actually kinda cool)

So now to make yet another change. If I drag the arduino and mt8870 down to my jeep and power the arduino via usb with a battery (one of those cell phone battery pack thingys) and plug the Jetstream JT270M into the mt8870 it does NOT work. (once this all works, this will be the typical set up)

you had an interesting point about the similar ground potentially being helpful when all plugged into the my desktop. I pulled out my laptop and plugged it into the MT8870 and powered the arduino from my desktop. that works perfect fine too.

Now when it comes to the ground here.... Would it be helpful. If i ran a jumper wire from the ground rail on my bread board for my arduino set up to a part of the body in my jeep or perhaps one of the mounting screws on the Jetstream radio?

You also mention audio levels on the radios being too high or low....

When testing with the yeasu, I rolled the volume up and down slowly while txing DTMF tones with the baofeng and saw no changes..



Thanks for all your help. I really appreciate it.
 

Batman_

Member
Joined
Jul 20, 2013
Messages
26
That's a cool little module, all self contained and fairly fool-proof.
Just add power and it functions.

I see it has a row of 5 LED's for "data strobe", and binary last-data [latched].
When you run your tests do any of these LED's react ?
The LED closest to the audio jack should always go "on" when it hears tones, and back "off" for nothing.
You can use that to sense and set volume input levels.
^^^^^ check for results here first and for each test.

If the LED's don't change with DTMF, I wonder if it's your patch cable.

With microphone jacks and headphone jacks being multi-function in radios, perhaps the audio pinout from the radio does not match the required audio pin requirement.
(you're not using the radio's mic-in jack instead of audio-out jack ((gotta ask)) ?)

When you switch from computer (as audio source) to radio (as audio source), and if you aren't switching cables, then it might be computer has stereo out (3-conductor: both L/R active channels of audio out) on cable, where-as radio is mono on one pin (but on wrong pin of 2 choices).

You can use a volt meter on AC and lowest voltage setting (looking for about 1 volt) to measure radio audio out (DTMF) from the cable you are plugging into the decoder.
(watch the meter when DTMF tones are received, and are not).
That can help you identify which pins have signal.
You can also test using a TV/VCR audio-inputs as an amplifier to hear your signal and identify which pins are the real signal, and if it's a clean signal.
(you could also use a computers line-in for this test).

If the 5-LEDs are lighting (and changing), but the three breadboard LED's aren't working, that's a different story.
Let me know.
 
Last edited:

Ref-Jazzy

Member
Joined
Mar 9, 2010
Messages
130
Location
Indianapolis Indiana
So I have plugged the radio into my computer mic port and recorded what it outputs. Adjusting the volume creates clearer tones but there is still an "open air" sound around it kinda like when you key up with out saying anything.

I have tried a steroid aux cable and a mono ai cable with no joy.

Do you think something like this would help?


https://www.amazon.com/gp/aw/d/B01E...SY340_FMwebp_QL65&keywords=audio+filter+3.5mm
 

Batman_

Member
Joined
Jul 20, 2013
Messages
26
I looked at the schematic included on the amazon link you provided.
We know it uses a stereo jack for input, and it uses the R-CH. and not the L-CH.
The L-CH. connector pin is floating, and from what I can find on G00GLE-images the TIP of a stereo plug is L-CH. where-as the R-CH is on the mid-shaft "Ring".
So, you must use the R-CH of a stereo plug as mono male plug will not work.

I see the Yaesu 1900r & Jetstream JT270M have a "two-contact" audio (earphone) out, which will be mono.
You will have to make a cable: TIP from radio plug to "Ring" (R-CH) on decoder-in (stereo plug) or it won't work.
This explains why it worked using your computer as a sound source, but no where else.

It has a 100nF blocking cap and with the two 100KΩ input resistors, perhaps an Z-in of 50KΩ.
Chip Z: 10MΩ into op-amp.
Likely a non-issue.


You asked about the ferrites and RF problems, but since this a receive decoder you should not see that as a problem during receive.
Of course if you are standing next to it transmitting it could fail.

If this is for power supply filtering, your arduino will be having problems too as the decoder gets it's power from the arduino.

It all needs to be properly shielded by the sounds of it.

* *
The only likely problems I can see you having is too high an input signal (Range: .02~.86 Vrms) causing distortion or the wrong cable.

IF you build it into a metal box and desire to be fancy/universal, install a female stereo input jack and install a selector A/B switch to route the input from either L-CH or R-CH pins to the R-CH decoder input.
Then you can use any patch just by flipping the switch.

You may also want to build in an attenuator that can be switched out (or something like this) so you can have the radio at normal listen level and plug in the decoder without having to adjust the radio's volume level.
This will also allow an external speaker to be used and the decoder to also remain in circuit.
 
Last edited:

Batman_

Member
Joined
Jul 20, 2013
Messages
26
* *
The only likely problems I can see you having is too high an input signal (Range: .02~.86 Vrms) causing distortion or the wrong cable.

IF you build it into a metal box and desire to be fancy/universal, install a female stereo input jack and install a selector A/B switch to route the input from either L-CH or R-CH pins to the R-CH decoder input.
Then you can use any patch just by flipping the switch.

You may also want to build in an attenuator that can be switched out (or something like this) so you can have the radio at normal listen level and plug in the decoder without having to adjust the radio's volume level.
This will also allow an external speaker to be used and the decoder to also remain in circuit.

Perhaps a built-in peak detector LED might be useful too.
Audio Indicator
 
Last edited:

Ref-Jazzy

Member
Joined
Mar 9, 2010
Messages
130
Location
Indianapolis Indiana
You are amazing sir. Thank you much.

I bought two headphone jacks with terminals on the back and wored them up and it works perfectly.

Now I just need to adjust the code to move a servo instead of light LEDs.

Again thank you.
 

Batman_

Member
Joined
Jul 20, 2013
Messages
26
I am pleased I was able to be of help.
If you post a vid of the final servo project, let me know.
I'm an arduino fan too :)
 
Status
Not open for further replies.
Top