44809

Calculate Distance between Arduino BLE shield and Phone

Question:

Is it possible to calculate the distance between an arduino bluetooth shield (BLE Shield 2.1) and cell phone? More specifically, when the cell phone is within <5 feet of the shield, I want it to perform an action. I know BLE Beacon technology is able to do this in a general sense (immediate, near, far) so I'm wondering if it is possible?

Looking through stack overflow, I've found the following answers but they are all dated:

<a href="https://stackoverflow.com/questions/11846506/calculate-distance-between-bluetooth-device-in-android" rel="nofollow">Answer 1</a> <a href="https://stackoverflow.com/questions/29859666/distance-between-bluetooth-module-and-an-android-device" rel="nofollow">Answer 2</a>

I know that ultrasonic frequency and laser sight are both options but I am trying to keep costs low so I would prefer a way in which the distance is calculated without the use of an additional tool.

Answer1:

Yes you can use it for distance calculation based on RSSI (received signal strength). You should implement iBeacon on Arduino side as stated in Eirik M answer. The most important thing in my opinion is that you have to be aware of BLE/iBeacon precision.

Please read carefully the following articles to determine if iBeacon technology fits to your needs. If so, implementation should be straight forward.

<a href="https://community.estimote.com/hc/en-us/articles/201636913-What-are-Broadcasting-Power-RSSI-and-other-characteristics-of-beacon-s-signal-" rel="nofollow">Broadcasting power and RSSI</a>

<a href="https://blog.shinetech.com/2014/02/17/the-beacon-experiments-low-energy-bluetooth-devices-in-action/" rel="nofollow">The Beacon Experiments: Low-Energy Bluetooth Devices in Action</a>

Answer2:

If BLE beacons are good enough for you, it should be fairly easy to implement a beacon for the Arduino shield. There are a few things you need to be aware of, such as output power and antenna characteristics. I recommend to read up on beacon technology to understand how it works.

Recommend

  • Animating the background using CSS and skrollr.js
  • Result vs raise in F# async?
  • Only length-1 arrays can be converted to Python scalars with log
  • VBA Excel Macro to update cell values based on multiple criteria
  • centre thumbnail in scrollbar (jQuery)
  • android Fragment Added but not visible
  • Unit Testing Frameworks for Visual Studio 2012 Cons/Pros
  • native zlib inflate/deflate for swift3 on iOS
  • .htaccess URL and directory redirect
  • how to uninstall plugin/egit from ADT eclipse
  • How to resize UIViewControllerWrapperView
  • FB.UIServer._loadedNodes[a.frame] is undefined
  • how to sleep accurately in a while loop in C (Linux)?
  • Rapidly iterating Silverlight development
  • Fibonacci Computation Time
  • Convert Python date to Unix timestamp
  • iPython magic for Zipline cannot find data bundle
  • how to execute 50 parallel methods 500 times per second effectively?
  • Unload image of UIImageView thats offscreen
  • How are 32 bit JavaScript numbers resulting from a bit-wise operation converted back to 64 bit numbe
  • OpenOptionsMenu not working with ActionBarSherlock Custom SubMenu
  • How to remove left and right margins from all wrapped rows in flexbox (without nth-child or js)
  • Get the last date of each month in a list of dates in Python
  • What is this strange character in chrome's resource css viewer?
  • How do I add a File Type Association in a Windows Phone 8.1 app manifest?
  • How to repeat sections of a SQL query across UNIONs? (DRY in SQL)
  • Where these are stored?
  • how to set variables in a php include file?
  • Alternative To body {overflow:scroll;} That Will Prevent Page Jostling/Wriggling?
  • Display images in Django
  • Problem deserializing objects from cache on MyBatis 3/Java
  • How to define and use opencv mat of user type
  • Extracting HTML between tags
  • vba code to select only visible cells in specific column except heading
  • Jquery - Jquery Wysiwyg return html as a string
  • Arrays break string types in Julia
  • Python: how to group similar lists together in a list of lists?
  • WPF Applying a trigger on binding failure
  • Understanding cpu registers
  • Java static initializers and reflection