Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Calculating distance using RF

Status
Not open for further replies.

ealee264

New Member
Hi, I am facing this particular problem of determining the distance between the transceivers using Radio Frequency Wave.

SInce the wave is travelling in the speed of light, there is not a proper PIC which is fast enough to calculate the distance up to the accuracy of 1m as i would need an internal frequency of 300Mhz. Is there any other way of calculating this distance?

The reason i used RF is because it could penetrate obstacles. So I cannot use other wave..IS there any suggestion for my problem?,,
 
Timimng to nano-second resolution is relatively easy using hardware counters and a suitable clock.

However, if you are thinking of using one transceiver to send a pulse which is then recieved and re-transmitted back to the first transciever to give the "time of flight" of the pulse, you will have far greater problems than the timing resolution.

There will be propagation delays through the transceivers at both ends of the link, these delays (if they are consistently repeatable) must be subtracted from the measured pulse return time.
You may also have problems with receiver recovery time, ie the time for the reciever to return to full sensitivity on switching from transmit to receive.

JimB
 
Timimng to nano-second resolution is relatively easy using hardware counters and a suitable clock.


There will be propagation delays through the transceivers at both ends of the link, these delays (if they are consistently repeatable) must be subtracted from the measured pulse return time.
You may also have problems with receiver recovery time, ie the time for the reciever to return to full sensitivity on switching from transmit to receive.

JimB

Thx PC88 for the thread it enlighten me more. Mr JimB, u mentioned tha nano- sec resolution is easy to achieved...but i find it hard to locate such high frequency clock and counter.. how much would it cost ?

Ab the delays, i have thought of it. I would be carry out experiment to ind out the errors hopefullyit could be accurate enough.
 
while triangulation is much easier, RF time of flight would need to be 3.33nS/meter.

Well you could use all ECL but that is very expensive and power huungry.

The affordable way to do it is a combination of

https://www.electro-tech-online.com/custompdfs/2008/11/DS1124.pdf

and

https://global.kyocera.com/prdct/electro/pdf/add_pdf/169_173_e.pdf

Remembering that the length of the counter is your maximum measurable distance and you need two edges of the counter going in the same direction in the delay line.

Dan
 
I'm not sure how you would do it with discrete chips, but here are some frequency counters with 300 Mhz direct count capabilities:

https://www.electro-tech-online.com/custompdfs/2008/11/01FC103_01FC104-1.pdf

Aceco by WiMo: Frequency counter, bug finder, RF tester
Those are 300MHz frequency counters and not 300MHz timers.

They are usually front end mixers and then lower frequency counters. This may have changed more recently on high end units, they might have transitioned to FPGAs.
 
while triangulation is much easier, RF time of flight would need to be 3.33nS/meter.


Remembering that the length of the counter is your maximum measurable distance and you need two edges of the counter going in the same direction in the delay line.

Dan

Thx Dan, are u saying using triangulation to calculate the distance?,,Im using Triangulation to calculate the position of the tracked object..

The datasheet u gave me, the size of the clock is kinda mini...How am I supposed to solder on PCB board..and the clock frequency is just 40MHz and I need the clock frequency to be 300MHz.Did I get the wrong idea?..

Please enlighten me...
 
Thx Dan, are u saying using triangulation to calculate the distance?,,Im using Triangulation to calculate the position of the tracked object..

The datasheet u gave me, the size of the clock is kinda mini...How am I supposed to solder on PCB board..and the clock frequency is just 40MHz and I need the clock frequency to be 300MHz.Did I get the wrong idea?..

Please enlighten me...
Well if you are already triangulating, I am a bit in the dark as to what you are doing since it is simple math from your location to it's to give you it's distance.

The clock frequency does not need to be 300MHz, the measurement resolution needs to be 3nS. 30MHz into a PIC counter, since so many have a thing for worshiping it, gives you your main time base. The programmable delay line gives you sub nanosecond resolution in affordable parts.

Wow. that part is better than I thought. :) I was only comparing decent accuracy with decent price. Of course my idea of decent is a bit, um, extreme. ;)

Dan
 
Emm,,perhaps i have misused the word triangulation. I calculated the distance A(transceiver) and B(transceiver),by having A transmit a signal to B and B send back to A.
By using the speed equation distance traveled = speed of light/time taken. with the assumption that the time delay is deducted. I will be using this distance together with another 2 distance of separation(BC and BD) to calculated the 2D position of B. This is actually Trilateration...=.=''

I thought the clock frequency is directly proportional to the resolution of the measurement. For example PIC 16F877A using 20 MHz crystal, the internal clock frequency would be 5 MHz. When i used this to make a counter , the step size of be 200 ns.

Did i get the wrong concept?..
 
The clock frequency does not need to be 300MHz, the measurement resolution needs to be 3nS. 30MHz into a PIC counter, since so many have a thing for worshiping it, gives you your main time base. The programmable delay line gives you sub nanosecond resolution in affordable parts.

Dan


How are we supposed to achieved the resolution of 3ns using the items u suggested?..what i understand from the DS1124 is actually a delay device up to the accuracy of .25ns..and for the clock I can just use a crystal clock with frequency 20 MHz right?

Thanks in advance..
 
Last edited:
How are we supposed to achieved the resolution of 3ns using the items u suggested?..what i understand from the DS1124 is actually a delay device up to the accuracy of .25ns..and for the clock I can just use a crystal clock with frequency 20 MHz right?

Thanks in advance..
not a problem.

Technically yes... I am just to used to looking at smaller numbers. A 100PPM/C crystal will only vary around 0.01%/C

Dan
 
Can u further elaborate on this? Kinda lost.. Do u have any example schematic using this device as counter?

Thanks
You reverse the process. Instead of directly measuring time of flight, compare it to a standard, in this case the sum of the counter and the programmable delay line.

The counter overflow goes out to the delay line and the echo from the remote stops the counter and is compared to the output of the programable delay. Since you know what you put into the system, when it matches the echo time you have found the distance to the target.
 
You reverse the process. Instead of directly measuring time of flight, compare it to a standard, in this case the sum of the counter and the programmable delay line.

The counter overflow goes out to the delay line and the echo from the remote stops the counter and is compared to the output of the programable delay. Since you know what you put into the system, when it matches the echo time you have found the distance to the target.

OOOOHHHH..I not really understand what ur idea is but it enlightened me on this. Is this what u mean?
let say a 4 bit counter at 1111. After Td(programmable delay) it changes to 0000. The algorithm would be 1st start off with maximum step size which is 255*0.25ns. If the counter still remain 1111, Td will be decreased by 0.25ns then it continues till the counter changes to 0000. The delay time that that trigger the changes of the counter would be representing the time of flight.

Is this what u mean =)
 
yes that and some averaging to get rid of noise. but you need to latch the return signal so it stays put, and you can do successive approximation to reduce the number of samples to complete the measurement.

I think... the counter is part of the "guess" when the counter goes from 0000 to 1111 it toggles a pin connected to the input of the delay so the two add together. The return edge is latched as well so you get two edges into another latch. If you were to run samples at 100Hz you could think of the system as a phase locked loop.

Dan
 
Last edited:
Thx Dan. Going to work on a proper circuit and and programming as well. Stilll very green in programming. Ordering sample ....

By the way, I can just use 20MHz crystal for the clock input for the ds1124 right?.

Thx =)
 
Thx Dan. Going to work on a proper circuit and and programming as well. Stilll very green in programming. Ordering sample ....

By the way, I can just use 20MHz crystal for the clock input for the ds1124 right?.

Thx =)
no the input to the DS1124 is the counter overflow... the DS1124 alone can only measure 21 meters. If that is all you need then you do not need the counter at all. You could look into other companies as well, the DS1124 would give you a resolution of 0.1M. There are other parts around as well.

Dan
 
As a starter project you might consider beginning with building a ultrasonic-range finder. Many of the principles will be the same, but it'll be much simpler in several respects. For instance, your timer resolution only needs to be microseconds instead of nanonseconds, and generating an ultrasonic pulse has fewer pitfalls than transmitting an RF pulse.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top