go away spammer

Author Topic: Time of Flight RF Distance Measurement  (Read 9765 times)

0 Members and 1 Guest are viewing this topic.

Offline airman00Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,650
  • Helpful? 21
  • narobo.com
    • Narobo.com - Mechatronics and related
Time of Flight RF Distance Measurement
« on: April 07, 2009, 10:37:56 AM »
Here's my idea for RF distance measurement that uses the Time of Flight method
HARDWARE: Two transceivers - transceiver A and transceiver B
OPERATION: Transceiver A sends out a signal and starts a timer. Transceiver B receives A's signal and immediately replies with another signal. Transceiver A stops its timer once it receives the reply from B. Take the time , divide it by two and you have the time it took to go one way.
Distance = Velocity * Time .  Only problem is that the velocity for radio transmission is 300,000 km/s, aka the speed of light.

SYSTEM REQUIREMENTS: I need to design a system that operates on a 2 mile (~3.2 km) range , and I want a resolution of about .1 mile (~.16 km). I have already found RF transceivers that can support the 2 mile range I need.
Code: [Select]
DISTANCE = VELOCITY * TIME
.16 km = 300,000 km/s * TIME
TIME =  5.33333333 × 10 -7(thats 10 to the -7) seconds
TIME = 0.533333333 microseconds or 533.333333 nanoseconds

So that means I can have an error tolerance of at most 533 nanoseconds
Would a standard AVR timer be able to handle this much precision?

Can someone point out any useful links or things to read?

Thanks in advance

EDIT: I found this - http://www.eecs.berkeley.edu/~slanzise/research/rf_tof_ranging_dist.pdf
« Last Edit: April 07, 2009, 01:13:55 PM by airman00 »
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline GearMotion

  • Supreme Robot
  • *****
  • Posts: 489
  • Helpful? 24
  • Two decades+ of Embedded Design
    • CircuitGizmos
Re: Time of Flight RF Distance Measurement
« Reply #1 on: April 07, 2009, 11:16:18 AM »
This all depends on the processor crystal clock, interrupt response times, and software - these are all several orders of magnitude too slow for what you attempt to do.

(In my opinion)
« Last Edit: April 07, 2009, 11:19:54 AM by GearMotion »

Offline airman00Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,650
  • Helpful? 21
  • narobo.com
    • Narobo.com - Mechatronics and related
Re: Time of Flight RF Distance Measurement
« Reply #2 on: April 09, 2009, 04:13:18 PM »
AVRfreaks.net replies:
Quote
You are limited to what ever the system clock rate is. If it is a 20MHz processor running at 20MHz, you have 5ns. That is pretty much max for any of the standard AVRS, I think. XMegas are reported to be spec'd for something like 32MHz.

I think my idea is really doable!
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline kd5kfl

  • Full Member
  • ***
  • Posts: 72
  • Helpful? 1
Re: Time of Flight RF Distance Measurement
« Reply #3 on: April 09, 2009, 07:04:56 PM »
The inconsistencies in the system clock would be a huge source of error. referring to variations in the duty cycle of a clock which was not designed for high precision.

interrupts in the computer would throw things off.

as my flight instructor was fond of saying... You go ahead. I'll watch.

Offline airman00Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,650
  • Helpful? 21
  • narobo.com
    • Narobo.com - Mechatronics and related
Re: Time of Flight RF Distance Measurement
« Reply #4 on: April 09, 2009, 08:25:38 PM »
I made a similar post about this on AVRfreaks
Read about it here: http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=77431
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline GearMotion

  • Supreme Robot
  • *****
  • Posts: 489
  • Helpful? 24
  • Two decades+ of Embedded Design
    • CircuitGizmos
Re: Time of Flight RF Distance Measurement
« Reply #5 on: April 10, 2009, 07:38:22 AM »
Your other post only talked about timing, not about sending signals, not about keeping two systems in sync. Like kd5kfl's instructor said...

Offline airman00Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,650
  • Helpful? 21
  • narobo.com
    • Narobo.com - Mechatronics and related
Re: Time of Flight RF Distance Measurement
« Reply #6 on: April 10, 2009, 07:45:02 AM »
not about keeping two systems in sync.
they don't have to be in sync. Think about it...
OPERATION: Transceiver A sends out a signal and starts a timer. Transceiver B receives A's signal and immediately replies with another signal. Transceiver A stops its timer once it receives the reply from B. Take the time , divide it by two and you have the time it took to go one way.
Transceiver B is constantly waiting and immediately sends a reply to the Transceiver A that receives , so Transceiver A and B do not have to be synced. Obviously you would have to subtract how long it takes to send out the RF signal out UART or whatever.....
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline GearMotion

  • Supreme Robot
  • *****
  • Posts: 489
  • Helpful? 24
  • Two decades+ of Embedded Design
    • CircuitGizmos
Re: Time of Flight RF Distance Measurement
« Reply #7 on: April 10, 2009, 08:40:52 AM »
not about keeping two systems in sync.
they don't have to be in sync. Think about it...
OPERATION: Transceiver A sends out a signal and starts a timer. Transceiver B receives A's signal and immediately replies with another signal. Transceiver A stops its timer once it receives the reply from B. Take the time , divide it by two and you have the time it took to go one way.
Transceiver B is constantly waiting and immediately sends a reply to the Transceiver A that receives , so Transceiver A and B do not have to be synced. Obviously you would have to subtract how long it takes to send out the RF signal out UART or whatever.....

RF signal out of a UART?? The point that is being made is you are talking about speed of light measurements using a $2 processor running at 20 MHz using a crystal with 200 parts per million accuracy. You have to account for the variability of a signal happening at any state of the processor operation. The AVR's variability makes this effort impractical.


Offline airman00Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,650
  • Helpful? 21
  • narobo.com
    • Narobo.com - Mechatronics and related
Re: Time of Flight RF Distance Measurement
« Reply #8 on: April 10, 2009, 09:27:11 AM »
RF signal out of a UART?? The point that is being made is you are talking about speed of light measurements using a $2 processor running at 20 MHz using a crystal with 200 parts per million accuracy. You have to account for the variability of a signal happening at any state of the processor operation. The AVR's variability makes this effort impractical.
I think I understand now, thanks GearMotion

But still ,from what I understand, I will be able to get my +-.1 mile (~.16 km) accuracy. What do you think GearMotion?
Thanks
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline GearMotion

  • Supreme Robot
  • *****
  • Posts: 489
  • Helpful? 24
  • Two decades+ of Embedded Design
    • CircuitGizmos
Re: Time of Flight RF Distance Measurement
« Reply #9 on: April 10, 2009, 09:49:49 AM »
But still ,from what I understand, I will be able to get my +-.1 mile (~.16 km) accuracy. What do you think GearMotion?

Frankly I'd take the problem out of the domain of the microcontroller. A microcontroller (the stationary one - point A) can start and then gather the measured results, but you are better off making some external hardware to handle this.

Might be easier to explain using LEDs. Point A has a red LED triggered by a microcontroller. That same trigger also trips a high frequency counter. Point B has a red LED detector that trips a blue LED. No micro involved, so you keep the number of variables reduced.

Point A then gets a signal back from point B with a blue LED detector. This signal stops the counter. The counter value is read by the the microcontroller.

Would you be able to replace these ideal LED devices/detectors with real-world devices? What is the frequency of your radio? Or put a different way, what is the period of your carrier frequency? Is it a variable? Can you detect a signal with zero delay? How many periods of your radio frequency signal does it take to establish detection? Is that reliable, consistent?



Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Time of Flight RF Distance Measurement
« Reply #10 on: April 11, 2009, 01:59:38 PM »
Hi,

I think my idea is really doable!
So, in other words you didn't read the other quite recent threads we had on the subject??
You confuse timer ticks, resolution and precision.

I know it isn't doable!
(What you describe and the way you wanna do it, but hey, it's your time and money, so feel free to waste some of each).
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline airman00Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,650
  • Helpful? 21
  • narobo.com
    • Narobo.com - Mechatronics and related
Re: Time of Flight RF Distance Measurement
« Reply #11 on: April 11, 2009, 03:11:37 PM »
So, in other words you didn't read the other quite recent threads we had on the subject??
I did .
Here's what I found : http://www.societyofrobots.com/robotforum/index.php?topic=5923.0

There was another thread, but I cant find it right now.
From the AVRfreaks thread it seems like I can get relatively good precision. I would get an error of +-.1 mile, which is acceptable to me.
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

 


Get Your Ad Here