Shop OBEX P1 Docs P2 Docs Learn Events
Propeller DTMF? — Parallax Forums

Propeller DTMF?

MicrocontrolledMicrocontrolled Posts: 2,461
edited 2010-03-23 15:04 in Propeller 1
Does anyone have an object that can produce DTMF tones for dialing a phone? Also, what is the suggested circuit for this? Thanks in advance.

Micro

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Computers are microcontrolled.

Robots are microcontrolled.
I am microcontrolled.

SX Spinning light display·

http://designedbymemicros.blogspot.com/

Comments

  • kf4ixmkf4ixm Posts: 529
    edited 2010-01-28 19:03
    here is a circuit to interface to a phone line with a line input, hope this helps...

    http://forums.parallax.com/showthread.php?p=875553
    ·
  • MicrocontrolledMicrocontrolled Posts: 2,461
    edited 2010-01-28 19:29
    What if I don't have a transformer? Nothing else can do?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Computers are microcontrolled.

    Robots are microcontrolled.
    I am microcontrolled.

    SX Spinning light display·

    http://designedbymemicros.blogspot.com/
  • ChetChet Posts: 150
    edited 2010-01-28 19:32
    get a cheap modem at a swap meet or so or an old answering machine and canabalize it for the modem

    Good luck
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-01-28 19:33
    Acoustic coupling (speaker and the handset mic) works well. But for direct connection, you need the transformer, although there may also be analog optoisolator circuits that will do the job. Legally, you're supposed to have an FCC Part 68-approved "data access arrangement" (DAA) for connection to the public phone system. Here is some info regarding DAAs.

    -Phil

    Post Edited (Phil Pilgrim (PhiPi)) : 1/28/2010 7:45:36 PM GMT
  • kf4ixmkf4ixm Posts: 529
    edited 2010-01-28 19:38
    you can pick up the 600:600 transformers at just about any radio shack for a couple of bucks. i couldn't find them on thier website, but i've seen them in thier stores numerous times in the parts bins.
  • MicrocontrolledMicrocontrolled Posts: 2,461
    edited 2010-01-28 20:03
    Would one from an old computer modem do? I don't see a part number on it. How senistive is that?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Computers are microcontrolled.

    Robots are microcontrolled.
    I am microcontrolled.

    SX Spinning light display·

    http://designedbymemicros.blogspot.com/
  • kf4ixmkf4ixm Posts: 529
    edited 2010-01-28 22:03
    it might, if you can unsolder it/isolate it from the other circuitry, you can verify that the windings on each side are at 600 ohms each.
  • eod_punkeod_punk Posts: 146
    edited 2010-01-28 23:35
    The BS2 function can do FREQOUT, would it be possible to run FREQOUT on two different pins each with one tone needed for DTMF?
    I think you are still stuck though needing some 8870 for at least receiving DTMF, if not an 8880 for both sending and receiving.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    There is no problem that can't be solved with a suitable amount of explosives!

    EOD Memorial
  • DynamoBenDynamoBen Posts: 366
    edited 2010-01-28 23:36
    What about DTMF in? Anyone done anything with DTMF decoding?
  • localrogerlocalroger Posts: 3,452
    edited 2010-01-28 23:48
    The spectrum analyzer that was posted awhile back which works by overlaying freq_period samples and adding them up should be able to make short work of DTMF decoding. You'd need to run it at the periods of all the DTMF tones at once, but a single cog should be able to do that.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-01-29 00:05
    Attached is a DTMF input demo I did awhile back that uses the Goertzel algorithm to detect the tones. It includes an Excel worksheet for computing the bandwidth of the filters.

    -Phil
  • DynamoBenDynamoBen Posts: 366
    edited 2010-01-29 00:57
    Phil Pilgrim (PhiPi) said...
    Attached is a DTMF input demo I did awhile back that uses the Goertzel algorithm to detect the tones. It includes an Excel worksheet for computing the bandwidth of the filters.

    -Phil

    Thanks Phil this should give me the boost I need. I've had a project on paper for some time that needed a DTMF decoder. The problem was all the decoder ICs I could find were obsolete, and hard to find. I figured the Prop could do it but didn't know where to start. Thanks again.
  • zoopydogsitzoopydogsit Posts: 174
    edited 2010-01-29 09:34
    Hi Micro,

    I'm looking for one too!

    I tried doing this over the December break and I share what I learned, observed and make some suggestions on what not to do and how to achieve the result.

    I was wanting to get one Propeller to generate DTMF and another to listen for it.·I found out about the DTMF generation frequencies in wikipedia http://en.wikipedia.org/wiki/Dtmf·

    I thought I'd start with the generation first as that would probably be the easiest part! I tried using the frequency SYNTH object as it would output 2 frequencies per cog - which sounded great for DTMF (which is made from summing two frequencies).·What I found is that the frequency SYNTH object put out a neat squarewave at the right·frequency. I then summed these from two pins via 1K resistors.·Listening to it, it sounded sufficiently close to my human ear to be DTMF, and I seemed to be able to make which ever ones I wanted by mixing the frequencies. To prove that it worked I tried manually·detecting DTMF using the MC14536 DTMF detector chip ·http://www.jaycar.com.au/products_uploaded/MC145436.pdf·However no matter what frequency groups (for DTMF codes) I couldn't detect it. So the question was, is it a problem with the·DTMF generation or the DTMF detection?

    To then prove the DTMF·detector was working I then·ratted the box of old phones in the shed until I found one that had a·DTMF generator·chip that I could·find·enough information on to get it to output DTMF when not connected·to the phone line. From there I found that the DTMF detector worked fine.·So the detector was working!

    I then·looked at the DTMF from the phone·ong my CRO and it was a couple of very·beautifully formed overlapped sine waves, and not at all like my superimposed·square waves!

    I then tried shaping the square waves with inductors and caps to try to round out the edges, but eventually·I gave up after frustration.

    I suspect to get the Propeller to output DTMF then we we'll have to generate two nice overlapping sine waves. The start will be to get it to output a sine wave at a defined frequency. I'm guessing we would use a couple of resistors like the composite video DAC, but this will be more complex.

    Does anyone out there have a decent sine wave generator?

    Dave

    ·
  • Mike HuseltonMike Huselton Posts: 746
    edited 2010-01-29 12:24
    Sine/Cosine 4-quadrant lookup tables already a done deal in the Prop1. Where is the difficulty?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    JMH
  • localrogerlocalroger Posts: 3,452
    edited 2010-01-29 13:20
    Dave, the squarewaves won't add because they're not being added, they're being ORed with one another. You will need to do a high frequency PWM to generate analog output, then as Mike H. suggests use the sine table to generate sine waves at the two frequencies you want and actually add them together to generate the moving PWM level.
  • IRobot2IRobot2 Posts: 164
    edited 2010-01-29 13:51
    I have been working on a set of DTMF encoders and decoders for a couple months too. Very early on I abandoned the idea of using only the prop itself for decoding and encoding the frequencies. I am sure it can be done, but cost, simplicity and time led me toward using the 8870 and the 5089. Kwinn has helped me out tremendously by doing pretty much all the heavy lifting, so I really cant take much of the credit, but I at least have a working demo sitting on my desk now. Attached is a schematic that has a encoder/decoder/prop. It is not a completed schematic with power supply but it will give you every thing you need to send and receive signals at one station. (My project required multiple "stations" that could both send and receive tones.)

    I am working on this project every day so if any one wants to send me a PM I would be more than happy to share what I have learned so far. Its pretty neat.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Alex Burke
    "It is not how smart you are rather, it is how you are smart." -Jon Campbell
  • DynamoBenDynamoBen Posts: 366
    edited 2010-01-29 15:44
    IRobot2 said...
    Very early on I abandoned the idea of using only the prop itself for decoding and encoding the frequencies. I am sure it can be done, but cost, simplicity and time led me toward using the 8870 and the 5089.

    While both of these would do the job they aren't widely available because I don't think they are in production anymore. Which speaks to my earlier point, honestly if there were newer versions of both DTMF in/out ICs I would be tempted to take the route you did.
  • IRobot2IRobot2 Posts: 164
    edited 2010-01-29 16:06
    @DynamoBen - You are right about them being out of production. There still are plenty of them out there though, so if it is a small personal project I would not worry to much about it. You could always use something like the LM567, I believe they are still in production but I may be wrong. I chose ease of use over tremendous long term availability. Thanks for bringing that up though.

    Once I wrap up my current project I would love to attack the task of getting the prop to send and receive tones without use of many external chips. This is probably going to be a more difficult task than it appears to be. In fact I know it is. These circuits are pretty finicky and even with dedicated chips it can become very tedious, let me tell you. Generation of tones is the easy part, getting a prop to decode and isolate the tone is a whole nother' bag of worms. I will buy some one a drink if they can create a working DTMF tone encoder/decoder with only a prop and discrete components. It took me a month to get one working with dedicated chips.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Alex Burke
    "It is not how smart you are rather, it is how you are smart." -Jon Campbell

    Post Edited (IRobot2) : 1/29/2010 4:12:31 PM GMT
  • kf4ixmkf4ixm Posts: 529
    edited 2010-03-23 15:04
    here's a place that has the 8870's for $4.00...

    http://www.bgmicro.com/index.asp?PageAction=VIEWPROD&ProdID=10622
Sign In or Register to comment.