Embedded hardware, ESP32
PCB in productionRFID Door Lock
An access-control lock for my own door: tap a card and it opens. I designed the circuit board myself and wrote the firmware that runs it.
- Role
- Solo: circuit design and firmware
- Board
- 2-layer PCB, 110 by 80 mm
- Brain
- ESP32 microcontroller
- Status
- Board designed, going to production
Why I built it
I wanted to open my room with a card instead of a key, and to learn how real hardware is designed, not just wired on a breadboard. The lock is the first piece of a bigger Smart Room project, where lights and sensors will all report to one dashboard.
How it works
Tapping a card sends its ID from the MFRC522 reader to the ESP32. If the card is enrolled, the ESP32 switches a MOSFET that powers an electric strike: the door opens for a few seconds, then locks again. A green light and a short beep mean yes; red and a low beep mean no.
Up to 20 cards are stored in flash memory, so they survive a power cut. Five wrong cards within 30 seconds lock the reader for a minute.
Managing cards without a laptop
The admin card has hidden gestures. Tap it twice and the lock enters add mode: the next card you tap is enrolled. Tap it three times for remove mode. If nothing happens within 10 seconds, it goes back to normal.
The same controls are in a phone app built on Blynk, plus a few extras: approving the last card that was denied without walking to the door, a live temperature reading, and a log of every unlock.
The circuit board
I designed the board in KiCad, from the schematic to the layout, including a few custom footprints. It replaces the breadboard prototype and adds the protection a real installation needs:
- A fuse, reverse-polarity protection and a surge diode on the 12 V input
- A separate, clean 3.3 V supply just for the card reader
- A sense circuit that checks whether the strike really got power, so a broken wire shows up as a failure instead of a false success
- Fail-secure wiring: without power the door stays locked, while the inside handle always opens by hand
Red alerts
The board checks the Home Front Command alert feed every 5 seconds. When an alert covers the configured area, the door unlocks for 15 seconds, so nobody fumbles with a card on the way to the shelter. It triggers only once per alert wave.
What's next
The board is going to production. After that: Home Assistant on a Raspberry Pi and a wall touchscreen that controls the whole room.
What it does
- Custom 2-layer PCB designed in KiCad, 110 by 80 mm
- Drives a real electric strike, and stays locked if the power fails
- An admin card adds or removes other cards, no laptop needed
- Remote unlock and an event log from a phone app, plus over-the-air updates
- Unlocks automatically during Home Front Command alerts for the area
Built with
- ESP32
- C++
- KiCad
- Blynk
Gallery

Next project
Jarvis
A voice assistant that runs entirely on my own PC. It listens for its name, understands what you say and answers out loud, with no cloud and no API keys.
Want something like this for your business?
Tell me what you need and I'll get back to you with next steps.