Shop OBEX P1 Docs P2 Docs Learn Events
Sending data over analog landlines? Anyone? — Parallax Forums

Sending data over analog landlines? Anyone?

xanatosxanatos Posts: 1,120
edited 2014-08-24 23:20 in General Discussion
I've got a one-off where I need to send data over an analog phone line to the remote destination. So...

I know I need to go "off hook", dial touch tone, detect receiver pickup, handshake and send the data in some format, then hang up.

Is there a nice module or chip out there that handles this already, or do I have to manually do everything?

Has anyone on here already done this, and be willing to share?

Thanks!

Dave

EDIT: Found in the Basic Stamp Manual the basic circuit for using the DTMFOUT over the phone lines. Is DTMF going to be the best way to TX and RX data from the remote location? Or is there a better way to send higher-speed data? I'm going to need to send between 50 and 100 bytes at the LOW end... as much as 500 bytes at the high end.
«1

Comments

  • Beau SchwabeBeau Schwabe Posts: 6,566
    edited 2014-08-22 17:15
    A dial-up Modem ? .... that would do everything you would want at speeds way above what you are asking. ... you would need another one at the other end.

    There used to be a module that you could interface to without a PC.... in other words just about any micro controller, but now days that might be hard to find.


    EDIT: I just found this ... might work

    http://www.prweb.com/releases/2010/05/prweb4037524.htm

    http://www.adaptivemodules.co.uk/index.cfm/fa/shopdetails/Product_ID/507
  • xanatosxanatos Posts: 1,120
    edited 2014-08-22 17:34
    Those both look enormously promising - if they're still in production! :) Thanks very much!
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-08-22 17:46
    Cluso99 pretty much convinced me not to try to use a land line with a Propeller with this thread on the topic.

    My very inefficient attempt at interfacing a cell phone with a Prop is documented in this thread. I just wish I had made a video of the contraption in action. All those relays clicking out a text message was a lot of fun to hear.
  • xanatosxanatos Posts: 1,120
    edited 2014-08-22 18:01
    Hi Duane! I'm looking more at the module thing than a homebrew if I can indeed find such an animal. I just sent some inquiries out regarding the modules that Beau posted. I really don't want to reinvent the wheel here, modules are cheap, pre-approved and save me MUCH time in development and prototyping. That said, the idea of using a phone line is not optional here - they REQUIRE as a condition of acceptance, that cellular, TCPIP and PTSN telephony all be supported. I've got the cellular and TCPIP parts down pat, but telephony is a reach for me into the way-back machine, so... :)

    Your links gave me some really good ideas though, and several things to follow up with that may be helpful.

    The last time I worked with landlines was building a red box back in the 80s... :)

    Thanks again,

    Dave
  • SapphireSapphire Posts: 496
    edited 2014-08-22 18:13
    xanatos,

    Just use an external modem. Has all the line interface built-in, and will work for what you want. I have a number of dial-up remote sites setup this way. Even works fine on VOIP phone lines.

    Here's a lifetime supply for you:

    http://www.ebay.com/itm/351152915634
  • NWCCTVNWCCTV Posts: 3,629
    edited 2014-08-22 18:17
    Fax Machine???
  • xanatosxanatos Posts: 1,120
    edited 2014-08-22 18:17
    Can you make a BS2 talk to a 56k modem? That would be a very easy option if I can just send serial data at 9600 or 19.2 to a 56k modem and not have to worry about any of the intervening issues...

    Dvae
  • Ken GraceyKen Gracey Posts: 7,392
    edited 2014-08-22 18:19
    We used to have a neat Cermetek modem for this kind of project. I wonder if there's still an audience for it.

    image.jpg


    Ken Gracey
    640 x 542 - 104K
  • xanatosxanatos Posts: 1,120
    edited 2014-08-22 18:23
    Ken Gracey wrote: »
    We used to have a neat Cermetek modem for this kind of project. I wonder if there's still an audience for it.

    image.jpg


    Ken Gracey

    Well look at that adorable little thing! You don't happen to have a few boxes of those on a shelf under an inch-thick layer of dust by any chance? :)

    Alternately, any of the schematics/parts lists?? :)

    Thanks... that looks like exactly what I'm looking for if it can send 2 to 500 bytes at a shot at least.

    Dave

    EDIT: I just found the datasheet for the Cermetek CH1786 - looks like I can still get them SOMEWHERE... just not sure where yet. Certainly looks like it would do the job!
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2014-08-22 18:30
    Ken Gracey wrote: »
    We used to have a neat Cermetek modem for this kind of project. I wonder if there's still an audience for it.

    image.jpg


    Ken Gracey

    You could probably find a similar modem module (like the one that Ken has shown) out of a old multifunction printer.
  • SapphireSapphire Posts: 496
    edited 2014-08-22 18:30
    Dave,

    That's just the maximum modem data rate, you can use it from 300bps up to 56kbps. All done through the simple AT command set.

    I use a BS2 to control the modem and send/receive the data. Just need 3 pins (TX, RX and DTR to force a hang-up). You could add flow control, but the modem buffers data for you. Very easy to use.
  • xanatosxanatos Posts: 1,120
    edited 2014-08-22 18:34
    This is turning out to be a very rich thread. I never knew about the modules, and I never knew I could use a regular 56k modem with a BS2... that's awesome.

    Thanks folks! A lot to go on here!

    Dave
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2014-08-22 18:35
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-08-22 20:33
    Try EBay for 'RS232 56K modem'. Lots of choices both new and used. Not as compact as the module that Parallax used to sell, but very reasonable costs.

    I still have my RS232 56K modem for a rainy day. But I really should get another for the other end of the line. It is even a FAX modem in case I need to send or receive Faxes.

    If you initialize the modem for a fairly standard setup, I suspect a BS2 can work. The Propeller will handle more... always.

    Building your own from scratch really is demanding. The phone company desires certain interface protection, and then you have to get the sound quality of your FSK to be dead on. It is just easier to buy something that solves all these issues and is accepted by local regulations.
  • TorTor Posts: 2,010
    edited 2014-08-22 21:19
    I too have a 56k modem in storage. Was actually in use until a couple of years ago. These are easy to use, just connect to RS-232 serial. I think the local telecom still supports dialup..
    I suspect that there are a huge number of modems around, in closets or drawers, obsoleted by ADSL and cable etc. They are small enough that they don't get noticed so easily when you start throwing away old gear no longer in use. But the problem with using these things for your own end-to-end communication purpose is that most people (including me) only have the one.. and you need two! :)
  • CuriousOneCuriousOne Posts: 931
    edited 2014-08-22 21:27
    Get used US Robotics Courier (external). It can do all what you want, and if paired with similar one, it can work as dedicated line system, without of need of telephone company at all.
  • Cluso99Cluso99 Posts: 18,069
    edited 2014-08-23 03:57
    Just grab some modems (most you will find will be AT command set compatible). Most modems should communicate to another modem, even if its a different brand or speed. They should handshake up to their common maximum speed.

    Be careful... Make sure that if the line is also used for ADSL that the filter block is inserted into the line according to the ADSL modem instructions. This removes the higher frequencies used for ADSL from your handset (and modem) to stop interference.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-08-23 04:44
    Apparently if you are shopping, the ones to get are 56Kbaud RS232 fax/modem v.92.
    And it seems that the v.92 is important.

    There are cheaper USB modems that may fit your need at the computer end, but RS232 to a Propeller or a BS2 is pretty much the way to proceed.

    I am a bit uncertain the USB modems with work with Linux. It is the good old game of 'special drivers' all over again. Check with Linux before buying one.
  • kwinnkwinn Posts: 8,697
    edited 2014-08-23 05:58
    There are also single chip modems like this one "http://www.digikey.com/catalog/en/partgroup/single-chip-modem/21084", and IIRC there is a 1200 baud modem object for the propeller. Not sure if the object handles the phone line part though.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-08-23 07:35
    From what little I understand there a two groups of issues.

    A. Compliance with telephone company expectations and regulations. This may include items such as isolation transformer and lightning arrestors. The solutions have been around a long time, but a DIYer just might not understand the need to comply and run afoul with their phone company by upsetting service for other customers.

    B. The Frequency Shift Keying is an audio solution that uses tones. The more pure the tones, the better the results. So if you use a Propeller or other microcontroller to generate the audio from square waves, there is a lot of harmonic content that downgrades the ability to receive and respond to the tones. Ideally you want sine waves without harmonic content at all, but one can get filtering and PWM to approximate sine waves.

    The modem itself is a mature piece of equipment that is just about globally standardized. So it is likely to be easier to buy a solution that offers you pretty much all the standard features and learn to use that rather than build from scratch. The knowledge you gain will transfer to future projects.

    So the main point is neither A. nor B. is trivial and can be ignored. If you want to just get a PIC, load it with someone else's code, and wire it into your telephone and BS2; you won't likely get very far. If you are a motivated DIYer, it can be done with time and effort. It wouldn't hurt to have an oscilloscope and a good reference for standard audio frequencies.

    ++++++++++
    One very interesting modem and BS2 application might be to send a robotic SMS message to your cellular phone. It seems that telephone companies that provide cellular telephone services, also have dial in telephone numbers that will send an SMS message to any telephone for a small fee.

    Of course, you have to look into how to participate in the service and what is the proper format for an SMS text message. But that means that any location with a telephone land line can send you a message if there is something important that you care to monitor 24/7 at that telephone number.

    And this also can do some interesting tricks; such as get a person to verify their provided cellular telephone number by sending them a confirmation code. Since a cellular phone is usually tied to a person's proof of identity, this could be used as a credential to rent roller skates or a bicycle in a park, and so on.
  • xanatosxanatos Posts: 1,120
    edited 2014-08-23 10:25
    For SO many reasons, I'm just going to use a pre-made modem, or modem module... I just have never really done any of this type of data interface over PSTN, so I never knew that a regular old 56k v.92 modem could be driven with plain old RS232 from a stamp or propeller. Now that I do... it's a no brainer. I'm not really interested in reinventing the wheel and making my own DTMF with FSK and phone line level translation...... I just need data links for this project, and one MUST be via regular PSTN as a fallback option. And sow that I've learned I can talk to a nice, time-tested old modem... it's the most direct and fastest route.

    Thanks again everybody!

    Dave
  • bill190bill190 Posts: 769
    edited 2014-08-23 10:39
    How about one of these...
    1024 x 683 - 67K
  • xanatosxanatos Posts: 1,120
    edited 2014-08-23 12:14
    bill190 wrote: »
    How about one of these...

    I actually remember those....
  • bte2bte2 Posts: 154
    edited 2014-08-23 12:46
  • xanatosxanatos Posts: 1,120
    edited 2014-08-23 13:05
    bte2 wrote: »

    That is AWESOME!!!! Must get! :) Thanks!
  • Cluso99Cluso99 Posts: 18,069
    edited 2014-08-23 17:51
    Nice indeed!
  • NWCCTVNWCCTV Posts: 3,629
    edited 2014-08-23 20:45
    If I had a need for it I would definitely buy one. However, I can find no legitimate use for a modem these days!!!
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-08-24 00:10
    Well, I did look around for alternatives to a big box and wall wart type of 56Kbaud v.92 modem. There are chips and complete modules attached to an RJ11 jack. But the prices are pretty much locked in to around $50/60USD or more for something new and complete.. unless it is a USB modem. One doesn't save anything by buying a 2400 baud modem.

    From what I understand, the 56K baud devices will send and receive at slower rates. The BS2 is limited to 19200 baud max. Whatever you purchase needs to confirm this flexibility.
  • localrogerlocalroger Posts: 3,451
    edited 2014-08-24 07:28
    Any USB modem is giong to have one of the usual USB to RS232 suspects lurking inside, so if you can identify the chipset you can find out whether it has Linux (or Windows 7 and 8 for that matter) drivers.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2014-08-24 11:09
    Is this a Stamp project?

    At one time I bought 100 surplus Apple 5 volt ABD Teleport modems for less than $1 each and wrote a note (attached, with PBASIC code) about how to convert them for the use with the Stamp. I also used the Cermetek embedded, a nice module, but it (typical of embedded modules) needs the varistors and whatnot in order to comply with the phone company's protection standards. A full-fledged modem is a good bet because it has all of that.

    I'd write configuration commands into the modem eeprom, so that it would come up with known settings. One of those would be to fix the modem baud rate to 2400, even with the high speed Cermetek. That would speed up the negotiation of the connection and was easy on the Stamp interface. Besides, I was working these on farms and locations where the phone lines were none too good. It helps if you have control over both ends of the modem link, so that you can clamp both of them down to matching rates and protocols in advance.

    On the Stamp, watch out for the "wait" modifier in serin commands. Phone lines tend to be noisy and some modems are verbose if not noisy. The Stamp interprets any incoming stuff as an excuse to extend the "wait".

    If you are connecting a modem to the p16 serial port then special considerations are necessary to turn off all echo and result reporting.
Sign In or Register to comment.