Bluetooth for proximity

HI everyone. I've been looking for info on how to use a Bluetooth module to trigger an alarm if it goes out of range or at a certain signal threshold. Something like this Blue Watchdog Bluetooth proximity alarm: 100 decibels of aural terror in a credit card-sized package | Engadget

What i want its a fixed control unit and a portable transceiver to trigger the alarm the fixed control unit. So I'm going to need to Bluetooth modules.

So far I have found info about using it as a communication module but nothing related to what I'm looking for.

How to pair the two devices?
How can I manage to read it's signal level?

How can I manage to read it's signal level?

Normally you can't.

You may read RSSI and based on that judge on distance.
G..gle "bluetooth rssi"

pito:
You may read RSSI and based on that judge on distance.
G..gle "bluetooth rssi"

Note that signal strength is not a very reliable indicator of distance.

Note that signal strength is not a very reliable indicator of distance.

..but he may "judge". The actual db values vs. distance depend on many factors, however..

They have to be close enough together to work, but walls and filing cabinets, etc, make a difference.
LOS, my BT mouse is good 20 to 30 feet they say. The room ain't that big!

You could put a BT crystal in a crystal radio and see what you get.

Do you guys know anther way to do this? I mean, to trigger an alarm once a person carrying some portable device walk out of range. Or comes in range, we could use some logic to deal with that.

..you will lose connectivity when out of range - read the BT datasheet what happens then.. :slight_smile:

CheyPR:
Do you guys know anther way to do this? I mean, to trigger an alarm once a person carrying some portable device walk out of range. Or comes in range, we could use some logic to deal with that.

Yes that is easy, what is hard is knowing what this "range will be", it will not be very well defined.
Basically you need a transponder, that is just a transmitter and receiver that keep exchanging messages. When the exchanges stop you know you are out of range. However that range could be variable depending on a large number of factors.

I really don't mind distance if its going to be on average more than 10 ft. And if it is out of range the alarm should stay on. I also found 2 similar projects with some code here:
http://blog.bluetooth-smart.com/2012/09/16/programming-the-ble112-using-bgscript/

is this helpfull?

Grumpy_Mike:

CheyPR:
Do you guys know anther way to do this? I mean, to trigger an alarm once a person carrying some portable device walk out of range. Or comes in range, we could use some logic to deal with that.

Yes that is easy, what is hard is knowing what this "range will be", it will not be very well defined.
Basically you need a transponder, that is just a transmitter and receiver that keep exchanging messages. When the exchanges stop you know you are out of range. However that range could be variable depending on a large number of factors.

That's basically what I need. I don't mind range. I'm looking to trigger an alarm once the system is left unattended. Do you know any transponder easy to manipulate with a microcontroller or microprocessor? I've been reading about bluetooth and its hard to manipulate, we have to deal with the lower layers of the bluetooth software stack to be able to get the RSSI values.

Just get a simple FM transmitter, there are lots of them about. Then have it transmit a very short ID message about once ever two or three seconds. Have a random number generator generate a component of the delay. Then on the receiver end note the time you saw the last message from the device and fire an alarm if it is too long, say 30 seconds.
You will get some clashes with two transmitters sending at once but over all the messages will get through if you don't have too many.

Hey @CheyPR did you found out how to do it?

Monitoring the State pin will tell you if the connection drops/ device goes out of range.

joshu2991:
Hey @CheyPR did you found out how to do it?

CheyPR posted some seven years ago and has no way of knowing that you are replying now. :astonished: