Searching \ for '[PIC]: How would I build a reflectometer?' 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/microchip/devices.htm?key=pic
Search entire site for: 'How would I build a reflectometer?'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: How would I build a reflectometer?'
2003\02\19@090151 by michael brown

picon face
Hello all,

I wish to build a PIC based reflectometer to use in my business for
measuring the length to network wiring.  It appears that the capture
capability of the PIC's I'm used to would be far to coarse of a
measurement since I need nanosecond precision.  Are the 18F series PICs
capable of this kind of precision?  If not, what would you guys
recommend for an external chip to do the pulse timing.  Since this is a
one off, and is being built by an incompetent fool such as myself,
simplicity is key.  Is this even workable for a hobbyist?

Any ideas anyone?

michael brown

"In the land of the blind, he who has one eye is king"

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spam_OUTlistservTakeThisOuTspammitvma.mit.edu with SET PICList DIGEST in the body

2003\02\19@091153 by Werner Soekoe

flavicon
face
Michael,

I cannot give really specific part numbers, etc, but I can give my ten cents
(being a novice hobbyist myself):

1. Have a very high speed external oscilator, lets say 500Mhz+
2. Use a counter chip, lets say a 16 bit counter that can manage the 500Mhz+
3. Your PIC should then trigger the counter while at the same time sending a
signal accros the cable. I'm assuming you connect a loopback device to the
other end.
4. The return signal should then trigger a stop event on the counter.
5. Have the PIC read the counter's value, then reset it.

Repeat the above procedure +- 3 times, then average the counting values. You
can either caculate the length by using distance/time calculations, or
mannually calibrate it by programming a fixed factor onto the chip.

I could be wrong about the oscillator. Maybe a lesser frequency such as
50Mhz could also work, but I've never done this myself. Never the less, the
above mentioned procedure *should* work. I cannot guarantee it though.

Good luck.

Werner Soekoe
.....WernerSKILLspamspam@spam@fsl.gov.za

{Original Message removed}

2003\02\19@104050 by Larry Reynolds

picon face
Michael,

       A pulse will travel in a wire around 1 foot/nanosecond.  So, your
resolution will be directly related to pulse width.  One nanosecond is
half of a 500 MHz cycle.  Get where I'm going with this???

Larry


michael brown wrote:
>
> Hello all,
>
> I wish to build a PIC based reflectometer to use in my business for
> measuring the length to network wiring.......

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservspamKILLspammitvma.mit.edu with SET PICList DIGEST in the body

2003\02\19@105115 by Olin Lathrop

face picon face
> A pulse will travel in a wire around 1 foot/nanosecond.

The speed of light is about 1 foot/nanosecond in vacuum.  However, it will
be significantly less on a transmission line.  It depends on the impedence
of course, but figure about half as a rough rule of thumb.

Still, making reaonable distance measurments will required speeds many
times faster than what a PIC can handle.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email .....listservKILLspamspam.....mitvma.mit.edu with SET PICList DIGEST in the body

2003\02\19@110401 by Mike Poulton

flavicon
face
Olin Lathrop wrote:
>> A pulse will travel in a wire around 1 foot/nanosecond.

> The speed of light is about 1 foot/nanosecond in vacuum.  However, it will
> be significantly less on a transmission line.  It depends on the impedence
> of course, but figure about half as a rough rule of thumb.

> Still, making reaonable distance measurments will required speeds many
> times faster than what a PIC can handle.

A clever trick used by laser rangefinders is to go analog. The pulse
transmission triggers the chaging of a capacitor through a resistance.
The received reflection stops the charging, and the capacitor voltage
is read with an A/D converter. This requires a very fast flip-flop and
precise capacitance and resistance values, plus some other fun stuff,
but it does NOT require a fast microcontroller.

--

Mike Poulton
EraseMEmpoultonspam_OUTspamTakeThisOuTmtptech.com
MTP Technologies
KC0LLX

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservspamspam_OUTmitvma.mit.edu with SET PICList DIGEST in the body

2003\02\19@111747 by Wagner Lipnharski

flavicon
face
Olin Lathrop wrote:
>> A pulse will travel in a wire around 1 foot/nanosecond.
>
> The speed of light is about 1 foot/nanosecond in vacuum.  However, it
> will be significantly less on a transmission line.  It depends on the
> impedence of course, but figure about half as a rough rule of thumb.
>
> Still, making reaonable distance measurments will required speeds many
> times faster than what a PIC can handle.


I already suggested this in the past, but here it goes again.

Measuring a single travel from point A to B is difficult, since the time
would be very short.
But measuring the "accumulated" time to travel many times from A to B will
be easier.
The previous suggestion was to measure a laser travel time from A to B,
which here is similar.

One easy way to do that would be with just one flip-flop or just a latch
circuit, the fastest you can find.  Connect the /Q output to input DATA and
use a CR discriminator to "feedback" the Q output to Clock Input as a
single pulse whenever Q changes state.  Apply a forced single pulse at
CLock input and see what happens... the weird circuit will run as an
oscillator.  As fast you can make it oscillate, better.  Use a counter and
a timer tied to this "oscillator", so you can count how long it needs to
run 100 thousand cycles, or whatever the counter needs to run to make a
significative time recording.  If you use a short wire as "feedback", then
you will have your "standard delay".  Inserting a long wire as "feedback",
you "should have" a significative longer time, the delta is your "wire
delay".

Considering 1ft/ns, running 1 million cycles with 1ft feedback wire, means
an equivalent of 1000k ft, or 1000kns or 1000us (1ms).  Now, using a 100ft
wire, you will have at least 100ms.  This delta time is perfectly
measurable with any microcontroller.

Probably the "standard delay" will be related to the CR pulse
discriminator, lets say 10ns, plus the own flip-flop or latch response
delay, 10ns? a total of around 20ns per cycle.  Then, 1 million cycles
"could" generate around 20ns x 1Mcycles (0.000,000,02 x 1,000,000) = 0.02s
(20ms).  So, with one ft wire, the total time to run 1MCycles would be read
as to be 21ms, with 100ft wire = 120ms, delta of aprox 100ms, divided by
1MegaCycles = 100ns per cycle, divided by 100ft, 1ns/ft. That would be the
formula.

Wagner.

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email @spam@listservKILLspamspammitvma.mit.edu with SET PICList DIGEST in the body

2003\02\19@112410 by michael brown

picon face
----- Original Message -----
From: "Larry Reynolds" <KILLspamlreynol4KILLspamspamEROLS.COM>
To: <RemoveMEPICLISTTakeThisOuTspamMITVMA.MIT.EDU>
Sent: Wednesday, February 19, 2003 9:39 AM
Subject: Re: [PIC]: How would I build a reflectometer?


> Michael,
>
>         A pulse will travel in a wire around 1 foot/nanosecond.  So,
your
> resolution will be directly related to pulse width.  One nanosecond is
> half of a 500 MHz cycle.  Get where I'm going with this???

I think so Larry.  Since there are some cheap ($169.00) handheld devices
to do this with a 4' minimum length, I was thinking that with some type
of external components I could make this work for less money.  Even if I
can't do it cheaper, it would be worth it for the learning experience.

michael brown

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spamBeGonelistservspamBeGonespammitvma.mit.edu with SET PICList DIGEST in the body

2003\02\19@112815 by Spehro Pefhany

picon face
At 10:49 AM 2/19/2003 -0500, you wrote:
> > A pulse will travel in a wire around 1 foot/nanosecond.
>
>The speed of light is about 1 foot/nanosecond in vacuum.  However, it will
>be significantly less on a transmission line.  It depends on the impedence
>of course, but figure about half as a rough rule of thumb.
>
>Still, making reaonable distance measurments will required speeds many
>times faster than what a PIC can handle.

You can play tricks like clocking an HCMOS register from a delay line to get
resolution in the hundreds of picoseconds, and control the thing with a PIC
or whatever. I'm not sure if that's now commercial TDR meters do it.

Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
TakeThisOuTspeffEraseMEspamspam_OUTinterlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistservspamTakeThisOuTmitvma.mit.edu with SET PICList DIGEST in the body

2003\02\19@112817 by j galt

picon face
>Olin Lathrop wrote:
>
>The speed of light is about 1 foot/nanosecond in vacuum.  However, it
>will be significantly less on a transmission line.  It depends on the
>impedence of course, but figure about half as a rough rule of thumb.
>Still, making reaonable distance measurments will required speeds many
>times faster than what a PIC can handle.
>

Actually it depends on the "velocity factor" of the line which is another
characteristic.

What I have pondered is a simple circuit that would turn a storage/digital
scope into a simple reflectometer.


_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservEraseMEspam.....mitvma.mit.edu with SET PICList DIGEST in the body

2003\02\19@114137 by hael Rigby-Jones

picon face
{Quote hidden}

Something like this?

http://www.web-ee.com/Schematics/TDR/tdr.htm

As an ultra cheap and nasty method, how about making the cable the C part of
a CR relaxation oscillator.  The PIC measures the frequency and by having a
set of fudge factors for different cable types, the length could be
calculated.  Granted it will never be as accurate as a commercial
instrucment but I think the idea is possibly workable.

Regards

Mike

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistservspam_OUTspamKILLspammitvma.mit.edu with SET PICList DIGEST in the body

2003\02\19@150903 by michael brown

picon face
> > What I have pondered is a simple circuit that would turn a
storage/digital
> > scope into a simple reflectometer.
> >
> >
> Something like this?
>
> http://www.web-ee.com/Schematics/TDR/tdr.htm
>
> As an ultra cheap and nasty method, how about making the cable the C
part of
> a CR relaxation oscillator.  The PIC measures the frequency and by
having a
> set of fudge factors for different cable types, the length could be
> calculated.  Granted it will never be as accurate as a commercial
> instrucment but I think the idea is possibly workable.

I saw that circuit on another site, but it would be a tad awkward to
drag my scope to the customers site.
;-)

michael brown

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistservTakeThisOuTspamspammitvma.mit.edu with SET PICList DIGEST in the body

2003\02\19@155143 by Larry Reynolds

picon face
Michael,

       Well, some good ideas have popped up here that could lead you onto a
successful project.  The analog approaqch sounds interesting.  Bt if you
go digital, keep in mind transition times of the devices.  Motorola ECL
might be a good option for the logic devices or even the 74F line of
logic.

Larry


michael brown wrote:
{Quote hidden}

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservSTOPspamspamspam_OUTmitvma.mit.edu with SET PICList DIGEST in the body

2003\02\19@160744 by Larry Reynolds

picon face
michael brown wrote:
>
> > Something like this?
> >
> > http://www.web-ee.com/Schematics/TDR/tdr.htm
> >
       Nifty circuit, but the first thing I would do is replace the existing
chip with a SN74F04 from TI.  This should speed up things considerably.

Larry

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spamBeGonelistservSTOPspamspamEraseMEmitvma.mit.edu with SET PICList DIGEST in the body

2003\02\19@195234 by Peter L. Peres

picon face
There is a schematic on the web that shows how to make a reflectometer
using a logic gate a crystal and a few resistors. The readout is a scope.

A PIC is not fast enough to act as a tdr but you can use one of several
tricks to make it work. One of the tricks involves building an oscillator
with a reasonable wideband low pass characteristic in the gain cell. This
will resonate on the strongest echo from the line with some luck (using
the line as LC frequency determining element). It is read with a frequency
counter, which can be made with a PIC. This is not a beginner project
imho.

Peter

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email KILLspamlistservspamBeGonespammitvma.mit.edu with SET PICList DIGEST in the body

2003\02\20@062606 by j galt

picon face
{Quote hidden}

Yes, that looks interesting. Basically a circuit to periodically generate a
sharp pulse. If the pulse repeats at a few hundred Hz you don't even need a
storage scope as the screen will be refreshed. As others have mentioned
there are also many other newer faster logic families available.

If you can get a reflection back that is large enough to cross a logic level
you could have it stop a high speed counter. You would have to experiment to
see what sort of reflection amplitudes you get with different lengths of
cable. The scope has the advantage of displaying smaller reflections and
multiple reflections. Also the reflection you get from an open will be
different from the reflection from a short.

>
>As an ultra cheap and nasty method, how about making the cable
>the C part of a CR relaxation oscillator.  The PIC measures the frequency
>and by having a set of fudge factors for different cable types, the length
>could be calculated.  Granted it will never be as accurate as a commercial
>instrucment but I think the idea is possibly workable.
>

There might be some way the pulse transit time on the cable might be made
into a sort of oscillator circuit.


_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail

--
http://www.piclist.com hint: To leave the PICList
EraseMEpiclist-unsubscribe-requestspamEraseMEmitvma.mit.edu>

2003\02\20@064858 by hael Rigby-Jones

picon face
> >Michael Rigby-Jones wrote:
> >As an ultra cheap and nasty method, how about making the cable
> >the C part of a CR relaxation oscillator.  The PIC measures the frequency
> >and by having a set of fudge factors for different cable types, the
> length
> >could be calculated.  Granted it will never be as accurate as a
> commercial
> >instrucment but I think the idea is possibly workable.
> >
>
> {Original Message removed}

2003\02\20@103635 by michael brown

picon face
From: "Michael Rigby-Jones" <@spam@Michael.Rigby-Jones@spam@spamspam_OUTBOOKHAM.COM>
To: <spamBeGonePICLISTspamKILLspamMITVMA.MIT.EDU>
Sent: Thursday, February 20, 2003 5:47 AM
Subject: Re: [PIC]: How would I build a reflectometer?


> > There might be some way the pulse transit time on the cable might be
made
> > into a sort of oscillator circuit.
> >
> That's basicaly what Wagner suggested a few posts back.  I was
thinking you
> could perhaps do away with pulse reflections all together and just use
cable
> capacitance with some calibrations for cable type.  It might be able
to be
> made accurate enough for some applications, but TDR is the way to go
for
> real accuracy.

I was thinking about this approach.  I've seen it referred to as a
"gimmick" capacitor.  I didn't know how much effect the "real world"
might have on it though (fluorescent lights, noise, etc..).  I will do
some experiments at various customer sites that are wired using the same
cable type.  I already know the lengths there as well.

michael

--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestspam_OUTspammitvma.mit.edu>

2003\02\20@144102 by Dennis J. Murray

flavicon
face
I'll tell you guys - I've been following this link since it's inception and
you REALLY have my curiosity piqued!!  I've used TDRs quite a bit in a past
life and I DEPENDED on the visual representation on the screen to interpret
what is really on the line!  I don't think I EVER had a clean line that
didn't require some interpretation - was that hiccup a sharp bend? water in
the line? an unauthorized tap?  A long-forgotten splice?  etc.

How do you plan to accomplish this using a PIC or an oscillator circuit????
Or don't you?  Just looking to determine overall length to the most
significant reflection??

{Original Message removed}

2003\02\20@153328 by michael brown

picon face
From: "Dennis J. Murray" <TakeThisOuTdjmurray.....spamTakeThisOuTBELLATLANTIC.NET>
To: <TakeThisOuTPICLISTKILLspamspamspamMITVMA.MIT.EDU>
Sent: Thursday, February 20, 2003 1:40 PM
Subject: Re: [PIC]: How would I build a reflectometer?


> I'll tell you guys - I've been following this link since it's
inception and
> you REALLY have my curiosity piqued!!  I've used TDRs quite a bit in a
past
> life and I DEPENDED on the visual representation on the screen to
interpret
> what is really on the line!  I don't think I EVER had a clean line
that
> didn't require some interpretation - was that hiccup a sharp bend?
water in
> the line? an unauthorized tap?  A long-forgotten splice?  etc.
>
> How do you plan to accomplish this using a PIC or an oscillator
circuit????
> Or don't you?  Just looking to determine overall length to the most
> significant reflection??

I only wanted to measure the length of installed network cabling.  I'm
not really looking for wiretaps or anything that subtle.  ;-)  I'm
thinking that as long as the injection end is terminated to match the
characteristic impedance of the wire, there should only be one large
reflection and that would be from the far end.  I'm thinking that using
the latest arriving "echo" would represent the distance to the far end
of the wire.

michael

--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestspamRemoveMEmitvma.mit.edu>

2003\02\20@160155 by Dave Tweed

face
flavicon
face
"Dennis J. Murray" <RemoveMEdjmurrayspamspamBeGoneBELLATLANTIC.NET> wrote:
> I'll tell you guys - I've been following this link since it's inception and
> you REALLY have my curiosity piqued!!  I've used TDRs quite a bit in a past
> life and I DEPENDED on the visual representation on the screen to interpret
> what is really on the line!  I don't think I EVER had a clean line that
> didn't require some interpretation - was that hiccup a sharp bend? water in
> the line? an unauthorized tap?  A long-forgotten splice?  etc.
>
> How do you plan to accomplish this using a PIC or an oscillator circuit????
> Or don't you?  Just looking to determine overall length to the most
> significant reflection??

In the October/November 1992 issue of Circuit Cellar, there's an article
that describes a contest-winning design for a TDR that's based on an 8051.
It uses a PAL and a delay line to get timing resolution down to 20 ns.
See http://www.dtweed.com/circuitcellar/caj00029.htm#409

As presented, it didn't draw the waveform -- it just calculated the length
and termination impedance from the height, polarity and delay of the first
reflection. However, a few small changes to the design would allow
capturing the full waveform.

You can order back issues at
Print: www.circuitcellar.com/products/b92_93.asp
CD:    http://www.circuitcellar.com/products/cd.asp

-- Dave Tweed

--
http://www.piclist.com hint: To leave the PICList
spamBeGonepiclist-unsubscribe-request@spam@spamspam_OUTmitvma.mit.edu>

2003\02\20@161227 by Robert Rolf

picon face
If all you want is to measure is cable length, then just measure the
cable capacitance (or cable pair C).
Knowing your pf/ft it's simple math after you measure C.

Many DVM's can measure C directly. Alternatively use the cable C in an RC osc
cct and measure frequency or period. The cheap TDR URL posted earlier uses a
74HC14 as the oscillator. Just use the cable for the C and you're done. KISS!
Remember to substact out the connecting lead C.

Using a 555 and current source for charging C would give you a linear read out
that you could display on an analog meter. (One half of 556 oscillates using
cable C, the other half generates a fixed width pulse which you low pass filter
and use to drive meter IOW FtoV). No PIC required <G>.

Robert

michael brown wrote:
{Quote hidden}

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestEraseMEspamspam_OUTmitvma.mit.edu>

2003\02\20@162233 by Dennis J. Murray

flavicon
face
You want a great reflection from the end?  Just leave the end open or
shorted!  A good termination impedance match doesn't return much signal.  A
short or open gives you a great spike (different directions, of course).

{Original Message removed}

2003\02\20@164101 by Wagner Lipnharski

flavicon
face
Dennis J. Murray wrote:
> I'll tell you guys - I've been following this link since it's
> inception and you REALLY have my curiosity piqued!!  I've used TDRs
> quite a bit in a past life and I DEPENDED on the visual
> representation on the screen to interpret what is really on the line!
> I don't think I EVER had a clean line that didn't require some
> interpretation - was that hiccup a sharp bend? water in the line? an
> unauthorized tap?  A long-forgotten splice?  etc.
>
> How do you plan to accomplish this using a PIC or an oscillator
> circuit???? Or don't you?  Just looking to determine overall length
> to the most significant reflection??
>
> {Original Message removed}

2003\02\20@164447 by Wagner Lipnharski

flavicon
face
michael brown wrote:
{Quote hidden}

hehe, again, I take back what I said in the last email, sent seconds ago.
You are in true trying to measure the wire distance.

If you build a cable loop terminator, simply a connector to make a loop
between the cat-5 wires, lets say, building a 4 pairs loop, so you are
multiplying by 8 the cable distance, and using any low cost thing as I
suggested, a million pulses repeater, measuring the time, you could do it
with less than $10 hardware.

--
http://www.piclist.com hint: To leave the PICList
@spam@piclist-unsubscribe-requestspam_OUTspam.....mitvma.mit.edu>

2003\02\20@164858 by michael brown

picon face
From: "Dennis J. Murray" <spamBeGonedjmurrayEraseMEspamBELLATLANTIC.NET>
To: <PICLISTspamBeGonespamMITVMA.MIT.EDU>
Sent: Thursday, February 20, 2003 3:21 PM
Subject: Re: [PIC]: How would I build a reflectometer?


> You want a great reflection from the end?  Just leave the end open or
> shorted!  A good termination impedance match doesn't return much
signal.  A
> short or open gives you a great spike (different directions, of
course).

I may not have been clear enough.  I meant that the "injection" (near)
end would be terminated in the proper impedance to prevent ping-ponging
of the pulse.  The far end would be left as you said, either open (most
likely) or shorted.  :-)

michael

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-request@spam@spamspamBeGonemitvma.mit.edu>

2003\02\20@165450 by michael brown

picon face
From: "Wagner Lipnharski" <.....wagner@spam@spamEraseMEUSTR.NET>
To: <.....PICLISTRemoveMEspamMITVMA.MIT.EDU>
Sent: Thursday, February 20, 2003 3:42 PM
Subject: Re: [PIC]: How would I build a reflectometer?


> hehe, again, I take back what I said in the last email, sent seconds
ago.
> You are in true trying to measure the wire distance.
>
> If you build a cable loop terminator, simply a connector to make a
loop
> between the cat-5 wires, lets say, building a 4 pairs loop, so you are
> multiplying by 8 the cable distance, and using any low cost thing as I
> suggested, a million pulses repeater, measuring the time, you could do
it
> with less than $10 hardware.

I'm going to work on this in my "spare" time.  ;-)  I recently noticed
that a couple of "cheap" tools were available that would measure a
cable.  Since the time to send a pulse and receive a response is very
short (nanoseconds), I had wondered how these tools could do it using an
inexpensive micro.

michael

--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestSTOPspamspam@spam@mitvma.mit.edu>

2003\02\20@171355 by Robert Rolf

picon face
michael brown wrote:
{Quote hidden}

Sampling.

You generate a fast ramp whose slope is based on cable dielectric constant
and have a damn fast comparator to sample the signal at a progressive delay
(rising reference) after pulse is launched.
The micro does the A/D conversion at it's leisure
since the sampling process can be as slow as required by the A/D speed.
The only 'hard' part is making a damn fast sample and hold (picosecond
aperture times).

There was a project in Circuit Cellar in the past decade that used a garden
variety micro to do something similar to what you want. I looked on their
site but didn't find it. Someone else here probably knows what article I'm
thinking of.

Robert

--
http://www.piclist.com hint: To leave the PICList
spamBeGonepiclist-unsubscribe-requestKILLspamspam@spam@mitvma.mit.edu>

2003\02\20@172638 by hard Prosser

flavicon
face
I've been following this with some interest also having had a bit to do
with TDRs (&OTDRs) in a past employment..

It occurs that it should be easy to determine the reflection time  to
within one clock cycle reasonably easily using an interrupt (for open or
shorted lines). The problem is that this only gives a resolution to 1 clock
cycle - 1uS for a 4MHz oscillator part. (18 series may improve on this
using the 40MHz capability??).

Regardless - the resolution will be a lot less than desired. (1uS = 100m of
cable go & return time)

However, if a means of delaying the transmission linearly within a clock
cycle was provided, it should be reasonably easy to adjust the timing so
that the reflection is received at a clock cycle transition (or, rather 50%
of the interrupts at clock N, and 50% at clock N+1). N would then provide
the course reading.

This could be acheived in hardware using a PWM output to set  a trigger
point compared to a  ramp generator (RC network ??) triggered at N=0.

The end result should allow timing resolution to 1/1024 (10 bit pwm) of a
clock cycle - or roughly 1nS for a 4MHz clock.  (cable length = 100mm).
Good enough for most cases, and better thyan the accuracy of the velocity
factor over long cable lengths anyway.

The hardware would need a bit more thought but I can't really see too much
of a problem with it.


Any comments??

Richard P



From: "Wagner Lipnharski" <wagnerspam_OUTspam@spam@USTR.NET>
To: <spamBeGonePICLIST@spam@spamMITVMA.MIT.EDU>
Sent: Thursday, February 20, 2003 3:42 PM
Subject: Re: [PIC]: How would I build a reflectometer?


> hehe, again, I take back what I said in the last email, sent seconds
ago.
> You are in true trying to measure the wire distance.
>
> If you build a cable loop terminator, simply a connector to make a
loop
> between the cat-5 wires, lets say, building a 4 pairs loop, so you are
> multiplying by 8 the cable distance, and using any low cost thing as I
> suggested, a million pulses repeater, measuring the time, you could do
it
> with less than $10 hardware.

I'm going to work on this in my "spare" time.  ;-)  I recently noticed
that a couple of "cheap" tools were available that would measure a
cable.  Since the time to send a pulse and receive a response is very
short (nanoseconds), I had wondered how these tools could do it using an
inexpensive micro.

michael

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestEraseMEspamKILLspammitvma.mit.edu

--
http://www.piclist.com hint: To leave the PICList
spamBeGonepiclist-unsubscribe-requestspam_OUTspamRemoveMEmitvma.mit.edu>

2003\02\20@174530 by Wagner Lipnharski
flavicon
face
Robert Rolf wrote:
> If all you want is to measure is cable length, then just measure the
> cable capacitance (or cable pair C).
> Knowing your pf/ft it's simple math after you measure C.
>
> Many DVM's can measure C directly. Alternatively use the cable C in
> an RC osc cct and measure frequency or period. The cheap TDR URL
> posted earlier uses a 74HC14 as the oscillator. Just use the cable
> for the C and you're done. KISS! Remember to substact out the
> connecting lead C.
>
> Using a 555 and current source for charging C would give you a linear
> read out that you could display on an analog meter. (One half of 556
> oscillates using cable C, the other half generates a fixed width
> pulse which you low pass filter and use to drive meter IOW FtoV). No
> PIC required <G>.


Nothing wrong in measuring capacitance, but most multimeters can't get
below 100nF.

Other possibility is perhaps build a milliohms meter, simpler to built.
Most multimeters can give you a resolution of 1mV, so, if you measure the
resistance of the whole cable spool (500 or 1000 ft) before you use it, you
will find out the relative resistance for smaller cut pieces easily.

A simple circuit like that can tell you magic numbers:


                      50 Ohms
            .------.
  +9VDC-----| 7805 |---R---.
            '------'       |
               |           |
               o-----------'
               |
   >-----------o--------> (+)
Wire                          V meter
   >-----------o--------> (-)
               |
              _|_
              GND

The above circuit generates a constant current about 100mA.

An AWG 26 solid gives you 43.6 ohms per 1000 ft.
Suppose this is your wire.

Connecting both ends of 1 wire of the 1000 ft cable at the [WIRE]
connectors at the above circuit, the mV meter will indicate 43.6 x 100mA =
4.36V
If this is what you get at the V meter, then the following formula could be
used when measuring pieces of this same cable:

Wire Size in ft = mVolts x 1000 / 4360

If you read 0.36V, then it will be

   360 x 1000
   ----------  =  82.56 ft
      4360

So, your multimeter has a 1mV resolution, it means you will have a wire
size resolution of;

   1 x 1000
  ----------  = 0.22 ft
     4360

pretty good for a $5 solution, right?

To build your own formula, just measure how many mV you get in the whole
spool of 1000ft, and replace the 4360 in the above formula by this new mV
found.

Of course, once the cable is layed, you can't get both sides, so, using a
simple loop in one pair will solve your problem, but then, replace the 50
Ohms resistor in the above circuit by 100 ohms to keep the wire V below 5V,
and remember that you would be measuring the wire distance in double, but
the formula still telling you the cable length, not wire(s) length, because
you are using the 2 wires loop for the spool and for the actual cable under
measure.

Suppose using the wire loop, 100 ohms resistor (50mA constant current), now
the 1000ft spool (actually 2000ft wire being measured) results in 87.2 ohms
x 50mA = 4.36 V.

If measuring a smaller cable using the 2 wires connector you find out 0.36V
(360mV), then

                360 x 1000
cable length = ------------- = 82.56 ft.
                   4360

The tricky is to find a resistor (50, 100 ohms or other value) that gives
you the biggest number below 5V when measuring the 1000 ft spool.  Of
course, if your total cable lenght will have more than 1000ft, then select
the resistor to be able to measure this whole length.  As smaller the
resistor, better accuracy and resolution at your measurement, but of course
will cause overvoltage in longer cables, so, longer cables, higher
resistors, but don't go below 5 ohms. Always calculate the resistor power
at least as 35/R in watts.

You would want to take notes of voltage measured at the whole spool using
diferent resistors, just in case. 20, 50, 100, 150, 200 ohms for example.
Take notes, then choose a better resistor when measuring the cable and use
the correspondent values.  Perhaps you could build a rotary switch with
soldered resistors... multi-range?  a different formula for each position.

Check this link for some idea of Copper AWG vs resistance:
http://www.thelenchannel.com/1wire.html


Wagner.

--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestspamRemoveMEmitvma.mit.edu>

2003\02\20@175223 by Dennis J. Murray

flavicon
face
Sorry.  I misunderstood your goals.  My "mistrake"
----- Original Message -----
From: "michael brown" <spam-mespam@spam@HOUSTON.RR.COM>
To: <EraseMEPICLISTRemoveMEspamSTOPspamMITVMA.MIT.EDU>
Sent: Thursday, February 20, 2003 4:44 PM
Subject: Re: [PIC]: How would I build a reflectometer?


{Quote hidden}

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestspamspammitvma.mit.edu>

2003\02\20@180103 by michael brown

picon face
From: "Dennis J. Murray" <spam_OUTdjmurrayspam_OUTspamspam_OUTBELLATLANTIC.NET>
To: <PICLISTspam_OUTspamMITVMA.MIT.EDU>
Sent: Thursday, February 20, 2003 4:51 PM
Subject: Re: [PIC]: How would I build a reflectometer?


> Sorry.  I misunderstood your goals.  My "mistrake"

Nothing to be sorry for.  I just need to be a little more clear.  ;-)
I'm working on it.

michael

> {Original Message removed}

2003\02\20@180314 by Olin Lathrop

face picon face
> I've been following this with some interest also having had a bit to do
> with TDRs (&OTDRs) in a past employment..

I've been following it too, but I've kept my mouth shut so far because I
don't have any particular expertise in this area.

However, I just got this idea that doesn't require a fast micro nor any
comparator at all.  There may be some problems with this, but here goes:

The other end of the cable must be open (cable DC resistance is infinite),
and that the cable impedence is known.  Pull one lead of the cable to as
high a voltage as the cable and your analog electronics can stand via a
high value resistor, like 1Mohm.  The other cable lead is tied to ground.
A high speed opamp is set up as an integrator of the cable voltage.  Hold
the integrator in reset (FET clamp probably) and wait for everything to
stabalize.  Then as simultaneously as possible release the integrator and
switch in a resistor accross the cable that matches its characteristic
impedence.  Read the integrator value when you get around to it.  Its
voltage will be directly proportional to cable length.

THEORY OF OPERATION: Assuming a perfect impedence match with the resistor
that is switched in, the cable voltage will drop half way to ground before
the reflection from the end comes back.  Once the reflection comes back,
the voltage should go to 0 and stay there indefinitely because this is the
steady state condition.  The length of time at the 1/2 voltage is the
cable propagation time to the end and back.  The value on the integrator
will be proportional to this time, since the voltage is fixed.  Once
steady state is reached, the input to the integrator is 0 and it will
therefore hold its voltage.  Of course there will be leakage and offset
errors, so the integrator voltage will drift over time, but this is much
slower response than the cable.  You therefore should read the integrator
as quickly as possible after steady state, but a few microseconds more
shouldn't make any difference.  It should be fine to initiate the pulse
from a PIC output, then wait the A/D acquisition time plus a few extra
microseconds, then do a conversion.

Of course you won't get the nice perfect 1/2 voltage pulse followed by
steady 0, but integrating whatever you do get will probably still work as
long as the resistor matches the cable impedence reasonably well.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestKILLspamspam@spam@mitvma.mit.edu>

2003\02\20@180319 by Dennis J. Murray

flavicon
face
Good idea, Wagner.  Sounds like we're making this WAAAAY too complicated by
going TDR - or even a PIC!!!

Reminds me of my college days in EE class.  We measured lengths of wire runs
by shorting the two wires on the opposite end and using the unknown length
as one leg of a resistance bridge.  Very, very simple math.  I'm sure most
introductory EE textbooks would have the circuit if you really need it.  Or
email me off-line & I'll elaborate (rather than take up everyone's time up
on non-PIC related issues).


{Original Message removed}

2003\02\20@190929 by Mike Singer

picon face
Olin Lathrop wrote:
...
> I've been following it too, but I've kept my mouth shut so
> far because I don't have any particular expertise in this area.

Better get some particular expertise in this area... wait, I suspect you are just joking: almost all you've written is a nonsense beginning with "cable DC resistance is infinite" at "as high voltage as the cable and your analog electronics can stand" and so on.

Cable DC resistance could vary tremendously, I think.

Mike.



> However, I just got this idea that doesn't require a fast micro nor
any
> comparator at all.  There may be some problems with this, but here
goes:
>
> The other end of the cable must be open (cable DC resistance is
infinite),
> and that the cable impedence is known.  Pull one lead of the cable to
as
> high a voltage as the cable and your analog electronics can stand via
a
> high value resistor, like 1Mohm.  The other cable lead is tied to
ground.
> A high speed opamp is set up as an integrator of the cable voltage.
Hold
> the integrator in reset (FET clamp probably) and wait for everything
to
> stabalize.  Then as simultaneously as possible release the integrator
and
> switch in a resistor accross the cable that matches its characteristic
> impedence.  Read the integrator value when you get around to it.  Its
> voltage will be directly proportional to cable length.
>
> THEORY OF OPERATION: Assuming a perfect impedence match with the
> resistor
> that is switched in, the cable voltage will drop half way to ground
before
> the reflection from the end comes back.  Once the reflection comes
back,
> the voltage should go to 0 and stay there indefinitely because this is
the
> steady state condition.  The length of time at the 1/2 voltage is the
> cable propagation time to the end and back.  The value on the
integrator
> will be proportional to this time, since the voltage is fixed.  Once
> steady state is reached, the input to the integrator is 0 and it will
> therefore hold its voltage.  Of course there will be leakage and
offset
> errors, so the integrator voltage will drift over time, but this is
much
> slower response than the cable.  You therefore should read the
integrator
> as quickly as possible after steady state, but a few microseconds more
> shouldn't make any difference.  It should be fine to initiate the
pulse
> from a PIC output, then wait the A/D acquisition time plus a few extra
> microseconds, then do a conversion.
>
> Of course you won't get the nice perfect 1/2 voltage pulse followed by
> steady 0, but integrating whatever you do get will probably still work
as
> long as the resistor matches the cable impedence reasonably well.
>
--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestspamBeGonespam.....mitvma.mit.edu>

2003\02\20@191845 by Dale Botkin

flavicon
face
On Fri, 21 Feb 2003, Mike Singer wrote:

> Cable DC resistance could vary tremendously, I think.

I believe he meant that the cable loop resistance with the distant end
open is infinite.  Which would be true.

--
http://www.piclist.com hint: To leave the PICList
KILLspampiclist-unsubscribe-requestspam.....mitvma.mit.edu>

2003\02\20@200134 by Mike Singer

picon face
Dale Botkin wrote:
> > Cable DC resistance could vary tremendously, I think.
>
> I believe he meant that the cable loop resistance with
>  the distant end open is infinite.  Which would be true.

I haven't specifications for cables isolation right before
me. Let's ask RF guys, what is the resistance of an
isolation of a long old cable feeding, say, antenna under
rain, under sun?

  Mike.

--
http://www.piclist.com hint: To leave the PICList
spam_OUTpiclist-unsubscribe-requestspamKILLspammitvma.mit.edu>

2003\02\20@225933 by Dale Botkin

flavicon
face
On Fri, 21 Feb 2003, Mike Singer wrote:

> Dale Botkin wrote:
> > > Cable DC resistance could vary tremendously, I think.
> >
> > I believe he meant that the cable loop resistance with
> >  the distant end open is infinite.  Which would be true.
>
> I haven't specifications for cables isolation right before
> me. Let's ask RF guys, what is the resistance of an
> isolation of a long old cable feeding, say, antenna under
> rain, under sun?

Unless the cable is simply defective, the DC resistance would still be,
for practical purposes, infinite.  I've seen old coax and twisted pair
with way screwy impedance caused by various factors, but unless it's
physically damaged and shorted (which, of course, a TDR would show) it's
an open circuit.

Dale

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestRemoveMEspamEraseMEmitvma.mit.edu>

2003\02\21@031542 by Mike Singer

picon face
Dale Botkin wrote:
> > I haven't specifications for cables isolation right before
> > me. Let's ask RF guys, what is the resistance of an
> > isolation of a long old cable feeding, say, antenna under
> > rain, under sun?
>
> Unless the cable is simply defective, the DC resistance
>  would still be, for practical purposes, infinite.  I've seen
> old coax and twisted pair with way screwy impedance
> caused by various factors, but unless it's physically
> damaged and shorted (which, of course, a TDR would
> show) it's an open circuit.

Dennis J. Murray wrote:
> I'll tell you guys - I've been following this link since it's
> inception and you REALLY have my curiosity piqued!!
> I've used TDRs quite a bit in a past life and I DEPENDED
> on the visual representation on the screen to interpret
> what is really on the line!  I don't think I EVER had a clean
> line that didn't require some interpretation - was that
> hiccup a sharp bend? water in the line? an unauthorized
> tap?  A long-forgotten splice?  etc.

  Dale,
Dennis mentioned "water in the line". I'm not sure it will
be OK to Olin's measurement idea:
"Pull one lead of the cable to as high a voltage as the
cable and your analog electronics can stand via a high
value resistor, like 1Mohm."
Though for usual "practical purposes", you mentioned,
some "water in the line" would be quite acceptable.

  Mike.

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2003\02\21@074307 by Olin Lathrop

face picon face
> Better get some particular expertise in this area... wait,
> I suspect you are just joking: almost all you've written
> is a nonsense beginning with "cable DC resistance is
> infinite" at "as high voltage as the cable and your analog
> electronics can stand" and so on.
>
> Cable DC resistance could vary tremendously, I think.

Not when the other end is open, as I specified.

The reason for the high voltage (probably around 20V in practice) is to
increase the signal to noise ratio.  There will be some fixed noise in the
circuit, and the opamp will have an offset error.

Calling everything nonsense without any arguments to back it up is a waste
of time.  What specifically do you believe to be incorrect?


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2003\02\21@074603 by Olin Lathrop

face picon face
> I haven't specifications for cables isolation right before
> me. Let's ask RF guys, what is the resistance of an
> isolation of a long old cable feeding, say, antenna under
> rain, under sun?

I guess you're saying the resistance wouldn't be "infinite" for the
purpose due to leakage currents thru dirt, moisture, etc?  You're right,
this method doesn't work when there is significant leakage.  It could be
corrected for by measuring the steady state voltage when pulled up to the
+ supply via the high value resistor.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2003\02\21@203611 by j galt

picon face
>Olin Lathrop wrote;
>
>The reason for the high voltage (probably around 20V in practice)
>is to increase the signal to noise ratio.  There will be some fixed noise
>in the circuit, and the opamp will have an offset error.
>

My feeling is that this method may be prone to inaccuracy since the
exponential decay will approach zero asymptotically. It's worth trying
though. The idea of measuring the resistance of the wire has a problem if
connectors are already installed on the cable, since the wire-to-connector
junction may vary in resistance.



_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE*
http://join.msn.com/?page=features/virus

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2003\02\22@074743 by Peter L. Peres

picon face
On Fri, 21 Feb 2003, j galt wrote:

*>though. The idea of measuring the resistance of the wire has a problem if
*>connectors are already installed on the cable, since the wire-to-connector
*>junction may vary in resistance.

Measuring cable lengths by resistance is standard in telephone and
electrical installations (during refits etc). Same for measuring remaining
cable length on cable drums etc. Expected resistances are in the low tens
of ohms for residential cable lengths. F.ex. RG59U 100m is 22 ohms for
center conductor and much lower for the shield. A twisted pair of the same
length has about 60 ohms total (far end shorted). Telephone cable is
measured in the same way. This is a standard technique to the point where
specialised measuring shunts date back to the late 1800's for telegraph
cable work. A properly fitted connector will not alter the measured
resistance enough to matter (or else the connector is faulty).

The TDR is the way to check the cable for problems and for spec meeting. A
form of TDR I have no seen mentioned here uses a repetitive pulse
generator and a resistor to inject them into the line and a spectrum
analyzer at the same end as the injector. The spectrum analyzer will show
problem resonances which correspond to disturbances on the cable and can
be converted to distances on the cable. The cable can be matched or not.
Tuning the pulse width can be used to emphasize cartain cable problems
(like weak reflexions etc). A highpass filter may be necessary at the
input of the specan.

Peter

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

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