Bluetooth proximity sensor - do they exists? - Page 1
Forum section: electronics / beginners

author: FriedMule
author_rank: Frequent Contributor
timestamp: August 20, 2022, 12:13:12 am
content: I hope on building / buying a circuit with a relay that triggers if one of 4 mobile phones are in the area.I hope to avoid using any app, it shall just detect that an accepted phone is near and then trigger.EDIT: Distance do not have to be more than 2 yards. If there is another solution, please say so. The main idea is that if an owner of an accepted mobile phone is, then does that person not have to think about anything, everything is just turned on, while another person meats shut off items. A bit like the cars where the owner can just open the door and other persons have no access.

author: thm_w
author_rank: Super Contributor
timestamp: August 20, 2022, 01:01:02 am
content: It would have to be something you'd build and write code for, I believe. Just sensing 2.45GHz is probably not ideal.But in your edit you are requiring specific IDs, if you actually want it to be secure that would not be easy/possible without an app.https://forum.arduino.cc/t/detecting-nearby-devices-via-bluetooth/567236/8https://forum.arduino.cc/t/detecting-bluetooth-wifi-devices/417851/12https://www.researchgate.net/post/How_to_use_HC-05_bluetooth_module_for_finding_nearby_active_bluetooth_devices

author: FriedMule
author_rank: Frequent Contributor
timestamp: August 20, 2022, 01:18:10 am
content: The security is not that important.I have a Chinese cabin scooter that only have an on/off button to start the scooter with, it does not care if there is a key or not, it is simply just a normal boring switch. To prevent people from just breaking the side window and drive away, do I want a power breaker someway, I was first thinking of a simple hidden switch, but what if I forget to switch it off?1 Then did I think of some sort of magnetic switch, but this again demands something magnetic being nearby I can use. I then thought of RFID, but what if I lose my keys. So my final thought, what about a simple phone detector, one that just triggers if one of the accepted phones is inside the scooter.Nobody would begin to investigate why the scooter won't start, if they can not see a switch or fast find a solution, therefore this fairly insecure but hidden solution. :-)

author: janoc
author_rank: Super Contributor
timestamp: August 20, 2022, 08:28:46 am
content: Quote from: FriedMule on August 20, 2022, 01:18:10 amAnd also likely to drain your battery much faster, compared to an actual hidden switch.There is no "sensor" for this sort of thing per se. If you want to do this, then the way is to get e.g. one of the Nordic NRF52 based modules and program it to continuously listen for BLE advertisements. As soon as it hears one, it checks whether the sender's MAC is one of the approved devices. It could also threshold on the RSSI value to allow only strong signals - presumably from a nearby device and not a crook trying to use an amplifier to steal your scooter (a very common relay attack on cars using active keyless entry/start systems that have keyfobs with continuously broadcasting transmitters). Then it triggers a pin to switch a relay or whatever on to power the scooter up.However, if you have never worked with Bluetooth Low Energy before then be prepared for a pretty hefty learning curve.

author: AndyBeez
author_rank: Frequent Contributor
timestamp: August 20, 2022, 09:10:18 am
content: I agree with @janoc, a hidden switch in the ignition circuit is the best solution. This means your scooter starts, even if you lost your phone.Otherwise you could investigate using a fingerprint reader. For Arduino uses:https://create.arduino.cc/projecthub/projects/tags/fingerprint

author: kjr18
author_rank: Regular Contributor
timestamp: August 20, 2022, 10:38:47 am
content: I think fingerprint sensor is a good idea. For power drain issue you could use latching circuit that is used in those cheap component testers (pressing buttons powers microcontroller who then keeps transistor on while testing, then turns it off to power down itself - in your case it could be door switch, if you have one). Or just make it sleep while not detecting anything.

author: janoc
author_rank: Super Contributor
timestamp: August 20, 2022, 11:16:29 pm
content: Quote from: AndyBeez on August 20, 2022, 09:10:18 amOr an NFC tag stuck to your phone (or wallet, keys, whatever). Much easier to implement than dealing with Bluetooth.

author: fordem
author_rank: Regular Contributor
timestamp: August 22, 2022, 02:50:46 pm
content: Quote from: FriedMule on August 20, 2022, 01:18:10 amSo what if you loose your phone? Or your phone battery dies?How is this different from any other form of motorized transportation - where a good old fashioned key switch has been all the security that's needed.

author: janoc
author_rank: Super Contributor
timestamp: August 22, 2022, 06:16:25 pm
content: Quote from: fordem on August 22, 2022, 02:50:46 pmThen he will rip the contraption out and bridge the two wires from the hidden relay to get his scooter going again. Unlike the thief, he knows what to do and where to look.This is a complete non-issue.

author: Ground_Loop
author_rank: Frequent Contributor
timestamp: August 22, 2022, 09:09:27 pm
content: The typical Bluetooth module available on Amazon has an output that turns on when a connection is established which can then be used to enable a relay (no app or complex circuitry required). Although you'll need to bring the battery voltage down to something usable for the BT module. They can also be 'married' to specific Bluetooth devices and will only connect to that one device. I don't believe you can set them up to be married to more than one device. However, what you can do is have the few phones connect to it openly and from that point on they will connect and enable the starter when nearby. Anyone trying to steal it will likely never suspect that there is a Bluetooth connection they need to make to engage the starter circuit.

author: fordem
author_rank: Regular Contributor
timestamp: August 24, 2022, 01:26:30 pm
content: Quote from: janoc on August 22, 2022, 06:16:25 pmUsing that logic he might as well just fit a hidden switch, the thief won't know where to look - keep things simple.

author: tszaboo
author_rank: Super Contributor
timestamp: August 24, 2022, 01:54:12 pm
content: I did test like these with ESP32s. The RSSI was varying by something like 20dB which meant that they were either 1m away or 50m away based on calculation. Concluding that this is not a really useful for contact tracing or other similar simple proximity detection. You can still do this if you have multiple fixed receivers you do angle-of-arrival and other compensations.

author: janoc
author_rank: Super Contributor
timestamp: August 25, 2022, 08:49:54 pm
content: Quote from: fordem on August 24, 2022, 01:26:30 pmWell, that has been suggested ...

author: janoc
author_rank: Super Contributor
timestamp: August 25, 2022, 08:57:35 pm
content: Quote from: tszaboo on August 24, 2022, 01:54:12 pmThese BLE proximity tags have a range of a few meters tops, especially when using a crappy chip antenna. These devices care only about exceeding certain RSSI threshold to enable/unlock whatever you are after, one doesn't calculate distance from it. That would be useless because of propagation issues that are not possible to control.So set the threshold to a value that can't be exceeded unless you are really close to the target and you are good to go. It may still fail to unlock e.g. if your phone is in the bag, attenuating the signal, but that's OK.