RC522 RFID Reader MFRC522 Library Arduino Door System


hello;

i got rc522 rfid reader module based on mfrc522 datasheet

i want create rfid door unlock system apartment's door, using  miguelbalboa's
rfid library great , module cheap (around 5-10$). inspired project  brett martin (his project). , want publish workings because there old informations mfrc522 library around in forum . , going  try comment code lines as can.

http://www.youtube.com/watch?v=utxeljwf1bu

and here code and  flow scheme.
code on  github , since new coding, appreciated.

work flow:



code: [select]
code not fit here, please grab github

features:

  easy user interface

  1 master rfid tag needed whether delete or add tags
can choose use leds output or
serial lcd module inform users. or can use both

  stores information on eeprom

  information stored on non volatile memory preserve
  users' tag, master card id hard coded on arduino's flash memory
  no information lost if power lost. appx. 250 tags can programmed
  (for 7 byte uid tags, 140 tags can programmed)
  note: eeprom has unlimited read cycle 100,000 limited write cycle.
 
  security
 
  keep simple using tag's unique ids,
  since module , tags cheap,
  guess ids not unique.

  going use (just secure neighbors not hackers)
  insecure way unlock door.

  , there note on datasheet mentions aboout that
  note: use of single size uids (unique ones) might end soon,
  since number of usable ids limited approximately
  3.7 billion pieces only.

  there security
  issues if there "lock" actually.
 
credits:

  omer siar baysal put project

  idea , of code brett martin
  http://www.instructables.com/id/arduino-rfid-door-lock/
  www.pcmofo.com

  mfrc522 library
  https://github.com/miguelbalboa/rfid
  based on code dr.leong   ( www.b2cqshop.com )
  created miguel balboa (circuitito.com), jan, 2012.
  rewritten søren thing andersen (access.thing.dk), fall of 2013
  (translation english, refactored, comments, anti collision, cascade levels.)

  arduino forum member luisilva massive code correction
  http://forum.arduino.cc/index.php?topic=257036.0
  http://forum.arduino.cc/index.php?action=profile;u=198897

  license

  free code
  give credits put effort on code


todo:

i think since don't use check-sum storedcard , readcard data can 4 byte. checked eeprom , there 4 byte, need figure out behavior.
eeprom code corrected 4 byte data. before writing 5 byte data eeprom stupid since getting 4 byte data rfid tags . mind there 7 byte cards too, need modify code cards. (easy do)

there no way exit program mode if entered accidentally without scanning card,
timeout ? or scanning master card again ?

scanning master card again exit program mode

no wipe mode ?? if lost card?

a universal relay code >  possible?

when entered program mode led cycle through red green blue once, make cycles until exiting program mode.
now cycles.

we using 1 byte store how many tag records have, , each card id takes 4 bytes  on eeprom. arduino uno r3 (atmega328) has 1024 bytes on eeprom 1024-1 = 1023 / 4 = 255 card id record can stored on eeprom. if use more secure way, lets 16 byte 1023 / 16  = 63 records can stored. started new secure branch on github in order give more security project. experimental

optimize code both 4 byte uid , 7 byte uid tags? (for 4 byte supported)


*************** reserved here project updates *************************

23/07/2014 ***** updated github link, commented lines

25/07/2014 ***** massive code correction forum member luisilva, sketch works
                                      there still issues leds corrected
                                      code more human readable (at least newbies me) compared original code

26/07/2014 ***** testing code bugs, etc. far, everthing works expected
                                      code optimized both common anode or common cathode leds, or use regular leds
                                      not matter led going use, define led have

27/07/2014 *****  buzzer code (not needed actually, added anyway)   removed
                                    more information project provided code
                                    can exit program mode scanning master card again if entered accidently
                                    corrected eeprom code cards have 4 byte uid

01/08/2014 ***** minor delay corrections, minor changes relay code.
                                     code controlling relay not universal. need modify relay code needs.
                                     when in program mode led cycles through red green blue
                                     i have been testing whole project days, far good.

hi have got active code link?


Arduino Forum > Community > Exhibition / Gallery > RC522 RFID Reader MFRC522 Library Arduino Door System


arduino

Comments

Popular posts from this blog

Connecting Raspberry Pi 2 to P10(1R)-V706 LED Dot Matrix - Raspberry Pi Forums

TypeError: <unknown> is not a numpy array - Raspberry Pi Forums

datso and removing imagetitle - Joomla! Forum - community, help and support