Build a Face Recognition Smart Door that registers faces, identifies them in real time, and controls a servo motor to open and close a door—complete with personalized voice greetings powered by text-to-speech. Walk up to the camera, and if your face is registered, the system greets you by name and opens the door automatically.
Why did we decide to make it?Building a face recognition door system traditionally requires deep learning frameworks, servo control libraries, audio synthesis, and a lot of glue code. With Grablo's visual blocks, all of that complexity disappears—no coding needed.
What You'll BuildA complete face recognition smart door featuring:
- Real-time face registration and recognition
- Servo motor door control (open/close)
- Personalized voice greetings via text-to-speech
- False-trigger prevention with hold-time logic
- Dashboard with live camera feed and enrollment controls
- Install software:Download and install Grablo on your Raspberry Pi
- Set up hardware: Connect camera, speaker, and servo motor
- Get this project:Project Link
- Open Grablo app: On your desktop or mobile browser
- Hit RUN: Connect to your Raspberry Pi and start recognizing faces!
- Enroll faces: Type a name and click the Enroll button
- Test it out: Walk up to the camera and hear your personalized greeting
💡 Want to build it yourself? Continue to Build Process
- Go to https://app.grablo.co
- Click "Create Project"
- Name your project
- Select your device (Raspberry Pi 4 for this tutorial)
- Create a new dashboard
- Camera Widget: Select your camera to display the live video feed
- Push Button Widget: Create an "Enroll" variable to trigger face registration
- Input Widget: Create a "Name to Enroll" variable for typing the person's name
- Label Widget (Face Count): Display the total number of enrolled faces
- LED Widget (Registered): Indicate whether the detected face is a registered one
- Label Widget (Name): Display the recognized person's name
- LED Widget (Door Open): Show whether the door is currently open or closed
Start the camera and enable face recognition when the project begins.
- Condition (Once): Runs once at project start
- Action (AI Analysis): Create a new AI Analyzer → Set AI Model to Face Recognition → Type to Recognize Face → Assign output variables (Registered and Recognized Name)
- Action (Camera): Select camera → Command: Start
Register a new face whenever the Enroll button is pressed on the dashboard.
- Condition (Compare): Enroll variable = True, Option = Rising Edge
- Action (AI Analysis): Select AI Analyzer → Command: Add Analysis → Type: Enroll Face → Face Name: From Variable → select "Name to Enroll"
Continuously track the total number of registered faces.
- Condition (Always): Runs on every cycle
- Action (AI Analysis): Select AI Analyzer → Command: Add Analysis → Type: Get Enrolled Count → Assign to Face Count variable
Open the door when a registered face is detected continuously for 3 seconds (prevents false triggers).
- Condition 1 (Compare): Registered = True, Option = Hold Time: 3 seconds
- Condition 2 (Compare): Door Open = False (only open if currently closed)
- Action (TTS): Create new TTS → Command: Play → Output Text: Use block editor to join "Welcome home, " + Recognized Name variable + ". Door opening."
- Action (IO Device): Create Servo Motor → Select GPIO pin → Command: Set Position → 90 degrees
- Action (Set Variable): Door Open = True
Close the door when no registered face is detected for 3 seconds.
- Condition 1 (Compare): Registered = False, Option = Hold Time: 3 seconds
- Condition 2 (Compare): Door Open = True (only close if currently open)
- Action (TTS): Command: Play → Output Text: "Door closing."
- Action (IO Device): Select Servo Motor → Command: Set Position → 0 degrees
- Action (Set Variable): Door Open = False
💡 Tip: You can duplicate Control 4 and modify the conditions and actions to quickly create Control 5.
That's It!Congratulations! You've built a complete face recognition smart door using visual blocks and zero lines of code.
Expected ResultsWhen you run your project:
- Camera view appears: Live feed with face detection overlay
- Unregistered face: Red border labeled "Unknown"—door stays closed
- Enroll a face: Type a name, click Enroll → face count increases, face is recognized immediately
- Registered face detected for 3 seconds: TTS greets by name, servo rotates to 90°, door opens
- No registered face for 3 seconds: TTS says "Door closing", servo returns to 0°, door closes
- Scale: Register hundreds or even thousands of faces
- Raspberry Pi Camera Module (CSI)
- USB Camera
- 3.5mm audio jack
- USB audio adapter
- Bluetooth speaker
Follow the connection table and connect each row of components horizontally:
⚠️ For multiple servos or heavy loads, use an external power supply instead of powering directly from the Raspberry Pi.
Video TutorialWatch the complete build process in action:
What's Next?Expand your project:
- Add a buzzer alert for unregistered faces
- Log entry/exit times to a dashboard
- Add multiple doors with different servo motors
- Integrate with a relay to control an electric door lock
- Add a "Delete Face" button for managing enrolled faces
Face not detecting:
- Ensure adequate lighting on the face
- Check camera connection and orientation
- Make sure the face is within the camera's field of view
Door opens for unknown faces:
- Verify the Compare condition checks Registered = True
- Ensure Hold Time is set (3 seconds recommended)
- Check that the correct variable is assigned
TTS not speaking:
- Check speaker connection
- Verify TTS action is configured with Command: Play
- Test with a simple text first before using variables
Servo not moving:
- Verify GPIO pin matches your wiring
- Check power supply to the servo
- Test with different angle values (0° and 90°)
Door keeps opening and closing rapidly:
- Verify Hold Time is set in both open and close conditions
- Ensure Door Open variable is properly toggled in both controls
- Check that conditions include the door state check (open/closed)
- Website: https://grablo.co
- Web App: https://app.grablo.co
- Docs: https://doc.grablo.co
- Support: support@grablo.co









Comments