Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Telephone Monitor & Controller

Status
Not open for further replies.
Hi,

I have finally gotton ALMOST everything to work thanks to you guys for the help and the help of a couple friends.

Ok once again, my circuit detects ringing and i programmed it to detect when five rings occur. When this 5th ring occur, i need to be able to open the telephone line to which the circuit is connected via the PIC18F452 i'm using. :confused:I don't know how to do this :confused:. The reason for opening the line is to be able to allow the CALLING party to enter a device pin sequence using his/her phone after realizing the line is opening. This pin sequence once correct then either turns on or off an LED which i connect to a general purpose input/output pin of the PIC18F452. Once this opening of the line is accomplished the rest would be easy because i already implemented the codes equence to activate the LED...I will then replace the LED with an electrical device activated by a relay.

I will grately appreciated any suggestions...I already tried (in code) to force the pin on the PIC18F452 which detects the phone going off hook, to a high giving the indication to the PIC18F452 that the phone is off hook after 5 rings is obtained although the phone is physically still on the hook but the ringing on the calling party's end still continues. Therefore the calling party can't enter the device pin sequence. How do i open the line so that the calling party's phone would stop ringing and be able to enter a device pin sequence using his/her phone keypad?...

Hope i explained myself good enough ...
 
You need a relay to open the phone line. That should make the phone line behave as though someone has picked a phone up.

The circuit that detects that the phone is off-hook will not work the other way round to force the line off-hook
 
Relay

I have a realy implemented in the circuit...The Omron G6A series 5VDC which breaks the line when five rings are obtained and i then display call missed to the LCD...I break the line for a sec and then reconnect via the relay but the calling party's phone still rings...so he'she doesn't know to enter a pin for the device...i can't leave the realy open when five rings is obtained because the phone goes "dead" when the relay trips it for that short space of time.

I still don't know what to do after 6 hours ... and counting ... :(
 
I'm having a little trouble understanding what you're trying to achieve..

Do you want to pick up the phone after 5 rings, wait for a pin code, turn on/off a led, hang-up the phone?

If yes, (I'm going from an old schematic I found on 1 of your 300 threads) then after the ring is detected, the relay is activated, which will connect the 560R resistor and the transformer across the phone line and 'pick-up' the connection. The relay contact is kept closed for as long as the phone is off-hook. The calling party will no longer hear the dial tone, and can start pressing buttons.

Now listen for the tones, activate the LED or whatever.

After you've done whatever you wanted, hang up the phone (on-hook) by opening the relay contacts.

The next call can now come in.
 
Relay

The relay trips the telephone that the circuit is coinnected too. The relay is connected in a normally closed manner so when i send a signal high to it after the phone attached to it rings five times by the calling party, the telephone goes "dead" (no signal) and returns on after a short while. This would end the calling party's call and would read as a MISS CALL by the PIC.

Now what i am trying to do is when the five rings is reached, instead of sending a high to the relay i would send a high to the pin on the PIC18F452 that senses when the phone goes off hook. I did this so the PIC18F452 would think the phone has physically gone off hook when it really didn't. Thus, the ringing on the calling party's end should stop and he/she should be able to enter the device code sequence within the ten seconds the phone suppose to remain activate. However, the ringing doesn't stop on the calling party's end so he/she never knows to enter a pin after the five rings.

What do i do??? :confused:
 
The relay trips the telephone that the circuit is coinnected too. The relay is connected in a normally closed manner so when i send a signal high to it after the phone attached to it rings five times by the calling party, the telephone goes "dead" (no signal) and returns on after a short while. This would end the calling party's call and would read as a MISS CALL by the PIC.

Now what i am trying to do is when the five rings is reached, instead of sending a high to the relay i would send a high to the pin on the PIC18F452 that senses when the phone goes off hook. I did this so the PIC18F452 would think the phone has physically gone off hook when it really didn't. Thus, the ringing on the calling party's end should stop and he/she should be able to enter the device code sequence within the ten seconds the phone suppose to remain activate. However, the ringing doesn't stop on the calling party's end so he/she never knows to enter a pin after the five rings.

What do i do??? :confused:

Try drawing yourself a flow diagram and take it step by step. I think you are trying to look at too much at the same time. It sounds like you are closer than you were on your other posts.
 
Flow diagram

Yeah i have a flow diagram...but missing something somewhere i guess... Think my problem is understnading how the ringing works and how to stop it if i send an off hook signal via code to the PIC.

Because when i call the phone (called party) that the circuit is connected to from my cell phone or any other phone(calling party) and i physically take it off hook and put it back down, my circuit recognises any digit pressed from my cell phone for ten seconds, then the telephone company disconnects the calls from the CALLED party's end NOT my cell phone. Therefore this means when i try to send the off hook high via code the calling party (cell phone user or any other telephone) would have ten seconds to enter the device pin to activate the device/ deactivate but i never stop hearing ringing on my cell phone although i send the off hookhigh in code so i never get to enter the device pin code.

Regards,
Darrell.
 
Yeah i have a flow diagram...but missing something somewhere i guess... Think my problem is understnading how the ringing works and how to stop it if i send an off hook signal via code to the PIC.

Because when i call the phone (called party) that the circuit is connected to from my cell phone or any other phone(calling party) and i physically take it off hook and put it back down, my circuit recognises any digit pressed from my cell phone for ten seconds, then the telephone company disconnects the calls from the CALLED party's end NOT my cell phone. Therefore this means when i try to send the off hook high via code the calling party (cell phone user or any other telephone) would have ten seconds to enter the device pin to activate the device/ deactivate but i never stop hearing ringing on my cell phone although i send the off hookhigh in code so i never get to enter the device pin code.

Regards,
Darrell.

After 5 rings on called end you need to pickup the phone on that end, not send a code, other end does not see code as phone in not 'off-hook' yet and phone company see's the code and disconnects.
You need to count 5 rings and pickup phone (resistor or phone network across line).
 
Activating device

I am counting the five rings...not sure about how to get the phone to go off hook with that resistor you mentioned.
 
By physically taking the phone off hook which is sensed by a high voltage on one of the pins on the PIC18F452. However, when the calling party is calling the phone attached to the circuit i want the phone to go off hook but NOT by someone PHYSICALLY taking it off-hook...i want to do it VIA CODE so someone can activate an electrical device such as an aircondition unit from a remote location if no one is available to answer the phone that the circuit is attached too. That is where the counting of five rings come in to play.

Therefore in summary, i call from work on my cell phone to my home phone which is connected to the circuit. I want to turn on my air condition in my room so when i get home it will be cool and nice. So i ring my phone at home knowing that no one is at home to answer it. After five rings the phone at home should be opened by the microcontroller via code so that the ringing on my cell phone stops and i am able to enter the correct device code to activate the air conditioner.

Makes more sense now what i am trying to do?
 
Can you provide a schematic of how you have set up your circuit.

Getting the PIC to take the phone off-hook is done by activating the loop relay (shown in one of your other posts). This relay connects a resistor (and transformer) across the phone line: line current flows and the phoneline becomes off-hook; the caller is connected.

When you want to hang up the line, deactivate the relay: no line current flows and the call is terminated (e.g. hang-up/on-hook).
 
.However, when the calling party is calling the phone attached to the circuit i want the phone to go off hook but NOT by someone PHYSICALLY taking it off-hook...i want to do it VIA CODE so someone can activate an electrical device such as an aircondition unit from a remote location if no one is available to answer the phone that the circuit is attached too.
Makes more sense now what i am trying to do?

You can NOT send a code over the phone line and decode it UNTIL you take the phone off-hook. There is no way for you to see the 'code' because the ringing voltage is still on the line and the telco still has control (my previous message), you do not have 'control' until you go off-hook, think of an answering machine, it can't do anything until it goes off-hook.You need to understand how a telephone 'network' works. Try reading about a 'pbx' as there may be more useful info.
Good Luck.

Can you post your schematic, flow diagram, and your code so far??
 
Last edited:
Circuit

My circuit is on page 8 of the attached with te circuits broken down into components prior to page 8.

I understand what you guys saying now...I really don't understand the telephone network good enough i guess...but understand now why what i am trying to do wouldn't work...The resistor you were talking about across the network would loop the line...like a 100ohm or 1000ohm or something i guess when the call is connected. Does anyone of you guys have a good e-book that i could browse through to better understand the telephone network because i have the demonstration tomorrow morning...Although the circuit works...i am not too familiar with everything and how it works. I think i know the majority but it may come in handy so i would appreciate any advice/links.
 

Attachments

  • FINAL CIRCUITS.doc
    3.9 MB · Views: 189
I don't see how the output relay would ever activate with the backwards diode and the transistor that's not connected.

I can't see where the line relay contacts are. Are they across the line, marked by an arrow and '150 LA10'? That arrow is where the contact should be, with the resistor in series.

Connecting the resistor across the line connects the call just the same as physically taking a telephone off-hook.
 
My circuit is on page 8 of the attached with te circuits broken down into components prior to page 8.

I understand what you guys saying now...I really don't understand the telephone network good enough i guess...but understand now why what i am trying to do wouldn't work...The resistor you were talking about across the network would loop the line...like a 100ohm or 1000ohm or something i guess when the call is connected. Does anyone of you guys have a good e-book that i could browse through to better understand the telephone network because i have the demonstration tomorrow morning...Although the circuit works...i am not too familiar with everything and how it works. I think i know the majority but it may come in handy so i would appreciate any advice/links.

If your demo is in the morning it's a little late don't you think to say you don't understand.
Did you google for an E-Book or anything on networks, it should be out there.
I believe you posted something like this a while back and I commented that you need to learn what a telephone network is and how it works.
I gave away all my books when I stopped working on 'PBX' systems. The system I worked on did not even have something as powerfull as a pic, it used a Rom State Machine (look that up), and it would handle 100 inside lines, 6 outside lines, and an operator.
You need to know how to go off-hook and still transfer audio (your dtmf tones), process them and then go on-hook. (actually I think X-10 makes this stuff). You need to understand the network and the rest is fairly simple.
Good Luck

What did you make your doc file with?? I tried to open it with OpenOffice and all I got was some drawings with no labels.
 
Last edited:
Little to late

Thanks yea it is a little too late...I have books that i downloaded and read them through at the early stages not paying particular attentiopn to it too much but its coming back to haunt me slightly now but i think i could manage fairly well because i could explain my circuits used fairly well.

Sorry bout the circuits without titles though. I don;t know what happened there. I used microsoft visio to draw and label them and transfered them to a word file.
 
Thanks yea it is a little too late...I have books that i downloaded and read them through at the early stages not paying particular attentiopn to it too much but its coming back to haunt me slightly now but i think i could manage fairly well because i could explain my circuits used fairly well.

Sorry bout the circuits without titles though. I don;t know what happened there. I used microsoft visio to draw and label them and transfered them to a word file.

Do they open correctly in Word?? OpenOffice usually does a good job with Word files. It would be interesting to look at what is there to understand what you built.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top