Shop OBEX P1 Docs P2 Docs Learn Events
DTMF IC interfacing w/cell phone — Parallax Forums

DTMF IC interfacing w/cell phone

iQuitiQuit Posts: 78
edited 2010-03-18 04:24 in Accessories
I'm working on a project that uses a cell phone as a receiver for a BS2. I want to use the phone's headset
to interface with the BS2: speaker output of phone --> DTMF receiver --> BS2. And then, BS2 --> cell phone's
mic input for confirmation tones.
Outline: I want to be able to call the cell phone connected to the BS2 with any phone, use the keypad of the phone
I'm calling from to enter a PIN, hear a confirmation beep, then enter another number as a command, and
have the BS2 execute said command, followed by another confirmation beep. Multiple commands can be sent.

I will also have the cell phone call out if the BS2 detects an alarm condition. The cell phone I'm using is one I have
around and am not using. It's a Nokia 8290. The hands-free headset has a button that will dial the last number used
and also hang up a call--the BS2 can use this to call out, and end a session.

Now, to the question. I need help interfacing the Nokia headset to the DTMF receiver. I'm not very good with the
analog stuff. From what I can gather, I need to use the differential input mode of the receiver? Connect the speaker out
of the cell phone directly to this using the input diagram shown in the data sheet? I haven't picked a DTMF receiver yet,
because I'm hoping someone may have ideas as to which is best--there are several out there. I can do some testing
of the speaker output of the phone using the Oscope if needed. This output will change as the volume on the cell phone is changed.
Best way to account for this?

Also, using the mic input to the phone driven by the Stamp for confirmation tones. I know that the Stamp can generate
tones, so this is probably simpler to implement.

I've attached a diagram of the pin out of the Nokia headset--at least I think I did. It's a four pin plug. Two are used for
the speaker--it shows a 30 ohm speaker. The mic uses the other two pins. The mic is wired in parallel with a 10nf cap.
And when these lines are shorted, the phone answers an incoming call, hangs up, or dials the last dialed number when
held down for one second when the phone is in standby mode. The Stamp will use this feature.

Wow, sorry this is so long, but I wanted to be sure to get most of the overview in.

Thanks for any responses in advance.

Post Edited (iQuit) : 3/17/2010 12:52:41 AM GMT
540 x 272 - 3K

Comments

  • iQuitiQuit Posts: 78
    edited 2010-03-17 02:23
    Also, if anyone can think of a better uC to use than the BS2 with DTMF decoder, I'm open to suggestions. I don't know
    much about the Propeller, perhaps it has the DTMF decode built in? I'll try posting over there.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "She may not be very pretty now, but she was somebody's baby once." Bugs Bunny
  • FranklinFranklin Posts: 4,747
    edited 2010-03-17 02:53
    Since you need help connecting the DTMF decoder (not a Parallax part) to a cell phone (not a parallax part) you should wait here for your answer and not cross post to forums that do not apply to your question. It's the polite thing to do>

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • iQuitiQuit Posts: 78
    edited 2010-03-17 03:03
    I do want to connect this to a BS2, and will probably need help at that stage also. Looking for help using the DTMF
    receivers in general. Which is best or easiest to connect to the stamp etc. I'm studying the data sheet for the
    MT8880 right now, but and not sure on the input to the DTMF from the cell phone.

    I'm not sure what cross posting is. Sorry if I did it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "She may not be very pretty now, but she was somebody's baby once." Bugs Bunny
  • kwinnkwinn Posts: 8,697
    edited 2010-03-17 13:40
    iQuit, while the propeller can probably do the DTMF decoding in software (since it has a 1200 baud sw modem) the MT8880 or similar decoder chip is the way to go. The chip can deal with a fair bit of variation in the input level voltage and provides a 4 bit output to indicate what tone pair was received as well as a "valid tone pair" bit.
  • iQuitiQuit Posts: 78
    edited 2010-03-17 16:01
    kwinn,
    I'm thinking that the 8880 is the way to go. I've been studying the data sheet and trying to remember back to my
    class days (11 years ago). My main enquiry is how to directly connect the output of the cell phone (via the headset) to
    the 8880 IC. The data sheet states a max value of 869 mV rms on the input--doesn't state if this is single or dual ended.
    Probably doesn't matter as long as the total input does not exceed that value. The speaker to the phone is 30 ohms.
    I think I'm going to start with testing the cell phone output to see what kind of values I'll be working with. The diagram shown in
    the data sheet for differential input shows a gain of one on the op amp. the input has two caps in series with two resistors.
    10 nf and 100k ohm respectively. The link is here: http://www.datasheetcatalog.org/datasheet/calmicro/CM8880-1.pdf
    if anyone wants to see what I'm describing. Once I have an 8880 in hand I can start testing.
    My goal here was to see if the 8880 was going to be the chip to use for this app.

    Has anyone used one of these chips before? Is that differential input valid for the input I'm thinking of using?

    Thanks for the reply.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "She may not be very pretty now, but she was somebody's baby once." Bugs Bunny
  • kwinnkwinn Posts: 8,697
    edited 2010-03-17 19:01
    I looked at using an 8880 in another project and reading the output is fairly simple, as is the analog input. If you are using the output from the cell phone speaker measure the p-p voltage and use a voltage divider to get the proper level in to the 8880. If the cell phone and 8880 share a battery put a 0.1uF capacitor in to block the DC. The 8880 op amp can handle a differential input signal. There are several suggested circuits on the data sheets.

    Missed the "headset" part. Same procedure as using speaker as input.
  • iQuitiQuit Posts: 78
    edited 2010-03-18 00:00
    Thanks kwinn,
    I find that I don't need the 8880 after all. The 8870 is a better choice because all I need is decoding, which is what
    the 8870 does. This way I don't have to mess with those pesky registers found on the 8880 IC.

    The cell phone will use its own battery, and I'll maintain charge via its 12V car charger. The BS2 will be powered by
    the car batter, along with a back up battery that the car will keep charged. I'm not sure if I'm going to have ground
    loop problems or not.

    I want to use the headset of the cell phone as the connection to the BS2 via the 8870. This way I can simply unplug the
    phone and use it as a back up phone--I don't want to hack into the phone to gain access. I'm pretty sure I can use only
    the headset as my interconnect, 'cause it has all of the functions I'll need for the project. I'll be able to make a call from
    the BS2, send a tone to the phone from the Stamp, hang up a call and detect an incoming call using just the headset. I
    think!

    I've just ordered 3 of the MT8870s, so once I have one in hand, I'll take it to the breadboard and start testing. I'm still
    not real confident about the input to the 8870 from the cell phone. If you get a chance, take a look at the data sheet
    for the 8870... http://www.alldatasheet.com/datasheet-pdf/pdf/77085/MITEL/MT8870.html

    They show two different inputs, and I think (key word) that I should use the differential input? I plan on testing the output
    of the cellphone at various volume settings to see what it produces and how it compares to the inputs listed on the data
    sheet of the 8870.

    Thanks for the help, D

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "She may not be very pretty now, but she was somebody's baby once." Bugs Bunny
  • iQuitiQuit Posts: 78
    edited 2010-03-18 00:05
    I forgot to mention in that last post that the headset cable from the phone will be wired directly to the 8870 IC
    input. The speaker will be removed--a schematic I posted in my original posting shows it to be a 30 ohm speaker.
    I'm thinking, and this is where I'm not sure, that I simply need to wire these two speaker wires directly to the
    differential input of the 8870's input, as it shows in the data sheet.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "She may not be very pretty now, but she was somebody's baby once." Bugs Bunny
  • kwinnkwinn Posts: 8,697
    edited 2010-03-18 03:06
    iQuit, my earlier posts were actually about the 8870. When you said DTMF decoder and gave the number it seemed familiar and I took it for granted as being that one. You can connect the speaker wires to the two op amp inputs provided the voltage is not too high. The gain of the op amp can be adjusted by the feedback resistor. Not sure what having no speaker (load) will do to the voltage from the phone. Beware of clipping or distortion of the signal. It will cause erratic or no decoding.
  • iQuitiQuit Posts: 78
    edited 2010-03-18 04:24
    kwinn,
    When I first started looking into this I saw some designs that used the 8880. I didn't know that there was a version that
    only had the decoding portion--the only part I need anyways. Sweet.

    I plan on testing the speaker output of the phone with the speaker attached, and then with a ~400 ohm resistor as the
    load and finally without any load. Not sure if connecting the leads to the Oscope without a load is a good idea or not.
    Hmmmm. nono.gif The scope has some load, so... I'll start at the lowest volume setting and work my way up in each
    case. The op amp has input impedance, right? And with those caps, the only thing that will get through is the AC part.
    Wow, it's been so long since I've thought about this stuff. I'm glad there are sights like this one with all of you helpful
    people.

    The diagram that they show, with resistor values listed, would give a gain of one. I could change this if need be.
    Anyway, I've ordered the parts and will activate the cell phone once the parts arrive and dive in testing. I'm looking
    forward to it. Haven't done anything like this in some time.
    smilewinkgrin.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "She may not be very pretty now, but she was somebody's baby once." Bugs Bunny
Sign In or Register to comment.