avatarRakshit Shah

Summary

The web content provides a guide on converting RSSI values from BLE (Bluetooth Low Energy) beacons into distance measurements in meters, which is particularly useful for developing social distancing applications during the COVID-19 pandemic.

Abstract

The article discusses the use of Bluetooth Low Energy (BLE) technology to maintain social distancing by converting RSSI (Received Signal Strength Indicator) values into distance measurements. It explains key concepts such as RSSI, Measured Power, and Advertising Interval, which are crucial for estimating the proximity between BLE devices. The author emphasizes the importance of understanding these parameters to accurately calculate distances and implement social distancing features in applications. A formula is provided to convert RSSI values to distance, with an example using a Measured Power value of -69 dBm at 1 meter. The article also references a GitHub project for a social distancing app and encourages contributions to improve its accuracy. Additionally, the author invites readers to become Medium members, support the work through donations, and engage with the content through social media platforms.

Opinions

  • The author suggests that developers can create social distancing applications with basic knowledge of JavaScript frameworks and the provided formula.
  • The article implies that the RSSI value fluctuates due to external factors, making distance estimation more challenging at greater distances.
  • It is mentioned that the Measured Power value, which indicates the expected RSSI at 1 meter, is crucial for accurate distance calculations.
  • The author indicates that the Advertising Interval of BLE beacons affects signal stability and battery life, with shorter intervals providing more stable signals but consuming more battery.
  • The author expresses that the calculated distance using the provided formula is an approximation and invites readers to comment if they find a method for calculating exact distances.
  • The article encourages community engagement and contribution by linking to a forked GitHub project and inviting readers to follow the author and the BeingCoders publication on various social media platforms.
  • Monetary support for the author's work is suggested through Medium membership, donations, or buying the author a coffee.

Convert RSSI Value of the BLE (Bluetooth Low Energy) Beacons to Meters

Make a social distance app with Bluetooth concept easily. You just need some JavaScript framework knowledge and formula to find the distance between two BLE devices.

Image by Author made with Adobe Photoshop

Due to the pandemic situation because of coronavirus (Covid-19) many developers are working on Bluetooth, NFC, Geolocation, GPS/GPRS technologies to implement a social distance approach or show the affected area, etc.

How to manage social distancing using Bluetooth technology?

You should have basic knowledge about the below parameters, which are in use with Bluetooth technology.

RSSI (Received Signal Strength Indicator)

For Bluetooth, it is the strength of the beacon’s signal as seen on the receiving device, e.g. a smartphone. The signal strength depends on distance and Broadcasting Power value. Bluetooth works with broadcasting signals and that broadcasting power value is around 2–4 dBm — and due to that, the signal RSSI strength will be around -26 (a few inches) to -100 (40–50 m distance).

To calculate Bluetooth Proximity between two unpaired/paired devices and the beacon using another value defined by the iBeacon standard; i.e. Measured Power

Due to external factors influencing radio waves — such as absorption, interference, or diffraction — RSSI tends to fluctuate. The further away the device is from the beacon, the more unstable the RSSI becomes.

Measured Power

Measured Power is a factory-calibrated, read-only constant that indicates what’s the expected RSSI at a distance of 1 meter to the beacon. Combined with RSSI, it allows estimating the distance between the device and the beacon.

However, you can change it in the raw chips using Arduino, etc if you have access to the AT-commands of the BLE chip. There is another factor that also affects the continuous signal, i.e. Advertising Interval (Have a look at it below)

Advertising Interval

Beacons do not broadcast constantly like WiFi. They ‘blink’ 😉 instead. Advertising Interval describes the time between each blink. The value ranges between 100 ms and 2000 ms.

The shorter the interval, the more stable the signal. Keep in mind that adjusting Advertising Interval will impact battery life in a long way.

This was the basic about you should know before implementing anything with BLE

Now Let’s talk about the formula and conversion.

You may also like to read, How to boost your wifi signal strength using tin foil?

Formula

Keep four parameters in your mind

  1. Distance
  2. Measured Power
  3. RSSI
  4. N (Constant depends on the Environmental factor. Range 2–4, low to-high strength as explained above)

Distance = 10 ^ ((Measured Power -RSSI)/(10 * N))

BLE uses Measured Power is also known as the 1 Meter RSSI. So consider the value of Measured Power = -69

RSSI = Obtained RSSI value from the devices (For example, you obtained -80)

N = 2 (Consider Low strength)

Put the values into the above formula to calculate the distance:

Distance for RSSI -80 = 10 ^ ((-69 -(-80))/(10 * 2)) = 3.54 meters

Similarly, Let’s say your RSSI values are…

a. Distance for RSSI -75 = 10 ^ ((-69 -(-75))/(10 * 2)) = 1.995 meters ≅ 2 meters

b. Distance for RSSI -69 = 10 ^ ((-69 -(-69))/(10 * 2)) = 1 meter

If you want to calculate your distance, just copy the below expression, change your RSSI value (Highlighted as bold fonts), and paste it to the google search engine.

10 ^ ((-69 -(<RSSI_VALUE>))/(10 * 2))

Note: Please note that this calculated distance is approximated.

Wrapping Up…

If you are looking for an example to alert people when some device comes nearby you, or in another language, If you want to implement a social distancing concept using BLE You can use this forked project on GITHUB. You can also contribute to making it work with high accuracy.

If you find a way, how to calculate the exact distance with BLE technology then please comment below, Your help will be appreciated.

You can check the code of the 1point5 application for a social distancing app.

Become a Medium member if you want to read more interesting stories like this. It will cost you $5/Month or $50/Year and provides you unlimited access to Medium stories. I will receive a small commission when you use my membership link for signup.

If you find joy and value in what I do, please consider supporting my work with a donation — however much you can afford, it means and helps more than you can imagine.

References: Bluetooth Wikipedia, BLE Formula, Bluetooth electrical engineering book

You can give tips too using Buy me a coffee.

Originally Published at BLE to Meter Conversion by Rakshit Shah (Me).

BeingCoders Publication

👏 Before you leave, Appreciate Author’s Effort by clapping on their story👨‍💼 Follow the Author to hear back more from him/her 📰 Knowledge shared | knowledge multiplied 🚀 , follow BeingCoders Publication. ✍ Write some feedback or your opinion about the story. ✌ Follow us on Facebook | Twitter | Instagram. Read More content at Beingcoders.

Technology
Bluetooth
Bluetooth Low Energy
Social Distance
Covid19 Pandemic
Recommended from ReadMedium