I know that the signal needs 1ns to travel 20cm.
$$\frac{20\,\text{cm}}{1\,\text{ns}}=\frac{2\cdot10^{-1}\,\text{m}}{10^{-9}\,\text{s}}=2\cdot10^8\frac{\text{m}}{\text{s}}$$
just as expected from a transmission line, roughly 2/3 of the vacuum speed of light. However: this has at most two significant digits, i.e. you get at least 1% of error if your speed measurements aren't accurate. You want 10m accuracy over 3 km, that's 0.033% of error.
Measuring your signal speed accurately makes or breaks your whole measurement.
My goal is to determine the length of the transmission line with a accuracy of 10m.
So, you need to measure timing to an accuracy of 50 ns! (and you were complaining about logic gates with a few ns of delay uncertainty...)
500m and 3km
So, rundtrip times of 2.5 µs to 15 µs.
OK, this gives us a lot to work off!
drive the transmission line with a high current output opamp, that outputs a 5ns pulse with an amplitude of 3V.
Oh! I wouldn't recommend that; totally wrong. An opamp is useful if you need something that amplifies the input nice and linearly. You don't want that. You want the sharpest edge you can get.
So, opamp: would need fantastic (significantly more than 1GHz!) bandwidth.
Instead, a simple CMOS push-pull stage with a MOSFET driver will give you an excellent sharp edge.
You will want to add a 150Ω series resistor to match the impedance of your MOSFETs (which will be very low) to the transmission line.
The duration of the pulse doesn't matter, by the way, for your system. What matters is the steepness of its edges. (Which are inverse to its bandwidth.)
You can measure the distance just as accurately with a 20s duration pulse as with a 5ns pulse, as long as the bandwidth of the edges are the same!
I am planning to place a Bandpass filter
Excellent!
A band-pass filter filters away low frequencies. If you design it such that the lower cut-off frequency is above 1/(pulse duration), then you get something that resembles the derivative of your pulse. Instead of seeing a rising and a falling edge, you get two pulses where the edges are!
Read this carefully, and make yourself a drawing of voltage over frequency! Draw a pulse (with slightly round edges, ca 1ns wide, 5ns long pulse), and then, same size, draw the derivative of that function.
That derivative plot should now be a figure with two pulses, one when the rising edge of the original pulse is, one when the falling edge of the original pulse is.
Now, do the same thing, but for an inverted pulse: Now you get one pulse, negative, for the first edge, and one, positive, pulse for the second edge.
See what I'm doing here?
The highpass part of your bandpass filter just converted your positive and negative pulses into a signal where there's always a positive pulse.
So, you don't need a rectifier at all. Forget the rectifier! It makes things harder, and doesn't help you at all!
Great, now you only have to detect that pulse. A high-speed comparator might indeed do that. But with a single NPN transistor you can do the same: since this is all AC-coupled, your pulses are around any arbitrary DC voltage you choose.
So, a single transistor can be used to amplify your signal enough so that it can be directly observed by your microcontroller.
So, there we go, your whole system would then be:
- microcontroller to generate the pulse
- a CMOS pair to buffer the pulse and feed it into the transmission line through a 150Ω resistor
- a bandpass filter to convert the pulse into two pulses at the edges
- three resistors and a 10ct NPN with enough bandwidth
- your microcontroller to observe the amplified positive pulse
That's it! No opamps, no comparators, no rectifiers, no logic involved here – just very basic signal theory and using the right amplifier for the job.