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