Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Ohms/distance cable length project

Status
Not open for further replies.

KhaledOsmani

Full Member level 6
Joined
May 4, 2014
Messages
384
Helped
1
Reputation
2
Reaction score
1
Trophy points
18
Activity points
3,933
Hello

I hope to built a circuit based on PIC18F4520 that executes the following:

Whenever connected a telephone twisted pair line of 0.4mm thickness (only), an LCD tells its distance after ohm to length conversion.

The idea principle is based on Ohm's law.

I've seen similar projects, using a voltage divider, whereas the line can be considered as pull down to ground resistance, then Vcc is sensed via PORTA, and after math conversion one can know the value of the resistance (in this case, a copper line), therefore can know its length. What I don't like in this project is one must connect the two terminals of the line, to be able to know its resistance hence length. The problem is that there are cases where one cannot reach the other terminal of the line (maybe it is underground buried somewhere).

What I want to make is to design a circuit, where one can connect twisted pair two terminals to PIC, then length is shown on LCD. It is similar to the functioning of 3M Dynatel 965 in its open circuit function (tells where the line is open).

Any thoughts please?

Thanks in advance
 

Hi,

I´m pretty sure, that the §M tool doesn´t calculate the length with Ohm´s law.
I rather think it uses signal runtime of reflected signal method to determine the cable length.

Klaus
 
Hi Klaus

I didn't say want to make it function just like the 3M does.
I want to achieve the same results.

Any suggestions?

Thank you
 

If it uses only one end of a line then it probably works using TDR as KlausST suggests.

You might also be interested in this too.
 
Hi ads

So to know length using only one side of the cable, is only possible using TDR. Any suggestions to the previous method, where connecting two sides of the line to know its length and maybe some adjustment to it?

Thanks
 

I didn't say want to make it function just like the 3M does.
I want to achieve the same results.

Any suggestions?

Well you're not going to be able to directly measure the resistance if you can't access the other end of the cable, so your choice is limited to reflectometry. Even then you'll need to know the inductance and capacitance of the cable pretty accurately to get a good length measurement as the ) is dependent on them.

- - - Updated - - -

To get something accurate with a resistance measurement you might need to resort to some sort of wheatstone bridge topology, even then you might get inaccurate results unless you have really good connections to the tester as small variations in the resistance will result in gross changes in the length (wire resistance is in the order of hundreds of micro-ohms per ft.)
 

Is reflectometry achievable with PIC?

For the other choice, are you saying I must make a voltage divider test to know R, and two other tests remains to get L and C?

Thanks
 

Is reflectometry achievable with PIC?
no clue if it's possible with a PIC, I'm a hardware guy.

For the other choice, are you saying I must make a voltage divider test to know R, and two other tests remains to get L and C?
not sure you need the L and C if you are just getting an accurate resistance as the currents through a wheatstone bridge aren't supposed to be varying.
 

TDR should be possible with a PIC although I've never tried it.
I would suggest a step generator that triggers the PIC and sends the signal simultaneously and using the fastest counting speed to time the relection. So the PIC is used as a period counter to measure the length. It can then do the calculations and return a meaningful length on a display or serial link.

Brian.
 
Hi,

I saw somewhere that a device measures length with capacitance in nF for phone lines (pairs), the person who showed me it in action said it's a good approximate measurement from client's home to the exchange, besides fault-finding, not sure if that's any use to you.
 
That can be very unreliable, the capacitance depends on other factors and whether there are extensions or spurs off the line. It can also be influenced by other telecoms equipment sharing the line and things like ADSL filters. TDR is more predictable and, if enough care is taken, tell you not only the line length but also the distance to other devices or connections along the way.

Brian.
 
  • Like
Reactions: d123

    d123

    Points: 2
    Helpful Answer Positive Rating
I have not done it with a PIC, but have done it with HCS08 family microcontrollers. To do this with much accuracy, you will probably want to use a part with at least (2) timer input capture channels, with a timer clock running at at least 8MHz. If you add in fast external comparator with a D/A conencted to one of its inputs and the cable connected to the other, then you can adjust the trip point and be better able to select/detect the intermediate levels of the reflected waveform. As has been indicated, you can assume a certain velocity of propagation for the wire, or allow the user to enter it from the cable manufacturers data, and have the calculated length use the value to display the result..

If you want to use loop resistance and either access the other end of the wire or have an ability to tie the far end of the wire pair together, this method can work but you will ideally need to make a constant current source and use 3 terminal or 4 terminal wire resistance measurement techniques. Depending on the A/D resolution and scaling, you may need to use a current source of significant output. I would not recommend trying to use anything below 20mA.
 

Hi,

assuming a cable signal velocity of 80% of c then the resolution with an 8 MHz counter is about 15m.

But I´d say this is more reliable than capacitive or ohmic measurement method.

Klaus
 

The specified PIC18F4520 can run with a 16-bit counter running at 10MHz (= 12m resolution) or with an external clock source at the timer input, up to about 50MHz (=2.4m resolution). Using the standard 10MHz clock, the longest length measurable (if actually possible) is around 1Km.

Brian.
 
Generally, you do want to use a clock rate of higher frequency to achieve your best resolution. If you can efficiently do so in the microcontroller of your choice and code efficiently, one can also cascade timers to be able to work with longer lengths (either gating the start of the second timer or using the rollover interrupt to start a 2nd timer). Interrupt latency of the system can introduce error which may or may not be acceptable in the rollover method. You also want to do a series of pulses/measurements, collect the data and average or filter them and use the filtered result as your estimated length because a single measurement can still have alot of noise/error.

Depending upon your circuit sophistication and coding ability, you can detect shorts or impedance changes along the wire as well.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top