How to mesure utp cable lenght

Hi everyone, I'm trying to make a LAN tester using arduino, however I want the device to be able to mesure the cable lenght too, besides of being able to check the wiring status. I'm completely new using arduino, and I don't know if is posible for arduino to be able to mesure cable lenght (by pulses or something). I did some research and I found the technique called time domain reflectometry, nevertheless, I don't know anything about it. Can somebody give me some help in how to start ? what do I need? I'm completely lost.

Thanks

Search the site for TDR but you will need an oscilloscope.

1 Like

Hi, thank you for answering me. I don't have an oscilloscope, can you explain me why do I need an oscilloscope ? is it a hard task to do by arduino itself ? as I said I don't know anything about arduino and I want to know and learn about its limits.

A TDR can be used to measure cable length, the slowness and hardware of an Arduino cannot do a similar measurement.


You might be able to make a milli/micro ohmmeter to measure the return cable resistance (hence length) but this has its limitations on it too.

1 Like

To further complicate the measurement problem, you must terminate the two wires with a non-inductive resistor with a value equal to the impedance of the cable. OR you must have the two ends of the cable not connected. Either way will give you a reflection of the pulse signal you send down the cable. The time between the initial pulse and the reflected pulse will be related to twice the cable length.

1 Like

I disagree with you there, Paul_KD7HB. You terminate the end of a transmission line with a resistor equal to the characteristic impedance to prevent reflections.

You need the end of the cable to be open circuit or short circuited to get good reflections. (There is a 180 degrees phase shift for the short circuit condition).

2 Likes

The reason that it is impractical to use an Arduino is the speed that that a pulse travels along the cable is so high, and the Arduino is relatively slow.

The speed of the pulse down a cable is equal to the speed of light times the velocity factor of the cable.
Typically this is going to be around 2x10^8 metres per second.

So in one microsecond the pulse will go approximately 200m.

As the clock frequency of a typical Arduino is 16MHz, you can only measure time in units of 1/16 microseconds (=62.5ns). During this time the pulse has gone 12.5m.

So even if you can accurately determine when the reflection returns to your end of the cable, then with the resolution of the timing you can only measure the cable length in units of 6.25m.

1 Like

In the old days of telegraphs they would use a resistance measurement if the loop resistance of the cable is known - this is measured by shorting the ends of a known length and measuring the resistance. To measure an unknown length you short at the far end and measure the resistance at the near end. The measurement isn't straightforward as the resistance will be quite low - just a few ohms max probably. But basically you feed a known current in and measure the voltage, you would probably need an op=amp to boost the voltage to a suitable value and apply an offset to get it in range of the Arduino analogue input.

1 Like

Yes, you are correct. The resistor will let you see if there are any breaks in the wires or sharp bends, or other discontinuities. If no reflections, remove the resistor and time the pulse and reflection to be able to compute the length.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.