Anybody played with Time-domain Reflectometer usin a prop ?
Toby Seckshund
Posts: 2,027
One of the guys at work, a Windows lover (you know the sort), threw a right strop today at the lack of test equipment. His rants encompassed anything that was mentioned that day, which included the blessed Propeller. So the gauntlet is down. One TDR using a prop just to spite him.
All clues gratefully received.
Alan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Style and grace : Nil point
All clues gratefully received.
Alan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Style and grace : Nil point
Comments
Like this but use a comparitor to detect returned signal and cnt to time the interpulse gap ?
Graham
I used them Decades back, in transmitter group, but recently we have been dumped a load of multi co-ax and multi-core cables. The wrong end is ALWAYS cut off first !
The Strop was thrown as he had one when he was on telephones, he could have "anything he wanted". We reminded him he wasn't there now and there was dummies spat, and teddy bears everywhere. I smirked a bit too much and he laid into my interests, ie poor little defensless props.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Style and grace : Nil point
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Style and grace : Nil point
Keep us posted, please?
thanks,
Mark
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Style and grace : Nil point
www.crrel.usace.army.mil/library/technicalreports/TR02-15.pdf
I considered an AVR approach, with its inbuilt comparator and A/D stuff, but that isn't the principle here. He didn't slag off the AVRs so they cannot be used.
Will read up on half step techniques. The lenths of cables that I will be using will be 10-100 Mtrs, the tricky bit for timings.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Style and grace : Nil point
I'm looking at doing something similar myself to measure cable distances and would welcome sharing ideas with you....
Regards,
Coley
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
PropGFX - The home of the Hybrid Development System and PropGFX Lite
I would like to continue any way, as the new job will make good use of it ( although they should have the resources to buy a proper one )
I got as far as looking into the Half Step bits and dreaming of using an old 2x16 lcd as a readout graph/data. The longer cables are easier as the delays are big enough to be managable, but the shorter ones might be a problem.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Style and grace : Nil point
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
PropGFX - The home of the Hybrid Development System and PropGFX Lite
I managed to guestimate the fault in a burried triax, that was 500 Mtrs, to within 5 Mtrs just by comparing the reflections to that of a known 100Mtr lenth and the pulse from the Pulse-and-Bar generator.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Style and grace : Nil point
No, to my shame the moment of the initial "want" went by, then I changed jobs.
But now I am back in a job that could use such a toy, at least until all of the copper stuff becomes fibre'd. I will have to start looking back up all of the info, but the trickiest bit is the reasonably short range stuff, cables that were hundreds of metres long did give a bit of a rest period before the echos came back!
The half-step did seem to be the most common method, that (I think) was for the initial step to go to half level and the get held there, then when the reflection came back it would add or subtract from that half level and so give a clue to range and type of discontinuity.
Alan
The trick is to turn very small times into a measurable quantity.
Some designs use a charge gate, either 3 diodes + Cap + current source, or 1 diode and open-drain, and then a ADC.
I think it was Bean did some interesting looking tests a while back, using TWO props, and relying on similar but not non-locked clocks.
From memory, that could detect length changes in short wires, using many samples.
Such designs are easier if you know the phase step, and there is a new companion part that may be ideal.
I have recently fired up a sample of a Si504, which is a nifty little part that swallows a single 4 byte real for frequency, and a 16 bit signed integer for offset trim. What could be simpler, or have more dynamic range ?
Si504 delivers any freq 32KHz to 100MHz and seemed to have good short term stability, so two of those could give a nice way to give two clocks of close known offset , and controlled phase advance - measure, then trim, ( offset-trim is good to ~ 28ppb/step.)
Maybe add a couple of TinyLogic D-FF( NXP 74AUP2G79 look good?) for the capture parts, to keep apertures smallest.
One captures Cal Zero and one captures Delay-Time-Edge
I'll have to dig up my old code that measures the wire length and see if it can be adapted for TDR use.
Bean
I thought at the time that these chips would work with the prop in making a TDR. I never had the $50 to pursue it.
Jim
Looks like it's going to work. Just uses 1 resistor on a demo board.
Bean
MAX639 - switch-mode regulator
NME dc-dc converter
78L05
1 transistor
PIC16C84 running on 4MHz xtal
MAX404 - video opamp
and that's it. Plus a few passives, the LCD display and a small relay.
In operation you dial in the propagation velocity and get a direct readout of the cable length. It's meant for measuring how much cable is left on a part drum.
The hard part was getting a signal that is NOT phase locked to the propeller clock.
Please try this and let me know if it works for you. It seems to work for me.
I have attached the .spin files in case you don't have PropBasic.
Uses serial terminal @ 115200 baud to show results.
Bean
Bean
Can you expand on what you used here for the non-phase locked 625KHz signal ?
Would a simple RC osc be sufficiently unlocked, or would LC be needed, or a ceramic resonator (455KHz is still easy to get?) or a HC4060+ crystal ?
This causes the PLL to constantly adjust and it never gets phase locked.
That is what the TASK Generate does. It runs on it's own cog.
Those other methods would probably work too, but if the propeller can do it without extra hardware, I'd rather do it that way.
Bean
P.S. I'd like to hear if anyone has tried this. If you have please post here and let me know.
Any idea how fast you have to update FRQx so the PLL doesn't lock? (Specifically, I'm wondering if a Spin loop would work.)
I was also interested in why you chose 625 kHz.
Thanks,
Jonathan
It just needs to be slow enough to give the propeller some time to execute code before the next cycle, but fast enough so you don't have to wait a long time to get a reading.
I was just using 625KHz for something else and it seemed to work, so I did bother trying other frequencies.
I'm not sure exactly how fast you need to update FRQx, again I just played around until I got something working. Spin might be fast enough.
Bean
Oops, I used he scroll wheel and did not even notice the extra code.
Very nifty. What LSB do you seem to get using this ?
Some info on the Prop PLL could be useful, in this type of app.
Be nice to know the VCO-Osc design, and the loop filter time constants etc, to know what time-slot-coverage that actually gives.
Certainly is simple.
The results are displayed in picoSeconds and judging from the numbers it looks like a couple picosecond resolution.
I've not verified that this is acurrate. I just got some reasonable numbers and it looks okay to me.
Chip will have to answer about the PLL design, I don't know those answers.
Bean
In post #29 in that thread you were discouraged about doing the task with a single Propeller, rather than with two running at slightly different frequencies. Is that what you've figured out how to do now?
@JMG, here is a comment Chip made in response to a question about the PLL: "They are all 7-stage differential ring oscillators with full phase frequency detectors (not XORs) for feedback. They lock from any frequency to any other frequency in about 10us and adapt to small changes over several reference clocks. To ask how quickly their frequency changes is a good question. I've never tried to measure that. I have used them for FM broadcast quite succesfully, though. (Instead of outputting to a DAC for line-level audio, add/subtract the sample to/from FRQ to create FM.)"
Interesting. That makes Bean's 'permanent wiggle' on the VCO about 1/12 of that 'lock' time, so would make it pretty much triangular @ the VCO control voltage (ie always sweeping, chasing a lock target that keeps moving )
Provided the internal Vcc/Gnd noise does not cause 'snap' effects, it should cover all time slots.
Likely that differential ring oscillators helps give some PSRR.
A key element here, easy to overlook, is the Prop pins can move Async, with a Local PLL/VCO -> Divider -> Pin, the pins
are not sync'd to any SysCLK (unlike most other uC )
Tracy, Yes, that is what I figured out. Even using the PLL the output edges get synced to the propeller clock because that is where the input edges occur. So I didn't think it was possible to create an edge that was not locked to the propeller clock.
I thought I has seen in another post (maybe the one about noise while playing a WAV file ???) about modulating the input to the PLL. So I thought I would give that a try. It took some experimenting, but I finally got something usable.
Bean
Yes, without this "feature" my method would never work.
By the way, if you just use a piece of wire instead of the 220 Ohm resistor (and no BNC either), it should measure the time delay for the signal to go through the wire. Of course the length will be wrong because it won't be a "round trip", plus the velocity factor is not the same as coax.
Bean