https://photos.app.goo.gl/fPhF8hjb4CV2x2xn9
Version 2 is already on the way, with way more features!! Please consider buying the components through the included product links to support this and other projects!
🛠️ เจาะลึกเบื้องหลังการทำงาน (Deep Dive / Technical Analysis)
Physical metal keys are an archaic vulnerability; they can be perfectly cloned with a photograph. The RFID Security System utilizes advanced cryptographic tokens! By hardwiring an MFRC522 RFID Scanner acting natively as an incredibly fast 13.56MHz radio array, the Arduino broadcasts a continuous electromagnetic field. When an authorized plastic keyfob enters the magnetic perimeter, its internal microchip powers up completely wirelessly and violently screams its Unique Identifier (UID) back to the receiver! The Arduino validates this Hexadecimal string securely, and instantly drives a massive Transistor to physically smash open a heavy 12V Steel Door Solenoid lock!
The Intense SPI Protocol Matrix
The RFID scanner produces an immense amount of data far too fast for a standard Serial pin to comprehend. It strictly requires the Serial Peripheral Interface (SPI)!
- You MUST wire the module perfectly into the Arduino Hardware SPI pins natively:
MOSI (Pin 11),MISO (Pin 12),SCK (Pin 13)! - The
<SPI.h>library locks the clock speed extremely high. <MFRC522.h>handles the terrifying decryption mathematical handshakes entirely in the deep background.
#include <SPI.h>
#include <MFRC522.h>
#define SS_PIN 10
#define RST_PIN 9
MFRC522 mfrc522(SS_PIN, RST_PIN); // Initialize hardware interface structure
// The Master Key!
String authorizedUID = "E3 B2 C1 A5";
void loop() {
// If no card is nearby, completely abort the loop to save processing cycles!
if ( ! mfrc522.PICC_IsNewCardPresent() || ! mfrc522.PICC_ReadCardSerial() ) {
return;
}
// Construct the incoming Hex bytes into a readable massive string!
String content= "";
for (byte i = 0; i < mfrc522.uid.size; i++) {
content.concat(String(mfrc522.uid.uidByte[i], HEX));
}
content.toUpperCase();
// The Cryptographic Gate!
if (content == authorizedUID) {
Serial.println("ACCESS GRANTED.");
digitalWrite(RELAY_PIN, HIGH); // Strike the 12V Solenoid open!
delay(5000); // Allow exactly 5 seconds for the physical door to be pushed open.
digitalWrite(RELAY_PIN, LOW); // Snap the lock brutally shut again!
} else {
Serial.println("ACCESS DENIED.");
}
}
The 3.3V Logic Extermination Risk
The MFRC522 module operates on pure 3.3V Logic.
- Exposing the
3.3V VCCPin to the Arduino's5Voutput pin will instantaneously vaporize the module's delicate crystalline radio transmitter! - While the SPI data pins can typically survive
5VLogic from a Uno, it is highly professional to deploy a Logic Level Converter chip between the Arduino and the Sensor to prevent slow degradation of the RFID silicon over several continuous months of heavy usage!
Authentication Cybersecurity Hardware
- Arduino Uno/Nano (Handling the high-speed SPI cryptographic polling matrices!).
- MFRC522 RFID / NFC Module (Operating intimately at 13.56MHz; entirely immune to standard low-frequency 125KHz card cloning architectures!).
- MIFARE Classic 1K Cards / Blue Keyfobs (Providing the encrypted Hex payloads autonomously).
- Physical 12V Electromagnetic Lock Solenoid.
- Heavy Duty 5V Relay Module or TIP120 Transistor Array (To separate the fragile logic boards from the massive 12V solenoid coil!).