Sending data over analog landlines? Anyone?
xanatos
Posts: 1,120
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.
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.
Comments
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
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.
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
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
Dvae
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!
You could probably find a similar modem module (like the one that Ken has shown) out of a old multifunction printer.
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.
Thanks folks! A lot to go on here!
Dave
http://en.wikipedia.org/wiki/Hayes_command_set
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.
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!
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.
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.
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.
Thanks again everybody!
Dave
I actually remember those....
That is AWESOME!!!! Must get! Thanks!
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.
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.