Introduction: RFID RC522 and Normal DC Motor
My inspiration comes from a link: https://www.instructables.com/id/Arduino-RC522-RFI... On my own I have a DC motor and RFID RC522. By keeping those both in mind, I was wondering if I could do something useful as door unlocking/locking. So let's start!
For this project we need:
-Arduino board
-DC motor
-L298N chip (motor driver)
-Power Supply (5V-12V)
-Resistances (3x220OHM)
-RGB LED
-RFID RC522 (with a tag and a card)
Step 1: Connect Motor Driver to Arduino Board and to DC Motor
Arduino pins_________Motor Driver (L298N) pins
GND____________pin#1 (Current Sensing)
D2______________pin#5 (Input1)
D3______________pin#7 (Input2)
A3______________pin#6 (Enable1)
5V______________pin#9 (Logic Supply Voltage)
GND____________pin#8 (GND)
Power Supply
+(5-12V)_________pin#4(Supply Voltage)
-________________pin#8(GND)
Step 2: Connect RFID RC522 to Arduino Board
Arduino pins____________RFID RC522 pins
D9____________________RST
D10___________________SDA
D11___________________MOSI
D12___________________MSO
D13___________________SCK
3.3V___________________3.3V
GND__________________GND
Step 3: Connect RGB LED to Arduino
Arduino pins________ RGB pins
A0________________ pin#1 (Red)
A1________________pin#2 (Green)
A2________________pin#3 (Blue)
Step 4: Sketch and Libraries
Here is the sketch: RFIDDoorLockVersion1
library:MFRC522