Cabletester using ADS1115 and a TDR

Hi Lads,

Im building a cabeltester for RG58 cable, using a TDR (74AC14) and for making the Threshold im using the ADS1115.

The Idea is to messure the lenght of a cable by messuring the reflection of the square wave.

my issue is the code, and the knowlegde, if the Arduino isn't powerful enough to detect the reflection.

im putting the upper and lower threshold in the area where the reflected signal is.

Then theoretical i have the fist pulsetime and the second pulsetime, minus second from the first i have "delta" t. lets say 120ns devided by two = 60ns (a cable length) times 0.2 = 12m cable.

if anyone have solved this, please let me know :slight_smile: Attaching my first version of the code.

Kode_for_Detector_V_1.ino (1.72 KB)

You need some extra hardware designing and building in order to make a Time Domain Reflectometer, you can't just connect a 74AC14 to an Arduino and expect to get meaningful results.

The reason for this is that you need to be able to measure time in nanoseconds (=10-9s), whereas an Arduino can only directly measure time in microseconds (=10-6s).

One clock pulse of a 16MHz Arduino is 62.5ns, a pulse travels a long way down a cable in that time. (around 12m, ie 6m there and 6m back, allowing for the velocity factor of the cable), so you can only directly measure cable lengths in multiples of that distance.

Hi John.

i made the TDR with all components, so its generates 450HZ i alså tried with 50KHz to get results.

Im guessing that the time between the pulse and reflection is so short, that its impossible to use a Arduino.

my test shows also that as shorter the cable is, as more difficult it is to messure (it's logic)

As i understand, i would say your calculation that you are writing is incorrect. The time between the pulse will show 120ns (24m = 60ns forward, 60ns back) so the code for that part will be ((PulseInterval/2)*0.2) = 12m

Im just not sure if my code is correct, but i belive my setup is correct

Perhaps you can measure the phase shift with an AND of the outgoing and reflected signal. A phase shift of 0 or multiple of 360° will produce the highest average voltage (duty cycle, 50% for a rectangle), 180° will result in 0V. All you have to do is adding a low pass filter to the output of the AND gate, then measure the voltage using analogRead().

But I think that a pulse on a cable does not travel at the speed of light, instead it will be slowed down by the LC cable characteristic. The phase shift also depends on the cable termination, open or shorted.

DrDiettrich:
But I think that a pulse on a cable does not travel at the speed of light...

True.
VP (Velocity Propagation) of RG-58 is 66%.
I think most coax cables are around that mark.
There will ofcourse only be a reflection if the other end is not properly terminated (52ohm).
Leo..

exactly, the signal is traveling with 2/3 of the speed of light in a cable.

And yes, it should not be terminated to get the reflection, thats the idea of the project, to find the distance to the broken part :slight_smile:

DrDiettrich, the way you explain it, i understand that it would tell me if the cable is broken but not the distance? otherwise I can't see how it can tell me the distance? Do you have a link or a drawing for that idear?

thx

If you overlay an original and a reflected pulse, they overlap perfectly at zero travel time, and the longer the travel time, the less overlap. That overlap can be determined by a simple logic AND (or OR...) gate and the width of that pulse gives the time to the line break (or short). With a continuous square wave signal you get a PWM (duty cycle) representation of the distance.

I built a TDR using a ACAM GP22 for measuring Triax camera cables and the results (see #87 of thread) were very good.

DrDiettrich, Is it possible for you to draw that solution?

This are my suggestions for the cable length and break detection:

CblLen.JPG
On top is the cable length tester, as described before. The cable should e.g. be folded, so that the generator signal is not delayed at the AND gate input.

The break detector (bottom) in fact is more complicated. The opamp produces the difference between the original and the measured signal (sum of input and reflection), i.e. the reflection only, which then is ANDed with the generator signal as before. An opamp may be too slow, so that the overlap of both the signal and reflection should be conditioned differently, e.g. by a level comparator. For more details a real curve diagram were helpful.

CblLen.JPG

DrDiettrich, i have build the circuit and sending the signal in and mounted the "broken" cable. what i am measuring at the test pin after the AND, is close to a sawtooth wave without any reflection. what did i do wrong? or did i misunderstood something here?

attached the pic of the messureing

image1 (3).jpg

How skilled are you in using scopes? Did you already look at the calibration signal of your scope?

An AND gate outputs a sqare wave, the sawtooth most probably comes from a bad test facility.

You don't see reflections after the AND gate, only the overlap of the injected and reflected signal. At the frequency of 500Hz the reflection won't make a noticeable difference, you'll have to use a much higher frequency (Mhz). If you have a dual channel scope, compare the inputs of the gate.

If the signal is after the low pass filter, it has a usual shape and indicates a much too low RC time constant - the desired signal should be as flat as possible.