Live Gate Simulation Animated Prototype
Hardware Wiring Arduino Mega Connection Map
MFRC522 Wiring
VCC → 3.3V
GND → GND
SS → Pin 53
RST → Pin 5
MOSI → Pin 51
MISO → Pin 50
SCK → Pin 52
GND → GND
SS → Pin 53
RST → Pin 5
MOSI → Pin 51
MISO → Pin 50
SCK → Pin 52
Servo & Output
Servo Signal → Pin 9
Servo VCC → 5V (External)
Servo GND → GND
Buzzer → Pin 6
Red LED → Pin 7
Green LED → Pin 8
Servo VCC → 5V (External)
Servo GND → GND
Buzzer → Pin 6
Red LED → Pin 7
Green LED → Pin 8
Security Logs
--:--:--[BOOT] Army Gate Controller Online.
--:--:--[INFO] MFRC522 initialized. Waiting for card scan...
--:--:--Waiting for user to scan a card...
Components List Bill of Materials
| Component | Quantity | Purpose |
|---|---|---|
| Arduino Mega 2560 | 1 | Main Controller |
| MFRC522 RFID Module | 1 | Reads Cards |
| Servo Motor (MG995) | 1 | Barrier Movement |
| Active Buzzer | 1 | Alarm on Denial |
| LEDs (Red & Green) | 2 | Visual Feedback |
| Jumper Wires | ~15 | Connections |
How It Works Step-by-Step Process
1
User Scans RFID Tag
MFRC522 emits 13.56MHz RF field and reads the card's UID.
2
UID Verification
Arduino compares the scanned UID against the authorizedUIDs list.
3
Access Granted (Match)
Green LED turns on, Servo rotates to 90°, barrier opens for 5 seconds.
4
Access Denied (No Match)
Red LED flashes, Buzzer beeps for 1 second, gate remains closed.
5
Auto-Reset
Gate closes automatically and system waits for the next card scan.