Measure the speed of electricity...
Bean
Posts: 8,129
I have been inspired by "Laser Developer" and have made a DMTD (Dual Mixer Time Difference) measurement system using two propeller boards.
One board is simply a generator. It generates two 1MHz square waves that are 90 degrees (250nSec) out of phase.
These two signals are fed into a second propeller board that will sample the two signals at 1MHz. But because the two boards have seperate crystals there will be (should be) a small frequency difference between the two boards. In my setup the difference between the two was 19ppM (19Hz @ 1MHz). There MUST be some difference between the two for the system to work.
First the two signals are interconnected using short wires of the same length. The system can then be zeroed by pressing a key in PST. Then one of the short wires is replaced with a long wire to be measured. The system will measure the actual phase delay caused by the time it takes the signal to travel the length of the wire being measured.
I have hacked this up in PropBasic, but I want to re-write it in spin to make it more generic for Propeller users.
I've tried this on two different setups (one at work and one at home) and it seems to work. I used a 19 foot piece of wire and the system said it was 22 ft (but I don't think electricty flows at exactly 1 ft per nSec).
If you want to try this out, I used P0 and P1 for the signals (don't forget to connect the grounds together too).
Let me know if you try this. If there is enough interested I'll do a little write-up for it.
P.S. If you prefer there is a spin version posted further down.
Bean
One board is simply a generator. It generates two 1MHz square waves that are 90 degrees (250nSec) out of phase.
These two signals are fed into a second propeller board that will sample the two signals at 1MHz. But because the two boards have seperate crystals there will be (should be) a small frequency difference between the two boards. In my setup the difference between the two was 19ppM (19Hz @ 1MHz). There MUST be some difference between the two for the system to work.
First the two signals are interconnected using short wires of the same length. The system can then be zeroed by pressing a key in PST. Then one of the short wires is replaced with a long wire to be measured. The system will measure the actual phase delay caused by the time it takes the signal to travel the length of the wire being measured.
I have hacked this up in PropBasic, but I want to re-write it in spin to make it more generic for Propeller users.
I've tried this on two different setups (one at work and one at home) and it seems to work. I used a 19 foot piece of wire and the system said it was 22 ft (but I don't think electricty flows at exactly 1 ft per nSec).
If you want to try this out, I used P0 and P1 for the signals (don't forget to connect the grounds together too).
Let me know if you try this. If there is enough interested I'll do a little write-up for it.
P.S. If you prefer there is a spin version posted further down.
Bean
pbas
366B
Comments
I believe the difference in signal speed vs. speed of light is called Velocity Factor. It would be a good experiment to try coax vs. a single conductor as the VF of coax is usually pretty significant, on the order of .8 or more.
It is amazing to see some of the folks on here like you that are good at putting ideas into practice.
C.W.
Thanks, yeah I guess I should have made the units "nSec" instead of "ft".
It would be a great experiment to measure the velocity factors of different cables.
Bean
Perhaps you have the solution there. Just run the signal through a laser/photo diode set up.
Anyway the speed of signals through wires might be close enough for me:)
My friend works as a director/professor at our German standars lab PTB where they are doing very high precision speed & time measurement.
If you look in their publications there are lots of very interesting things to be found. But more to the normal user environment, I would suggest to use
GPS stabilized oszillators for such experiments, because standard quarz oszilators are not very good in terms of jitter & stability.
http://www.jrmiller.demon.co.uk/projects/ministd/frqstd.htm
Cheers, Fried
What does DMTD stand for? Google comes up with noise...
DMTD is Dual Mixer Time Difference
The reading are pretty jittery, but using long wires of CU and AL should show some difference in speed.
Bean
If the signal was not so jittery, could something approaching the accuracy of Laser Developer's chip be made with a couple props?
Measuring very fast events using a relatively slow clock seems like kind of cool thing that might be useful. I love this stuff!
Jim
Yes, if you had two oscillators (TCXOs) that where about 10ppM apart (or VCTCXOs) that would be ideal.
Bean
Exactly my thoughts. Now I'm interested because I have been thinking of an el'cheapo homebrew TDR for a while. I have tried a couple ideas out, but I could never get it to work accurately enough to be field-usable. If I ever get the non-exsistant spare time, I would love to set this up and see it in action. *glares menacingly at the HUGE stack of paperwork on my desk*
Lawson
I used 16 averaged together and the results varied only by a couple tenths of a nSec.
Bean
These undefined SF-TLA's make me crazy!
And yeah, Prof_Braino. Thaat's exactly what I'm talking about.
The fluctuations are small in the short term, so these average out. I think that you would want to limit sample taken to a single measurement session, as the large drift occure over the long term, in that case you would be measure the long term drift of the crystal and other parts of the system.
I would think one could store reading in EEPROM and transfer to PC later, or just store directly to SD.
The point of interest in this application would be the reflected signal, and the chanllenge would be to fliter out the reflection from other noise, is that correct?
This is a cool application, and might turn out to be useful!
When I was talking about storage, I was not implying the cable under test, I was meaning some sort of database with the average signal propegation for your stock of cables. Like for our purposes here, say 14ga wire made of copper would have a very different signal propegation than 30ga. nickel plated wire, and that would have to factor in to your calculations. I am by no means a math whiz, and would have to call in some big guns to help out with this, but I can't help but think it would work... but.. to repeat myself, accuracy would be my biggest fear. High-dollar TDR setups can detect faults down to the centimeter over miles and miles of cable, and the already inherant errors Bean saw is the biggest turn-off. High precision xtals would help, but not an end-all solution to it.
C'mon Bean. I know you are interested in this, where's your $0.02?
I tried it without the PLL (5 MHz instead of 80 MHz) and it didn't seem to make much difference.
Here is the latest version of the receiver with averaging and better edge handling. Before I started measuring after any jitter, now I start measuring at the first edge regardless of how much jitter comes after it.
Bean
Bean
http://Galileo.phys.Virginia.EDU/classes/109N/lectures/spedlite.html
It could be helpful as a baseline reference..
So far it looks good, and the readings are more stable.
I should have something to post tomorrow, but right now it appears able to have about 50 picoSecond resolution. But I just got it working a couple minutes ago, so that may change.
This will be quite a nice demo of the capabilities of the Propeller chip.
Stay tuned...
Bean
Interesting, how do you get around the need for 'all timeslot sampling', also known as two non-locked frequencies ?
'NOTES:
' This method relies on a small frequency difference between the clock of the transmitter
' and the receiver. If you are having trouble, try a different board for one or the other.
'
"
I'm trying to use the video generator, but it's not working too well.
Initially I was getting nice steady values, but they seem to jump large amounts. I guess because even though the video generator is creating a different frequency it is still phase locked to the crystal.
I'm going to try dithering the video frequency and see if that helps.
Bean
Why not add a simple device like a 74HC4060/LV4060, which has an oscillator and divider ?
Two crystals are always going to give a better result, if you want fractions of a ns averaging.
Oh well. I tried....
Bean
Technically the velocity of electrons in the wire move very slowly.
Something like 1/2" per hour.
It's the wave through them that moves fast.
Nit pick off:
Duane