Obtain the value of the signal strength of the Bluetooth module

Hello everyone,

Im working in a proyect were I want to connect two different devices (let's call them device A and device B) via Bluetooth (HC-05). When device B moves away at a certain distance from device A, and therefore looses signal strength, I want to make device A vibrate or buzz.

For this proyect I´m using Arduino UNO. I would be so grateful if you can tell me what kind of code I could use to make this proyect possible. :smiley:

What signal strength information is available from the HC-05?

Paul

catarusso:
When device B moves away at a certain distance from device A, and therefore looses signal strength, I want to make device A vibrate or buzz.

Be aware that most often RSSI indicators are a very crude indication of distance.

If the TX and RX were in a large open space, and the antennas of both were kept rigidly fixed in orientation then
you can get an approximation of distance.

If the antennas are for instance moving around and changing orientation or objects are getting in the way then the 'distance' could change from say 2m to 10m, whilst TX and RX were actually still the same distance apart.

Bluetooth devices may not be optimum for this, but there are several 434\868\915Mhz radio modules that provide direct register access to an RSSI value.

Paul_KD7HB:
What signal strength information is available from the HC-05?

Paul

RSSI.
If you're asking for the recieved signal strength indicator, it has a reach of 5 to 10 meters

catarusso:
RSSI.
If you're asking for the recieved signal strength indicator, it has a reach of 5 to 10 meters

Yes, just wondered about your research on the subject. I just Googled "hc-05 rssi arduino" and got lots of threads and information, including the problem of multiple Bluetooth devices transmitting at the same time.
Paul

If you really want to pursue this exercise, you should seriously consider using BLE devices, rather than HC-05s. That way, you will be merely wasting most of your time instead of all of it.

Have a look at the Arduino Nano 33 IoT. This will make your life a lot easier and you could save some money on top of it.

https://store.arduino.cc/arduino-nano-33-iot

If you are happy with knowing the signal gets better or worse when you move you can use the RSSI as suggested. But you will not get reliable absolut distance values. Every wall, object or body part between the two antennas will change the RSSI value.

I wrote a little Geiger counter type sketch that was fun for a minute or two.