Finding the Distance Between Two Ardunios

Hello please give advice about my problem:

I am trying to create a system to calculate the distance between Ardunio A & Ardunio B. Please advise that it should be able to calculate distance with obstacles in the way (so ultrasonic is not optimal).

How should I accomplish this?

I was thinking about using RF but it seems not to work.

Any ideas, thoughts, or resources would be greatly appreciated.

Hi,

What is the application?
How far will the arduinos be apart?
What will be the objects in the way?

Thanks.. Tom.... :slight_smile:

This question comes up all the time, and for indoors, there is no satisfactory solution. One recent commercial offering is Pozyx.

lukescomputers:
I am trying to create a system to calculate the distance between Arduino A & Arduino B.

A measuring tape comes to mind as the most practical.

lukescomputers:
I was thinking about using RF but it seems not to work.

The standard way of doing this is to use GPS.

If inside buildings, well, the measuring tape. I am not kidding. :grinning:

Without line of sight there's no magic option. Structured light, stereoscopy and ultrasound all require
line of sight.

By the way this might be an xy problem. What are you trying to do?

Here is my solution that I thought of, please advise:

I have ardunio A & B.

A & B both have a transmitter T and receiver R (9v battery powering it).

AT is sending out a signal every second. Each time AT sends a signal it starts a timer. After sending a signal AR begins to listen for a signal.

BR is constantly listening to a signal. When BR receives a signal BT sends out a signal.

AR receives a signal and stops timer.

So the longer the signal takes, the father it is. I know that this will not be perfectly accurate but it a possible solution?

It is possible with sound, but will have reasonable accuracy only in unobstructed line-of-sight situations, in a quiet environment.

but it a possible solution?

No.
Plug numbers into it and see how good the timing has to be.

Plug numbers into it and see how good the timing has to be.

What numbers? Are you assuming that the OP meant radio?

lukescomputers:
Here is my solution that I thought of, please advise:

I have ardunio A & B.

A & B both have a transmitter T and receiver R (9v battery powering it).

AT is sending out a signal every second. Each time AT sends a signal it starts a timer. After sending a signal AR begins to listen for a signal.

BR is constantly listening to a signal. When BR receives a signal BT sends out a signal.

AR receives a signal and stops timer.

So the longer the signal takes, the father it is. I know that this will not be perfectly accurate but it a possible solution?

It's a good idea but the two modules don't have a line of sight. So the signal will bounce off walls and objects and make your calculated distance vary.

A BME280 chip is intended to be used for indoor navigation. With some work, it can tell you how many rooms away, but it can't do metres or feet.

The BME280 chip is a pressure, humidity and temperature sensor.

The problem with call & response kind of timing is that RF is sooo fast.
Signals go at the speed of light -
miles per second
186000

metres per second
299792458

So seconds per meter is 1/299792459 = 3.335 x 10^-8. This works out to about 1 ft/nS, 1 meter/ 3nS.
So in your house, maybe 10 meters end to end, it takes ~ 30nS to go from transmitter to the receiver.
That's 1/2 of one clock cycle in a 16 MHz Arduino.

The only way I see RF working is if both sides know their location and send it to the other side, then speed of the transmission does not matter. There's lots of ways for a device to locate itself, such as the one suggested above, which reminds me of the Roomba vacuum cleaner, which can navigate around to clean for a couple hours and then find its way back to its charging station.
Another way to self locate might be perhaps 2 beacons in the house, and a directional antenna on the Arduino to determine the strongest signal from one beacon, then find the angle from there to the strongest signal from the 2nd beacon. Once that is known, the location in the room can be calculated for anyplace except a straight line between the beacons. This might work somewhat in a wood frame house, with interference from metal objects to screw things up - dishwasher, refrigerator, stove, sink, washer, dryer. Other appliances? Stuff in the basement? Furnace, water heater, Aluminum siding? Heating/cooling ductwork?

CrossRoads:
The problem with call & response kind of timing is that RF is sooo fast.
Signals go at the speed of light -
miles per second
186000

metres per second
299792458

So seconds per meter is 1/299792459 = 3.335 x 10^-8. This works out to about 1 ft/nS, 1 meter/ 3nS.
So in your house, maybe 10 meters end to end, it takes ~ 30nS to go from transmitter to the receiver.
That's 1/2 of one clock cycle in a 16 MHz Arduino.

The only way I see RF working is if both sides know their location and send it to the other side, then speed of the transmission does not matter. There's lots of ways for a device to locate itself, such as the one suggested above, which reminds me of the Roomba vacuum cleaner, which can navigate around to clean for a couple hours and then find its way back to its charging station.
Another way to self locate might be perhaps 2 beacons in the house, and a directional antenna on the Arduino to determine the strongest signal from one beacon, then find the angle from there to the strongest signal from the 2nd beacon. Once that is known, the location in the room can be calculated for anyplace except a straight line between the beacons. This might work somewhat in a wood frame house, with interference from metal objects to screw things up - dishwasher, refrigerator, stove, sink, washer, dryer. Other appliances? Stuff in the basement? Furnace, water heater, Aluminum siding? Heating/cooling ductwork?

I have heard that bluetooth could be used to solve this problem. Is it promising or not?

Is it promising or not?

Not promising.

Bluetooth is simply a radio trancever with protocol. Even if he radio solution was possible the protocol would bugged up any timing.

Doesn't the RF signal go at the speed of sound?

Bianco:
Doesn't the RF signal go at the speed of sound?

You kidding? :astonished:

jremington:
The BME280 chip is a pressure, humidity and temperature sensor.

Yes. Read the datasheet. That offers some clues how this sensor could be used for this purpose. I think they're dreaming, but so is the OP of this thread.