ESP32 Smart Lock System | Fingerprint + IoT Remote Unlock
by Pro Maker_101 in Circuits > Arduino
98 Views, 1 Favorites, 0 Comments
ESP32 Smart Lock System | Fingerprint + IoT Remote Unlock
In this project, I’ve built a Smart Lock System using the FireBeetle 2 ESP32-C6, a DFRobot Capacitive Fingerprint Sensor, and the Blynk IoT App.
This smart system allows you to unlock your lock in three different ways —
✅ Locally using your fingerprint,
✅ Remotely through the Blynk IoT app, or
✅ Manually using a push button from inside the room.
The relay automatically switches OFF after 2 seconds for safety and to save power.
You can store up to 80 fingerprints, and the best part — you can add or remove fingerprints directly from the Blynk app without connecting the device to a computer!
Using the ESP32-C6’s WiFi connectivity, the entire system stays online, letting you control and manage access from anywhere. This makes it ideal for home, office, or lab security automation.
Whether you’re interested in IoT home automation, DIY electronics, or smart security systems, this project is both practical and educational, and can be easily built with basic components.
Supplies
- DFRobot FireBeetle 2 ESP32-C6
- DFRobot ID809 Capacitive Fingerprint Sensor
- 12V Solenoid Lock
- 12V Relay
- Push On Switch × 3
- 7805 Voltage Regulator (with Heatsink)
- 22µF Capacitors × 2
- 104 (0.1µF) Capacitors × 3
- 100nF Capacitor
- IN5819 Diode
- IN4007 Diode × 2
- PC817 Optocoupler
- BC547 Transistor
- 1KΩ and 220Ω Resistors
- 12V Socket
- Terminal Block
Circuit Diagram
The complete circuit diagram for the Smart Lock System is attached below.
You can follow this schematic to understand all the connections between the ESP32, fingerprint sensor, relay, and solenoid lock.
You can make the circuit in three different ways:
- 🧩 Design your own PCB using EasyEDA, And Buy PCB,s From JLCPCB, or any other PCB design platform.
- 🪛 Use a dot PCB (perfboard) and connect the components manually using wires.
- 🧠 Breadboard prototype it first if you’d like to test before making a permanent version.
Place Components on PC
After designing or printing the PCB, it’s time to assemble all the components according to the circuit diagram.
👉 Start by placing each component exactly as shown in the schematic — this helps avoid wiring mistakes later.
🧠
Assembly Tips:
- Begin with small components like resistors and diodes.
- Next, place ICs, transistors, and optocouplers (such as PC817).
- Then mount capacitors, connectors, and relays.
- Finally, add the ESP32, fingerprint sensor connector, and 12V socket.
Use short jumper wires or straight tracks to keep the layout neat and reduce noise or interference.
Ensure correct polarity for diodes, capacitors, and the 7805 voltage regulator.
You can also use screw terminal blocks for connecting external parts like the solenoid lock and power input for easy maintenance.
Trim and Clean the PCB
Once all the components are soldered properly, it’s time to finish and clean your PCB.
1. Trim the Extra Leads
After soldering, use a side cutter or flush cutter to carefully cut off all the extra component legs on the backside of the PCB.
Make sure you don’t damage the solder joints while cutting.
2. Clean the PCB
To remove flux residue and give your board a professional look:
- Take some IPA (Isopropyl Alcohol) on a soft brush or cotton cloth.
- Gently scrub the solder side of the PCB until it looks clean and shiny.
- Allow it to dry for a few minutes.
Cleaning helps to prevent corrosion, improve electrical reliability, and make your PCB look neat and polished.
FireBeetle 2 ESP32-C6 Installation
For this project, I’ve used the DFRobot FireBeetle 2 ESP32-C6 as the main controller.
It’s a powerful and compact WiFi + Bluetooth + Zigbee development board based on the ESP32-C6 chip, ideal for IoT and smart automation projects.
⚙️ Key Points
- Low power RISC-V processor
- Built-in USB Type-C and 3.3V logic
- Works with Arduino IDE
- Supports Blynk IoT platform
Solder female header pins on PCB and plug the FireBeetle board carefully matching pin labels.
🔗 Buy Here: DFRobot FireBeetle 2 ESP32-C6
Capacitive Fingerprint Sensor Installation
Use the DFRobot ID809 Capacitive Fingerprint Sensor for accurate and fast recognition.
It supports up to 80 fingerprints and communicates via UART interface with the ESP32-C6.
⚙️ Key Points
- Built-in RGB ring light for status indication
- Supports Add/Delete fingerprint functions via Blynk
- Reliable capacitive sensing for high accuracy
Solder male header pins to the sensor wires (6 pins total) and connect it to the female header on the PCB.
Before installation, read the sensor datasheet carefully to ensure correct wiring and operation.
🔗 Buy Here: DFRobot Capacitive Fingerprint Sensor (ID809)
Programming the FireBeetle ESP32-C6
Now your PCB is fully assembled and ready to program.
⚙️ Steps
- Connect the FireBeetle 2 ESP32-C6 to your PC using a USB Type-C cable.
- Works with Windows, macOS, and Linux.
- Open the Arduino IDE.
- Select the correct board and port from the Tools menu.
- Paste the provided Blynk + Fingerprint code.
- In the code, enter your Blynk Auth Token, Template ID, and WiFi credentials.
- Upload the code to the ESP32-C6.
For a complete setup guide, watch the detailed video tutorial (click here)
Downloads
Make the Enclosure
To protect your PCB and components, make a custom box using 3mm acrylic sheet.
⚙️ Steps
- Cut the acrylic sheet according to your PCB size using a cutter or laser tool.
- Assemble the pieces to form a box shape.
- Fix the PCB inside the box using screws or hot glue.
- Ensure openings for USB Type-C, sensor, and wires.
- Finally, glue the sides securely for a clean, durable finish.
This acrylic box keeps your project safe, neat, and professional-looking.
Connect the Solenoid Door Lock
Use a 12V Solenoid Door Lock to control the door mechanism.
There are two types available (normal and mini size) — you can buy either one from DFRobot.
⚙️ Key Points
- Operates on 12V DC
- Connect positive (+) and negative (–) wires to the terminal block on the PCB
- Controlled by relay for safe automatic locking/unlocking
- Works perfectly with the FireBeetle ESP32-C6 and fingerprint/Blynk control
🔗 Buy Here: 12V Solenoid Lock – DFRobot
Blynk Setup and Fingerprint Operation
With the Blynk IoT App, you can now unlock your door from anywhere, and also add or remove fingerprints directly from your phone.
⚙️ Setup
- Open the Blynk IoT App.
- Create a new template and copy your Auth Token, Template ID, and Device Name.
- Add three buttons in the dashboard:
- 🔓 Unlock Door
- ➕ Add Fingerprint
- ❌ Remove Fingerprint
- Upload the code with your Wi-Fi and Blynk credentials to the FireBeetle ESP32-C6.
- Once connected, you can control the lock and fingerprints remotely through the app.
🖲️ Manual Operation
Two push switches are also provided on the PCB for offline control:
- One for adding fingerprints
- One for removing fingerprints
You can manage users even without the internet using these buttons.
💡 Ring Light Indicator Status
Access Granted
🟢 Green
Access Denied
🔴 Red. (3× fast blink)
Finger Capture Error
⚪ White (2× fast blink)
Add / Delete Finger
🔵Blue / 🟡 Yellow
Watch the full detailed video tutorial for setup and demonstration 🎥
Door Installation and Power Backup Setup
Now it’s time to install your smart fingerprint door lock system on the door!
⚙️ Installation Guide
- Mount the Solenoid Lock securely on the door frame using screws.
- Connect its + and – terminals to the PCB’s terminal block.
- Make sure the lock aligns properly with the door latch for smooth operation.
- Place the Fingerprint Sensor on the outside panel of the door so it’s easily accessible for scanning.
- Only the finger sensor and solenoid lock should be outside.
- All other components (PCB, power module, FireBeetle board) must be kept inside for protection.
- Secure the main PCB inside the enclosure (you made earlier from 3mm acrylic) and mount it safely near the lock.
Working & Operation
Once everything is assembled and installed, it’s time to see your Smart Fingerprint Door Lock in action! 🚪✨
🔸 Multiple Unlock Options
- Fingerprint Unlock:
- Simply place a registered finger on the sensor.
- The system will verify your fingerprint and unlock the door instantly.
- Only stored fingerprints can unlock — secure and reliable!
- Blynk App Control:
- Unlock the door from anywhere in the world using the Blynk IoT app.
- You can also add or remove fingerprints directly from the app.
- Manual Button Unlock:
- From inside the room, press the push switch to unlock the door manually.
- Another switch is used for adding or removing fingerprints without a phone.
🔸 Smart Features
- Unlock locally or remotely via Wi-Fi + Blynk.
- Add or remove fingerprints from either phone or buttons.
- Auto lock after 2 seconds for safety.
- Optional battery backup ensures operation during power failure.
🔸 Watch the Full Working Demo
🎥 Check the video tutorial for complete setup, Blynk configuration, and working demonstration
Watch Video