Basic Idea:
Ditch the key FOB and use your mobile phone as a passive key to access and authorize your car. There are many challenges with such a system but I believe this development is unavoidable. Whilst my prototype is certainly not the most elegant, it does proof a basic point, which is that dedicated physical car keys are a thing of the past. I hope that in the future car manufactures will implement such systems, but given that currently key FOBs can be sold for $200 a pop, killing this cash cow might take a while.
Demo of the Bluetooth Passive Keyless Entry System:
Tech Stuff:
Signal Strength - Distance Approximation
To my knowledge there is currently no way to rapidly poll the signal strength (RSSI) in the standard Anroid API. The RN42 chipset on the bluesmirf has a way of outputting RSSI values at 5HZ but coding and analysis gets quite a bit more complicated since one needs to enter the command mode of them modem which would prevent the actual devices from communicating. There is a passthrough command but trial and error showed that this method was not very reliable.
Future bluetooth modems might have better and easier ways of polling signal strength which then can be used to assess the distance more easily but for now we wanna stick to cheap off the shelf hardware, requiring no modifications.
The Bluesmirf Connected to the Arduino Board |
Slave/Master - Connection Initiation:
Your phone needs all the battery it has and can not waste precious power trying to continuously initiate a connection to the vehicle. It is thus imperative that the connection must be initiated by the bluesmirf, which has all the power it could ever need from the vehicles battery.
Forum Topic Here
The solution was to simply use Two I/O pins. This way the bluesmirf could conveniently be switched on and off. During actual driving driving bluetooth communication is disabled to conserve power and board life but most importantly to let the phone goto sleep.
This is the documentation of the RN42 chipset including the command set. The basic things you will need to do:
- Enter Command Mode
- Set desired baud rate (I choose 9600kbps)
- Authorize the MAC address of your phone
- Set the Board to Master and Auto Connect Mode
- Adjust scanning and paging intervals to your liking (although the bluesmirf has somewhat limited capabilities in that the "The inquiry and page interval is fixed at 0x1000 = 2.56 seconds"
Powering the Bluesmirf:
The bluesmirf, according to Sparkfun, uses about 25mA. This figure showed to be an average guestimate after the actual power consumption was measured. Turns out that it spiked up to 42mA,more than the poor little Arduino can supply via a single Digital Input/Output pin. If there are people who actually used a single I/O pin could have damaged their boards...Forum Topic Here
The solution was to simply use Two I/O pins. This way the bluesmirf could conveniently be switched on and off. During actual driving driving bluetooth communication is disabled to conserve power and board life but most importantly to let the phone goto sleep.
Hardware used:
Galaxy S3 (Android 4.1)SainSmart 2-Channel 5V Relay Module for Arduino DSP AVR PIC ARM
Code Coming Shortly...
how did you manage to make your
ReplyDeletebluesmirf establish the connection?
i tried it but it didn't work.
"CONNECT" failed
The Mercuino Project: Keyless Entry System >>>>> Download Now
Delete>>>>> Download Full
The Mercuino Project: Keyless Entry System >>>>> Download LINK
>>>>> Download Now
The Mercuino Project: Keyless Entry System >>>>> Download Full
>>>>> Download LINK d9
hey Ron,
ReplyDeletemake sure you have the Bluesmift set to be the Auto-connect (Master Mode) (SM,3) and your phones Mac address stored in its memory!
Dude this is awesome. Keep up the good work!
ReplyDeleteThis is really very cool! I am looking to do something similar to my w210 but I am having trouble figuring out how to activate/deactivate the alarm from inside the vehicle without using the fob, can you point me in the right direction?
ReplyDeleteIs it bluetooth low energy? How can we make use of Bluetooth LE in such project.
ReplyDeleteThis sounds very cool! If only I could make it a module...
ReplyDeleteOne of the latest keyless entries today is the smart locks.
ReplyDeleteForest Park Locksmith
I'm planning to use BT LE module. So can I use it? I want simple connect as you mentioned MASTER mode.
ReplyDeleteDear sir, can you please sent me the source code. Seriously, i really need to know how to use the RSSi function between android and arduino. Thanks :)
ReplyDeleteDear Sir, when you display the RSSI value by entering "L" command, are you really seeing the RSSI value being displayed at the rate of 5Hz?
ReplyDeleteAre you going to add more instructions? Wow would I love to do this.
ReplyDeleteWell the mercuino project was the reason I started my own version of a keyless entry system. I really wish he would of put up some code before disappearing but oh well.
ReplyDeleteI started my own version of the mercuino project called carduino. If anyone is interested in starting this project then you can check up on my updates here: www.carduino.vonini.com
Hopefully mercuino updates his stuff so we can see some finished results.
Hello, Thanks for Sharing information about keyless entry remotes of car.
ReplyDeletekeyless entry remotes
Hi, I am starting with this project, and like to know more about this, as is this project will work with windows device?
ReplyDeleteNaive question... I have a Toyota with a key fob that lets me open the locked door by grabbing the door handle and starting the car by pressing the ignition button when the key fob is close to the car. I.e in my pocket. Why can't an app be developed that lets my phone transmit the same frequency as the key fob? Making the key fob redundant.
ReplyDeleteThank you, but you can give the code?
ReplyDeleteemail - miragempro@hotmail.com
A hug
Eduardo from Brazil
Thank you, but you can give the code?
ReplyDeleteemail - miragempro@hotmail.com
A hug
Eduardo from Brazil
Thank you, but you can give the code?
ReplyDeleteemail - feltown@yahoo.com
A hug
Oscar from US
Thank you, but you can give the code?
ReplyDeleteemail - miragempro@hotmail.com
A hug
Eduardo from Brazil
42mA would dry your car's battery out if not driven for a week. So it is not good system...
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThank you,but you can give the code?
ReplyDeleteemail-ywcao@corvin.cn
A hug
yiwen from PRC
Thank you, but you can give the code?
ReplyDeletefatoadg@gmail.com
Where is the code?
ReplyDeleteneed the code please mail me on mvijaykmr786@gmail.com
ReplyDeleteThank you
Thank you, but you can give the code?
ReplyDeletefatoadg@gmail.com
Need code and circuit design. it's really very nice. I want to build this for my car...
ReplyDeleteThis comment has been removed by the author.
ReplyDeletehello, but you can give the code?
ReplyDeletemr.shafiee1366@gmail.com
Hi very like this project ,can you share me your code ?
ReplyDeletemightyx1jzge@gmail.com
The Mercuino Project: Keyless Entry System >>>>> Download Now
ReplyDelete>>>>> Download Full
The Mercuino Project: Keyless Entry System >>>>> Download LINK
>>>>> Download Now
The Mercuino Project: Keyless Entry System >>>>> Download Full
>>>>> Download LINK qm