Propogation time measurement

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Propogation time measurement

12,315 Views
BeNoM
Contributor I
Hello!

How can I measure a propogation time of the signal sent by zigbee tranciever?
I mean, if I send a signal from tranciever A to B, I want to measure the time the signal travels in the air from A to B. How can I do it?

Thanks,
BeNoM
Labels (1)
0 Kudos
Reply
41 Replies

2,303 Views
BeNoM
Contributor I

Hi Wings!

Thanks for the RDF idea!

To clearify, I have base stationS (as much as I want)  with 100m of distance between them, placed on shore line.

I thought about determinig the position using the RDF and Base StationS.

With 2 stations and RDF I get only the TOP ANGLE of the tringale Base1 <-> Swimmer <-> Base 2

and the base length of the triangle ( 100m distance between the stations)  but it's not enough for

determinig the exact swimmer's position...

Could you please tell more about the RDF or ADF methods?

 

Thanks,

BeNoM

0 Kudos
Reply

2,303 Views
Wings
Contributor I
If you go here:
http://www.ramseyelectronics.com/cgi-bin/commerce.exe?preadd=action&key=DDF1
You'll find an electronic kit that will do what I'm talking about. It comes with schematics & theory of operation -- should get you all the info you'd need. ($170) A friend of mine has one of these but he's never put it together yet. I had a peek at it yesterday. I saw that the antenna switchers are common 1N4148 diodes and they say this works up to 450MHz. I'd say that's pushing it, and if you're going to use this kit at anything higher I'd recommend diodes with much lower capacitance than a 4148. You may also have to reduce the values of the inductors used in antenna switching if the frequency is much higher than 450. What they're using probably has way too much parasitic capacitance above 1GHz.

And as far as determining position using 2 base stations, if you know the direction from each base station to the swimmer you have all the info you need to determine the swimmers exact location relative to a base station. Lookie here:
http://en.wikipedia.org/wiki/Triangulation

Remember, if you plan on using this approach you'll have to provide a continuous unmodulated carrier from the swimmer during the RDF capture (which shouldn't take but a few tens of milliseconds, if that). If the carrier is modulated like it would be in sending a data packet I feel sure it will confuse the hell out of the RDF decoder hardware/software.
0 Kudos
Reply

2,303 Views
BeNoM
Contributor I

I think RDF is a great method and I need only 2 base stations for determinig the exact position instead of 3, in other methods...

What can you tell me about the accuracy of the RDF method?

BeNoM

0 Kudos
Reply

2,303 Views
Wings
Contributor I
Accuracy - My only experience using RDF with a 4-antenna system was many years ago. I (we) borrowed one on a couple of occasions when we had a tracking mission. (Many years ago I went on a wild excursion from real life and had my own P.I. business for a while.) The indicator was the same as you see in the Ramsey device, a ring of LEDs. Our transmitter only transmitted short pulses of about 1 half second every few seconds, so you had to be looking. After several pings you got fairly comfortable in knowing the direction, but since we were usually moving, it was erratic at times. My guess is, on the water with no buildings & stuff around the base or the swimmer, it should be quite good.

"I think that using "RF MUX" to switch between the antennas would be preferable for RDF application."

I agree, especially at upper UHF.
0 Kudos
Reply

2,303 Views
BeNoM
Contributor I
I think that using "RF MUX" to switch  between the antennas would be preferable for RDF application.
 
What do you think?
 
BeNoM
0 Kudos
Reply

2,303 Views
BeNoM
Contributor I
Hi! I'm a bit busy so I'll replay later to your ideas...
Look what I found in TI:
 
They say that they implemented a "Location Engine" for their ZigBee Tranceiver.
I've read briefly the PDF and their method very similar to the method I've described
with the "range formula". Do you think their method is reliable?
 
Thanks,
BeNoM
 
 
0 Kudos
Reply

2,303 Views
Wings
Contributor I
In answer to your question: No

Why? Because in your case none of the swimmers are stationery, and even if they were, the orientation of the transceivers relative to the base station would be continuously variable, making the measured RSSI a variable variable, or variable^2. :smileyhappy:

I glanced over the pdf and got a general idea of what they're doing. Seems like quite an elaborate and complex calculation, and got the idea that the result is just a good guess of the unit's position. Also it seems with so much calibration taking place beforehand, it would only be suitable for transceivers that remain in a fixed location and orientation.

The only way to really know is to try it, but I'd surely place a phone call to TI and try and talk to the guy who wrote that document before I put a lot of time in it.
0 Kudos
Reply

2,303 Views
rhinoceroshead
Contributor I


 
What about echoes from sonar transmitions? How to avoid echoe effects?


You would just have to wait until the echos die out before sending another pulse.



1. What are the prices for sonar transmitter and receiver?
2. What companies produce sonar solutions?
3. What are the dimensions of such sonar chip?
4. For sonar transmition, do I have to ask for a license?
5. What frequencies are license free?


1. To buy just an ultrasonic transmitter and receiver, it would be around $10 - $20 USD.  It's just a little piezo speaker/microphone set that is tuned to specific frequency like 40 kHz.

2.  I think the ones I have were made by Panasonic, but I'm sure there are lots of manufacturers out there.

3.  It's not a chip.  It looks a lot like an electrolytic capacitor approximately 1 cm in diameter and 1 cm in length.

4.  No license necessary.  It's just a sound wave.  It might be annoying to some animals but the FCC won't mind.

I don't think sonar will work at great distances in the air though.  I'm going to suggest that you use the phase shift method again.  The base and mobile station(s) could transmit on some high, but non-microwave frequency and the device on the swimmer's wrist would just retransmit the signal it receives on a slightly different frequency.  The base station would modulate a square wave onto that carrier with blanking pulses.  The carrier can be generated with a crystal and the blanking can be easily done on most PLL chips.  When the received signal comes back to the the base station, amplify it and you can use an XOR gate as a phase discriminator.  When the received square wave and the original square wave are exactly in phase (zero meters distance) the output from the XOR gate will be zero volts.  When the received and original square waves are 180 degrees out of phase, the output of the XOR gate will be a solid 1 volt.  Everything in between 0 and 180 degrees will effectively give you a PWM signal proportional to distance.  If you low-pass filter the PWM signal, you will get a voltage proportional to the distance.  You would have to experiment and do a few calculations to determine an appropriate square wave frequency and you will most likely need a very fast XOR gate, or you could use the phase discriminator from a PLL - likely to be an XOR gate.

0 Kudos
Reply

2,303 Views
Wings
Contributor I
BeNoM - I'm gonna bill you for bringing up such an interesting topic. :smileyhappy:

More thoughts on sonar (wish we knew more of the requirements of your application).

IF you can endure having a device placed at the shoreline, and IF the system only needs to compute distance over a short period of time, like for several minutes, you could do it without having to transmit from the swimmer. Start by having the swimmer near the shore unit at some known distance, and press a button on the swimmer's unit. This would cause the swimmer unit to lock onto the pulses coming from the shore unit and adjust its oscillator to get into sync. You should be able to trim a crystal oscillator to within a few parts per million. Then, as the swimmer gets farther away the pulses from the transmitter will lag your reference by an amount proportional to distance. If you could trim the oscillator to within, say, 5ppm, then after 10 minutes the time difference due to the oscillator error would only be 3 ms, or around 15 feet. 30 feet after 20 minutes.

Mmmmm... you never said if you wanted the SWIMMER to know his distance or the base station to know it. Which is it?
0 Kudos
Reply

2,303 Views
Wings
Contributor I
Rhino - wouldn't a 25MHz timer clock give you half that resolution? (6 meters vs 12) He would be measuring the round trip time, correct?

I kinda wish I had an application that needed this. But then again I should have never read BeNom's post - I've got other things to think about and this problem is stealing cycles from my project. :smileyhappy:
0 Kudos
Reply

2,303 Views
rhinoceroshead
Contributor I
Yeah, you're right, Wings.  I should have said 6 meters.  Hey - is your moniker in reference to aviation?  Isn't the phase difference distance measuring method what they use in aviation for the DME instrument?
 
Or maybe you're a Paul McCartney fan...
 
As for stealing cycles in your project, couldn't you do some kind of a clock stretch?  :-P
0 Kudos
Reply

2,303 Views
rhinoceroshead
Contributor I

Oops, I see that you're using an LNA.  Maybe this resolution is acceptable for you then.

One more thing - if the channel is open most of the time, you could get around the problem of variable lag times by taking very large numbers of measurements and averaging them.  Hopefully the sources of random error will cancel out and you will be left with only the predictable error.  In fact, taking a statistical approach, you could forget about all the error sources and lump them all into one random variable.  If you make 100 measurements, you can calibrate against a known distance and statistically determine the accuracy of the instrument.
0 Kudos
Reply

2,303 Views
BeNoM
Contributor I
hhhhhh... I really don't want to choose the 3 option...
 
Thanks everybody for help...
0 Kudos
Reply

2,303 Views
BeNoM
Contributor I
Thank you Wings! You've understood what I'm trying to do...
 
You gave me some interesting ideas...
 
What is the price of Evalution Board of the chip from ChipCon?
How much trancievers it contains?
Do they have a support with examples and code?
 
Thank you,
BeNoM
0 Kudos
Reply

2,303 Views
Wings
Contributor I
If my memory serves me, you get 2 900MHz transceiver development boards for $500. Their intention is for you to connect one to one PC and the other to a 2nd PC. When I got mine I got one of the first they ever shipped, so I was plagued with many problems, mostly software issues and some chip issues. If I had that to do over again I would just invest my time in going over the data sheet a few extra times and dive right into the chip. Their development system cost me more in time than it should have. The boards are fairly easy to connect directly to your own microcontroller. The design I did uses a QG8 and a 2nd piggy-back board that contains just the transceiver chip and its magical components. If you follow their reference design it should work well - it did for me. I get over 1 mile range using just a 3-inch 1/4 wave whip under ideal conditions (the shoulder of an interstate highway, on a 12 foot pole). The chip's maximum power is 10mw and it has excellent sensitivity.

As far as example code, I don't really know. They didn't have anything I could use at the time I got into it. But now I've got my own frequency hopping spread spectrum mesh network running and I'm pleased with the results.
0 Kudos
Reply

2,303 Views
rhinoceroshead
Contributor I
You could run the timer on A and record the counter value and then send a frame to B and make B echo it back to A.  Then A can record the timer counter again, subtract from the original and then divide the result by 2.
0 Kudos
Reply

2,303 Views
BeNoM
Contributor I

The problem is that by the method you suggest, I also measure the time it takes to

a transmitter to generate the message so the time I will measure in fact is:

t = T + t1

where T is an actual time the signal travels in the air

and t1 is a time that takes to transmitter to generate the message and to receiver to decode the message,

so, t1 is a prasite time.

Moreover, the mechanism of sending a message (at least in ZigBee) waits until the "channel" is clear

so I should take this time in acount.

Do you have an idea how can I solve the problem of "parasite" time? 

0 Kudos
Reply

2,303 Views
rocco
Senior Contributor II
Hi, BeNoM:

I'm not sure what you are trying to measure . . . or why?

If you are trying to measure the time the signal actually propagates through the air, the microcontroller's timers are not fast enough. The signal will propagate at the speed of light through air, which is about one foot per nanosecond. No microcontroller that I know about has nanosecond resolution for its timers.

Is this measurement for testing purposes or is it part of the application?

If it is for testing purposes, you could try using a fast oscilloscope. But keep in mind that the signals will need to travel through the scope-probe leads, and that time will be close to the speed through the air. The scope will have it's own internal delay, but that should be called out in the specs. You could simply subtract out the scope and lead delays.

But when all is said and done, the measurement you will get will be the speed of light through air.

Message Edited by rocco on 2006-08-03 01:28 PM

0 Kudos
Reply

2,303 Views
BeNoM
Contributor I

 

Again, thanks for help.

This is the most important part of my application. I don't want involve GPS in my project.

The target is to find the distance between 2 trancievers.

According to my calcultions I get the following:

Max range I'll get from ZigBee is 1km (with low noise aplifier).

C = 300,000 km/s

T = L / C = 1km / 300,000km/s = 3.33 micro seconds

So, we are talking about of microseconds...

So a microcontroller that works on 12MHz does a "tick" every aprox 0.1 micro second.

So, at least in theory I will be able to measure the propogation time...

0 Kudos
Reply

2,303 Views
RedMountain
Contributor I
Maybe I'm really confused, but isn't that whole equation thing you're using a very crude way of attempting to derive the speed of light? The propogation time through the air will be the speed of light multiplied by the distance of transmission. This will be very very tiny compared to the actual processing time of the signal (processing individual bits after they have gone through the 802.15.4 IEEE protocol, mcu operations, etc). I'd try the method rhino suggested to figure out what sort of time it takes to transmit, recieve, process transmit recieve, and divide it by 2 to figure out a rough idea of how long a transmission and its associated minimal processing (your "parasite time") takes.

Let me know if I'm completely off track. :smileyhappy:

Now that I think about it, you could figure out exactly how long an 802.15.4 packet would take by reading the IEEE spec and finding how long it transmits per byte of information. Is that the sort of thing you're looking for? I can look it up and/or point you to that information if that indeed is what you're interested in.

Message Edited by Red Mountain on 2006-08-03 01:19 PM

0 Kudos
Reply

2,303 Views
BeNoM
Contributor I

First, thanks for help!

You are not confused :smileyhappy:, but my target is to find an efficient and simple way to measure the distanse between 2 trancievers.

I don't have the ZigBee trancievers so I can't do the tests by myself :smileysad:

I want to derive the distance from the equestion: D = C x T.

Where C is a speed of the signal (because we don't live in vacum it won't equel exactly to

speed of light but aprox. it does).

T - is an exact time the signal travels in the air.

I don't sure, but I think that times stated in IEEE  802.15.4 for frames proccecing are only in theory

but maybe you're right, it's worth to check this out...

It's intersting to know what are aprox. values of "parasite time" we are talking about...

I thought of the next method to calculate the real average "parasite time":

By placing 2 trancievers in 2 different places we get 2 equations:

time1 = T1 + "parasite time"

time2 = T2 + "parasite time"

I assume that average "parasite time" is the same and it's make sense because we

we use the same trancievers, the same firmaware and sending the same frames.

To decrease the error one may perform number of such measurements and calculate the average

of the "parasite time".

And now, when I have the "parasite time" I can derive the exact time T that the signal travels in the air,

and from the equation L = C x T we get the axact distance between 2 trancievers...

Sounds very nice in theory...

What do you think?

Unfortunately, I don't have a ZigBee tranciever to test it by myself :smileysad:

0 Kudos
Reply