Searching \ for 'Telephone use & time calculation' in subject line. ()
Help us get a faster server
FAQ page: www.piclist.com/techref/pots/dtmf.htm?key=telephone
Search entire site for: 'Telephone use & time calculation'.

Truncated match.
'Telephone use & time calculation'
1999\02\05@210837 by

Does anybody know, how to build a circuit to detect how much time my
brothers  used the phone and which number they dialed. I was thinking to use
DTMF with 8870 and a pic to calculate the time, but don4t know how to
trigger the start of time calculation, is there any tone for that??? (start
and stop of the conversation)
Anything would help thanks
Javier

you can check the line voltage..
there is an absolute value of phone line voltage
when it.. hook, off hook, dial..
Comparator/diode/ress will do.
I forgot the excat voltage value..
hope this help..

-ari-

On Fri, 5 Feb 1999, Javier wrote:
> Does anybody know, how to build a circuit to detect how much time my
> brothers  used the phone and which number they dialed. I was thinking to use
> DTMF with 8870 and a pic to calculate the time, but don4t know how to
> trigger the start of time calculation, is there any tone for that??? (start
> and stop of the conversation)
> Anything would help thanks
> Javier
>

At 10:52 PM 2/5/99 -0300, Javier wrote:
>Does anybody know, how to build a circuit to detect how much time my
>brothers  used the phone and which number they dialed. I was thinking to use
>DTMF with 8870 and a pic to calculate the time, but don4t know how to
>trigger the start of time calculation, is there any tone for that??? (start
>and stop of the conversation)
>Anything would help thanks
>Javier

You can't reliably detect the conversation itself, but you can measure the
current into the phone, and therefore the amount of time it's been offhook.

dave vanhorn wrote:

> You can't reliably detect the conversation itself, but you can measure
> the current into the phone, and therefore the amount of time it's been
> offhook.

Your device is in parallel with the line.  It detects when the phone
is picked up by the drop in the line voltage rather than current per se,
and detects when the phone is hung up by th eline voltage going back to

The curly bit is detecting when (and if) the call is answered.  Old
systems signalled this by reversing the line voltage, public telephones
still do in most cases.  "Ordinary" phones it's difficult.

But you can probably figure it near enough.  If the "call" after
dialling lasts longer than the ringing limit time, it's almost certainly
--
Cheers,
Paul B.

At 10:05 PM 2/5/99 -0500, you wrote:
>You can't reliably detect the conversation itself, but you can measure the
>current into the phone, and therefore the amount of time it's been offhook.

Wouldn't it be possible to detect the conversation by either a)something
akin to a VOX or scope trigger circuit or (more difficult) b)try to take a
rough look at the spectrum of the signal and tell background noise from a
voice.

Don't some answering machines do this to avoid lots of blank spots on the
tape? I'm not sure what mine does, I don't get many calls on it,especially

Sean

|
| Sean Breheny
| Electrical Engineering Student
\--------------=----------------
Save lives, please look at http://www.all.org
Personal page: http://www.people.cornell.edu/pages/shb7
shb7cornell.edu  Phone(USA): (607) 253-0315 ICQ #: 3329174

At 02:22 PM 2/6/99 +1000, Paul B. Webster VK2BZC wrote:
>dave vanhorn wrote:
>
>> You can't reliably detect the conversation itself, but you can measure
>> the current into the phone, and therefore the amount of time it's been
>> offhook.
>
>  Your device is in parallel with the line.  It detects when the phone
>is picked up by the drop in the line voltage rather than current per se,
>and detects when the phone is hung up by th eline voltage going back to

This is trickier than it seems. I designed this into a line of credit card
verification terminals.
Basically, you have to have at least two overlapping thresholds to cover
all the variables out there.
Detecting the series current into the instrument is much more reliable.
You'll get at least 20mA, and maybe as much as 100mA when the phone is off
hook. Telco equipment is designed around current, not voltage. I made the
voltage detect work, but it took a bit more work than it first looks like.

For "your phone" you can reliably set a threshold, but I've seen this
number of off-hook voltage vary from 6V or so all the way up to over 24V.
CO voltage (on hook) is typically 48V, but I've seen as high as 56V and as
low as 12V (YES from the telco CO not a PBX!)  You have to be careful
checking the voltage. Whatever you measure it with has to conduct very
little current. <5uA is the spec, I did a pulsed measurement that falls
between the cracks of the FCC part 68 spec, sampling the line at about 1mA
but only for a few mS on every sample.  You also have to guard against line
voltage plus peak ring voltage, plus any transients.

For the series current method, a pair of optoisolators will get you there.
Put the LEDs in paralell, opposite polarity, with a 10uF non polar cap in
paralell with both.

------cap------
+----A   K---+
+----K   A----+

Now one or the other opto will trip if the phone is off hook. They will
alternately pulse during ring, which will let you detect ring (incoming
call) or outgoing call.

>  But you can probably figure it near enough.  If the "call" after
>dialling lasts longer than the ringing limit time, it's almost certainly

Or they're servicing the lines, happens infrequently, without notice,
typically late at night when they think you won't notice. They will drop
your line voltage for a while (usually to zero, but not always)
or when they test your line with an MTU installed (Maintainance Terminating
Unit)  They drop the voltage below 12V, and the MTU disconnects all your
in-house wiring from the line, then they can measure their lines fault
currents to ground, and resistance.

>Wouldn't it be possible to detect the conversation by either a)something
>akin to a VOX or scope trigger circuit or (more difficult) b)try to take a
>rough look at the spectrum of the signal and tell background noise from a
>voice.

Somewhat, but there can be a lot of noise on a phone line when it's not in
use.
You'd have to pick it up with a diff-amp with a large CMRR, or a transformer.

>Don't some answering machines do this to avoid lots of blank spots on the
>tape? I'm not sure what mine does, I don't get many calls on it,especially

Yes, but the consequence if they are wrong is pretty trivial. They will err
on the side of allowing silence.
Do we want to "bill" here for silent periods? Probably we do.
I don't think we want to bill for 60 hz hum on the line.

When no one is on the phone, voltage is at ~50VDC. When someone picks up
the phone, voltage drops to ~8VDC (someone check that number?) So a 20V
Zener would let the current through when not in use, and stop when it's
picked up. Hook that up to an Opto-isolator or something simliar, invert
it, and you have a phone in use indicator. As for the DTMF, maybe someone
else can help...

-Greg

At 07:22 AM 02/6/99 , you wrote:
>Does anybody know, how to build a circuit to detect how much time my
>brothers  used the phone and which number they dialed. I was thinking to use
>DTMF with 8870 and a pic to calculate the time, but don4t know how to
>trigger the start of time calculation, is there any tone for that??? (start
>and stop of the conversation)
>Anything would help thanks
>Javier

-----------------------
Greg Cormier, age 17
Digital electronics, programming, computer interfacing, microcontrollers
Local time : GMT + 5h30m
ICQ # : 565465

Hi Javier
there is a circuit in some older telephone systems (TIE of Trillium for
example) that is called a system message detail recorder SMDR generally
they are RS232 output and will log time in time out and number dialed some
will even record the number of rings before answered. If you could find one
of these you would have all you need
good luck

Wil Reeder
teachtechbc.sympatico.ca
solar,wind,tide, TEG  renewable energy

----------
| From: Javier <grijalbaCVTCI.COM.AR>
| To: PICLISTMITVMA.MIT.EDU
| Subject: Telephone use & time calculation
| Date: Friday, February 05, 1999 5:52 PM
|
| Does anybody know, how to build a circuit to detect how much time my
| brothers  used the phone and which number they dialed. I was thinking to
use
| DTMF with 8870 and a pic to calculate the time, but don4t know how to
| trigger the start of time calculation, is there any tone for that???
(start
| and stop of the conversation)
| Anything would help thanks
| Javier

At 11:08 AM 2/6/99 +0530, Greg Cormier wrote:
>When no one is on the phone, voltage is at ~50VDC. When someone picks up
>the phone, voltage drops to ~8VDC (someone check that number?) So a 20V
>Zener would let the current through when not in use, and stop when it's
>picked up. Hook that up to an Opto-isolator or something simliar, invert
>it, and you have a phone in use indicator. As for the DTMF, maybe someone
>else can help...

If you have to do it by voltage, and you have to use a single threshold,
then 18V is what I'd reccomend.
Loads of experience, time, and number of deployed units behind that number.

Old circuit i've seen involves one rectifier (B250C1500) with the output
across a 22k resistor and a high efficiency diode.  With a line voltage of
~40V coming from the phone lines when not busy and the LED will light.  The
rectifier means that it doesn't matter which way round you have it, also
polarity protection is of no consequence.  When in use the LED will dim.
Using a zener as mentioned in another e-mail will stop it lighting when the
phone is in use.  This could easily be altered for use with a op-to isolator
for input into a PIC for timing.

PS.. In most countries it is not allowed to connect anything other than
approved equipment across the phone lines.  Hence talk to the phone company to
see if you can get the Okay.  They check using line resistance or something
like that.

I hope this is of any use.

Karl  U.

At 07:15 PM 2/6/99 -0500, Karl A. Uscroft wrote:
>Old circuit i've seen involves one rectifier (B250C1500) with the output
>across a 22k resistor and a high efficiency diode.  With a line voltage of
>~40V coming from the phone lines when not busy and the LED will light.  The
>rectifier means that it doesn't matter which way round you have it, also
>polarity protection is of no consequence.  When in use the LED will dim.
>Using a zener as mentioned in another e-mail will stop it lighting when the
>phone is in use.  This could easily be altered for use with a op-to isolator
>for input into a PIC for timing.

This sort of thing is exactly what they DONT want connected. A device like
this can cause your phone to never be seen as hanging up. You can only draw
a few uA from the lines in the on-hook condition.

The only guaranteed method to check if a phone is off hook, is to look for
a series current >=20mA.
That's what the phone company does. Your phone has to draw at least 20mA,
they have to supply at least 20mA.

Voltage detect can work as I've mentioned, but it's tricky to make it work
on all phones and all lines.

>PS.. In most countries it is not allowed to connect anything other than
>approved equipment across the phone lines.  Hence talk to the phone company to
>see if you can get the Okay.  They check using line resistance or something
>like that.

You won't get it. If you ask them, you will cause youself trouble.

When designing phone circuits, we use line simulators for most of the work,
then PBX lines that are essentially a high quality line simulator, then
after everything checks out, we do a final test on telco lines to make sure
there isn't anything we've missed.

For the hobbyist, you can make a simple line simulator fairly cheaply, or
work on your home line, but  if your device wigs out the automated testing
routines and gets you disconnected, grin and bear it.

Another connect issue is that everything you attach to the line need to
have some serious AC/DC isolation. (it's been a while since I looked at
that number 1600 or 2200V IIRC) Otherwise you risk blowing up your circuit
(and anything attached to it) or putting dangerous voltages back up the
line.  You do NOT want the liability suit when your project shocks a
lineman and causes him to injure himself.  Optoisolators and certified
transformers are what you need.

Be careful with circuits that are detecting on/off hook by measuring loop
voltage.  FCC 68.312 (below and at http://hallikainen.com/FccRules)
requires the DC resistance of terminal equipment to be 5 meg between tip
and ring for all DC voltages up to 100 volts.

Harold

Sec. 68.312  On-hook impedance limitations.

(a) General. The limitations in this section that involve 2-wire
network ports apply to tip and ring of the public switched network. For
4-wire network ports (tip, ring, tip 1, and ring 1) with loop-start or
ground-start signaling, the limitations apply when tip and ring
conductors are connected together and treated as one of the conductors
of a tip and ring pair and the tip 1 and ring 1 conductors are connected
together and treated as the other conductor of a tip and ring pair.
(b) Limitations on individual equipment intended for operation on
loop-start telephone facilities, including PSDS Type II in the analog
mode:
(1) Registered terminal equipment and registered protective
circuitry shall conform to the following limitations, for each Ringing
Type which is listed as part of its Ringer Equivalence:
(i) The dc resistance between tip and ring conductors, and between
each of the tip and ring conductors and earth ground, shall be greater
than 5 megohms for all dc voltages up to and including 100 volts.
(ii) The dc resistance between tip and ring conductors, and between
each of the tip and ring conductors and earth ground shall be greater
than 30 kilohms for all dc voltages between 100 and 200 volts.
(iii) During the application of simulated ringing, as listed in
table I below, the total dc current, shall not exceed 3.0 milliamperes.

On Sat, 6 Feb 1999 19:15:53 EST "Karl A. Uscroft" <KUscroftAOL.COM>
writes:
{Quote hidden}

___________________________________________________________________
Get completely free e-mail from Juno at http://www.juno.com/getjuno.html
or call Juno at (800) 654-JUNO [654-5866]

Hi, Javier

there is no tone for detecting off/on hook. In telephone systems you have to
measure the current in the line. You can do this simple by putting the
optocopler serially in the tel. line.

-------------------------------------

tel. line                                to telephone

-------------|--|>|--|---------------
|       |
|--|<|--|

||
||
\/
____
E B C
|   |

for the optocoupler you can use:
H11AA1 or TLP620 or PC814 etc.
With this transistor in the optoc. you can do a simple AF amplifier for audio
and for detecting dialing number.

Hope this help

Valter

Javier wrote:

> Does anybody know, how to build a circuit to detect how much time my
> brothers  used the phone and which number they dialed. I was thinking to use
> DTMF with 8870 and a pic to calculate the time, but don4t know how to
> trigger the start of time calculation, is there any tone for that??? (start
> and stop of the conversation)
> Anything would help thanks
> Javier

Thanks to everybody for answering, but I don4t want to detect or calculate
the time a telephone is off hook, I want to know the time I4m conversating
(how much is the company billing me !!!) It4s not that easy, is it??
Javier

-----Mensaje original-----
De: dave vanhorn <dvanhornCEDAR.NET>
Para: PICLISTMITVMA.MIT.EDU <PICLISTMITVMA.MIT.EDU>
Fecha: Sabado 6 de Febrero de 1999 00:55 a.m.
Asunto: Re: Telephone use & time calculation

{Quote hidden}

At 07:58 PM 2/7/99 -0300, Javier wrote:
>Thanks to everybody for answering, but I don4t want to detect or calculate
>the time a telephone is off hook, I want to know the time I4m conversating
>(how much is the company billing me !!!) It4s not that easy, is it??
>Javier

Some old systems reverse polarity on connect, which you can detect with the
dual-opto current sensor, but most do not. Still, you could get a fair
sanity-check on them, if they report more time than you do (measuring loop
current) then you know they are wrong!

Someone suggested watching for a short reversed-voltage pulse when you
connect to the other party, that or a short time (1/2 second?) after you
finish dialing would be good times to start the timer.  Stop the timer
when the telephone is hung up, and call it good, is about all I can
suggest (Unless you can get the telephone company there to suggest
something better, I get the impression that's the best we can figure
here.)

Part of the reason is that, here in the US, we're not charged for
local calls, just LD calls.  It doesn't take THAT long to dial, so if
you just "charge" your brother for the time including dialing time,
it'll motivate him to dial fast?  <G>  I'm sure he'll hang up quickly
after the conversation is finished...

(It's a complex situation - you cannot listen for the last dial tone
in a X second window, as it's possible to spend an hour on the phone
playing "touch tone tunes" - if LD it'd all be charged time.  And you
can mix "Tone" and "Pulse" dialing and some (not necessarily all)
central switch offices will accept that mix (One friend does something
like this, his box stops someone from dialing a pulse {for 1}, followed
by area code & number if you have LD dialing disabled.  Some people get
sneaky...)

Mark

Javier wrote:
{Quote hidden}

>Some old systems reverse polarity on connect, which you can detect with the
>dual-opto current sensor, but most do not. Still, you could get a fair
>sanity-check on them, if they report more time than you do (measuring loop
>current) then you know they are wrong!

Gotta agree with this one. Assuming he doesn't listen to the dialtone as a
hobby, you're mesurements might be 5 minutes higher or something... so as
long as the telco's are less....

-greg

-----------------------
Greg Cormier
Kathmandu, Nepal
Local time : GMT + 5h30m
ICQ # : 565465

Javier wrote:

> Thanks to everybody for answering, but I don«t want to detect or
> calculate the time a telephone is off hook, I want to know the time
> I«m conversing (how much is the company billing me !!!) It«s not that
> easy, is it??

Ah!  You got the message!  I have seen some funny things written here!

You can tell when the phone goes "off-hook", when and which tones are
dialled, and when it goes back "on-hook".  You can«t easily tell when
(and if) it is actually answered so you have to make an assumption that
it is answered shortly after the *last* tone is dialled, and toll paid
until it goes back on hook.

There are obvious ways to "fool" this algorithm (pressing extra tones
occasionally) so you may have to refine it, but otherwise, it will
marginally over-estimate the time used on calls.  That«s as close as it
gets.
--
Cheers,
Paul B.

>Gotta agree with this one. Assuming he doesn't listen to the dialtone as a
>hobby, you're mesurements might be 5 minutes higher or something... so as
>long as the telco's are less....

I'd guess about 15 sec per call.

|Thanks to everybody for answering, but I don4t want to detect or calculate
|the time a telephone is off hook, I want to know the time I4m conversating
|(how much is the company billing me !!!) It4s not that easy, is it??

Unfortunately, in the U.S., residential customers are not given
call supervision (an indication of if/when a call is completed).
Given that some call-failed announcements are preceded by ringing
and have no SIT tones preceeding them, there's really no way to
distinguish those from dialing an answering machine.

If your goal is simply to have a list of numbers dialed from his
phone which you can cross-check against a phone bill, then this
may not be a problem.  If, however, you want something approaching
reasonably accorate information for all calls then I'd suggest
doing something like this:

[1] Build a circuit which puts the line voltage through a very
high impedance low-pass filter (e.g. 2 one-meg resistors
in series, feeding a 0.1uF cap) and then looks for "rapid"
rising or falling edges (e.g. more than 2 volts per 0.1 second).
You'll probably want seperate PIC inputs for rising and falling.
With luck, you'll avoid tripping when the phone rings.

[2] Use an "accurate" call-progress detector chip (from Teltone;
I forget the part #).  That will let you detect the different
tones for dial-tone, busy, and ringing.  If you hear busy tone
shortly after dialing and nothing else, odds are the call was
not completed.  If you hear ringing and it stops more than 10
seconds before the end of the call, odds are the call was ans-
wered by something other than a call-failed announcement.  If
you don't hear ringing but the call lasts more than a minute,

Note that the above is NOT by any stretch of the imagination spoof-
proof.  But assuming your brother is honest it should work pretty
well.

>Given that some call-failed announcements are preceded by ringing
>and have no SIT tones preceeding them, there's really no way to
>distinguish those from dialing an answering machine.

Is that the name for those schreechingly loud tones that they preceed the
muffled and fuzzy message with?  Is there a purpose, other than punishing

>Given that some call-failed announcements are preceded by ringing
>and have no SIT tones preceeding them, there's really no way to
>distinguish those from dialing an answering machine.

|Is that the name for those schreechingly loud tones that they preceed the
|muffled and fuzzy message with?  Is there a purpose, other than punishing

In theory, the tones have a purpose; the first and second tones
have two standard pitches each as well as two standard durations.
The combination of pitch and duration allows for 16 possible tone
combinations, of which I think seven are defined to represent diff-
erent reasons for call failure.  In theory, then, it's possible for
automated equipment to listen to the tones and record why the call
failed.  In addition, for COCOTs (coin phones not owned by the phone
company) SIT tones provide one means by which they can determine
that a call was not completed and the customer should get their money
back.

Unfortunately, however, many call-failure announcements these days
don't have SIT tones before them, and even those that do are often
not recorded terribly well.  It is rather ironic in this day when
phone company announcements are all stored digitally, that the SIT
tones are often digitized off of badly-worn recordings rather than
being generated directly digitally, but such is the power of inertia
sometimes...

>|Is that the name for those schreechingly loud tones that they preceed the
>|muffled and fuzzy message with?  Is there a purpose, other than punishing
>
>In theory, the tones have a purpose; the first and second tones
>have two standard pitches each as well as two standard durations.
>The combination of pitch and duration allows for 16 possible tone
>combinations, of which I think seven are defined to represent diff-
>erent reasons for call failure.  In theory, then, it's possible for
>automated equipment to listen to the tones and record why the call
>failed.  In addition, for COCOTs (coin phones not owned by the phone
>company) SIT tones provide one means by which they can determine
>that a call was not completed and the customer should get their money
>back.

Too bad it's  not possible for humans to listen to anything after they've
been blasted.
I don't know what bozo set the levels up, but it sounds to me, louder than
+9dBm!
I've hit some that weren't too bad, but the majority seem to me to be
candidates for a hearing-loss lawsuit, especially in light of the fact that
you don't get any warning, and you're listening hard for the ringback when
it hits you.

>Unfortunately, however, many call-failure announcements these days
>don't have SIT tones before them, and even those that do are often
>not recorded terribly well.  It is rather ironic in this day when
>phone company announcements are all stored digitally, that the SIT
>tones are often digitized off of badly-worn recordings rather than
>being generated directly digitally, but such is the power of inertia
>sometimes...

Blown with airhorns by trainees??

Seems that I4m going to use this solution, just wait for 15-20 sec and then
start with the time calculation, since there is no 15 khz billing tone :-(
Javier
PD To isolate I4m going to use a 600 ohm trafo, 4 caps and 1.5 microH coils
!!??

>>Gotta agree with this one. Assuming he doesn't listen to the dialtone as a
>>hobby, you're mesurements might be 5 minutes higher or something... so as
>>long as the telco's are less....
>
>I'd guess about 15 sec per call.

More... (looser matching)
- Last day of these posts
- In 1999 , 2000 only
- Today
- New search...