Measuring distance with RF

Hi

this link seems to suggest that you could use a circuit to send a ping to another circuit, measure the length of time taken to receive a reply and get a result with an accuracy of +-5m

I stumbled accross this whilst playing around with two arduinos that happen to have some RF modems on them , so I thought it might be a fun experiment, but...........

I stuck a Serial.prinln(currentMillis) into my sketch and the beggining of the loop. and I let the serial monitor run for a bit, I get a 7ms loop time, with some flucuation.

meaning that in theory ( and or practice) the radio waves from my modules will have travelled (299792458/1000) per millisecond, and since the loop takes 7 times this to run, I would in no way be able to get anything useful from it.

Is there any feasibilty in using an arduino , or any microcontroller for this idea?

It's easy to use, it's easy to built [sic], it's cheap and it's a new revolutionary method of distance measurement

So revolutionary, it's only been around since the 1930s.

With custom hardware yes, doable, but with a processor that only executes a single instruction in the time it takes your radio signal to travel 18metres, +/- 5metres is a bit optimistic.

In general Instructables are crap and I think this last sentence shows it to be the crap it is:-

And you can use it without any knowledge of measurement technics.

spruce_m00se:
I stuck a Serial.prinln(currentMillis) into my sketch

I think you're barking up the wrong tree. To work that out for yourself, calculate what sort of timing resolution and accuracy you need to achieve, and then look at the realistic chances of achieving that on your Arduino.

If you're looking for resolution in terms of meters rather than kilometers I doubt the Arduino will be able to do it in hardware running at 16MHz. I'm even more skeptical that it can be done in software. Doing it using a polled architecture is even less likely to work. A polled architecture with print statements in the polling loop is substantially less likely to work.

You could use a big glob of Bose-Einstein condensate to slow your RF signal down.

i'm not suggesting it would work , I just wanted to know if it is worth investigating.

I just read about micros() having a 4microsecond resolution, that equates to 1.2km

My general goal when I stumbled across this was to be able to find a way to immitate a GPS position hold on a quadcopter that is inside a building that cannot be accessed previously,

This clearly will never get submeter accuracy, although I guess 2m would be acceptble.

Mike, agreed, even I have spotted a load of total crap on instructables, and I dont know much at all

AWOL:
You could use a big glob of Bose-Einstein condensate to slow your RF signal down.

Can't I just use some gooey jam, cooled in the fridge?

I suppose that will do, if you're all out of Bose-Einstein condensate.

Grumpy_Mike:
In general Instructables are crap

Do they not vet the stuff at all?

I don't spend much time there because that has been my observation as well, although there is the occasional article that is OK.

AWOL:
I suppose that will do, if you're all out of Bose-Einstein condensate.

Yep , until the winter, I cant overclock the fridge enough to get close to absolute zero on a hot day,
maybe if I stuck a coupld of hamsters on the generator??

Do they not vet the stuff at all?

Well appart from getting nerd gun projects not to swamp other submissions no it is not vetted in any way. I think they see it as a freedom of speach issue.
You can tell the level it is aimed at by some of the inane comments readers put.

I just read about micros() having a 4microsecond resolution, that equates to 1.2km

Just don't use pulseIn, get timing from ICP - input capture of Timer1 running 16 MHZ, 62.5 nsec.
If you take DUE with 84MHz uCPU clock, you will get about 5 m resolution.
Averaging over 256 ping's would increase this value down to ~1 m or so.
May be slow for real time flying plane

if it could go down to 1m then it would definately be worth considering,

Magician:
Averaging over 256 ping's would increase this value down to ~1 m or so.

Only if you have the appropriate amount of random noise in your measurements.

doppler plotting ?
i builded a system tryng to reed the base stations db ,, and look the differnts in meters ,,
failures when some things are blocking the signal ,
butt you can do a rssi to meter conversion ,, but this wil be like a barometic sensor ,,
conditions ,, freq you wil use ,, but yes its posible
i have a video , where i identify cb radio people,
i use four antenase ,, like a cube ,, it wil measure antena 1-2-3-4 and back to 1 ,,
it wil see the differents from four points ,,

as four antenas wil rx the same db signal , but wil the one closest in the corner near the signal ,,
wil give the most input ,,
so when example antema 1 is the stronges i now it wil come from this corner ,,
when i combine al 4 ,, i even can see ho is talking ,,
the funny thing is when they switch to heigh to lower tx power ,, the inputs wil change on al four points ,
so still i know there patern ,,
but if you reverse this method ,, for reading pos and height ,,
i now for sure you can make a system working ,, ,
use high freq ,, above 433, mhz ,, and measure the rrsi , constrained to meters ,,
this can be different when tc condtions are worse or good ,, but this is onley for Dx conditions ,
i use al kind of cb ahm radio stuff , and yes you can measure hieght ,
and distance ,, if you know the fixed tx output watts ,,, :smiley: