3
\$\begingroup\$

I want to calculate the distance between 2 Bluetooth tags (still need to be developed so no restrictions in components).

The tags will not be time synced so we would like to calculate time of flight by checking the time it took to go from A to B and back.

The error margin should be around 5 cm. Typically the tags are placed 10 to 30 meters apart.

Is it possible to calculate distance between the devices?

If Bluetooth is not suitable for this, do you have any suggestion for which transmission protocol would be better?

Thank you

\$\endgroup\$
1
  • \$\begingroup\$ Bluetooth or any other communications protocol is unsuitable for this. Radio signals travel at the speed of light and at short distances this is orders of magnitudes faster than the response time of the system itself. \$\endgroup\$ Commented Jun 11, 2017 at 20:02

3 Answers 3

4
\$\begingroup\$

Very unlikely

Bluetooth uses radio, and radio travels at the speed of light. A 1cm round trip will take less than 100ps. Timing something that short will be tricky, probably you'll want a 10GHz clock, though there are other options. But even then, Bluetooth isn't designed to instantly echo the radio message. If you receive, process and re-transmit the message, then the processing delay will be much longer than the time of flight, and will vary randomly by at least the period of the clock used with the Bluetooth chip.

With some clever hardware, it probably is possible to make 100ps accurate time of flight measurements. But it's hard and trying to combine with Bluetooth is just going to make it harder.

Real life example: Apple uses the 802.11v 'time of flight' for detecting if an Watch is in proximity to MacBook. The 802.11v paper claims "a mean absolute error of less than 1.33 meters in an ideal environment". For Apple it means they just check if two devices are no farther than 3m from each other.

As an alternative, consider:

  • Ultrasound (if you can aim the sensor at the other tag)
  • Differential GPS (if you don't know orientation)
\$\endgroup\$
4
  • \$\begingroup\$ I realize my question was unclear. The error margin should be in the range of 1 to 5 cm. The tags will be 10 to 40 meters apart. Does this change anything in your answer? \$\endgroup\$
    – jorrebor
    Commented Jun 12, 2017 at 16:58
  • \$\begingroup\$ @jorrebor Not the OP, but I can answer: definitely impossible with standard Bluetooth devices, quite likely impossible with any hardware at 2.4 GHz. (Keep in mind that 2.4 GHz has a wavelength of 12.5 cm, and you're asking for a resolution of less than half that!) \$\endgroup\$
    – user39382
    Commented Jun 12, 2017 at 18:52
  • \$\begingroup\$ It doesn't change anything. Meter-accuracy may be possible, 10cm will not be. A custom radio time of flight system could probably do what you want, but it will be complicated and there is no point trying to start with Bluetooth - start from scratch. \$\endgroup\$
    – Jack B
    Commented Jun 12, 2017 at 19:36
  • 1
    \$\begingroup\$ @duskwuff there are definitely challenges which would require a very different system design, but wavelength is not the issue. GPS signals have wavelengths of ~19 and ~24 cm (ie, both are at lower frequencies than 2.4 GHz) but despite that local resolution of a few millimeters is possible via differential techniques. \$\endgroup\$ Commented Jun 12, 2017 at 19:39
1
\$\begingroup\$

The Bluetooth stack will get in the way, certainly, but weighted results from a large number of tests will improve accuracy.

If I recall correctly, gravity waves were detected by measuring the distance light traveled over a mile or so to under the width of an atom. So surely the OPs relatively modest needs could be met with a purpose- built, e.g. SDR- based, system.

RSSI (signal strength) can be used for very coarse distance estimation and is in the Bluetooth spec.

Standard abilities are still weak, as of Bluetooth 5.1; see:this paper or this preprint of it: arxiv.org/pdf/1909.0803.pdf and/or the working open source SDR code it documents!

\$\endgroup\$
0
\$\begingroup\$

It may be a little late for your application, but it would probably be good to add an updated answer to this question with the new addition of "Direction Finding" services being added to Bluetooth 5.1.

https://www.bluetooth.com/learn-about-bluetooth/recent-enhancements/direction-finding/

It says these new services enable "Bluetooth positioning systems that can achieve centimeter-level location accuracy".

UWB (Ultra-WideBand) may be a better RF technology for Time of Flight capability in the meantime until the Bluetooth implementation of its distance measurement features mature.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.