Secure Your Home with an RFID based door lock Security System Lock With Arduino – Easy DIY Tutorial
Secure Your Home with an RFID based door lock Security System Lock With Arduino – Easy DIY Tutorial
In This Blog We will Cover Project On RFID based door lock security system with Arduino and Each Details Which is Necessary for This Project.When it comes to adding extra layer of security to your door lock there are many technologies like RFID, finger print identification, facial recognition and keypad code. Among all these technologies, RFID is widely used because it’s more efficient and takes less memory space. RFID stands for Radio Frequency Identification. Basic components of RFID system are RFID reader and RDIF tags. The reader reads the tag’s code and sends it to the controller. Each tag has it’s own unique code which the system identifies and take actions.
How RFID system works?
Initially the RFID reader module transmits high frequency radio waves (in megahertz). The tag consists of a coil (spiral copper track). When the tag is held closer to the reader module. The high frequency radio wave transmitted by the reader induces current in the tags coil. This induced emf powers the chip inside the tag. Once the chip gets powered it transmits the RFID code using frequency modulation. This modulated signal is decoded by the reader and send to microcontroller using standard communication protocols like SPI, UART or I2C.
There are two types of RFID systems. One is active and another is passive. In this project we are using a passive RFID system. In active RFID system, the tag is battery powered and also the frequency is high this increases the range of tag detection to several meters. In passive RFID system the tag doesn’t contain a battery and the range of tag detection is 5 to 10cm which is perfect for our application.
The reader module we are using is RC522. The RC522 module supports I2C, UART and SPI protocol we are using SPI protocol in this project. So lets start with the project.
Components required
Arduino nano with USB cable
RC522 RFID reader module
RFID tags – 2 tags are available with the module
Solenoid cabinet door lock. 12V DC
IRF540 – N channel MOSFET – 1pcs
10K ohm resistor – 1pcs
100k ohm resistor – 1pcs
1k ohm resistor – 1pcs
3mm led (orange colour) – 1pcs
Mini Breadboard – 1pcs
12V 5A adapter
Jumper wires, F to F – 6pcs , F to M – 2pcs , M to M – 2pcs
Circuit diagram and explanation
RFID reader connection
The SPI (Serial Peripheral Interface) protocol is used in RFID reader module. So in SPI there are four common pins. They are Serial clock (SCK), master in slave out (MISO), master out slave in (MOSI) and slave select (SS).
The SCK from reader module is connected to SCK of Arduino nano on Pin 13. MISO is connected to pin 12. MOSI is connected to pin 11 and SDA is connected to pin 10 , the SDA is used as slave select pin.
Led is attached parallel to the output of pin 2 which indicates that the card is tapped on the reader.
Why MOSFET is used?
The Arduino nano is programmed to detect a registered RFID tag and turn the output of Pin 2 to HIGH. The output voltage of pin 2 is 5V and also the maximum current it can give is 40mA. The solenoid door lock requires 12V and takes 0.8A current so it cannot be directly controlled by the Arduino. That’s why we need MOSFET to turn on the solenoid as the MOSFET IRF540 can withstand high current (30A) and high voltage (100V). The arduino’s pin 2 drives the gate of the MOSFET. When pin 2 turns high the MOSFET is turned on. This causes the current to flow from source to drain and the solenoid turns on. This retracts the latch and the door is opened.
-Nilay Guha
Fy Coordinator
Comments
Post a Comment