Hello world! Today i made a RFID door lock. The lamp acts as a Electric door lock because i don't have a electrical lock, you simply add the door lock to the relay instead of the lamp. I could not find much about the module, i have the RFID-RC522 in blue color, so this might be useful for the ones who have the same problem as me because the red one has the pins different...
Don't have components? Don't worry. Just click the component's name.
Step 2: Build Your Circuit.
Connect wire like the schematic above.
Step 3: Upload The Code.
You can uncomment this line below (line 68) in the code it will increase reading distance :
mfrc522.PCD_SetAntennaGain(mfrc522.RxGain_max);
Step 4: Test!
There is a button to clear the database. How this works is simple, Just hold the button and reset Arduino. Hold it for 6 second and it will clear all cards added. After that you need to add the new master card and key cards.
This project includes a 6 digit password (123142), that must be entered if you want to unlock the safe. There are 4 buttons to submit characters (1, 2, 3 or 4), an enter button, and a clear screen/ lock screen button. When the safe is unlocked, it will remain unlocked until the button to lock it is pressed.
The locking mechanism is simple - a servo motor is mounted to the shoe box, and a slit is cut in the shoe box and the door flap. When in the locked position, the motor is turned in between the openings, making it not possible to open.
Other Parts: 5 x Washer 1 x Plastic Washer 5 x Screw 5 x Nut 1 x Shoe Box 1 x 3/4th inch Conduit Strap Spare Cardboard Duct Tape
Tools: Screwdriver Ruler Knife/Blade
All the electronic parts can be found at Robotshop at lelong or just click the components' name.
Step 2: Upload The Code.
(NOTE: Don't forget to set your own password.)
Step 3: Attaching The Buttons.
There are 6 buttons in this project - 4 buttons to type in a password, 1 button to enter it, and 1 button to clear the screen or lock the door. Connect a wire from the GND pin of Arduino UNO to a ground strip on the breadboard. Then, connect each button to that ground strip. After that, connect each button to PWM pins on the Arduino UNO as shown.
Step 4: Powering The LCD Screen.
The next step here would be to attach the LCD screen. Send a wire from the 5V on the Arduino UNO to the positive rail on the breadboard, and then attach the pins to the ground and power rails as shown.
Step 5: Connecting LCD Screen To Arduino.
Now, you need to connect the screen to the Arduino PWM pins. The LCD screen will display what you typed in with the buttons in real time.
Step 6: Connect The Servo Motor.
The Servo Motor is what will lock and unlock the safe. You have the same on as me, the wires are grouped to a three piece ribbon cable, and there are female headers on the end. You can solder male pins to them, but I chose not to for this project because I needed the wires to reach farther. So, plug in 3 jumper cables to the female pins. Send the red and black to separate power and ground rails than everything else (as shown), and the white cable to Analog Pin 1. make sure to use a 100uF capacitor between that power and ground rail.
Step 7: Mount Everything. Now, you have assembled the circuit and you have the code. The next step is to mount everything to the shoe box.