Dellboy999
Posts: 2
Joined: Mon Sep 14, 2015 9:56 pm

Bluetooth proximity auto lock car

Mon Sep 14, 2015 10:08 pm

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?

User avatar
jbeale
Posts: 3516
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: Bluetooth proximity auto lock car

Mon Sep 14, 2015 10:19 pm

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 :-).

User avatar
davidcoton
Posts: 4253
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: Bluetooth proximity auto lock car

Mon Sep 14, 2015 10:28 pm

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).
Signature retired

Dellboy999
Posts: 2
Joined: Mon Sep 14, 2015 9:56 pm

Re: Bluetooth proximity auto lock car

Mon Sep 14, 2015 10:38 pm

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.

User avatar
Douglas6
Posts: 4783
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: Bluetooth proximity auto lock car

Mon Sep 14, 2015 10:42 pm

You can get Bluetooth beacons for about $30. A Pi should be able to detect proximity with a meter or two resolution.

User avatar
jbeale
Posts: 3516
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: Bluetooth proximity auto lock car

Wed Sep 23, 2015 6:22 pm

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.

User avatar
uk_baz
Posts: 6
Joined: Thu Oct 22, 2015 9:22 pm

Re: Bluetooth proximity auto lock car

Thu Oct 22, 2015 9:51 pm

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

Return to “General discussion”