Shop OBEX P1 Docs P2 Docs Learn Events
DTMF Decode: Audio Interface Issue — Parallax Forums

DTMF Decode: Audio Interface Issue

MarsCSMarsCS Posts: 6
edited 2008-10-02 14:17 in Propeller 1
I am working on a DTMF Squelch device for a Ham radio, basically a DTMF controled switch to turn on an external speaker. I currently have the propeller set up·so i can·program·the the·DTMF·tones via switches,·decode·the DTMF·tones sent from a basic stamp, and·then·display the·numbers on an LCD.· I have also successfully gotten it to switch the audio on and off based on the codes recieved. The problem I am having is figuring out how to safely interface the audio from my radio with the propeller. The propeller needs to monitor the audio from the radio to listen for the DTMF tones. I am afraid that if I don't properly connect the audio it will destroy the chip. The radio outputs mono audio at·2W into an 8ohm speaker ( I wish it had a preamp out...).

·Would resistors be sufficient, or is there some other method that would work better.
·Another option I am looking into is having this device record the audio onto a SD card so I would like an option that would preserve audio quality.

··· Any help would be greatly appreciated,



······

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Christopher Marsden

Colorado Springs, CO

Comments

  • StefanL38StefanL38 Posts: 2,292
    edited 2008-09-28 15:56
    Hello Christopher,

    the most important thing is to protect the propeller against to high current.
    The IO-PINs of the propeller have internal protection diodes. These diodes can stand
    some amount of current. But not to much. Therefore the minimum of protection is to have
    a resistor in serial to the IO-PIN. As the voltage of a common telefoneline can go up to 50V or more
    I suggest using an optocoupler. Optocouplers serve a very good protection against to high voltages.
    There is one problem. DTMF-tones are sinewaves. Normal optocouplers are for low/high-signals
    =rectangled waves. Therefore has to be an adapting circuit with something like a comparator with hysteresis

    If you do NOT follow a philosphy of as less external components as possible
    how about using a DTMF-decoder-chip ?

    here is a sample-circuit for the chip MT8870
    www.electronicsforu.com/EFYLinux/circuit/jun2003/CI-2-DTMF.pdf

    you can go searching for any circuit DTMF and TTL/microcontroller

    If the circuit is for 5V instead of 3.3V adapting this is really easy and discussed
    in this thread http://forums.parallax.com/showthread.php?p=585920

    best regards

    Stefan
  • MarsCSMarsCS Posts: 6
    edited 2008-09-30 07:58
    Thanks Stefan,

    I am not going to be connecting to a phone line, just an audio out on a VHF/UHF Ham Radio. I was hoping to avoid using the MT8870, I looked into it, but I wanted a challenge. I will probably have to go with the MT8870 though due to the noise levels on the radio. I did end up connecting my pc audio jack to the propeller through a resistor and managed to get some response using DTMF wav files that I made up but it was extremely inaccurate, and ceased to work when I added some low level noise to wav file . The Basic stamp must have a lot cleaner output signal with DTMFOUT.

    Still wondering on the feasability of routing the audio from the radio directly to the stamp for recording purposes. What would be the best way to do it to protect the stamp, and still get a decent quality recording.

    Thanks Again,

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Christopher Marsden

    Colorado Springs, CO
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-09-30 12:42
    I don't think there's a no-matter-what solution to be had.·

    If you place a zener diode with a·low-value resistor·on the input pin then it won't affect anything till the input voltage approaches the zener breakdown voltage when the zener diode will start to conduct.· I think that's all that you can do if you cannot keep the volume turned down to avoid applying too high a voltage on that input pin.
    267 x 197 - 6K
  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-10-02 01:19
    You may want to try using an isolation transformer along with a clipping circuit as others have discussed. This will help limit the amount of current flowing in the secondary.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • Cluso99Cluso99 Posts: 18,069
    edited 2008-10-02 01:59
    I dont think you will get the frequency response necessary using an ordinary optoisolator. As Paul sugested, you could use a transformer as isolation (try a small Etal equivalent as used in modems (up to 56K). They were small but have isolation of 1500v or 3500V. You may also find an audio transformer that doesn't meet these isolation specs suitable.
  • MarsCSMarsCS Posts: 6
    edited 2008-10-02 14:17
    I appreciate the help,

    A friend of mine, who is majoring in EE, suggested using a 10:1 voltage divider, and that I would only need an isolation transformer for actual telephone line voltages. He's not familiar with the Propeller, but said it should bring the max voltage down to around 2V. I'll have to try that before I invest in the transformer. I will definitely include the Zener that PJ suggested, I've got a few of those available. If I destroy my Propeller It's only $13 for a new one, and if it's a spectacular death at least I would have some interesting pictures to post.

    I'm trying to keep the size of this project as small as possible as it is going to be in a mobile installation. I'm not even sure if I'm going to use the LCD or if I will just stick to 7 segment displays. I will post a circuit diagram as soon as I can get one done up to see if anyone notices any major flaws.

    Thanks again....

    ········· He also gave me a link to a website that has some interesting audio interface circuitry (it is not his site):

    ··············· http://www.epanorama.net/circuits/index.html#audiocir

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Christopher Marsden

    Colorado Springs, CO
Sign In or Register to comment.