Convert RSSI Value of the BLE Beacons to Meters – Best Solution

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.7 min


BLUETOOTH-BLE-Concept-and-formula-to-find-distance-between-two-devices

Convert RSSI Value of BLE Beacons to Meters: Find the formula to calculate distances in meters between Bluetooth devices. Convert RSSI Value of two bluetooth device or BLE beacons in meters.

formula to convert rssi of BLE to meters
Learn how to Convert RSSI Value of BLE Beacons to Meters | Cover Image credits: Image by Author made with Adobe Photoshop

Convert RSSI Value of BLE Beacons to Meters


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 showing 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.

Convert RSSI Value to Meters – 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 make it work with high accuracy.

If you find a way, about 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.


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.

You can give tips too using Buy me a coffee.

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

You may also like,

adsense


Discover more from 9Mood

Subscribe to get the latest posts sent to your email.


Like it? Share with your friends!

What's Your Reaction?

Lol Lol
0
Lol
WTF WTF
0
WTF
Cute Cute
0
Cute
Love Love
0
Love
Vomit Vomit
0
Vomit
Cry Cry
0
Cry
Wow Wow
0
Wow
Fail Fail
0
Fail
Angry Angry
0
Angry
Rakshit Shah

Legend

Hey Moodies, Kem chho ? - Majama? (Yeah, You guessed Right! I am from Gujarat, India) 25, Computer Engineer, Foodie, Gamer, Coder and may be a Traveller . > If I can’t, who else will? < You can reach out me by “Rakshitshah94” on 9MOodQuoraMediumGithubInstagramsnapchattwitter, Even you can also google it to see me. I am everywhere, But I am not God. Feel free to text me.

0 Comments

Leave a Reply

Choose A Format
Story
Formatted Text with Embeds and Visuals
List
The Classic Internet Listicles
Ranked List
Upvote or downvote to decide the best list item
Open List
Submit your own item and vote up for the best submission
Countdown
The Classic Internet Countdowns
Meme
Upload your own images to make custom memes
Poll
Voting to make decisions or determine opinions
Trivia quiz
Series of questions with right and wrong answers that intends to check knowledge
Personality quiz
Series of questions that intends to reveal something about the personality
is avocado good for breakfast? Sustainability Tips for Living Green Daily Photos Taken At Right Moment