This project is about scanning an ID card and storing the read-out into the EEPROM. It’s build to be the back-bone of any system that requires a safety system based on ID card or Tags. What makes this sketch different from other sketches is that is is easy to read and understand. Secondly it is different because it’s using a timer technique for controlling the delays. And last but not least it’s easy to extend with a numeric keyboard, a relay controll etc.

There are many sketches about door-lock systems but I wanted to make one myself and not to make a better one but just to learn how it works. So this Sketch is, even if it might become very useful to you, in the first place a way to get to understand the mechanism of a timer control, EEPROM storage and the reader. I have chosen for the RC 522 mostly because I liked the library for it and also with the readers I tested the 532 seemed to be less responsive to the ID tags but that might have been due to the brand. The whole description about what to do and how to connect the only three modules is in the sketch to find. If it’s ready and started up the display will tell everything what is happening. I also have made some use of the Serial.print function to show how the information gets stored and wiped in the EEPROM. Just remove the * and *in the loop and open the monitor for serial.


In normal mode the reader and the buttons get all the attention. 

When the reader can read an ID it will check if the ID can be find in the EEPROM and if so it might actvate a relais.

All three of the buttons have a function what gets ativated after having pressed the button for at least 10 seconds. This is due to a savety measure as the functions are about deleting and adding ID cards. Just follow the instructions on the display.  


To build the system up:

Use a UNO or a NANO and follow the pin connection wiring which you will find in the sketch. Connect the LCD and the switches. Load the sketch into the Arduino and enjoy. Ó'yes, you might have to ad a library or two which you can find on github