TDR display without osciloscope?

Experts,

Making a portable TDR, I can simply display the time/distance to the first change in background, but numbers can't show the shape of the return pulses, and thus yield detail as to impedance mismatches due to opens, shorts, or splices.

I'm honestly not sure how I am going to make the measurements of cable voltages fast enough to fill an array for subsequent plotting on a 'poor man's osciloscope'. With signals spanning such short timespans (perfect conditions = 1 foot every nanosecond), I'm starting to have my doubts about using the lower speed AVR line, or even some STM32 chips to do this. Luckily, with 128 horizontal pixels (assuming using just one display), fine resolution isn't necessary for display-but it is, to some extent, for distance calculations (length of the cable). Perhaps I can have a fixed 'xoom', and move the 'window' up & down, with the distance range shown displayed on the LCD as well.

So I have the pulse generator design almost done, but when it comes to reading the voltage returned over short periods (as an osciloscope does), I'm puzzling over the speed of a native digitalRead(), as the process takes a lot longer thean the single cycle needed to simply receive the voltage on the pin. This page determined:

Just how long is it? It turns out that 100,000 runs of digitalRead() takes 489.7ms on a 16MIPS Arduino Uno. That turns out to be 4.9us per digitalRead() or 78 ticks (or instructions) per digitalRead().

I believe I am talking about needing magnitudes of speed faster, as even if you consider the measurement of a 'perfect' 100' would take just 100ns, which would mean a 16MHz uno would have a minimum resolution of 4,900 feet (1 ns = 1 ft; 4.9 ms = 4,900 us). Am I looking at a dedicated high speed IC to just take & store measurements?

Using the common 128x64 LCDs, or similar, what are your thoughts & guidance about having the 'trace' plotted?

Scopes use high speed ADCs to read the signal, not digital. You can get about 10 kSPS from an AVR's ADC in default settings, this speed can be increased quite drastically if you're OK with 8-bit resolution.

Then there's still the problem of dealing with all that data as you have just 2 kB RAM.

To save you a lot of work: Seeed Studio sells the quite nice SDO QUAD pocket-size scope, inexpensive at just under USD 300, it serves me well. Signals of up to 1 MHz are no problem, at 8 MHz I'm starting to see artifacts, but in the Arduino world you normally don't deal with that kind of speeds anyway. Not bad at all for the price.

wvmarle:
To save you a lot of work: Seeed Studio sells the quite nice SDO QUAD pocket-size scope, inexpensive at just under USD 300, it serves me well.

Small typo. It is a DSO Quad. I have one also and I am very happy with it. IIRC it does 75Msps

...R

Ah yes, thanks for the correction.
Lovely little device, helped me out quite a few times already.

I'm not looking for the cheapest TDR I can buy; Instead I'm looking to make one that can be used hand-held with UTP/STP and RJ-45 connectors in the field. We do it all the time with signal generators and oscilloscopes, but this is low-precision high reliability.
I don't think you'd see anything much past 1000' (a spool) in real life, so my voltage spike is geared toward making it that far & back.

  • Timer goes off (time to sample!)
  • Other circuit(s) on line disconnected
  • Pulse is triggered on desired wire/pair
  • ADC starts recording & storing (500 MSPS)
  • Once done, the Arduino 'conductor' reads the 1k of values, optionally pairing them down to be displayed across a 128 pixel LCD. This might make more sense to do in previous step.
  • Either way, the tech chooses what to display, and to grab the entire trace in hi res, low res, or only a portion of it-based on what is being selected for display.

An example would be if the tech had already zoomed into a spot of interest. Maximum 'zoom' would be 256 ns (at 500 MSPS) across 128 pixels, or 256'. A pot or push buttons (+,- ) could slide that window up & down, or even zoom out. The same data (sample/run/pass) could be re-read and re-displayed at the tech's leisure.

Even if another pulse was sent out (manually or automatically when first done, or even timed (every 10 seconds)), the display would still be lined up to the same time range. Meaning you could 'zoom' in, then flex the cable/connector to try to make the fault change.

So now, if this is to stand, my only decision point is how much do I want to pay for an ultra fast ADC? And based on that, will storage be required off the chip, on Arduino, etc. for not only display, but as CSV to MicroSD (or sent serial to PC, WiFi, etc. for later analysis in Excel, etc.

I hope you see why I am looking to make a viable TDR, not find one to buy.

Thanks again!

P.S. In a life long ago, I used old style TDRs for coax work of all kinds (CATV/TVRO/Satellites), even lugging them up poles! They were almost as heavy as the SAs I had to haul up poles I'd hooked up! :slight_smile: No knees left after those years. :frowning:

Look at this gadget for a neat approach

Anritsu make some really nice portable SA's/VNA's - but not cheap.

Allan

Arduinos can measure time in microseconds.

In order to get meaningful results, you need to be able to measure in nanoseconds - that's 1000 times faster than an Arduino can measure.

You'll need some other additional, and quite complex circuitry to do the measurement.

ADC starts recording & storing (500 MSPS

2ns memory, eh? Good luck with that!

On a slightly more positive note, some early Ethernet controllers would return a TDR value on certain types of error. It was accurate enough to be useful,even though the fastest clock around was, iirc, only 20MHz.

One approach is to use very short sample gate time with a high speed sample/hold circuit before the ADC.

You constantly retrigger pulses and offset the sample time w.r.t the pulse time a little different each
time.

This enables a low performance ADC to see into very short timespans - the narrow sampling gate
pulse provides a window, and you slide that window a little for each reading.

The hardware needed is a high speed sample/hold, and two stable oscillators running at slightly different
frequencies, one as the pulse generator, one for the sample/hold.

This is basically how high speed 'scopes worked before high speed ICs were available.

These days a high speed cmos analog switch into a capacitor would make a sample and hold circuit,
and you might choose two 100ppm crystals of nominally the same frequency and hope they are
sufficiently different.

Running two oscillators at a slightly different frequency is tricky, you have to worry about unwanted
injection locking between them, so good isolation is needed.

That is the approach used in the device I linked above.

Allan

Thinking about it another approch is to inject pulses and down-convert the result at the fundamental and
each harmonic, measuring amplitude and phase of each harmonic, then IFFT the result into the time domain?

Possibly.. fast pulses with eg the Jim Williams design, and you might want a biggish arduino to do the fft's reasonably quickly ......

You can see the system design and description of the aa-30 here:

And the available displays - including TDR - here:

Note that no super fancy hardware is used.

Allan

ps - the processor is an ATmega328 - seen them before?

MarkT:
One approach is to use very short sample gate time with a high speed sample/hold circuit before the ADC.
You constantly retrigger pulses and offset the sample time w.r.t the pulse time a little different each
time.
This enables a low performance ADC to see into very short timespans - the narrow sampling gate
pulse provides a window, and you slide that window a little for each reading.

Mark,
You hit the Hard Part(TM) head on. They sell ADCs into the $10,000s that are lightning fast. I'm not trying to reinvent the TDR, though. If I had an affordable ADC, one of the work arounds would be necessary, right? Making the pulses is comparative child's play compared to immediately being able to read the reflection's voltage on the line.
So let's say I go the ADC route. Thre are $60 ADCs at retail places that can do 500 MSPS at 8 bits. Let's look at both parameters:
**500 MSPS **

  • Yields 2' (approximate) precision. This is because 1ns = 1/1x109. So if I sample at 1GHz (1 GSPS), I would theoretically sample voltage once every nanosecond. So 1/2 the sample rate = 2x the distance, or 2 x 1' = 2'. I guess you could call 2' precision 2' *resolution * in theis case.
  • One foot precision kicks *ss! But the jump in price is significant between 500 MSPS and 1000 MSPS (1 GSPS).. Again, I'm trying to make something I (the average tech) could build & use. There's just something about using test equipment you built yourself... Someone should call it the Heathkit Effect... :slight_smile:
    8 bit
  • At first, this sounds really low, doesn't it? But then you imagine a 128x64 LED disoplay, and you realize your vertical range is 8 bit, or 64 LEDs.
  • If you have ever sent pixels, or even small text to a 128x64, or even a 64x64 LED, you realize that you could easily see an impedance mismatch on it-at least one significant enough to warrant a signal failure.
  • The target, reluctantly for the Geek™ in me, is not high accuracy or even high resolution. I'll simply rescale the output by a multiplier defined by the highest & lowest signal, and plot the 128 for display.
    Thoughts? Is this a good enough logic & spec for 'build or buy'?
    Since this is just overall project discussion, and I want this to be an open/for everyone design, a quick note on the horizontal display. If you imagine that you are sampling every 2' of line, you can see how 128 horizontal LEDs will yield 256' of display (yes, there is a dead zone). We know that you often have to do a full roll, or an insanely long run, that is more than this, so I'm thinking in my head (a vaccuum) that 2k' is a reasonable stop. But its it? With a horizontal zoom/scroll you could (again assumes 500 MSPS) either zoom into a 256' portion, or zoom out as far as you like. I'd have to add a pot for the adjustment on an initial test, though I hate the idea of knobs sticking out on field equipment (fix all that late, or leave it up to the builder's choice). So the display once zoomed would display the center 'distance' in small font in a corner of the LED and one could scroll a window through the range, reading a single result at leisure.

But back to the distance/max range for a moment. As these are samples taken either manually or at a slow rate, the limit here is voltage. Because I'm not limiting testing to coaxial or UTP/STP, adjusting the voltage of the pulse would be handy. In my work with coax I have seen opens that could be bridged by a high enough voltage spike, and I imaging the same for twisted pair is possible. I've seen damage by birds & arrows, but the hardest to find was sabotage. Don't continue if you aren't interested in real-world stories (this should avoid complaints).

I include the following as an example of the kind of coax damage that may or may not have been a good example of using a variable voltage spike to catch. As you will see if you read on, a high enough voltage spike may have indicated the kind of open, and at which end. I welcome your opinion.

queue gratuitous flashback music & wavy lines

We had a stretch of CATV .750 that would go down when it was cold up here in CT. I mean really cold. When it was warm, daylight, all was well. I know I spolied it by saying in advance it was sabotage, but any [line] techs have any ideas yet?
I didn't warrant a bucket yet, and had just hooks. Every night, I'd go out, and sure enough, the trunk amp on one stretch would work, and the next one downstream had no voltage (pulsed DC, or square wave). I went up & down those 2 poles a lot that winter-on hooks.
So I tore off the heat shrink on both ends, unscrewed the connectors, and sure enough, you could see the teeth marks on the copper clad aluminum (connector was secure). I even checked connectivity between the connector and the trunk amp's motherboard connector inside. All good. In the parlance of the militay: "WTF?"
The only time I could troubleshoot was when it was happenning, and that was late at night, when it was windiest & coldest-on hooks. So I went up & TDR'd (please forgive the expression/verb) from both ends. From the upstream end, the distance was correct, and so was the impedaance (MB removed downstream = open), and the distance was right (best TDR you could get at the time. I know because it felt like 5,000 lbs). From the downstream end, it was open-no return at all. [Any techs have a guess yet?]
I was about to put an adapter and an RG-6 extension for the dead zone on the downstream amp's input, so I took off the spacers (hard to explain here, but they & strap cover the cable) to bend the .750 out of the way to make room, and the coax UNDER the spacer split in 1/2. WFT?!
Someone on a ladder (no way to rach on hooks) had gone up the pole, and about 4' upstream from the trunk amp had cut the .750 clean with a hack saw under the spacer & strap, then covered it up with the spacer, re-wrapping the strap under it. Devious? On a scale of 1-10, an 11.

end of gratuitous 'only tdr story'; queue flashback return music & visuals
If you read this far, you'OK in my book! -pat :slight_smile:
Thanks to all for contributing so far.

It sounds like you're not really looking for an ADC, but some kind of timer that tells you when the reflection comes back. For the stated time resolution I have the feeling the second is much cheaper and easier to accomplish (if only because you don't have to deal with 1 GB/s of data - assuming 8 bit resolution).

By the way, 64 = 26, so 6-bit resolution in your 64-pixel column.

Do you really need to see the waveform shape? You can determine if a cable is open/short circuit by the amplitude of the reflected signal. Using something like the TDC-GP22 to measure time with suitably set comparators. I have a proof of concept post on here somewhere showing the results I got from such a setup.