From Scratch: building a Time Domain Reflectometer
TDR or Time Domain Reflectometry is a method for measuring transmission lines - cables and alike - used for the transmission of high-speed signals.
TDR can be used to check the length of the cable, can detect the presence and the place of a short, break, and other errors.
First, let's take a look at what we're going to build and what we can do with it.
We're going to use short, sharp pulses. Such pulses can be generated with cheap transistors working in avalanche mode, and can be read using cheap oscilloscopes (relatively speaking). To make the transistors work well in avalanche mode, we're going to need a voltage well in excess of one hundred volts.
This is how a pulse and it's reflection looks like on the screen:
An Old HP 1745A will work just fine:
I think this is prettier :) Pulse and reflection without termination:
...and with proper termination:
The current could be reduced to 13mA by redesigning the circuit. This is almost the half of the original current draw, and the service life is likely more than doubled. The new version is actively controlled: one the output voltage is sufficient to open up a chain of Zener diodes, the duty cycle of the PWM signal driving the booster is reduced.
Here's the final version of the circuit:
This was captured and simulated in LTSpice.
The LTSpice files for this circuit can be found here: https://github.com/netom/high-voltage
The circuit charges C4, a 100nF capacitor. Make sure to use one that is rated more than 200V, I used a 630V model just to be safe.
The high voltage is generated by Q3 and L1. Q3 is driven by a square wave of varying duty cycle between 50% and 0%. The mosfet opens and closes quickly at about 7Khz. L1, the 10mH inductor kicks up the voltage on the drain of Q3 when it closes. The energy of the kick is determined by how long Q3 has been held open, and that is in turn controlled by the duty cycle of the square wave on it's gate.
The driving signal is provided by the 555 integrated circuit. It is wired as an astable multivibrator. The ICs CV pin (control voltage) is modulated by Q2.
Q2 is opened if the voltage on the output (across C4) reaches a voltage where the Zener diode chain - consisting of D3, D4, and D5 - and the BE junction of Q2 is opened. Current flows through R6, D5, D4, D3 and the BE junction of Q2 to the ground. The transistor starts to conduct, and reduces the on the CV pin. (Inside the 555 the CV pin is connected to a simple resistive voltage divider.)
With the voltage on the CV pin dropping, the 555 reduces the duty cycle of the square wave. Q3 conducts for a shorter time, L1 will provide less of a kick, delivers less charge to C4, reducing the voltage.
When the output is not loaded, this control loop keeps CV fairly low, close to the saturation voltage of Q2, about 0.1V. Q2 will pull about 1.8mA out of the CV pin to achieve this. Assuming an "average" 2N3904 transistor, the base current will be about 12uA. R6 will help limit the current through the diodes and the base of Q2, and provides low-pass filtering together with C3.
Q1 provides feedback by liting up or closing off D1. The LED is labelled as "CTRL" on the box, it means "attention, ConTRLol voltage is too high". I choose a random small red LED, the part number on the schematic is just on other random one from LTSpice's library.
This LED turns on whenever the control voltage is large enough to open Q1 thorugh the voltage divider formed by R4 and R5. D1 is therefore OFF, if the output voltage can be maintained with a low duty cycle PWM, and therefore low current. Presenting a large enough load to the box will cause this LED to turn on.
If there is significant current draw, D2 lights up. This makes this power supply an excellent cable tester: connecting an unterminated cable to the output should NOT cause D2 to turn on. A shining D2 means that there's significant current draw from the output, therefore the cable is either shorted, or it's leaking a bit at high voltages (water or dirt in the connector, half-broken shielding, etc).
It is important to place C3 "after" the diodes, to Q2's base. Placing it next to R6 will cause loss of precise voltage control. The screenshot below was recorded on an oscilloscope measuring the voltage between the ground and the conductor between D3 and D4. (Measuring the voltage of the conductor between D4 and D5 yields similar results.) Notice the sawtooth-ish waveform:
The jumps on the waveform are cause by D4 or D5 going into conduction quickly, draining charge from C3. Since high voltage Zener diodes conduct in avalanche mode, they might have a negative resistance region. This is seems to be a less-known fact, I found little information on the subject. (Here is some: https://www.semanticscholar.org/paper/Negative-resistance-characteristics-of-Zener-diode-Zhang-Takaoka/3a041fb37b8744138edda1c9711b9b0d2ca096e2)
So when the diodes just start to conduct, they migh go into negative differential resistance mode, and deliver a quick burst of charge. These bursts are "kicking" on Q2's base, opening the device. The CV pin is yanked low.
Following the kick, the voltage on C3 drops, and conduction stops briefly. The CV pin is allowed to recover. This results in a jolt of power to be delivered onto the output, causing the CTRL LED to turn on frequently, and shine dimly. The output voltage is noisy, and the overall current drain is higher than it should be.
Placing C3 right to the base of Q2 means at one hand less charge for the avalanching Zener diodes to work with, and provides some buffer at the base of Q2 where the avalanche noise arrives. The right placement of C3 therefore reduces the avalanche noise by not being upstream so not providing power to the avalanches, and second by being at the base of Q2 and providing a reservoir of capacitance where the (much smaller) avalanches of charge may arrive without causing much disturbance.
The output of the device is a BNC socket. It is connected across C4, the hot center conductor is connected via a resistor. This can be as large as 100K if the application allows it. A bleed resistor across C4 is also helpful, even if it as large as 100MOhms. I do recommend using a 100K output resistor and a 10-100MOhm bleed resistor across C4.
The device was built in a box made out of single-sided copper clad FR4 sheets. Note that the hot part of the socket is hard to touch, but not impossible to do so:
The ciruit itself was built on a piece of unetched PCB. One side is ground, the other side is +9V. Most componets were soldered onto / over the ground side. This is the first version with simple shunt regulation and discrete transistor astable:
Yes, I did touch hot wires accidentally. Yes, it hurt a lot. It's no fun, don't do it.
I didn't bother to draw it in LTSpice, because LTSpice doesn't simulate avalanche effects.
I'm not going to go into details regarding the operation of this circuit. I just really would like to give an overview and some building instructions so it can easily be reproduced. If you'd like to know everything, take a look at this great article by Kerry D. Wong explaining it all:
http://www.kerrywong.com/2013/05/18/avalanche-pulse-generator-build-using-2n3904/
For an even more detailed description he directs us to this paper:
https://icecube.wisc.edu/~kitamura/NK/Flasher_Board/Useful/research/RSI02253.pdf
For the avalanche transistor we're going to use a simple 2N3904. Other transistors will probably work unless they have a CE breakdown voltage in excess of 150-200V. The collector gets the 200V voltage via a 1MOhm resistor. A small capacitor of 10pF is also connected to the collector and the other terminal of the capacitor goes to ground.
Although the 2N3904 is rated for 40 volts, most pieces will break down near or even well over a hundred volts. Don't be surprised of the first one out of your drawer can withstand more than a hundred and fifty!
The capacitor should be one with very low inductance and low ESR. Small, high-frequency NP0 types are probably fine. I used a silver mica capacitor because I had some laying around.
The base of the transistor should be connected to ground via a 22K resistor. The resistor value was determined by trial and error. This value seemed to achieve the narrowest and tallest pulses (beside of just working at all, of course) out of a handful of other values.
The circuit is working with frequencies in the multiple hundred megahertz range, so keep every connection as short as possible and/or use transmission lines of proper characteristic impedance and terminations.
The final device has three terminals:
Pack everything real tight to avoid reflections that smear and blunt the nice and sharp peak.
The generator itself is also built into a box made out of single-sided unetched PCB sheets.
The circuit works like this:
C1 is charged through R1 with about 200 volts, and therefore - at the beginning - 200 microamperes. The avalanche breakdown occures at a random voltage somewhat (even substantially!) higher than what the part is rated for.
This throws the transistor wide open, and it dumps the charge in C1 onto the 50 ohm feedline. Since the line is 50 ohm in both directions, the transistor will see a 25 ohm resistance (and some inductance because of the leads and wires of and inside the package). C1 empties quickly, the current stops, the transistor closes. C1 starts to charge again.
When the transistor is closed, it presents high impedance to the feedline, causing virtually no reflections. The signal can "pass under the transistor" unchanged.
The pulses occur in a somewhat random fashion around a characteristic frequency. This frequency is influenced by R1, C1, the input voltage, and the actual breakdown voltage of the transistor.
The time between the pulses can be calculated like this:
t_fire = - log(1 - V_breakdown / V_input) * R1 * C1
With my particular 2N3904 with 160V (!) actual breakdown voltage, 200V supply, 1Mohm resistor, 10pF capacitor:
- ln( (1 - 160 / 200 ) * 1 * 10^6 * 10 * 10^-12 = 16.1 * 10^-6
Using the numbers above, if I have a cable 16 meters and 23 centimeters long, and I measure 164 nanoseconds between pulses, then I can calculate the velocity factor like this:
( 16.23 / 300e6 ) / ( 164e-9 / 2 ) ~= 0.66
First the cable length is divided by the speed of light to yield the time it takes for and electromagnetic signal to travel the given length in empty space. This time is divided by half of the measured time (since the signal travels along it twice).
TDR can be used to check the length of the cable, can detect the presence and the place of a short, break, and other errors.
First, let's take a look at what we're going to build and what we can do with it.
Transmission line
A transmission line is a specific cable or other structure that's used to conduct high-frequency AC current. A transmission line might carry voice, provide AC mains to your home or carry very low voltage radio frequency signals.
We mostly care about radio frequencies of small or moderate power, so "transmisson line" will mostly mean coaxial (unbalanced) cables, mostly 50 Ohm RG58, H155, H1000, etc. The devices in this article can be modified to work with cables of various characteristic impedance and balance. (Worst case you might need to use a transformer.)
Velocity factor
TDR can be used to measuring feed line (cable) length or velocity factor. Velocity factor is a number given in percents or in fractions of one, and it is the ratio of the signal propagation speed in the transmission line to the speed of light in vacuum. A velocity factor of 66% or 0.66 means the signal propagates at 0.66 * 300,000 km/s = 198,000 km/s.The method
If a signal is sent along a cable, it will (partially) reflect from the end unless it is terminated with the characteristic impedance. Receiving the reflected signal and measuring the time of flight makes possible to calculate the cable length OR the velocity factor. Knowing one is needed to calculate the other.We're going to use short, sharp pulses. Such pulses can be generated with cheap transistors working in avalanche mode, and can be read using cheap oscilloscopes (relatively speaking). To make the transistors work well in avalanche mode, we're going to need a voltage well in excess of one hundred volts.
The setup
The measurement setup consists of 3 devices:- An oscilloscope. An old analog or a modern (but cheap) digital one will suffice. 100MHz of bandwidth is probably the minimum, 200MHz is recommended. More will not hurt, but faster scopes get expensive quickly. It must either have a 50 Ohm input or must be used with proper termination.
- A high voltage generator with about 200V output (it needs to supply little current).
- An avalanche transistor pulse generator. Sounds much more complicated than it really is.
The scope
I'm going to use a Hantek DSO5202P scope:This is how a pulse and it's reflection looks like on the screen:
An Old HP 1745A will work just fine:
I think this is prettier :) Pulse and reflection without termination:
...and with proper termination:
The high voltage
I built the high voltage generator myself. The first version was a simple Zener diode shunted uncontrolled boost converter. This one pulled about 25mA out of a little PP3 9V battery. Googling "9V battery discharge curve" and looking at the first few hits hints at about 20 hours of service time.The current could be reduced to 13mA by redesigning the circuit. This is almost the half of the original current draw, and the service life is likely more than doubled. The new version is actively controlled: one the output voltage is sufficient to open up a chain of Zener diodes, the duty cycle of the PWM signal driving the booster is reduced.
Here's the final version of the circuit:
This was captured and simulated in LTSpice.
The LTSpice files for this circuit can be found here: https://github.com/netom/high-voltage
The circuit charges C4, a 100nF capacitor. Make sure to use one that is rated more than 200V, I used a 630V model just to be safe.
The high voltage is generated by Q3 and L1. Q3 is driven by a square wave of varying duty cycle between 50% and 0%. The mosfet opens and closes quickly at about 7Khz. L1, the 10mH inductor kicks up the voltage on the drain of Q3 when it closes. The energy of the kick is determined by how long Q3 has been held open, and that is in turn controlled by the duty cycle of the square wave on it's gate.
The driving signal is provided by the 555 integrated circuit. It is wired as an astable multivibrator. The ICs CV pin (control voltage) is modulated by Q2.
Q2 is opened if the voltage on the output (across C4) reaches a voltage where the Zener diode chain - consisting of D3, D4, and D5 - and the BE junction of Q2 is opened. Current flows through R6, D5, D4, D3 and the BE junction of Q2 to the ground. The transistor starts to conduct, and reduces the on the CV pin. (Inside the 555 the CV pin is connected to a simple resistive voltage divider.)
With the voltage on the CV pin dropping, the 555 reduces the duty cycle of the square wave. Q3 conducts for a shorter time, L1 will provide less of a kick, delivers less charge to C4, reducing the voltage.
When the output is not loaded, this control loop keeps CV fairly low, close to the saturation voltage of Q2, about 0.1V. Q2 will pull about 1.8mA out of the CV pin to achieve this. Assuming an "average" 2N3904 transistor, the base current will be about 12uA. R6 will help limit the current through the diodes and the base of Q2, and provides low-pass filtering together with C3.
Q1 provides feedback by liting up or closing off D1. The LED is labelled as "CTRL" on the box, it means "attention, ConTRLol voltage is too high". I choose a random small red LED, the part number on the schematic is just on other random one from LTSpice's library.
This LED turns on whenever the control voltage is large enough to open Q1 thorugh the voltage divider formed by R4 and R5. D1 is therefore OFF, if the output voltage can be maintained with a low duty cycle PWM, and therefore low current. Presenting a large enough load to the box will cause this LED to turn on.
If there is significant current draw, D2 lights up. This makes this power supply an excellent cable tester: connecting an unterminated cable to the output should NOT cause D2 to turn on. A shining D2 means that there's significant current draw from the output, therefore the cable is either shorted, or it's leaking a bit at high voltages (water or dirt in the connector, half-broken shielding, etc).
It is important to place C3 "after" the diodes, to Q2's base. Placing it next to R6 will cause loss of precise voltage control. The screenshot below was recorded on an oscilloscope measuring the voltage between the ground and the conductor between D3 and D4. (Measuring the voltage of the conductor between D4 and D5 yields similar results.) Notice the sawtooth-ish waveform:
The jumps on the waveform are cause by D4 or D5 going into conduction quickly, draining charge from C3. Since high voltage Zener diodes conduct in avalanche mode, they might have a negative resistance region. This is seems to be a less-known fact, I found little information on the subject. (Here is some: https://www.semanticscholar.org/paper/Negative-resistance-characteristics-of-Zener-diode-Zhang-Takaoka/3a041fb37b8744138edda1c9711b9b0d2ca096e2)
So when the diodes just start to conduct, they migh go into negative differential resistance mode, and deliver a quick burst of charge. These bursts are "kicking" on Q2's base, opening the device. The CV pin is yanked low.
Following the kick, the voltage on C3 drops, and conduction stops briefly. The CV pin is allowed to recover. This results in a jolt of power to be delivered onto the output, causing the CTRL LED to turn on frequently, and shine dimly. The output voltage is noisy, and the overall current drain is higher than it should be.
Placing C3 right to the base of Q2 means at one hand less charge for the avalanching Zener diodes to work with, and provides some buffer at the base of Q2 where the avalanche noise arrives. The right placement of C3 therefore reduces the avalanche noise by not being upstream so not providing power to the avalanches, and second by being at the base of Q2 and providing a reservoir of capacitance where the (much smaller) avalanches of charge may arrive without causing much disturbance.
The output of the device is a BNC socket. It is connected across C4, the hot center conductor is connected via a resistor. This can be as large as 100K if the application allows it. A bleed resistor across C4 is also helpful, even if it as large as 100MOhms. I do recommend using a 100K output resistor and a 10-100MOhm bleed resistor across C4.
The device was built in a box made out of single-sided copper clad FR4 sheets. Note that the hot part of the socket is hard to touch, but not impossible to do so:
The ciruit itself was built on a piece of unetched PCB. One side is ground, the other side is +9V. Most componets were soldered onto / over the ground side. This is the first version with simple shunt regulation and discrete transistor astable:
Yes, I did touch hot wires accidentally. Yes, it hurt a lot. It's no fun, don't do it.
The pulse generator
Please excuse the hand-drawn schematic:I didn't bother to draw it in LTSpice, because LTSpice doesn't simulate avalanche effects.
I'm not going to go into details regarding the operation of this circuit. I just really would like to give an overview and some building instructions so it can easily be reproduced. If you'd like to know everything, take a look at this great article by Kerry D. Wong explaining it all:
http://www.kerrywong.com/2013/05/18/avalanche-pulse-generator-build-using-2n3904/
For an even more detailed description he directs us to this paper:
https://icecube.wisc.edu/~kitamura/NK/Flasher_Board/Useful/research/RSI02253.pdf
For the avalanche transistor we're going to use a simple 2N3904. Other transistors will probably work unless they have a CE breakdown voltage in excess of 150-200V. The collector gets the 200V voltage via a 1MOhm resistor. A small capacitor of 10pF is also connected to the collector and the other terminal of the capacitor goes to ground.
Although the 2N3904 is rated for 40 volts, most pieces will break down near or even well over a hundred volts. Don't be surprised of the first one out of your drawer can withstand more than a hundred and fifty!
The capacitor should be one with very low inductance and low ESR. Small, high-frequency NP0 types are probably fine. I used a silver mica capacitor because I had some laying around.
The base of the transistor should be connected to ground via a 22K resistor. The resistor value was determined by trial and error. This value seemed to achieve the narrowest and tallest pulses (beside of just working at all, of course) out of a handful of other values.
The circuit is working with frequencies in the multiple hundred megahertz range, so keep every connection as short as possible and/or use transmission lines of proper characteristic impedance and terminations.
The final device has three terminals:
- One for the high voltage power supply
- One for the pulse output to the measured feedline
- One for the oscilloscope
Pack everything real tight to avoid reflections that smear and blunt the nice and sharp peak.
The generator itself is also built into a box made out of single-sided unetched PCB sheets.
The circuit works like this:
C1 is charged through R1 with about 200 volts, and therefore - at the beginning - 200 microamperes. The avalanche breakdown occures at a random voltage somewhat (even substantially!) higher than what the part is rated for.
This throws the transistor wide open, and it dumps the charge in C1 onto the 50 ohm feedline. Since the line is 50 ohm in both directions, the transistor will see a 25 ohm resistance (and some inductance because of the leads and wires of and inside the package). C1 empties quickly, the current stops, the transistor closes. C1 starts to charge again.
When the transistor is closed, it presents high impedance to the feedline, causing virtually no reflections. The signal can "pass under the transistor" unchanged.
The pulses occur in a somewhat random fashion around a characteristic frequency. This frequency is influenced by R1, C1, the input voltage, and the actual breakdown voltage of the transistor.
The time between the pulses can be calculated like this:
t_fire = - log(1 - V_breakdown / V_input) * R1 * C1
With my particular 2N3904 with 160V (!) actual breakdown voltage, 200V supply, 1Mohm resistor, 10pF capacitor:
- ln( (1 - 160 / 200 ) * 1 * 10^6 * 10 * 10^-12 = 16.1 * 10^-6
or 16.1 milliseconds, wich means about a 62 kilohertz pulse train.
The frequency of the output can be changed by changing R1. Larger R1 means lower frequency.
The frequency of the output can be changed by changing R1. Larger R1 means lower frequency.
Measurement setup
To measure the cable length or valocity factor, the setup should be similat to this:
The generator is powered by the HV power supply via a short pigtail. Don't use a long one, since these cables act as capacitors, and might shock you when charged up.
The two "pulse out" sockets are connected to the cable under test and the oscilloscope. It doesn't matter which one is which.
My oscilloscope only has a high impedance input, so I needed to terminate the cable with a BNC tee adapter and a 50 ohm terminator.
The first pulse is coming straigh from the generator. The second one is being reflected off the unterminated end of the cable.
Look what happens if we terminate the cable properly:
Shorting the end of the cable causes the reflected pulse to be inverted:
I had a few ElectroBoom moments with this experiment. I can't whole heartedly recommend this exact experiment setup. If you don't know why, you shouldn't build this. :)
Measuring cable length
A piece of RG-58 has a velocity factor of 0.66. The question is, how long is it, if the scope screen looks like this:
The time between the pulses is 164 nanoseconds. Since the velocity factor is 0.66, the speed of signal propagation is 198e6 m/s.
So in 1 second, the signal travels 198*10^6 meters. In 164 nanoseconds, or 164*10^-9 seconds, it travels:
0.66 * 300e6 * 164e-9 / 2 = 16.236 ~= 16 meters and 23 centimeters.
The velocity factor is multiplied by the speed of light to yield the real signal propagation speed. Multiplied by the measured time we get length. Dividing by two is necessary since the signal travels along the cable twice.
Measuring velocity factor
The velocity factor can easily be calculated by measuring the cable length and the time it takes for a pulse to travel along it down and up again.Using the numbers above, if I have a cable 16 meters and 23 centimeters long, and I measure 164 nanoseconds between pulses, then I can calculate the velocity factor like this:
( 16.23 / 300e6 ) / ( 164e-9 / 2 ) ~= 0.66
First the cable length is divided by the speed of light to yield the time it takes for and electromagnetic signal to travel the given length in empty space. This time is divided by half of the measured time (since the signal travels along it twice).
Megjegyzések
Megjegyzés küldése