Page 1 of 1

Bluetooth proximity auto lock car

Posted: Mon Sep 14, 2015 10:08 pm
by Dellboy999
Hi,
I did a search but can't find what I am after help/suggestions on.
I am considering using a raspberry Pi to make a simple proximity sensor using Bluetooth to auto lock a car when out of range( small range like 1m or so), I do not want unlock just lock and I want to use a dongle of some sort so it just stays in my work bag.
I have to park my car everyday and sometimes you think did I lock it.
Can it be done cheap and easy?

Re: Bluetooth proximity auto lock car

Posted: Mon Sep 14, 2015 10:19 pm
by jbeale
If you have control of your car's door lock through a digital interface (CAN bus, etc) then it should work in principle, but I don't know how cheaply or easily. I would not expect you to be able to get a specific range (like 1 meter) from just detecting an active bluetooth pairing, I think it would be larger and more variable depending on many factors.

If I was doing that project, I might do it more simply by just detecting if there is someone sitting in the driver's seat, and auto-lock the door after a few seconds if not. Just don't step outside without your keys :-).

Re: Bluetooth proximity auto lock car

Posted: Mon Sep 14, 2015 10:28 pm
by davidcoton
Make sure the Pi shuts down after locking, to avoid draining the car battery. Then you have to figure out how and when to switch it back on.

This project might be better suited to an Arduino (lower power consumption, smaller, no display, etc).

Re: Bluetooth proximity auto lock car

Posted: Mon Sep 14, 2015 10:38 pm
by Dellboy999
Basically I see it work like this

Ignition on module becomes active with a timeout if it finds no bluetooth dongle after X amount of time.
If it finds a dongle then it waits till dongle is out of range outputs to a relay to that will lock the doors.
When the doors lock it will cut power to the module.

I am not looking to open the doors so the amount of time it would be on is minimal.

Re: Bluetooth proximity auto lock car

Posted: Mon Sep 14, 2015 10:42 pm
by Douglas6
You can get Bluetooth beacons for about $30. A Pi should be able to detect proximity with a meter or two resolution.

Re: Bluetooth proximity auto lock car

Posted: Wed Sep 23, 2015 6:22 pm
by jbeale
If you're talking about this: https://en.wikipedia.org/wiki/IBeacon
the article says the iPhone detects three range categories:

Code: Select all

  Immediate: Within a few centimeters 
  Near: Within a couple of meters
  Far: Greater than 10 meters away
I don't know exactly what the iPhone app does, but apparently the beacon signal is one-way only, so I presume they are relying on signal strength alone to estimate range. That is highly dependent on the environment, so you cannot guarantee any particular range, only an average making "typical" assumptions. If you happen to get enough RF-reflecting or absorbing material around your beacon, or maybe there is even some interfering signal, it can appear to be "greater than 10 m away" when it's still right next to the receiver, for example.

Re: Bluetooth proximity auto lock car

Posted: Thu Oct 22, 2015 9:51 pm
by uk_baz
If you are looking at beacons I would recommend looking at Eddystone as this is an open standard for beacons. You can read more about them at https://github.com/google/eddystone/

Javascript with node.js seems to be the best supported language right now for beacons on the Raspberry Pi and I would point you at https://github.com/sandeepmistry/node-e ... on-scanner as a good library to use. It is also available on npm https://www.npmjs.com/package/eddystone-beacon-scanner

I've done workshops with schools and at CamJam about proximity beacons. These are based on uribeacon which was the forerunner to Eddystone. The workshop details are at:
https://github.com/ukBaz/beaconWorkshop ... anual.html

I also did a talk about beacons which is on youtube at: https://www.youtube.com/watch?v=IiIx1xnXw0M

Beyond beacons the Bluetooth standard also has the Proximity profile (PXP) which enables proximity monitoring between two devices. Maybe a more secure options than beacons? More details at:
https://developer.bluetooth.org/gatt/pr ... ximity.xml

I hope that helps. Good luck!

Cheers,
Barry