Shop OBEX P1 Docs P2 Docs Learn Events
BS2 and DTMF detection — Parallax Forums

BS2 and DTMF detection

SalSal Posts: 2
edited 2007-08-07 04:14 in BASIC Stamp
I am hoping you would have some input on this email.
I appreciate your time.

I am intersted on DTMF detection using the Basic Stamp 2 from parallax. I know there are dtmf chips outhere I can use, as I matter of fact I have one. But I am like to do this for the fun and learning experience.· It is a nice challenge.

The BS2 only has a COUNT & PULSIN instructions that can count number of pulses on a pin and mearue how long each pulse is (with minimums specified).

Is the following sensible/on right path:

1)·Feed·a Comparator output, the inputs of which are an amplified DTMF signal and a 'relaxation oscillator output, into a BS2 pin and simply use COUNT to count the number of pulses.· Corrolate # of pulses to the frequency tested, etc.

The oscilator basically would chopp up the DTMF siganal via the comparator into 40,000 pulses(with a 40kHz oscillator, is this an overkill?), and since COUNT counts the # of pulses on the pin, that would give me the frequency.·



2)My original idea is to break apart the dtmf signal into its two componets, run each component to separate schmidt trigger and feed the trigger outputs to Stamp 2 pins and use COUNT.·
The problem is, I do not know what kind of a circuit to use to separate the two signals,· err.
Do you think just feeding the actual dtmf signal (amplified ) and use COUNT would work?

Thank you,
SL
js_94@hotmail.com

Comments

  • FranklinFranklin Posts: 4,747
    edited 2007-08-02 23:28
    DTMF has two frequencies in each tone. You will need to filter each tone into it's individual frequencies to use the commands. Several of the BS chips have DTMF decoding built in and that would be the way to go unless you just want to do it the hard way. I don't think the stamp will work as a frequency decoder without other parts which you are welcome to provide and configure.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • Philip GamblinPhilip Gamblin Posts: 202
    edited 2007-08-05 22:15
    I wasn't aware that any of the STAMPs did DTMF decoding. DTMF encoding is possible with the FREQOUT command since it will generate a pair of tones at the 'same' time. There is a demo someplace where it generates a dialtone the dials a number. Decoding is another problem all together.
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2007-08-05 22:42
    Folks -

    There is a PBASIC command intended for creating DTMF tones. The command is DTMFOUT and you can find out more about it in the PBASIC Help File or the PBASIC Reference Manual.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • pwillardpwillard Posts: 321
    edited 2007-08-05 23:07
  • mmmm Posts: 56
    edited 2007-08-07 04:14
    Sal,

    Check out the web page below it will give you some more insight as what it would take.



    Mike


    http://www.geocities.com/constantinescuradu/content/dtmf.htm
Sign In or Register to comment.