Jump to content


Photo

Rfid Central Locking - My Project


  • Please log in to reply
19 replies to this topic

#1 phillrulz

phillrulz

    Super Mini Mad

  • Members
  • PipPipPipPipPipPip
  • 617 posts
  • Location: North West London

Posted 24 July 2017 - 10:24 PM

Move if required- Not really ICE and there isnt a security project area...

 

RFID controlled central locking theory 

 

Evening all, Ive decided im going to install RFID controlled central locking. Long Story short im new to minis and much more electrically minded than mechanically. Due to this i thought id do something i feel was achievable and "cool". 

 

You will see me refer to "UID" alot in these posts. The UID is the Unique IDentifier. Its a Read only (mainly) code saved on every RFID it is unique to that chip and can not be changed (for the most part). 

 

 

About me(boring bit)

Spoiler

TL;DR Im an electrical nerd and like experimenting. 

 

 

Concept

 While on a random youtube streak (where everyone gets their best ideas) i ran into a video showing an RFID opening a car. Thinking this was pretty awesome i did a little research and looked in the reality of making this myself. Some things i looked at included :

  • Feasibility - Was it something i felt was withing my skills
  • Price - Lets not beat about the bush if its gonna cost and arm and a leg its not gonna happen
  • Security  - Did i open myself up to any dangers 

 

Feasibility 

Well someone had already done it why couldn't i.... A few months previous to finally deciding i would go a head i was at the L2B mini run. (where i bought my mini!!!!) met a guy and his dad. He had installed what  i believe was a central locking kit and had wired it so he could remotely start the engine with his fob. This meant the kits were out there.... Then i saw on the forums some talk about @A-Series Spares kits. Surprisingly hard to find any real manuals or information on the kits i looked into the generic central locking kits. Here i found schematics a plenty and decided it was something i could do.... 

 

 

Price 

Central locking - For the central locking kit bare i was looking at £126... sounds painful however if you were to add installation it would have risen to £306.... Like im sure all you guys can agree im only a little protective and dont like the idea of other people working on my mini. Bare bones it is ill install it myself. 

 

Control - Control wise i was sure from the start id use an arduino purely due to how cheap and easy to code they are. Let alone the huge open repository of existing code / scripts available. From looking online i roughly worked out how i would control the kit and looked at a cheap relay module from Ebay. They are a dime a dozen. Then looking for a way to read my RFID i found good reviews for Adafruits PN532 break out. Let alone they had already provided code to unlock a PC using an RFID, SCORE! Lastly i had to look for the RFID. These come in hundreds of forms. From Fobs to cards and even the extreme of hand implants!!!!! I decided on the more tame version which was in the form of a ring. Later i found out the ring has TWO RFIDS meaning i could control lock and unlock using different hand movements... Damn im sad. 

 

 

Security 

From what i can understand there is only two ways to make my system unlock the doors. The use of my RFID ring with its UID or by the bad guys that have scanned my RFID extracted my UID and either cloned it or emulated it. 

 

So unless my ring is stolen  ( same weakness as keys ) or my ring gets scanned and cloned ( you would have to scan it from within 1") my system is just as safe as the normal locks. Infact its safer than the key fob! That signal can be intercepted at a greater range and emulated! 

 

In the old days of RFIDs the UID was read only and could not be changed or programmed meaning they were uncopy-able however as times changed chips were made with programmable UIDs this means cloning was possible :(

 

TLDR 

  • Safe
  • Not too expensive 
  • Something i could do 

Edited by phillrulz, 25 July 2017 - 06:31 PM.


#2 phillrulz

phillrulz

    Super Mini Mad

  • Members
  • PipPipPipPipPipPip
  • 617 posts
  • Location: North West London

Posted 24 July 2017 - 10:25 PM

Control system

 

 

Hardware setup

The arduino used 5v DC the PN532 uses 3.3V. To make them compatible with each other a level shifter is required. Simply it converts whats is a 3.3v digital "high" to a 5v digital "high" and vice versa. Think of it as a gearbox turning the engines high RPM low torque into the low RPM high torque required at the wheels. The schematic is used is in the spoiler below. This shows the Arduino uno, bread board, level shifter and PN532 board. I would show you mine however its a spider nest of jumpers... 

 

 

 

 

Code

As good as i feel i am at coding with arduinos i have my limits. For this project i modified an existing program to suit my needs. The existing program supplied by adafruit takes a RFID input code and logs into a windows computer if the RFID checks out okay. The way it works , the arduino reads the RFID compares it to its list of access codes. If the code matches the arduino then types the users password in and hits enter on the keyboard logging the user in. So it already has two main section i can alter for my project.

 

 

Read a RFID - here the arduino reads the RFIDs UID and compares it to a database of good UIDS then it decides if it should ignore it or do an output like type the password. I can change the database of accepted codes to match the RFIDs UID for my particular chip takes 10 seconds to read my chip, get its UID and edit the software to accept my chip. 

 

 

Output a password - Here the arduino if the UID matches the accepted codes will output the users password. In my case i dont want a password to be outputted i want a relay to be switched. So i converted it to make the arduino turn a digital output high sending out 5V. This will be used to Switch a relay which will then switch the manual switch causing the doors to change state. 

 

 

Code before and after mods

 

Code before

 

wSbUw.png

( that isnt my UID its the default for the script  :shades:

 

Code after 

 

wSccx.png

 

 

 

So what does it mean? - The arduino reads the card. "If" the "cardidentifier" aka the UID matches that which you have listed in the code the code directly below the "if" will run. You will notice i have two sets of this code the only difference being the number in the "digitalWrite" command and the state. The digitalWrite command has two parameters. digitalWrite(Pin number , state); Pin number being the output which is switched and the state if you want 0V or 5V sending to that pin. I have two off these commands as i have two relays. One shorts white to ground this should lock the doors and the other relay shorts brown to ground this should unlock the door. Thinking about it i think i need to change the code to only pulse the relay vs lock it on. But when i get my kit ill have a play. 

 

 

 

Does it work...

Ive fully built the control side just waiting on the central locking kit to check compatibility or i will be going back the drawing board.... Below ive embedded a video showing the operation. 

As i explain there is a relay module with a red LED, when this switches on and off it represents the status of the door. To open the door an open palm must be placed approximately 1" above the sensor. This will read the open RFID and the relay will open the door. To lock the doors a fist bump is required. This presents the other RFID which is programmed to lock the door....

 

Yes i know its sad but hey who else can say they high five their mini and it unlocks then fist bumps it to make it lock!!! 

 

 

 

 


Edited by phillrulz, 28 August 2017 - 09:25 PM.


#3 phillrulz

phillrulz

    Super Mini Mad

  • Members
  • PipPipPipPipPipPip
  • 617 posts
  • Location: North West London

Posted 24 July 2017 - 10:25 PM

Post saved for Kit installation 


Edited by phillrulz, 24 July 2017 - 11:54 PM.


#4 phillrulz

phillrulz

    Super Mini Mad

  • Members
  • PipPipPipPipPipPip
  • 617 posts
  • Location: North West London

Posted 24 July 2017 - 11:54 PM

Post saved for testing / final post



#5 Albino_Hedgehog

Albino_Hedgehog

    Speeding Along Now

  • Traders
  • PipPipPipPipPip
  • 341 posts
  • Location: Rubery
  • Local Club: Solihull Mini Classic Club

Posted 25 July 2017 - 01:47 PM

Holy crap!!

Definitely gonna have to read through this again!!

#6 phillrulz

phillrulz

    Super Mini Mad

  • Members
  • PipPipPipPipPipPip
  • 617 posts
  • Location: North West London

Posted 25 July 2017 - 06:37 PM

Holy crap!!

Definitely gonna have to read through this again!!

Ha, sorry if its a little confusing happy to explain anything. 



#7 panky

panky

    Camshaft & Stage Two Head

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,776 posts
  • Location: Cheshire
  • Local Club: Northwest Casual Classics

Posted 25 July 2017 - 06:46 PM

I like it and love the end result - but I'll stick to the oily bits, far to clever for me ;D

Looking forward to seeing the finished system


Edited by panky, 25 July 2017 - 06:47 PM.


#8 phillrulz

phillrulz

    Super Mini Mad

  • Members
  • PipPipPipPipPipPip
  • 617 posts
  • Location: North West London

Posted 25 July 2017 - 07:09 PM

I like it and love the end result - but I'll stick to the oily bits, far to clever for me ;D

Looking forward to seeing the finished system

Yea looking forward to fist bumping the mini to lock it! 



#9 Albino_Hedgehog

Albino_Hedgehog

    Speeding Along Now

  • Traders
  • PipPipPipPipPip
  • 341 posts
  • Location: Rubery
  • Local Club: Solihull Mini Classic Club

Posted 25 July 2017 - 09:11 PM


Holy crap!!

Definitely gonna have to read through this again!!

Ha, sorry if its a little confusing happy to explain anything. 

Haha

No no, I went back a read it properly once I got to work as oppose to scan reading the first time!!

I follow it rather well, and am currently working on a Raspberry Pi ICE project for my Mini!

I do have a question however!!

Why build from scratch, and not just get an existing RFID alarm kit and pair your ring to it?

I was looking into RFID myself a few weeks back but my funds dried up a bit!! Definitely something I want to look into again in the future!

#10 phillrulz

phillrulz

    Super Mini Mad

  • Members
  • PipPipPipPipPipPip
  • 617 posts
  • Location: North West London

Posted 25 July 2017 - 09:42 PM

 

 

Holy crap!!

Definitely gonna have to read through this again!!

Ha, sorry if its a little confusing happy to explain anything. 

Haha

No no, I went back a read it properly once I got to work as oppose to scan reading the first time!!

I follow it rather well, and am currently working on a Raspberry Pi ICE project for my Mini!

I do have a question however!!

Why build from scratch, and not just get an existing RFID alarm kit and pair your ring to it?

I was looking into RFID myself a few weeks back but my funds dried up a bit!! Definitely something I want to look into again in the future!

 

RFID alarm kit? Do they exist? your not talking about the fob your press to unlock your car are you? 

 

And yea i used a Pi for a HTPC i mounted onto the back of a small 12v travel screen running off my power bank had like weeks of life... 



#11 Albino_Hedgehog

Albino_Hedgehog

    Speeding Along Now

  • Traders
  • PipPipPipPipPip
  • 341 posts
  • Location: Rubery
  • Local Club: Solihull Mini Classic Club

Posted 25 July 2017 - 10:50 PM

Kinda similar to those kits yes.

If you look up "Passive Keyless Entry" you should find some RFID kits with the walk away locking systems :)

#12 phillrulz

phillrulz

    Super Mini Mad

  • Members
  • PipPipPipPipPipPip
  • 617 posts
  • Location: North West London

Posted 26 July 2017 - 04:35 PM

Kinda similar to those kits yes.

If you look up "Passive Keyless Entry" you should find some RFID kits with the walk away locking systems :)

ah these forgot these existed, hmm i dont like the idea of me possibly walking past my car and it unlocking. 



#13 screech

screech

    Up Into Fourth

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 3,136 posts
  • Location: West Sussex
  • Local Club: Bognor rock ya mini & WSMOC

Posted 29 July 2017 - 08:57 PM

Looks great.

Can't see any reason why it wouldn't be compatible with the central locking. There are 2 triggers wires on the loom, one for lock, one for unlock. Wire them into your magic box to trigger to ground and jobs a goodun!

Keeping a close eye!

#14 Hewlett_T

Hewlett_T

    Stage One Kit Fitted

  • Noobies
  • PipPipPip
  • 55 posts
  • Location: Bristol

Posted 17 August 2017 - 08:13 PM

Sorry to be pessimistic but what's to stop someone using a RFID reader to read and clone your card or key fob. RFID is used in building security but due to the easy duplication and vulnerabilities high value or dangerous rooms are still key controlled as they can't be cloned blind (unless the key number is in open sight).

RFID can even be cloned just from walking past you with the correct equipment which is why new contactless cards are vulnerable and thus limited to £30 transactions.

Edited by Hewlett_T, 17 August 2017 - 08:14 PM.


#15 paulrockliffe

paulrockliffe

    Camshaft & Stage Two Head

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,763 posts
  • Location: Durham

Posted 18 August 2017 - 07:31 PM

Yeah, but the chances are so slim. How would you know the car had an RFID lock in the first place?

Anyway, looks really cool, I have the A-Series door locks, so might copy this.

Will this have key less ignition as well then? That might be complicated due to the need for a wheel lock for MOST, but interested to see if it can be made to work.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users