Arduino to Arduino communication (via BT or RF?)

Hi everyone!

I tried to search on google and on the forums for information on my question, but so far I could not find anything that would cover exactly what I would like to achieve.

I would like to build a device the would communicate with other Arduino devives in an ad-hoc fashion. So suppose two such devives get near to each other, one of the devices (I guess the first one that detects the other one first) should initiate a connection automatically and they should be able to sync information between each other.
Maybe I don't understand the BT communication very well, but it seems to me that a BT device should either be a slave or a master at one time. But in my case, a device could be both, and any device should be able to automatically pair up with another one automatically. RF is also an option, if that's more feasible to implement. But BT is also a bit more convinient as the range is not so big (but I can also imagine somehow degrading the RF range of an RF interface).

How would this Arduino-Arduino communication be possible? Ideally the devices should be relatively small and would need to have low power consumption (well, I guess that's not easy considering that each device should be searching for others frequently).

Any ideas? :slight_smile:

Thanks & best regards,

Thanks for the very quick and detailed reply! :slight_smile:

Actually the proximity detection part need not to be very sophisticated. The only requirement is that this automatic connection should not be triggered between two devices that are far from each other. Ideally it should only be initiated if the two devices are around maximum 2-3m distance from each other. Maybe it's even easier to tweak an RF solution for this, i.e. to degrade the range.

The reason I was thinking about a BT solution that the device should ideally be able to communicate with an already BT enabled device, such as a mobile phone. And it would have been nice to be able to use the same communication channel also for Arduino-Arduino communication and for Arduino-Phone communication.

But if you say that it's easier (and cheaper, which is also an important factor) to implement this using RF, than I will go down that road. So you say that it's quite feasible to implement the above mentioned ad-hoc, master-slave, slave-master autoconnect scenario using simple RF components?
Should I buy sg like this:

And then how do I handle the part where the devices should find each other and initiate the two-way communication?
And another thing came to my mind: if there are multiple devices nearby, i.e. 5-10 devices, wouldn't there be an interference that would make such device-device communication impossible?

Thanks in advance! :slight_smile:

Check out the Swift "RD-11", it may do exactly what u r looking for. Website in my sig!

@KE7GKP, thank you for your good words!

I've been thinking about a short-range range finder between two arduino systems, how could we do that easily? Using radio signal strength does not seem useful, it is too wild a variable, depends on how you hold it, antenna position, etc. Too many factors I think.

What about hacking an ultrasonic range finder, for example.

I notice that the above cited board has an ATMega on it, so if you might be able to get schematics and code. Probably can source an ultrasonic tx and rx from many other places as well, probably on the order of $5 in parts. Instead of pinging the output and reading the reflections on the input of one sensor, split the sensor with transmitter only on one system, rcv only on other. Used in this way, narrowness of beam might not be a problem either. I can synch two RD-11s by radio to within about 10 us, so you could get a common time reference to determine the time between send pulse and receive pulse and thereby distance. Sound is about 1 ft per millisecond, so there is way more then enuf time (1000 us per foot) to sense time between ping and its receipt. a 10 us loop with 10us time sync, puts us at say plus or minus 25 us, that is 1/40 of a ms, so should have something like 1/40 foot or better than an inch resolution. Add fudge, easily 1 inch resolution to a few feet or more.

Just a thought, would definitely require some hacking and experimenting!