Distance measurements with Xbee and Propeller
spragucm
Posts: 5
Here's my scenario:
I have three propellers with an Xbee attached to each. Two props (w/Xbee) are mounted at a fixed, measured distance. The third prop (w/Xbee) is moving around. I want to calculate the distance between the moving prop and the fixed props.
I think that it would be possible to send a bit from the moving prop to stationary ones over the Xbees, and determine the distance by saying:
distance=velocity*time
where distance is distance between moving/stationary Xbees
velocity is that of light in air
time is the time it took for the bit to travel (clocked by the xbees)
So, here's the question...Is this possible? Has anybody tried this or something similar to calculate distances?
Thanks much
I have three propellers with an Xbee attached to each. Two props (w/Xbee) are mounted at a fixed, measured distance. The third prop (w/Xbee) is moving around. I want to calculate the distance between the moving prop and the fixed props.
I think that it would be possible to send a bit from the moving prop to stationary ones over the Xbees, and determine the distance by saying:
distance=velocity*time
where distance is distance between moving/stationary Xbees
velocity is that of light in air
time is the time it took for the bit to travel (clocked by the xbees)
So, here's the question...Is this possible? Has anybody tried this or something similar to calculate distances?
Thanks much
Comments
XBees have the signal strength indicator. If this value is brought out to the I/O pins it could be a good solution to approximate distance.
But the real reason I replied to your post is to welcome you to our forums. I can see that you've made only a few posts and want to see that you feel right at home!
Sincerely,
Ken Gracey
I just finished a book about using XBees in wireless sensor networks. I'm not familiar with any way of accurately determining the time a signal is received.
If XBees can't do it there are other wireless devices or even using visible light. I think you'd have better luck with some sort to audio signal. You could use ultrasonic transducers to send and receive signals. This would be a lot more accurate than trying to measure the distance light travels in a given time.
BTW, Welcome to the forums.
One method might be to use an ultrasonic + radio hybrid solution. Thinking out loud: Have the roving Prop emit an initial ultrasonic ping 'packet' burst from either a multidirectional speaker, or rotating speaker. The packet is a series of pings that can be decoded by the receiver as a START packet. There could even be ping packets that contain the ID of the receiver. The 2 receiving Props sync to the START packets, then emits a radio response that tells the sending Prop it has received the packet, and tells the sender to fire the 'measurement detection pings' after the receiver has locked a timing method onto the sent packet. The time it takes the sender to reply with the follow up ping may be able to be determined and a distance extracted from the process.
In simpler form:
Sender sends START packet, a series of sound pulses.
The Receiver decodes the packet and determines if it is the ID contained in the packet.
The Receiver can lock on to the START packet with an internal timing method (start a timer).
The Receiver sends back an ACK via radio that says basically "Got your message, timer is started"
The Sender sends back either a solo ping or packet of pings for measurement.
The Receiver determines the time it took to receive the measurement pings
The Receiver then replies via radio the result.
All of this still requires that the environment be adequate for the audio to work right.
EDIT: Light intensity falls off quite consistently and measurably. If you had enough light sensors on the receivers, and enough light emitters on the sender, you may be able to use a method of calibrating the distance to the light fall-off factor. And again if using the radio for the response, each Prop can send out it's detected distance via xbee.