Wednesday, August 8, 2012

A Poor Mans Introduction To TDR


 I was browsing the Amateur Radio subreddit on late last night when I came upon a post about someone trying to build "A Poor Mans TDR" using an Arduino. After reading his blog and some of the comments in the thread, it occurred to me that perhaps a small introduction to TDR or Time-Domain Reflectometry would be in order. So without further ado ... Here it is!

So What is a TDR?

Well, simply put, TDR is the study of sending a signal out and examining the reflections that may occur. In another sense it is exactly like RADAR but usually along wires/cables/coax instead of in the air. After all, RADAR works by sending out a short pulse into the air, and measuring the reflections received back. The longer it takes to receive a reflection, the further away an object is, and the relative strength of the reflection can reveal details about the object the signal is reflecting off of (e.g. a stealth fighter will reflect very very little, while a 747 reflects alot).

Ideally we want to send out a very short pulse relative to the length of the system so we can separate the forward signal from the reflection. A good example from the Wikipedia article on TDR is:


It's easy to see the original input pulse and the reflection in the above picture. However, this is an article on a Poor Mans TDR, and we are dealing with systems where the length of the cables attached may be on the order of 6-50 feet. So lets do a little calculation on how quick a pulse must be in order to get a measurement like the one above.

Let's say we have 33ft (~10m) of RG58/U coax to test on. This coax has a velocity factor of 0.66 (The speed of light in the coax is 0.66c or around 2e8 m/s). With 10m of coax, the time it takes to travel to the end and back (a 20m trip) would be 0.0000001s or 100ns. Ideally we want our input signal to be very small in relation to the length of the system, perhaps 1/10th or less. So we would need a pulse on the order of 10ns or less.

That's not happening anytime soon with an Arduino or any other simple pulsing circuit.

But that's OK, we can still use long pulses. We will just need to understand a few more things.

A Simple TDR Setup

Shown below is a very simple TDR Setup. I have a simple pulsing circuit (Square wave generator at about 500Hz or 1ms high time), an 100MHz Oscilloscope, and about 75ft of Commscope WBC-400 (It's what I had laying around ... equivalent of Times LMR-400).

There is nothing special about the pulsing circuit here. It's just a few cascading flip-flops connected to a 50-Ohm resistor to generate the square wave. Functionally it should be almost the same as the Arduino circuit as one might use, but doesn't get loaded as easily. The pulser is connected to a short length of cable, then to a T-Junction attached to the O-Scope and then on to the length of WBC-400. On the end of the coax I have a small adapter to attach various standard loads (Open, Short, 50-Ohm, 100-Ohm).

So Lets See What Happens

First we start with just an open on end of the coax....

 Looks like a good square wave to me! Now lets try a 50-Ohm load on the end of the coax.

Hrmm, the signal level dropped off by about half, that's a bit odd. Lets try the short now.

Yup ... Looks like a short to me ... Reading about 0v all the way around.

So what do these results mean? Well remember our first calculation. For 10m of coax the round trip time was about 100ns, we have around 23m of coax with a velocity factor of 0.85 which comes up to a round trip time of about 180.4ns ... and considering the pulse is high for about 1ms .... the reflections have come back to the scope almost immediately. So lets start zooming in on the rise of the signal.

Starting out with the 50-Ohm load on the end of the coax and turning the time-base down from 400us to 100ns.

Here we can see clearly the rise of the signal and as one would expect, no reflections to be found. So why if the signal generator is 5v, are we only reading about 2.5v? Well it's simple circuit theory. Our signal generator has a 50-Ohm resistor in series with it to provide the appropriate impedance. We have then attached another 50-Ohm resistor (Albeit on the end of a long coax) to that circuit and that is what we are measuring across. So we created a voltage divider! Of course we should be reading 2.5v!

Ok, now lets try leaving the end of that coax open and see what happens.

Aha!! We can now clearly see what is going on. At the beginning, the signal clearly rises to the normal 2.5v level and stays there for a bit. That signal travels down the coax, hits the open, and reflects back. After a certain amount of time (related to the length of the coax) it hits the O-Scope. Being an Open, the reflection is a +1, so once it returns to the O-Scope it adds back to the original signal. Not being a perfect world, we can still see further on more reflections most likely caused by small mismatches in connectors and loads.

So if an open is a +1 reflection, a short must be a -1 reflection. It makes sense that the reflection from a short should cancel out the original signal. But it has to travel down the coax and back before it can cancel it. So lets see the short.

Ok, it seems my short wasn't all that good, but that's ok. This is about ideas, not about perfect execution. We do see the reflection canceling out the original signal after the same length of time (and then some). If we zoom out a level we can see eventually all the other reflections settle down back to 0v.

That looks a bit better.

Moving on, what can we learn from all this?

What We Can Learn From All This


Seriously though, we can measure lots of things this way. Using my scope and the open on the end of the coax, I can measure the length of time it took for the reflection to occur.

According to the scope it took 186ns for the reflection to return back to the scope. Early I had estimated about 180ns for this round trip. To be fair, I don't know the actual precise length of the coax, nor is the velocity factor I used exact. But we can take all this data and work it for any way we want.

Lets assume we know it's exactly 75ft long, the round trip took 186ns, and we want to determine the velocity factor of the cable.

Round trip, the cable looks like 150ft or 45.72m. So we divide the length by the time and get
245806452 m/s ... Divide this by the speed of light  (2.45806452e8/3e8) and get approx 0.82

Which is fairly close to the manufacturer specs. I probably could have been a bit more accurate with my time measurement, but again, this is just to show the idea.

Equally, we may know the velocity factor but wish to know the length of the line. Here we will assume the round trip took 186ns and the vf is 0.85.

With this velocity factor, the speed of light is 2.55e8 m/s, now we simply multiply that by the time we measured and get ...  47.43m. But that is round trip so we divide by 2 and get 23.715m or 77.8ft.

This last calculation is one of the more important ones in TDR. Imagine if you will that you are cable company and have a 20 mile run of coax and somewhere along that coax is a break. Using the same techniques, one could find approximately where the break is. The same goes for network cabling, fiber optic runs, etc.

Ok, thats great and everything, but is there anything else I can measure?

Is there anything else I can measure?

Sure ... Lets take a look at two more measurements. The first is a 100-Ohm load attached to the end of the coax.

Here we can see the reflection is larger than the 50-Ohm line (Indicating a reflection from a load higher than 50-Ohm) but not as large as a total open (And what is an open if not a Infinite Ohm load). So as the load increases towards infinity, the reflection will grow closer and closer to where the open would be. Likewise if the load was smaller than 50-Ohms, the reflection would dip down below the 50-Ohm line. And as the load approaches 0-Ohms (Again, that would be a short), it should drop down to 0.

So by using some known points on the scope, we can try to estimate the value of the load. This is, however, only if the load is purely resistive. Why? Because we are injecting a square wave, which has many frequency components. If we try to measure something with a complex impedance you might see something like ...

Now what does this tell you? Well we can see the original 75 feet of coax, then a slightly shorter second piece of coax that has a very slightly higher impedance, then ... well lots of stuff.

Actually that's me connecting the system to my 40m doublet. Make of that what you will.

See you down the log

Note: You don't need a fancy new scope to do any of this. I just used that one because I could save the screen shots to share with all of you!


  1. Thanks for the very good explanation. Clearly I need to go back to the drawing board, since the shortest delay you can get out of an Arduino is 62.5 nS, much longer than the pulse-length you recommend right at the beginning of the article!

    1. While having a short pulse and a long delay is great, it's certainly not necessary. The point was kinda to show that even with something slow you can still make the measurements quite accurately.


  2. The rest of the film juxtaposes different atmospheres suited to the different levels of reality which are presented.
    This overt identification with Laura is reinforced throughout the film with its focus on walking.
    Take a look: Reflectometry

  3. Thank you for sharing such great information.
    It is informative, can you help me in finding out more detail on
    about tdr.