Skip to the content
2 layers80 × 98.5 mmDoorLock PCB, the printed circuit board in 3D

This smart NFC lock grants keyless access to doors and drawers using Apple Pay, credit cards, or NFC tags. Designed with a custom, space-efficient PCB, the hardware is easily concealed. The firmware, built in PlatformIO for the ESP32, offers a robust and modular foundation that can easily be adapted for other microcontrollers.

Size
80 × 98.5 mm
Copper layers
2
Thickness
1.6 mm
Parts
23
Nets
46
Pads
109
Tracks, vias
86, 0
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
14 May 2026
Updated
14 May 2026

Overview

DoorLock PCB is an open-source printed circuit board by EzzNasr, from the EzzNasr/NFC-Door-Lock repository on GitHub. It is a 2-layer board of 80 × 98.5 mm with 23 parts on 46 nets, routed with 86 tracks and 0 vias.

It is built around the ESP32-DEVKITC-VE and 1N4148WT. Its parts include 5 connectors, 4 resistors, 4 diodes, 1 capacitor and 1 IC. It belongs with the radio and wireless boards and the ESP32 boards of this library.

Main components

2

README

README.md

ESP32 PN532 NFC Master Tester

I built this project to solve a massive headache: getting the PN532 NFC module to reliably talk to an ESP32 without crashing, hanging, or timing out. If you have ever tried to hook these two up and got hit with the infamous "i2cRead returned Error 263" message, this code is exactly what you need.

What it does (The Big Picture) At its core, this is a diagnostic tool and a rock-solid starting point for NFC projects. When you connect a card reader to a microcontroller brain, they have to speak the same language. Often, because of cheap clone parts or confusing wiring diagrams, they just ignore each other.

This code acts as a bridge. It lets you easily flip between different communication methods until the devices finally connect. Instead of guessing if your board is dead or if your code is wrong, this setup actively tells you what to fix so you can get back to actually scanning RFID tags and cards.

How it works (The Technical Details) Under the hood, this is a dual-mode PlatformIO project written in C++. It specifically targets the hardware quirks of the ESP32 and those common red PN532 breakout boards.

The main reason I2C fails on these boards (giving you Error 263) is a hardware flaw: they often lack the proper pull-up resistors on the data lines. The ESP32 sends a signal, the voltage drops too low, and it times out waiting for an acknowledgment.

This project bypasses that hardware flaw entirely by giving you a one-line software toggle between standard I2C and High-Speed UART (HSU). If I2C refuses to work, you just comment out a single line of code. The script seamlessly reconfigures the system to use the ESP32 Hardware Serial (RX2/TX2). HSU forces a direct, robust data stream that completely ignores the I2C resistor issues. The code also implements non-blocking retries, ensuring your main loop never hangs indefinitely while polling for a card.

Hardware Configuration Rules The absolute most critical part of this setup is matching the physical DIP switches on the reader to your code. If both switches are ON, the board enters a reserved state and disables communication entirely.

If you are using I2C Mode: Switch 1 must be ON, and Switch 2 must be OFF. Connect SDA to GPIO 21 and SCL to GPIO 22.

If you are using HSU / UART Mode: Both switches must be OFF. Cross your serial lines by connecting the PN532 TX to ESP32 RX (GPIO 16) and PN532 RX to ESP32 TX (GPIO 17).

Just select your mode at the top of the file, flash the board, and open the serial monitor. The code will output exactly how your physical switches and wires should be configured based on the mode you chose, making troubleshooting essentially foolproof.

Parts

23
QtyValueFootprintReferences
4500Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR2, R3, R4, R5
4Conn_01x01TestPoint:TestPoint_THTPad_D3.0mm_Drill1.5mmJ2, J3, Switch-1, Switch+1
4MountingHole_PadMountingHole:MountingHole_3.2mm_M3_Pad_ViaH1, H2, H3, H4
11000Capacitor_THT:CP_Radial_D10.0mm_P5.00mmC1
11N4148WTDiode_THT:D_DO-41_SOD81_P10.16mm_HorizontalD4
15VConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ1
1BuzzerBuzzer_Beeper:Buzzer_12x9.5RM7.6BZ1
1ESP32-DEVKITCPCB design:ESP32-DEVKITCU2
1GreenLED_THT:LED_D4.0mmD3
1Motor_ServoConnector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalM1
1NFC MODULEConnector_Wire:SolderWire-0.1sqmm_1x04_P3.6mm_D0.4mm_OD1mmJ
1WhiteLED_THT:LED_D4.0mmD1
1YellowLED_THT:LED_D4.0mmD2
1~LED_THT:LED_D4.0mmRED-POWER-STATUS1

Similar boards

  • 2 layers100 × 100 mmL298, puente h, the printed circuit board in 3D

    L298, puente h

    Aruzamen-Cristian/Lemurian-Clean

    El robot acuático recolector de basura, Lemurian-Clean, es una innovadora solución para la limpieza de cuerpos de agua.

    29 parts
  • 2 layers103.8 × 50 mmGalagino pcb set, the printed circuit board in 3D

    Galagino pcb set

    harbaum/galagino

    A Galaga, Pac-Man and Donkey Kong arcade emulator for the ESP32

    26 parts558
  • 2 layers115 × 75 mmSpinCoater, the printed circuit board in 3D

    SpinCoater

    RParkerE/OpenSilicon

    OpenSilicon enables DIY semiconductor fabrication with open-source guides for building IC equipment at home. The project includes BOMs, 3D files, firmware, and PDKs, supporting makers and researchers in chip fabrication.

    11 parts55GPL-3.0
  • 2 layers127.3 × 54.1 mmESP32 SolarBox, the printed circuit board in 3D

    ESP32 SolarBox

    cole8888/SRNE-Solar-Charge-Controller-Monitor

    Read data from SRNE solar charge controllers.

    34 parts42
  • 2 layers62.2 × 57.1 mmWs2mqtt, the printed circuit board in 3D

    Ws2mqtt

    Tho85/ws2mqtt

    Connect WiSafe2 devices to Home Assistant

    8 parts28BSD-3-Clause
  • 2 layers99.9 × 99.9 mmSplit flap, the printed circuit board in 3D

    Split flap

    tinkermax/split-flap

    DIY mechanical spli-flap display

    28 parts13CC-BY-4.0
  • 2 layersJF ECU32, the printed circuit board in 3D

    JF ECU32

    JoachimF/JF-ECU32

    RC Jet Engine ECU

    27 parts12GPL-3.0
  • 2 layers72.5 × 84.8 mmDevboard, the printed circuit board in 3D

    Devboard

    ste2425/PSP-Bluetooth-AVConnector

    An AV-Out Breakout library for the PSP. Providing Kicad symbols and footprints to interface with the PSP 2/3K AVOut socket (also known as the TVOut socket)

    13 parts12

Questions

How big is the DoorLock PCB PCB?

It measures 80 × 98.5 mm and has 2 copper layers, 1.6 mm thick.

What parts does the DoorLock PCB use?

23 parts, built around the ESP32-DEVKITC-VE and 1N4148WT. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the DoorLock PCB KiCad files?

From the EzzNasr/NFC-Door-Lock repository on GitHub, at the commit this page was made from: the board is PCB/DoorLock PCB.kicad_pcb and its schematic PCB/DoorLock PCB.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the DoorLock PCB design in my own project?

Its repository states no licence, so its author keeps all rights: ask EzzNasr before reusing the design.