RFID Door Lock with Arduino: Build Guide + Real Catch

RFID Door Lock with Arduino: Build Guide + Real Catch

An RFID door lock reads a card's ID, checks it against an allow-list, and moves a servo to release a latch if the card is authorized. We asked Soldr to build exactly that — and caught something worth knowing before you order parts: the tray it built has no way to actually read a card.

Quick answer: An RFID door lock needs a reader module, a card, and a servo latch. Soldr's tray for this build carded an RFID card in the "RFID Reader" slot — a passive tag has no reader hardware. Its own firmware admits it: "the build list currently lacks this reader." The fix is an MFRC522 module (Rs.180), used below.

Proof of work: we built this exact project through Soldr on 15 August 2026 — every screenshot below is from that session. Published 15 August 2026 · Last updated 15 August 2026.

What parts do you actually need for an RFID door lock?

Seven parts, once the gap below is corrected: an Arduino, an RFID reader module, an RFID card compatible with that reader, a servo to move the latch, a 3.3V regulator note for the reader, a power supply, and a breadboard. Soldr's session priced its own (broken) tray at Rs.1,780; the corrected tray below comes to Rs.1,230.

Parts list for the RFID door lock (prices checked August 2026)
Part Role Price (Rs.) Where to buy
Nano R3 (CH340) Development Board Controller 210 Nano R3 (CH340)
MFRC522 13.56MHz RFID Reader/Writer Module RFID reader — the part Soldr's tray was missing 180 MFRC522 Reader Module
13.56MHz MIFARE Classic Cards (pack of 5) The cards you scan — must match the reader's frequency 75 MIFARE Card Pack
MG996R Servo Moves the physical latch 710 MG996R Servo
9V Battery Snap Connector Power supply (see the voltage caveat below) 35 9V Battery Snap Connector
SYB-170 Mini Breadboard Prototyping 20 SYB-170 Mini Breadboard
Total (corrected tray) 1,230 Cash on delivery available across India

What did Soldr actually build, and what was wrong with it?

Our exact prompt was: "Build an RFID door lock that unlocks a servo-driven latch when an authorized RFID card is scanned, using an Arduino." Soldr returned a 5-part tray, matched 5/5 against the catalogue.

Soldr's RFID Reader slot expanded to show its only two options: a passive 125kHz RFID card tag and an unrelated voice recognition module — neither is an actual RFID reader
Proof from our 15 August 2026 session: the "RFID Reader" role's own swap list offers a passive card tag or a voice-recognition module — no reader module was ever surfaced as an option.

The "RFID Reader" slot was filled with an EM4100 125kHz RFID Card Tag — the small card or fob you'd scan, not the module that reads it. A passive tag has no active output of its own; it only responds when a reader's antenna energizes it. Clicking that slot's own "2 options" swap list confirms the gap rather than fixing it: the only alternative offered was an Elechouse Voice Recognition Module — unrelated hardware, also not a reader.

We didn't have to infer this was wrong — Soldr's own codegen step said so, twice. The firmware reply opened with: "Assumes a generic 125kHz RFID reader module (e.g., RDM6300) is connected to Serial1 (D0/RX, D1/TX) at 9600 baud — the build list currently lacks this reader; add one to complete the door lock." The generated sketch's own first line reads: // UNRESOLVED: 125kHz RFID reader module (e.g., RDM6300) is not listed in the build.

Soldr's generated firmware for the RFID door lock, its own first-line comment reading UNRESOLVED: 125kHz RFID reader module is not listed in the build
Proof from the session: the Firmware tab's own header comment states the gap plainly — the codegen step knows the reader is missing but has no way to add it to the tray.

A third, completely independent part of Soldr confirms the same thing: the deterministic Wiring tab. It can only wire the tag's power pins (VCC, GND) — there's no signal pin to wire, because a passive tag doesn't have one.

Soldr's deterministic wiring table for the RFID door lock: the servo gets a full V+/GND/PWM connection, but the RFID card tag only has VCC and GND wired — no signal pin exists to connect
Proof from the session: three separate systems inside Soldr — part retrieval, the firmware generator, and the wiring builder — all independently land on the same fact: there is no reader in this tray.

Two smaller things worth knowing before you order, found in the same session: the tray's controller (Arduino UNO R4 Minima, Rs.1000) was described as "the lowest-cost listed controller that meets the requirement" — but that same slot's own swap list shows an Arduino Nano at Rs.210, less than a quarter of the price, sitting right there as an option. And the generated firmware defines SERVO_PIN 2, while the separately-generated wiring table assigns the servo's signal to Pin 9 — two parts of the same build disagreeing on which physical pin does the job. The firmware step even self-flagged a related issue: "SERVO_PIN is declared but never read or written afterwards."

Wiring the corrected build

This wiring is built from the MFRC522's standard SPI pinout on an Arduino Nano, chosen to avoid every pin conflict named above.

Wiring — MFRC522 reader + MG996R servo, Arduino Nano
From To Why
MFRC522 SDA (SS) Nano D10 SPI chip-select
MFRC522 SCK Nano D13 Hardware SPI clock
MFRC522 MOSI Nano D11 Hardware SPI data out
MFRC522 MISO Nano D12 Hardware SPI data in
MFRC522 RST Nano D9 Reader reset line
MFRC522 3.3V Nano 3.3V pin (not 5V) The MFRC522 is a 3.3V part — powering it from 5V risks damaging it
MFRC522 GND Nano GND Shared ground
Servo signal Nano D6 Free digital pin, clear of every SPI/reset pin above
Servo V+ External 4.8–7.2V supply (not the Nano's 5V pin) The servo's ~700mA running draw is more than the Nano's onboard regulator should carry
Servo GND Common ground with the Nano and its supply All grounds must be shared for the signal to be meaningful

On the power supply: Soldr's own tray flagged this honestly — a 9V battery snap connector doesn't directly match the servo's 4.8–7.2V range or give the servo the current headroom a battery-backed regulator would. A 4×AA battery holder (Rs.60, giving a nominal 6V) sitting in the servo's rated range is a cheap, direct fix if you want to avoid a separate regulator.

Reference firmware

Soldr's own generated sketch assumed a reader that was never in the tray, so this is a reference sketch built around the real MFRC522, using the standard MFRC522 Arduino library (install via Library Manager) — not a transcript of Soldr's file.

// RFID door lock: MFRC522 reader + MG996R servo, Arduino Nano.
// Library needed: "MFRC522" by GithubCommunity (Arduino Library Manager) + built-in Servo.h

#include <SPI.h>
#include <MFRC522.h>
#include <Servo.h>

#define SS_PIN   10
#define RST_PIN  9
#define SERVO_PIN 6

MFRC522 rfid(SS_PIN, RST_PIN);
Servo doorServo;

const int LOCK_ANGLE   = 0;
const int UNLOCK_ANGLE = 90;
const unsigned long UNLOCK_DURATION_MS = 3000;

// Add your own card's UID here (see setup() to print a new card's UID)
byte authorizedUID[4] = {0xDE, 0xAD, 0xBE, 0xEF};

void setup() {
  Serial.begin(9600);
  SPI.begin();
  rfid.PCD_Init();
  doorServo.attach(SERVO_PIN);
  doorServo.write(LOCK_ANGLE);
  Serial.println(F("[SOLDR] RFID door lock ready - scan a card"));
}

bool isAuthorized(byte *uid, byte size) {
  if (size != 4) return false;
  for (byte i = 0; i < 4; i++) {
    if (uid[i] != authorizedUID[i]) return false;
  }
  return true;
}

void loop() {
  if (!rfid.PICC_IsNewCardPresent() || !rfid.PICC_ReadCardSerial()) return;

  Serial.print(F("[DATA] UID:"));
  for (byte i = 0; i < rfid.uid.size; i++) {
    Serial.print(rfid.uid.uidByte[i], HEX);
    Serial.print(' ');
  }
  Serial.println();

  if (isAuthorized(rfid.uid.uidByte, rfid.uid.size)) {
    Serial.println(F("[SOLDR] authorized - unlocking"));
    doorServo.write(UNLOCK_ANGLE);
    delay(UNLOCK_DURATION_MS);
    doorServo.write(LOCK_ANGLE);
  } else {
    Serial.println(F("[SOLDR] card not recognised"));
  }

  rfid.PICC_HaltA();
  rfid.PCD_StopCrypto1();
}

Frequently asked questions

RFID door lock banane ke liye kaunse parts chahiye?

Saat cheezein: ek Arduino Nano (Rs.210), ek MFRC522 RFID reader module (Rs.180), 5 MIFARE cards ka pack (Rs.75), ek MG996R servo (Rs.710), ek 9V battery connector (Rs.35), aur ek mini breadboard (Rs.20). Total Rs.1,230, Compoden se cash on delivery ke saath available.

Why can't a passive RFID tag act as its own reader?

A passive tag has no power source of its own - it only "wakes up" when a reader's antenna coil induces a current in it, which the tag then uses to send back its ID over the same radio link. Without a reader circuit generating that field and decoding the response, a tag sitting on a table does nothing at all; the Arduino has no wire it could even connect to.

What is the price of an RFID reader module in India?

The MFRC522 13.56MHz RFID Reader/Writer Module costs Rs.180 at Compoden, with cash on delivery available across India. A compatible 5-pack of 13.56MHz MIFARE cards costs Rs.75. Prices checked 15 August 2026.

Can I power the MFRC522 reader from the Arduino's 5V pin?

No - the MFRC522 module is a 3.3V part, and powering it from 5V risks damaging the chip over time even though many breakout boards will briefly appear to work. Use the Arduino's dedicated 3.3V pin for the reader's power, and keep it separate from the 5V servo supply.

Back to blog

Open this project in the Soldr app → What is Soldr.ai → parts, wiring and code for what this guide builds