Shop OBEX P1 Docs P2 Docs Learn Events
RFID Keylock - Security door entry - Multi-Pass - using a RBBB Propeller — Parallax Forums

RFID Keylock - Security door entry - Multi-Pass - using a RBBB Propeller

GarethGareth Posts: 278
edited 2011-08-20 15:56 in Robotics
This is a RFID Security door entry system based off the propeller chip.
RFID_002.jpg

I picked up one of these RFID readers from ebay at a bargain price :-
RFID.jpg
It is a USB HID RFID reader - HID meaning (Human Interface Devise).
It basically spits out a 10 digit number over the USB port.
rfidvid001.jpg

Linking a prop board as a USB bridge is possible (to decode the USB string).
However i found a simpler way by hacking into the raw serial data it transmits.
This means a simple Serial OBJ is all you need to decode data.

To do this i hacked the reader by soldering some headers direct to the board , just 3 wires ....
5V supply and Green wire being the Serial data.
rfidvid000.jpg

This then allows you to tap off (19 serial bytes) directly - at 9600 Baud
rfidvid002.jpg

Here is my basic code structure :-
Repeat index from 0 to 18 ; read in 19 bytes of raw RFID data
..RFIDTEMP[index] := pstrfid.CharIn

RFIDRX[0] := RFIDTEMP[2] +$13 ; load RXbuffer with relevant extracted raw numbers and add hex13 to them
RFIDRX[1] := RFIDTEMP[3] +$13
RFIDRX[2] := RFIDTEMP[4] +$13 ;
.....etcetcetc

...repeat index from 0 to 9 ; parse numbers
....if RFIDRX[index] == $3A ; search for bogus zeros "0"s
.......RFIDRX[index] := $30 ; replace with real "0"s

if strcomp(@RFIDRX, @Multipass) ;compare with database
...pst.Beep
...pst.Str(String("Multipass 0001837321"))

...OUTA[2]~~ 'Make P2 high ; fire the door solenoid
...waitcnt(clkfreq+cnt) ; 1 second is enough ....... door unlatches
...OUTA[2]~ 'Make P2 low ; reset solenoid


DAT
Multipass Byte "0001837321", 0 .......etcetcetc list of your RFID codes .....NOW in DECIMAL YAY

RFIDRX Byte "1234567890",0 ; 10 digit number buffer , holds the end number result
RFIDTEMP Byte "1234567890123456789",0 ; 19 digit raw buffer

Here is the latest version in action - final deployment is delayed until i workout the house wiring (video explains).

Great thanks go to fellow parallaxer WBA Consulting
I am using one of his RBBB prop boards YAY M44D40+ Propeller Module
This board has a small footprint and slots easily into my RFID box - neat and cosy...........

The original concept was developed here - however this was my first stab at unraveling the data, (chaotic programming)

I was then able to crack the numbering system and simplify the data input - ....... shown here using my Elfish propeller computer :-


Sign In or Register to comment.