# Distance between RF Transmitter and Receiver Using Arduino

Hello all, I am doing a project on finding the distance between RF Transmitter and Receiver I am using two 433MHz Transmitter and Receiver pair.

But max Frequency of arduino is 16MHz, is it possible to calculate the transmission and reception time of the RF module using ardunio

Suggest easy methods to find the travelling time of Rf, so that the distance can be calculated using Distance=Speed x Time.

If this is not possible, do tell a way to go about.... Both Hardware and software changes are welcome

Suggest easy methods to find the travelling time of Rf,

There aren't any in the Arduino universe.

Ramanathan_AR: Suggest easy methods to find the travelling time of Rf, so that the distance can be calculated using Distance=Speed x Time.

If it was 'easy' then;

Lots of people would have done it already

and

You would not need to ask.

And of course it would depend on the distance being 'measured' but for some reason you have not told us that.

With Arduino you may measure time in ~0.1us = 10^(-7)s precision. Since speed of light is 3.10^8m/s the best precision you may hope for is +/- 30m. I am afraid it will take a lot of work to get better result than simple in range/out of range approach.

Ramanathan_AR: If this is not possible, do tell a way to go about.... Both Hardware and software changes are welcome

Or, if the distance between the Arduinos is sufficient equip both of them with GPS receivers and have one of them send its location data to the other.

...R

You would have a much better chance of success by looking at the signal strength. That is of course if the hardware exposes that metric.

You would have a much better chance of success by looking at the signal strength.

Signal strength is useless for calculating distance, except under very special circumstances.

jremington: Signal strength is useless for calculating distance, except under very special circumstances.

In this case, you are probably right.

Ramanathan_AR: Hello all, I am doing a project on finding the distance between RF Transmitter and Receiver I am using two 433MHz Transmitter and Receiver pair.

But max Frequency of arduino is 16MHz, is it possible to calculate the transmission and reception time of the RF module using ardunio

Suggest easy methods to find the travelling time of Rf, so that the distance can be calculated using Distance=Speed x Time.

If this is not possible, do tell a way to go about.... Both Hardware and software changes are welcome

It is well nigh impossible to do this (except for highly constrained scenarios), because the composition and geometry of the surroundings have such a strong influence on signal strength (you've probably experienced this with a wifi signal that has dead spots, even when it works in places further away), and because the signal will bounce off of surfaces, ie, it doesn't take a direct path. RF ranging is hard; I've seen RF ranging modules for sale, but they cost like \$75 per module - I think they're doing time of flight, but it needs to be highly accurate and very carefully designed. I do not know how well they work.

Those 433mhz OOK receivers are particularly worthless for this, as they do AGC and are totally not meant for this. Among other things - in the absence of a signal, the automatic gain control will ramp up the gain until the noise it picks up provides a 50% duty cycle on the output pin. The way messages have to be sent is that you send a message with ~50% duty cycle, either preceeded by a "training burst" of 50% duty cycle, or repeated several times, or most often both, and then have the microcontroller pick out that pattern. (example of how I do that - it works pretty well). These also have a very low data rate - a few kbit/sec raw, under 1 kbit after overhead of sending messages multiple times and including a training burst.

srnet: If it was 'easy' then;

Lots of people would have done it already

and

You would not need to ask.

AWOL: There aren't any in the Arduino universe.

Have seen few examples of implementation s thought of doing in arduino If an AVR development board (second link) can do then why not an arduino

jremington: Signal strength is useless for calculating distance, except under very special circumstances.

Please do tell any thing possibles so that can have a solution

Have a idea on voltage too... Dose the voltage change based on distance

Robin2: Buy a laser range finder.

Or, if the distance between the Arduinos is sufficient equip both of them with GPS receivers and have one of them send its location data to the other.

...R

I want to make it as cheep as possible so only choosed RF

Time of flight is being used in WiFi setups so that it will be possible to control access when there is a certain distance; router to client.

If you want to this up 'using Arduino' then go ahead, report back and let us know how you get on.

Easy it will not be, doubt it will be cheap either.