Unlock a Door With Face Recognition Using ESP32 Camera


Face recognition have been used in smartphone in past few years. It is a cool technology where you can unlock your phone or to access any application that require high security. With ESP32-CAM, we can try to develop a simple application that use your face as ID. Since ESP32 board package already comes with CameraWebServer example code that cater for video stream and face recognition, let’s try to modify a bit so that it can control a relay to ON and OFF.


This video shows how to unlock a door magnetic lock through face recognition using ESP32 camera.

Hardware Preparation

This is the list of items used in the video.

The custom PCB is created using CNC on Snapmaker. Below is the list of components used in the PCB.

Schematic and PCB files for custom PCB.

If you have Snapmaker, you can download ? THIS FILES, and use it for CNC your PCB.

Sample Program

The program is edited directly from CameraWebServer example. Please refer to the video.

Thank You


Thanks for reading this tutorial. If you have any technical inquiries, please post at Cytron Technical Forum.

Please be reminded, this tutorial is prepared for you to try and learn.
You are encouraged to improve the code for better application.

2 thoughts on “Unlock a Door With Face Recognition Using ESP32 Camera”

  1. It is very good but the problem, it is not saving recognized faces to partition as Each time power on we have to start recognition again.

  2. bisa kah saya berbincang dengan Anda untuk proyek ini, saya ingin tahu lebih deta
    (can I talk to you for this project, I want to know more details)

Leave a Comment

Your email address will not be published.

Share this Tutorial

Share on facebook
Share on whatsapp
Share on email
Share on print
Share on twitter
Share on pinterest
Share on facebook
Share on whatsapp
Share on email
Share on print
Share on twitter
Share on pinterest

Latest Tutorial

DIY Interactive Robot Using REKA:BIT With Micro:bit
BLTouch Installation for Ender 3 with 32-bit V4.2.2 Board
Pick and Send Random Meal’s Option and Locations through Telegram Bot Using Grove WiFi 8266 on micro:bit
DIY Automated Vacuum Cleaner Using REKA:BIT With Micro:bit
Rainbow Spark in Mini House using Maker Uno.
Tutorials of Cytron Technologies Scroll to Top