Interacing an MCU to telephone line - Page 1
Forum section: electronics / projects

author: ali_asadzadeh
author_rank: Super Contributor
timestamp: July 13, 2017, 07:56:59 am
content: Hi,I want to know if we have an appnote or simple way of connecting a phone line to a MCU for detecting the caller ID,ring detection, getting Pushed buttons and send back and fort audio messages that are saved into an SD card, I can do all the stuff regarding ,recording and playback on an SD card, but I have no Idea or experience on connecting to the telephone line.

author: leeatljs
author_rank: Contributor
timestamp: July 13, 2017, 08:16:22 am
content: There is a microchip app note....http://www.microchip.com/wwwAppNotes/AppNotes.aspx?appnote=en012029is a starting point. Doesn't cover ring detection or surge suppression but will get you started.

author: ali_asadzadeh
author_rank: Super Contributor
timestamp: July 13, 2017, 08:41:57 am
content: Thanks for the info, Also I have found that silicon lab has some parts for the job, like SI3050 and Si3018, but they seems a bit complicated, do we have code for them or do we have a open source code for them? do we have anything simpler?

author: ali_asadzadeh
author_rank: Super Contributor
timestamp: July 14, 2017, 09:51:15 am
content: I have also found TEA1067 chip, it's super cheap! but I can not understand fully how to connect it, do you know any working example for this?

author: Unknown
author_rank: Unknown
timestamp: July 15, 2017, 08:18:16 am
content: This is actually multiple questions with some moderately complex answers; there is a lot of analog stuff going on with a telephone line:Ringing voltageis around 90VAC at 20Hz, superimposed on the line. For detecting ringing voltage alone you can find a lot of "ring detector" circuits aroundCaller IDis Bell 202 (or regional alternative) modem tones between the first and second ring. Caller ID units are the "dem" (demodulator) part of a modem.Touch Tones("pushed buttons") are DTMF - a two tone signalling mechanism with some filtering requirements, e.g. so that someone's voice or white noise doesn't get detected as DTMF just because it happened to contain the two tonesSeparating out transmit and receive audio on a 2-wire loop is the job of atelephone hybrid, which can be either a special transformer, or implemented in integrated circuitAs far as your question about an open equivalent to something like the Si3050, well, there are certainly many circuit diagrams available out there for replicating the functionality of all of the above, mostly in analog form. I don't think there is anything you can do withjusta microcontroller and software to directly connect to a POTS line. But the discrete parts involved would end up being more bulky, expensive, and complex than just buying an off-the-shelf "DAA" line interface like the Si3050.If you want to know more,Understanding Telephone Electronicsis sort of the canonical book. Just be warned that it will refer to a lot of out of date ICs.

author: ali_asadzadeh
author_rank: Super Contributor
timestamp: July 15, 2017, 01:14:46 pm
content: Thanks ELF, I'm an original Vampire so I need to know what's going on under the hood

author: stj
author_rank: Super Contributor
timestamp: July 15, 2017, 10:55:19 pm
content: worth pointing out here that different country's have different standards.so if your planning a product - research where you can sell it.there are laws too - in the u.k. it needs to be approved or use an approved isolation tranbsformer. (rip them out of modems)

author: cdev
author_rank: Super Contributor
timestamp: July 16, 2017, 11:53:31 pm
content: You're looking for a modern modem. For a long time - since the 1990s, many modems have supported voice as well as various kinds of standard phone line signalling.You may have to dig a little bit, seems like many of the companies that developed those standards and software are no longer in business.Modem functionality is now embedded in some computer sound cards too.

author: MosherIV
author_rank: Super Contributor
timestamp: July 17, 2017, 12:05:24 am
content: QuoteDamn, you beat me to itIt is un-wise to directly connect the io pins of microporcessor to the telephone lines. The Ring Indicator can be as much as 70V AC (in the very early days this was used to drive a solenoid with a small hammer to ring the bells)There is an aweful lot of analogue circuitry. From my days working on a custom Fax card, the telephone line to the car were connected through little isolation transformers.I think this is just a home project - in which ase look around for discarded modem/fax cards and look for ones supported in Linux, then you can get the linux driver code for said card.

author: ali_asadzadeh
author_rank: Super Contributor
timestamp: July 17, 2017, 05:06:18 am
content: Thanks, But do you recommend chips for these days?

author: Richard Crowley
author_rank: Super Contributor
timestamp: July 17, 2017, 05:24:30 am
content: Since legacy analog telephone lines are a dying technology, it should come as no surprise that most of the chips developed for that market are obsolete.A search term that might be helpful is "subscriber line interface circuit" or "SLIC" For example Google turned up this:https://www.microsemi.com/products/voice-line-circuits/voice-line-circuitsIt has a few current products, and a long list of "Legacy Chip Sets (Not Recommended For New FXS Designs)"You won't find any one product or solution to your wide variety of requirements. As @Elf observed, your requests are all over the map and you will need to become your own integrator of various solutions for the different functions.

author: ali_asadzadeh
author_rank: Super Contributor
timestamp: July 18, 2017, 05:14:11 am
content: ThanksI have found RAT ring group for microchip, it's purely based on simple discrete transistors, so I think I should stick to that