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.

Rings detector

Status
Not open for further replies.

Charlie123

New Member
Hello everybody,

Is somebody can assist me?

I'm using a 16F84A, and I would like my 16F84A to be able to detect the number of rings on the phone line.

Let say, if less than 3 rings my 16F84 provide 'beep', but if = or more than 3 rings, a sound is 'beep, beep'.

My mean concern is regarding 3 questions;

a) programmation syntax level,
b) what device I will need to be able to detect rings and count them.

regarding question b), I found this shematic;

https://www.aaroncake.net/circuits/phonbusy.asp

as per above link, LED1 and LED2 flash ON and OFF while the phone is ringing so I'm wondering how can I attached this cicuit to 16F84A. (let say I'm using GP2 and GP3 as input...should I connect base of the leds or base of the transistors to the pins or this does not really matter ?).

Due to that circuit if flashing and provide intermittent 0 and 1 status,

c) how can my 16F84 can recognized intermittent level 0 or 1 if I use 2 different input pin for comparaison ?

Do you have any suggestion to simplified or remove ring detector circuit?

I will be happy to rcv any assistance, instructions or help.


Brgds/Charlie





Brgds/Charlie
 
The 16F84a chip allows you to setup certain pins as interrupts. How I would attempt the programming side of this would be:

1) Create a global interrupt that simply increments a counter.

2) Create an interrupt for the pin connected to your phone interface that checks to see if the value of counter is less than a certain number. If it is, the increment ringCount and reset the counter value. If it is not, then simply reset the counter value and the ringCount and go from there.

3) In the main program loop, Check the value of RingCount and perform tasks accordingly.

Hope that helps.
 
Hello everybody,

3V0 and Oeginc,

3V0, thanks a lot I will take your circuit instead of mine.

For programmation, I know how to select port(s) as input from working register(W) to put in TRIAS 06, but as per Oeginc(member) I have no idea on how to create a Global interrupt and how to increment a counter and compare the values this is too much for my skill at the moment. I guess that 16f84 has an internal counter?

Let say, I want GP2 and GP3 as input, the set up should look like this:
--------------------------------------------------------------------------
SetUp MOVLW 0C ;Put 0000 1100 into W
TRIS 06 ;Make GP2 and GP3 as input
CLRF 06 ;Clear port 6 of garbage

--------------------------------------------------------------------------
as per Oeginc (step 1 of 3),

I need to create a GLOBAL INTERUPT to increment a counter. As per what I just rode on the web, global interrupt enable bit is at location b7 in register called INTCON but how and what should I do with it?


than I guess, I will need to set bit for the counter register(if counter register exist in 16F84) ?

BSF ???,?
BSF ???,?
BSF ???,?
BSF ???,?


as per Oeginc (step 2 of 3),

I need to create an interrupt for the pin connected to my phone interface that checks to see if the value of counter is less than a certain number. If it is, the increment ringCount and reset the counter value. If it is not, then simply reset the counter value and the ringCount and go from there. How should I do that ???

as per Oerginc (step 3 of 3),

I need to check the value(the main program loop) of RingCount and perform tasks accordingly. What it should look like ?

Is 12C508A has this interrupt register capability as I'm using 16F84 for testing purpose and I want 12C508A at final work ?


Best regards/Charlie 123
 
hi charlie,

Another Ring detector for your collection.

The 10K/1uF time components allow for three rings before a pulse output via the opto isolator. There is one pulse out, per 3 phone rings.

The number of rings before a response can be controlled by these two components, usually the cap.

Any general purpose unijunction is OK.
 
Last edited:
Thanks everybody for your reply,

Ericgibbs, your circuit will fit perfectly but I need to ajust the opto providing
1 pulse output after 1 rings instead of 3 rings for 1 pulse output.

I guess I will need to lower capacitor 1uF and resistor 10K? What is the best way to find the right values for these 2 components to 1 pulse output? What will you do?

Is it possible to tell me (from the left of the schematic) what are the type of the component below 0.47 uF(above R1=39K) looks like v(diodes?) and the ones under FWB (diodes briges?) what values or kind should I use ?

The 10K resistor your are talking about is this the one attached to the transistor or the 10k called R2?

is OPTO 4N27 ok for this circuit? If cannot answer above please can you provide me the link of this circuit, so I can search for info ?

Tks/Charlie
 
hi Charlie,

Added some detail to dwg.

The phone line ringer voltage is around 40/50V.
The transient suppressor is recommended because of line transient voltages on phone lines.

The FWB, full wave bridge is a general purpose rectifier, dont use less than 100Vpiv.
The rectified DC charges C2 upto approx 15Vdc,[lowering the 39K in value will increase this Vdc].
The two 100K's supply the unijunction with Vdc/2.

The cap C1 charges via R1, at approx 0.6*Vdc the unijunction will trigger and dump the charge on C1 into the opto-isololator.
The opto is a general purpose opto, just ensure its fast enough to respond to the fast unijunction pulse.
The output of the opto transistor drives a transistor amplifier to raise the pulse levels. to TTL

To get the ring response you require, adjust the 39K and the R1 resistors.
If you make the C1 value too low, the discharge via the 47R will fall off and it may not drive the opto.

I would suggest that you dont make the circuit over responsive/sensitive as there maybe lots of 'noise' on the phone lines that may cause a mis-trigger.

I have built and used this ringer circuit many times, it works OK.

To do a quick check on the phone line system in your area, just build and test the left handside of the circuit
upto and including the R3[10K]. Use a scope to check the voltages generated by ring.

Regards
 
Last edited:
Hello Eric and everybody,

Thanks a lot for your fast reply, I appreciate a lot your drawing comments now, I have almost everything to start :)

So you are telling me that your cct can provide me a steady logical 1 after each rings and go back to 0 and start all over on next rings (of coures, I find the right capacitor value) so an IC can count the number of rings no problem?

I have another simple question for you regarding the drawing.
If I use let say: Bridge rectifier; the DB-102 / Amp - Volts : 1 A 200 V, it means that I will have to connect :

0.47mF(uF) to one pin (~) of the DB-102,
the resistor 39K to the other pin (~) of the DB-102
pin (-) will attach to C2 negative side
pin (+) to positive side of C2

Is the 2 pin (~) inverted does matter ? (if so, this will blast my Bridge?) or just changing the polarity will do it?

Sorry for these simple question but I need a little refresh !

Brgds/Charlie
 
I'd like to remind everyone that here in the US, hanging non FCC approved circuits on telephone lines is illegal. Some of the suggested circuits while in theory could work, any law abiding citizen would not use them.

There are companies who manufacture approved devices - this should be the first place to start.
 
hi,

>> Is the 2 pin (~) inverted does matter ? (if so, this will blast my Bridge?) or just changing the polarity will do it?

Either '~' is OK.

>> So you are telling me that your cct can provide me a steady logical 1 after each rings

The opto provides a fast pulse, amplify it and latch it.

If this for a home type project heed the warnings regarding statutory regulations.

This circuit was approved for my company to use, but not for private use.
 
Optikon said:
I'd like to remind everyone that here in the US, hanging non FCC approved circuits on telephone lines is illegal. Some of the suggested circuits while in theory could work, any law abiding citizen would not use them.

There are companies who manufacture approved devices - this should be the first place to start.

Well this law abiding citizen has and would hook up anything I feel like to my (their?) phone line, but then I guess that means I'm not a law abiding citizen ;)

If Big Brothers goes to the trouble of getting a search warrant to prove I'm breaking some telephone law, well I guess I'm just one of those outlaw hobbyist that needs to push the envolope and willing to take that risk :)

Lefty
 
Leftyretro said:
Well this law abiding citizen has and would hook up anything I feel like to my (their?) phone line, but then I guess that means I'm not a law abiding citizen ;)

If Big Brothers goes to the trouble of getting a search warrant to prove I'm breaking some telephone law, well I guess I'm just one of those outlaw hobbyist that needs to push the envolope and willing to take that risk :)

Lefty

The Telco has complex troubleshooting equipment to determine if some badly behaving device is connected (usually faulty phone equipment) They will first likely send somone out to troubleshoot the lines.

So lets say you dont allow them to troubleshoot. I dont know what they will do. They do have an obligation to keep telephone service running properly for 911 emergency reasons. I suppose their options will be shut your service off altogether or go get a warrant or both.

You could probably play ignorant with them and get away with it. Better still if your device doesnt bother the line, they will likely not detect it. But just keep in mind that people have gotten into trouble over it.

1) Fooling with phone system with non approved / faulty devices
2) Trying to steal power from high voltage lines with donut transformers
3) Trying to jam / blank out a frequency band regulated by FCC

People try these things all the time and you CAN get into real trouble if caught.
 
Optikon said:
The Telco has complex troubleshooting equipment to determine if some badly behaving device is connected (usually faulty phone equipment) They will first likely send somone out to troubleshoot the lines.

Mostly they just test for grounds on either tip or ring wire, load impedenace, ring current draw and signal level allowance. None are hard to stay in compliance with if you know what you are doing or at least research the requirements.

So lets say you dont allow them to troubleshoot. I dont know what they will do. They do have an obligation to keep telephone service running properly for 911 emergency reasons. I suppose their options will be shut your service off altogether or go get a warrant or both.

You could probably play ignorant with them and get away with it. Better still if your device doesnt bother the line, they will likely not detect it. But just keep in mind that people have gotten into trouble over it.

1) Fooling with phone system with non approved / faulty devices
Yes, didn't Steve Wozniak of Apple computer get his start building and selling 'Blue Boxes' for obtaining free LD calls ;)
2) Trying to steal power from high voltage lines with donut transformers
The price of power would have to get a whole lot higher for me to try such antics, besides out power is underground and I'm too old to be digging trenches ;)
3) Trying to jam / blank out a frequency band regulated by FCC
No challenge, I've a HAM license that I would rather not lose
People try these things all the time and you CAN get into real trouble if caught.

Actually only the cable TV service has been pretty aggressive about protecting their income stream around here. About once a year they would publish a 'amnesty' period where people could turn in their illegal boxes. The newest digital set top boxes seem pretty secure and hard to hack or purchase on the gray market.

On the subject of trying to steal cable TV service. About 20 years ago there was a item in our home town paper about the manager of our local cable TV service driving down a street and seeing someone up a pole fooling with the cable TV service connection. He stopped and asked them what he was doing and the guy said the superbowl was going to be on tomorrow and he wanted to make a connection just for the day:D I forget if they pressed charges or not. :D

Lefty
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top