+ Post New Thread
Results 1 to 9 of 9
  1. #1
    Member level 3
    Points: 1,906, Level: 10
    Achievements:
    7 years registered

    Join Date
    Oct 2010
    Posts
    59
    Helped
    0 / 0
    Points
    1,906
    Level
    10

    Connect PIC microprocessor to telephone line

    I would like to be able to sense when a phone line rings, simulate like i pickup the phone and send a digital 400 bytes message on the line, then hang up.
    The message will be stored on a PIC controller.
    I do not have a clue where to start reading so i can interface the microprocessor with the telephone line.
    And also, how to detect when the phone ring and simulate pick up the phone.
    Please help me with some directions where to start.
    Thank you.

    •   AltAdvertisement

        
       

  2. #2
    Super Moderator
    Points: 80,992, Level: 69
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    16,429
    Helped
    3730 / 3730
    Points
    80,992
    Level
    69

    Re: Connect PIC microprocessor to telephone line

    Hi,

    Use a modem.
    Select one with RS232 interface to connect with the PIC.
    Read through modem documentation.

    Klaus
    Please donīt contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



  3. #3
    Member level 3
    Points: 1,906, Level: 10
    Achievements:
    7 years registered

    Join Date
    Oct 2010
    Posts
    59
    Helped
    0 / 0
    Points
    1,906
    Level
    10

    Re: Connect PIC microprocessor to telephone line

    Thank you but is too expensive.
    I am sure they are chips to do the job, but i did not find them yet.
    Thanks for suggestion.



    •   AltAdvertisement

        
       

  4. #4
    Super Moderator
    Points: 80,992, Level: 69
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    16,429
    Helped
    3730 / 3730
    Points
    80,992
    Level
    69

    Re: Connect PIC microprocessor to telephone line

    Hi,

    Too expensive?
    Even new ones are cheaper than I could build on my own.
    But you may find a lot retired modems in second hand stores or ebay or...

    But before buying / building something you need to specify :
    * you telephone line standard (analog, digital, what type?)
    * the receiver standard / the communication standard

    Klaus
    Please donīt contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



    •   AltAdvertisement

        
       

  5. #5
    Super Moderator
    Points: 83,020, Level: 70
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    13,647
    Helped
    4535 / 4535
    Points
    83,020
    Level
    70

    Re: Connect PIC microprocessor to telephone line

    Firstly: DO NOT CONNECT THE PIC DIRECTLY TO THE PHONE LINE!

    Not only will you upset the telephone company but you will almost certainly destroy the PIC as well. Telephone lines are potentially very dangerous, thats why the line wires are always insulated and unreachable. They can easily have > 100V on them and none of the wires (there are usually two but can be more) are ground.

    To sense ringing voltage you have to isolate the AC ringing supply from the background DC on the line. For that you need a safety rated capacitor, a current limiter, a rectifier and an opto-isolator. You probably need a voltage deadband circuit to prevent random noise and static on the line looking like a real ringing signal too.

    To seize the line (answer the call) you have to connect a constant current load across the wires. For this you need a relay and a constant current circuit. Typically this will be a small power transistor with fixed base voltage and a control resistor in it's emitter.

    Then you have to modulate something on the line to send your 400 bytes. As phone lines are typically rated to carry low frequencies between about 300Hz and 3.5KHz, you have to decide if you are sending the data as keyed amplitude (similar to Morse code) or keyed frequency (FSK) and design a modulator to suit. Obviously this has to be compatible with the system it talks to at the other end of the call. You then current modulate it to the line using an isolating transformer.

    The PIC would be responsible for monitoring the ringing signal, operating the line relay, preparing the data for the modulator and hand up when the data has ended. It also need it's own power supply which must be isolated from the phone line.

    So it isn't as easy as it sounds. Bear in mind that a commercial modem does all of the above and usually just sends and receives data from the PIC UART pins. That's why Klaus is saying "don't re-invent the wheel" particularly when it would be expensive and complicated to do so.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



  6. #6
    Member level 3
    Points: 1,906, Level: 10
    Achievements:
    7 years registered

    Join Date
    Oct 2010
    Posts
    59
    Helped
    0 / 0
    Points
    1,906
    Level
    10

    Re: Connect PIC microprocessor to telephone line

    Thank you all.
    Special for the in deep info from Brian.
    Because it is a new toy of mine, i am still searching.
    The signal to be sent out it is a wave file.
    I can play it in the microphone line from a speaker and will be OK.
    Back to goggling.



  7. #7
    Newbie level 1
    Points: 757, Level: 6

    Join Date
    Mar 2015
    Posts
    1
    Helped
    0 / 0
    Points
    757
    Level
    6

    Re: Connect PIC microprocessor to telephone line

    You will need a telephone line interface device such as Mitel/Zarlink MH88422. This device is used in TIM2015 (Speaking Clock) as described in Sam Hallas webpage http://www.samhallas.co.uk/repository/tim_2015.htm

    These devices are obsolete now and gaetting hard to find. And you can only find them on Surplus semiconductor vendor sites. There is a long rigmarole to go through to buy them especially if you are outside the USA. I bought 10 at a cost of USD20 ea.

    Click image for larger version. 

Name:	Mitel-MH88422-3.jpg 
Views:	3 
Size:	80.9 KB 
ID:	145082



  8. #8
    Full Member level 6
    Points: 4,703, Level: 16
    Externet's Avatar
    Join Date
    Jan 2004
    Location
    Mideast US
    Posts
    397
    Helped
    27 / 27
    Points
    4,703
    Level
    16

    Re: Connect PIC microprocessor to telephone line

    Modern telephones and answering machines use a microcontroller to sense line conditions, play messages, store dialing in memory, and injection of audio into telco lines.
    Just use one of them and tap the signals on the board to your microcontroller. They comply with the Telco needs and available cheap if not behind your own spider webs.

    An extraordinary learning book is the Motorola telecommunications data book, perhaps available on the web

    ----> https://archive.org/details/bitsaver...eData_83733780

    Second one in the pile:

    ----> http://www.molliesloft.com/si/010780.html
    Abolish the deciBel !



    •   AltAdvertisement

        
       

  9. #9
    Advanced Member level 5
    Points: 34,925, Level: 45
    Achievements:
    7 years registered Created Blog entry Created Album pictures
    SunnySkyguy's Avatar
    Join Date
    Sep 2007
    Location
    Richmond Hill, ON, Canada
    Posts
    6,734
    Helped
    1681 / 1681
    Points
    34,925
    Level
    45
    Blog Entries
    7

    Re: Connect PIC microprocessor to telephone line

    One can get a Modem chip for $12 http://datasheets.maximintegrated.co.../73M2901CE.pdf
    But you still need all the impedance control parts (Xfmr etc) and a serial port. By the time you order and build it you can be up and running with a used modem or old PC at surplus cost.

    Modems use DSP's not uC.
    A best design is easily achieved with good test specs™
    A better question deserves a better answer. ™
    ... so include all your acceptance criteria ( values, % tolerance) and assumptions in your question or any design.

    ... Tony Stewart EE since 1975
    - slightly north of Toronto



--[[ ]]--