Searching \ for 'Telephone use & time calculation' in subject line. ()
Make payments with PayPal - it's fast, free and secure! 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.
PICList Thread
'Telephone use & time calculation'
1999\02\05@210837 by Javier

flavicon
face
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

1999\02\05@214438 by Ari W

flavicon
face
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
>

1999\02\05@220631 by dave vanhorn

flavicon
face
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.

1999\02\05@222534 by paulb

flavicon
face
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
(about) 50.

 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
been answered for starters.
--
 Cheers,
       Paul B.

1999\02\05@225736 by Sean Breheny

face picon face
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
ones where the caller doesn't leave a message.

Sean

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

1999\02\05@225749 by dave vanhorn

flavicon
face
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
>(about) 50.

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
>been answered for starters.

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.

1999\02\05@230158 by dave vanhorn

flavicon
face
>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
>ones where the caller doesn't leave a message.

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.

1999\02\06@075725 by Greg Cormier

flavicon
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
Canadian living abroad in Kathmandu, Nepal
Digital electronics, programming, computer interfacing, microcontrollers
Local time : GMT + 5h30m
.....gcormierKILLspamspam@spam@wlink.com.np
ICQ # : 565465

1999\02\06@112453 by WIL REEDER

flavicon
face
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
teachtechspamKILLspambc.sympatico.ca
Vancouver,Canada 0x33
solar,wind,tide, TEG  renewable energy

----------
| From: Javier <.....grijalbaKILLspamspam.....CVTCI.COM.AR>
| To: EraseMEPICLISTspam_OUTspamTakeThisOuTMITVMA.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

1999\02\06@115155 by dave vanhorn

flavicon
face
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.

1999\02\06@191824 by Karl A. Uscroft

picon face
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.

1999\02\06@193516 by dave vanhorn

flavicon
face
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.

1999\02\07@020919 by Harold M Hallikainen

picon face
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" <KUscroftspamspam_OUTAOL.COM>
writes:
{Quote hidden}

___________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com/getjuno.html
or call Juno at (800) 654-JUNO [654-5866]

1999\02\07@034210 by Valter Gruntar

flavicon
face
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

1999\02\07@180651 by Javier

flavicon
face
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??
Thanks in advance
Javier

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


{Quote hidden}

1999\02\07@181313 by dave vanhorn

flavicon
face
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??
>Thanks in advance
>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!

1999\02\07@185506 by Mark Willis

flavicon
face
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}

1999\02\08@050654 by Greg Cormier

flavicon
>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
gcormierEraseMEspam.....wlink.com.np
ICQ # : 565465

1999\02\08@084038 by paulb

flavicon
face
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.

1999\02\08@115839 by dave vanhorn

flavicon
face
>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.

1999\02\09@123323 by John Payson

flavicon
face
|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??
|Thanks in advance

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,
   odds are it was answered.

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.

1999\02\09@130319 by dave vanhorn

flavicon
face
>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
the bad customer?

1999\02\10@121154 by John Payson

flavicon
face
>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
|the bad customer?

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...

1999\02\10@135818 by dave vanhorn

flavicon
face
>|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
>|the bad customer?
>
>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??

1999\02\11@013138 by Javier

flavicon
face
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...