Shop OBEX P1 Docs P2 Docs Learn Events
Interfacing the Prop to the telephone network (dialup) — Parallax Forums

Interfacing the Prop to the telephone network (dialup)

Cluso99Cluso99 Posts: 18,069
edited 2011-05-01 14:48 in Propeller 1
There has been quite a few threads lately about wanting to connect a prop to the telephone network.

As a professional modem designer and programmer (1984-1999) let me firstly explain some background issues.
  • Only an approved device can be legally connected to the PSTN (Public Switched Telephone Network = dialup telephone network)
  • There are different regualtions in different countries although less so now than before
  • The EU used to say (not sure if still nowadays) that Bell (202?) mode (specifically the answer tone - IIRC Bell used 2100Hz and EU used 2225Hz or visa versa) causes problems on their telephone exchanges and banned their use. I am sure this was a gimik to prevent US modems entering their market, because, they appeared to be unaware that the security industry was using Bell (103?) mode in almost all of their modems and was heavily deployed around the world. The actual signally used, which included the answer tone, was in fact this frequency said to cause problems. Obviously, it was not causing any problems!!!
  • Pulse dialling is now obsolete, although most likely still supported (I have been out of the industry for a while). However, there were various methods relating to the digits to the pulses. New Zealand had a reverse method to the normal and so brought in tone dialling in the 80's as a matter of urgency to avoid those problems.
  • There are basically three reasons for compliance requirements
    • Safety. Any device connected to the PSTN is required to prevent high voltages being applied to the line. This is a safety issue, and indeed a linesman was killed (1960's?) because of a fault where 240V ac was incorrectly applied to the telephone line. In Australia, as with a lot of other countries with 240V ac, the isolation was required to be ~3,000V. Around 1994 this was relaxed in many countries to be consistent with the US and other countries to be ~1500V. I believe this is also the same with the EU nowadays. Be aware that a lighning strike can produce 6,000V or more on telephone lines and handsets require IIRC 6,000V isolation. This is why a 250V MOV or Varistor is often included in the line circuit. I had small resistors in each line before the MOV so that if it actuated (causes a short on the line to prevent voltage going up to the modem and pc) it would cause the resistors to blow and hopefully protect the electronics. This proved quite successful.
    • EMI. This is to prevent interference with other devices and was initially required by the FCC well before most other countries adopted similar requirements. When the EU brought in their EMI compliance regulations they were tighter than the US. I think the requirements are pretty much standard these days.
    • Line compliance. This is the specification the devices must adhere to so that they can inter-operate. There are specifications for Tone dialling including frequency and twist tolerances, etc. There are line level requirements (minimum and maximum), timing requirements, etc. These are quite complex and expensive, so unless someone has a high volume application, the propeller chip and it's code is unlikely to ever be approved for this. (see below for caveats of this) There are also requirements for the number of times an autodialler can redial before being forced to wait, etc.
  • The costs of gaining compliance tests were extremely expensive. It used to cost me $10,000 per modem. Initially, a retest was required when even the modem chip changed revision. Rockwell's were mainly used throughout the world in the 80's & early 90's.
Now, having hopefully explained the history,etc, you have an idea about what is involved.

So what can you legally do?

Well, I believe there are some modules that have approvals for connection to the PSTN. However, unless they are supplied in a box, they are unlikely to be approved for your use. They are intended for manufacturers to be able to short-cut much of the red-tape to have it embedded into their products.

See the next posts for some ideas about what you can do... :tongue:

Comments

  • Cluso99Cluso99 Posts: 18,069
    edited 2011-01-18 19:02
    Using a modem with the Propeller without modifications to the modem, so you can legally connect to the PSTN (telephone network) :-

    Now for some ideas...

    Modems (PSTN "AT" command set types) are cheap these days and you probably can find them free from friends who no longer use them, if you don't have any yourself. You can simply interface the prop to them via serial. Use a MAX232 chip or equivalent (try the PMod RS232 3V3 version from www.digilentinc.com or equivalent). The AT command set was well documented and should be readily available on the wiki or google it.

    This will allow you to control the modem for dialling, or you can even connect to another modem.

    Here are some commands I posted on another thread to dial a phone (cellular or landline) and use the modem to send some tones to indicate something to the person on the other end of the line. It is untested. I will fix here when I get time to test or someone else tests and lets me know...


    I am pretty sure this will work and it's easy to try using a pc connected to the modem and a terminal program such as HyperTerm of equivalent. In its window do the following (say at 9600 baud)

    (search for the Hayes AT command set for definitions) http://en.wikipedia.org/wiki/Hayes_command_set

    ATDTxxxxxxxx;<cr> where AT=attention to the modem, H1=go off-hook, DTxxxxxxxx = dials your number xxxxxxxx using tone, ";" returns to command mode when the phone answers, and <cr> is the enter key.
    IIRC when connected you should see "CONNECTED" (just cannot be sure, because connected usually means the modem and we are not really using the modem section, just the dialler).
    ATDT111,,,111,,,111;<cr> where each "," is a 2 sec pause, ";" returns to command mode. You should hear the tones dialled
    ATH0<cr> where H0= hangup line

    IIRC that could all be placed in one string, so this might work...

    ATDTxxxxxxxx;DT111,,,111,,,111,,,;H0<cr>

    BTW I wrote modem code which implemented the AT command set in the 80's.


    Related thread(s)
    http://forums.parallax.com/showthread.php?128845-Can-the-Bell-202-Modem-Example-be-modified-to-send-SMS-Messages-over-cellular-network
  • Cluso99Cluso99 Posts: 18,069
    edited 2011-01-18 19:02
    Modifying your modem to use with the propeller chip (on a private telephone network):-

    What can you do?

    Selecting a suitable modem

    Firstly, make sure it is a modem that uses a plugpack (=wallwart) because these usually have the require interface that you can easily use. Well, open up the modem (yeah, it voids your warranty so what). Make sure there is a small transformer inside which isolates the phone line. If not, make sure the isolation is via an isolation IC. Particularly, you should not use one that derives it's power from the telephone line because often these versions isolate at a different point, usually the RS232 interface. If in doubt, do not modify it.

    Now you should have a legal modem with the required safe interface. So what can you do with it?

    Modifications:-


    The modifications I am now going to suggest can only be conected to a private exchange such as your own PABX. It should remain safe because you are not going to cross the isolation barrier. Here are some ideas for this device...
    • Firstly locate the isolation section. This is fairly easy and should be the area inside a boundary that will have no tracks within it and bounds the telephone line & handset plugs, the isolation transformer to the line, and perhaps a couple of otpoisolator ICs and transistor/fet circuit and a largish capacitor often ~0.47uF 250V. The tracks should be about 0.3" apart separating this circuitry (line side) from the (user side) modem chip(s) and RS232 chip(s) and speaker amplifier chip(s).
    • DO NOT ALLOW any of your modifications to have wires that enter the isolation barrier or the line side. This will breach safety!
    • Locate the isolation transformer. Trace the tracks to identify the line side to the telephone network. This is not the side we want. The other side will usually have a pair of back-to-back Zener diodes across them and will be a single winding (2 pins). These are the 2 pins you want.
    • Solder 2 wires, one to each of these transformer pins. I suggest you use a twisted pair of wires discarded from an old computer that has a 2pin female connector on one end. We can use this to connect to the prop via some circuitry (I will update this thread later with it).
    I will also dig out some circuits and post to here over the next day or so. So, locate your modems now!
  • Cluso99Cluso99 Posts: 18,069
    edited 2011-01-18 19:02
    Here are some circuits (more to be added later). My apologies for the poor quality.

    The modem336 is a Dialup V32.bis modem (33,600bps) circuit I designed. You will note the line side
    on the upper right. Note there is a LM386 speaker amplifier circuit in the middle right (which does not form part of the isolated area) and the power supply lower right. Note there is a capacitor across the transformer which is not fitted.
    Modem336.JPG
    There is a better schematic of the Line Section (DAA = Data Access Arrangement) in the attached thumbnails section below - the forum software won't let me put it here :(

    The MusicOnHold device is another circuit I designed. This is quite different to normal, in that the micro, etc all reside on the line side. The only part of the circuit that is not on the isolated line side is the interface to the Audio.
    MusicOnHold.JPG



    There is a better schematic section of the audio interface in the attached thumbnails below.
    I can post photos of these if anyone wants to see them.
    466 x 673 - 60K
    924 x 611 - 96K
    456 x 148 - 10K
    645 x 478 - 56K
  • Cluso99Cluso99 Posts: 18,069
    edited 2011-01-18 19:03
    Reserved for some more ideas
  • Cluso99Cluso99 Posts: 18,069
    edited 2011-01-19 00:59
    (BIO removed)
    Did a check on the AT command set and adjusted the AT code above.
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2011-04-30 15:59
    Do you know of any registered daa's that work with CID? I have a lengthening list of modems that I have tried and rejected for voice. Does part of FCC part 68 testing require that there is some bug in the modem firmware? :-)
  • Cluso99Cluso99 Posts: 18,069
    edited 2011-04-30 21:03
    There are some registered DAA's. Not sure if any have CID. You will have to check.
    When you say you rejected them for voice, what quality are you looking for? Remember, the line is 4KHz bandwidth and IIRC sometimes this is limited to 3KHz.
    bugs... they creep into everything, especially when we get bloatware!
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2011-05-01 14:48
    I am looking for dependability, and multi system reliability and installation. We use these for alert system software. Here is what I have tried, and the results.

    http://www.trendnet.com/products/proddetail.asp?prod=115_TFM-PCIV92A&cat=51 Most decent so far, detects dtmf tones well, and has ringback detection , however will not work with laptops, and a few other miscellaneous computers. sv92pp Agere chipset

    http://www.trendnet.com/products/proddetail.asp?prod=130_TFM-561U&cat=51 Works on windows 7 somewhat, but on miscellaneous computers including xp will not go into 'at+vtx" mode correctly, so all the caller gets is silence. lx93010 Conexant chip

    http://www.trendnet.com/products/proddetail.asp?prod=110_TFM-560X&cat=51 No caller ID, or ringback reporting.


    http://www.trendnet.com/products/proddetail.asp?prod=125_TFM-560U&cat=51 'fclass=8' command Works on XP, but not windows 7. agere sv92u2g

    http://www.cermetek.com/Catalog/Low-Speed-Modems/Datasheet/index.htm?http://www.cermetek.com/Catalog/Low-Speed-Modems/DataSheet/CH1786A_607-0019/ conexant 06833?? chipset. No ringback reporting, bug in firmware resets modem after at+vsm command at 115 baud.

    http://www.mouser.com/ProductDetail/Multi-Tech-Systems/MT9234SMI-92R1-SP/?qs=2MYRKSL8J%2fpnPF8WibWoaw%3d%3d Takes random amount of time to boot up, up to a minute?? Agere L-OCM-f100-v92cc chipset

    http://www.zoomtel.com/products/dial_up_external_serial.html zoom 3049C Works ok, no ringback reporting, seemingly random lockups, conexant 06833 chipset.

    http://www.way2call.com/scripts/openExtra.asp?extra=33#3 Way2Call lite . Very capable, nice looking hardware, not a true voice modem, but would work. However, only reliably detects dtmf tones 1,4,7, and *, at least with my test setup.

    So, it looks about like building my own, or something, not sure what. I would like an open platform device, like the prop, or else something that would interface with HID usb, with a sd card to store voice prompts, maybe?

    The part 68 thing scares me off of building my own, not sure what kind of cost I would be looking at for testing, even with a pre-tested daa.
Sign In or Register to comment.