# How to estimate characteristic impedance for a random cable and tolerance of the termination resistor?

When we have a source with 50 Ohm output impedance we use a coaxial cable with a 50 Ohm characteristic impedance. And if we don’t know the output impedance then we use a 50 Ohm termination resistor at the receiver end. These are the remedy for reflection issue for the high frequency component of the transmitted signal.

But in practice we don’t always use 50 Ohm coax but a randomly picked cable or pair of twisted wires. Imagine we need to send a differential signal such as with a RS422/485 interface. Now what I read is that the termination resistor at the receiver end must be equal to the cable’s characteristic impedance.

Now the issue is what if we don’t know the characteristic impedance of the cable or the twisted pair we run how can we estimate it? Is there an estimate if we know the AWG and length for instance?

And secondly, let us now assume we figured out the cable’s characteristic impedance as 120 Ohm, does the termination resistor need to be exactly 120 Ohm in practice or a 150 Ohm would suffice?(Assuming knowing at this step the characteristic impedance and the pulse transmission frequency)

(I know theres a huge theory behind the topic but I was wondering whether there are some methods when it comes to practice)

• I wish. I don't think there is a way since there's a lot more factors involved than just the wire AWG. I think you just have to have a machine that can measure it. Cables also have a tolerance for the characteristic impedance which is pretty loose. I think I heard around 10% somewhere, so using a resistor that is off by 25% might be too much if the cable ends up on the far side of the tolerance. Also, transmission frequency isn't what you need to be worried about. It's rise and fall time which could be very high even for low frequency transmissions. Oct 29 '19 at 18:45
• Although you could get a LONG piece of wire, and blast a very fast (relative to the length of the wire) square pulse down into it and measure what it looks like at the other end. Then adjust the parallel termination resistor at the far end until there is no overshoot or undershoot, but your oscilloscope's input impedance at the far end will affect things but it should be pretty high compared to the wire's characteristic impedance. Oct 29 '19 at 18:53
• How about can we at least estimate or know as a standard after how long length one needs the termination resistor? Is that about estimating the wave length due to rising falling edge frequencies? Or is there a standard length it is required? Oct 29 '19 at 18:55
• Length has next to nothing to do with the characteristic impedance of a cable. The impedance comes from the diameter of the wire, the thickness of the dielectric, and the electrical properties of the dielctric (the insulating material.)
– JRE
Oct 29 '19 at 18:56
• Length doesn't have anything to do with characteristic impedance, but the consequences of impedance mismatch (reflections, ringing) are worse as your wire length gets longer relative to the transition time. You basically don't have to worry about anything if the wire is short enough, the speed of propagation is fast enough, and the transition time is slow enough, that you can assume both ends of the wire are always at the same voltage. When you can't assume this anymore is when you need to start worrying. Oct 29 '19 at 18:59

It seems there's a fairly simple way to get a good approximation of the impedance of a random piece of cable.

It requires a fast oscilloscope, a pulse generator with a fast rising edge, and a potentiometer with a range that includes the cable's impedance (cable impedance is usually less than 500 ohms.) The cable you want to test must also be long enough that your scope can detect the reflection. The faster the scope, and the faster the rising edge of the signal, the shorter your test cable can be.

Summary of the method:

1. Estimate the reflection time. That's approximately $$\ \frac { 2\times l} {0.66 \times c}\$$ where $$\c\$$ is the speed of light in meters (around 300 meters per microsecond) and $$\l\$$ is the length in meters.
2. Set the oscilloscope to a sampling rate and sample depth adequate to capture at least the estimated reflection time.
3. Make sure that the pulses from the generator are spaced farther apart than the reflection time.
4. Attach the signal generator to the scope input, and from there to the cable you are testing. The cable to test and the cable to the signal generator join in a "T" at the oscilloscope input. Make sure the scope is set to high impedance (1M) if it has a low impedance mode.
5. Start the generator, and check that you are getting a reflection (with an ended open cable, it should be a somewhat smeared version of the generator pulse.)
6. Adjust the scope to trigger on the signal, not the reflection.
7. Attach a potentiometer across the open end of the cable. Preferably one somewhat close to a reasonable estimate of the cable impedance (couple of hundred ohms, but definitely not 10k.)
8. Adjust the potentiometer to minimize the reflection.
9. Disconnect the potentiometer from the cable and measure the value.

The measured value won't be extremely precise, but then impedance matching doesn't require matching down to a fraction of an ohm (or even single digit ohms.)

To take your example of terminating a 120 ohm cable with a 150 resistor, the reflection would be about 19dB weaker than the signal. So the reflection is a bit more than 0.01 times the driving signal. Makes about 0.05 volts of reflection for a drive signal of 5V. Try the suggested method for measuring the reflection, but use different fixed resistors and see how big (or small) the reflection is.

I've not used this method myself, so I can't tell you how difficult it is to carry out or if there are any pitfalls to watch out for.

Maybe you could give it a try and write up your experience with it as a more detailed version of this answer.

I was going to let this go, but I ended up having to go to my work room to fix a problem with my mail server. While waiting for some (big) files to copy, I went ahead and tried out the impedance measurement trick.

It turns out to be pretty simple, and can be done even with an old, slow analog oscilloscope. My scope is too slow to measure cable lengths that way, but it can surely show you if your cable is matched.

You can use pretty much any oscilloscope and a simple pulse generator. The slower the scope, though, the longer your test cable must be to make a noticable reflection. The pictures below were all made using a 5 meter cable. A two meter cable still shows reflections, but they aren't as distinct. Anything shorter than 2 meters will require a faster scope than I am using. As the cables get longer, you will see the reflections actually move away from the rising edge of the signal and become separate pulses.

Simplifed steps:

1. Program an Arduino Nano to generate a 1MHz pulse, with the shortest possible duty cycle. That's about 12.5% using the TimerOne Library.
2. Set the scope so that you can see a 1 MHz signal - mine goes up to 0.5 microseconds per division.
3. Connect the Nano output to your scope input using a T.
4. Observe the waveform - it should be a narrow square wave with somewhat rounded shoulders.
5. Connect the cable to test to the other end of the T.
6. You'll see a horribly distorted square wave.
7. Attach a potentiometer to the open end of the cable.
8. Tune the potentiometer until you get the nice, clean square wave back, but with maximum peak voltage.
9. Remove the potentiometer and measure the resistance.

It looks like this:

Setup:

The results look like this:

No cable:

Cable with open end:

If my scope were ten times faster (50 nanoseconds per division instead of 500) then you could just about measure the length of the cable. You don't need to measure the cable length to see the distortion, though. That slight "dog leg" on the rising edge of each pulse is the length of the cable - rather, twice the length. Out and back.

Properly terminated cable:

I used a proper terminator, but the effect would be the same if you attach a small potentiometer directly to the end of the cable and tune it for best match. As mentioned above, you want to make it clean but not unduly squashed. If you make the resistance too low, the level will drop and get distorted again. You want the cleanest and highest signal you can get.

Notice that the voltage is higher without the attached test cable than with the properly terminated cable. The Nano has to drive a 50 ohm load when the terminator is present. Its outputs appear to have a just a bit less than 50 ohms impedance, so the level drops with the terminator present - the output impedance and the terminator form a voltage divider. From the voltages measured, I'd estimate the output impedance of the Nano at around 30 ohms.

So, you can measure the impedance of a cable with fairly primitive tools and still get usable results.

You can also get a direct comparison of just how bad a mismatch is. Measure the cable impedance, then intentionally terminate it with a resistor that is slightly off. You can then see just how horrible (or not) it is.

Since the code is pretty short, here's the Nano program to generate the pulses:

#include <TimerOne.h>

#define SIGNAL_OUT_PIN 9
#define DUTYCYCLE_ON 128 /// 128/1024 gives a 12.5% duty cycle.  The Nano won't produce a shorter wave.
#define PERIOD 1 //1 microsecond period for 1 MHz

void setup() {
pinMode(SIGNAL_OUT_PIN, OUTPUT);
Timer1.initialize(1);
Timer1.pwm(SIGNAL_OUT_PIN,DUTYCYCLE_ON,PERIOD);
}

void loop() {

}

• Thanks for this answer with details and examples. In your example why do you need to set such a short on time(duty cycle)? Is that because you dont want to source much current? The Arduino 5V digital output pin as far as I know can source max 40mA. And if you say the output impedance is 30 Ohm, the minimum resistor can be connected becomes around 100 Ohm; less than that will violate 40mA. But maybe thats why you are reducing the on time to lower the mean current? Oct 30 '19 at 10:30
• The original idea was to make a very short pulse so that I could see the pulse separately from the reflection. It turned out that my method of generating pulses can't make one as short as I would need for that. If you want to see the reflection separate from the driving pulse with my Nano program, then you would need a cable probably 50 to 100 meters long.
– JRE
Oct 30 '19 at 11:04
• Once realized I couldn't make the pulses as short as I wanted, I had most of the answer already written, and just went on with it.
– JRE
Oct 30 '19 at 11:05
• In any case, I intend to fiddle with this some more and write a blog post with more details.
– JRE
Oct 30 '19 at 11:07

And secondly, let us now assume we figured out the cable’s characteristic impedance as 120 Ohm, does the termination resistor need to be exactly 120 Ohm in practice or a 150 Ohm would suffice?

In a typical RS422/485 application this small mismatch will probably be fine. It will put a step in the waveform which reduces noise immunity, but provided the signal is larger than the step the receiver should have no problem detecting it. Here is an example of RS422 signals in a 100Ω cable terminated with 4kΩ:-

When the signal reached the far end of the cable the mismatch caused some of it to be reflected back to the transmitter. Due to cable propagation delay the reflected signal was delayed, then added to the transmitted signal producing a step. The signal at the receiver end was similarly distorted but not as badly. Despite the huge mismatch the receiver was still able to accurately resolve the signal.

The difference between 120Ω and 150Ω is only 25% so the steps would be much smaller than this example.

I wish there was a simple (aka cheap) meter you could just hook up to a cable and measure it. There isn't a practical way to estimate from simple wire attributes since there's a lot more factors involved than just the wire AWG. I think you just have to have a machine that can measure it. If there is, I want to know it.

Cables also have a tolerance for the characteristic impedance which is pretty loose. I think I heard around 10% somewhere, so using a resistor that is off by 25% might be too much if the cable ends up on the far side of the tolerance.

Transmission frequency isn't what you need to be worried about. It's the transition time (rise or fall time). These could could be very high even for low frequency transmissions. Remember that the frequency of transmission is the fundamental which is one of the strongest, but lowest frequencies present in the bandwidth. It's the highest frequency present in your signal's bandwidth which is of concern since it's the one which will be hit soonest and hardest by impedance mismatches.

Length doesn't have anything to do with characteristic impedance, but the consequences of impedance mismatch (reflections, ringing) are worse as your wire length gets longer relative to the transition time. You basically don't have to worry about anything if the wire is short enough, the speed of propagation is fast enough, and the transition time is slow enough, that you can assume both ends of the wire are always at the same voltage. When you can't assume this anymore is when you need to start worrying. In other words, if you can assume the electric signal travels infinitely fast, you don't need to worry about termination.

There are different rules of thumb people use about when to start worrying. They range from from the wavelength of the signal's highest frequency being greater then 1/4 to 1/100th the length of wire.

For a digital signal, you can estimate the high frequency in the bandwidth with:

$$f_{max} = \frac{0.35}{t_{rise/fall}}$$

In practice, you could measure characteristic impedance of a wire by:

1. Getting a LONG piece of wire
2. Blast a very fast edge into one end of the wire. The shorter the wire is, the faster the edge has to be for you to be able to see anything useful.
3. Measure what it looks like at the other end.
4. Adjust the parallel termination resistor at the far end until there is no overshoot or undershoot. Your oscilloscope's input impedance at the far end will affect the measurement but it shouldn't affect it much since most cables seem to be than 120Ohms and your oscilloscope is probably 1 MegaOhm so it approximates an open circuit at the far end pretty well. This is high speed stuff so your probe setup will also matter (short ground clips and the like to prevent ringing from the probe)