Electrical – Wire landphone speaker to arduino (noise problem)

arduinotelephone

speaker to arduino

Hi. I did something like the image above.
I took my phone's speaker and connected it to arduino's GND and Analog PIN 0 so my computer can detect when the telephone rings silently and notify me. (I removed the speaker)

On the arduino side, the code seems to be working fine everything looks perfect, it detects the ringing just fine.

Problem is: When I pickup the telephone I hear a horrible noise.
If I disconnect one wire and leave the other, the noise is still there! (Have to disconnect them both)

I tried adding a diod between each wire it seems to lower the noise a bit for some reason, but the noise is still too much.

How can I isolate the telephone? I just want to get the voltage reading from the speaker to detect if it's ringing or not. When I use my multimeter on the speaker it doesn't make any noise though..

Best Answer

Only to add something important to comments: The phone landline comes to you from quite far away. The distance between your phone and the telephone exchange can be several hundred meters, even kilometers in the rural areas. There can be a substantial voltage between the phone line and any equipment in your house.

The phoneline has a constant 50....100 VDC for supplying the phone and sensing what's up (dial, open, open a call, close a call). Onto that is added 50....100 VAC as the ringing when somebody calls. During a call tde DC is still present and the speech is about one volt AC on it. You must have a proper isolation and filtering circuit to separate the components. The proper circuit is defined in general telecommunication equipment regulations and they must be considered as the law.

The noise: probably you have not sniffed more than a faint smell of what is possible. The 1000 volts surge will come some other day. Your phone has a thick insulation for that reason. Answering machines, faxes, modems etc... must not have any galvanic contact to the phone line, all connections must be done through isolation transformers, optocouplers and relays. Otherwise - sooner or later the smoke puffs out. It can well happen in the telephone exchange, too. Remember: they will have no difficulties in following the line and dropping a hefty bill, even a lawsuit to you.

A quidance: Do not connect anything homemade to the phoneline until you can obey the technical circuit regulations exactly. Rather pick the stray fields by a telephone signal picking coil or use a microphone. Add an amplifier, ADC the signal and detect the different events by software. No need even to buy a mic, the speaker in your image is ok.

Proper telephone landline interfaces for modems, telefaxes etc. are available as modules - no need for discrete relays or transformers. They also handle the audio signal and convert between 4 wire (=separate audio in & out) and the bidirectional 2 wire phone line. Here's an example:

http://www.cermetek.com/catalog/telephone-line-interface/datasheet/ch1817_607-0007.pdf

See other discussions of the same topic - how to connect Arduino to a landline.