Face Recognition Smart Door With Voice Greeting (No-Code)

by KimY21 in Circuits > Cameras

69 Views, 1 Favorites, 0 Comments

Face Recognition Smart Door With Voice Greeting (No-Code)

Face Recognition Smart Door - Demo

This tutorial shows how to build a Face Recognition Smart Door using visual programming blocks. Register faces, recognize them in real-time, open doors with a servo motor, and greet visitors by name with text-to-speech—no coding required!


What You'll Build

A face recognition smart door with:

  1. Real-time face registration and recognition
  2. Servo motor door control (open/close)
  3. Personalized voice greetings via text-to-speech
  4. False-trigger prevention with hold-time logic
  5. No coding required

Supplies

결선도.png

Required Components

  1. Raspberry Pi or supported hardware
  2. Camera (Raspberry Pi Camera Module or USB Camera)
  3. SG90 Servo Motor (or any PWM servo)
  4. Speaker (3.5mm audio jack, USB audio adapter, or Bluetooth)
  5. Jumper Wires


Servo Motor Wiring

  1. Signal (Orange/Yellow) → GPIO Pin (as selected in pin map)
  2. VCC (Red) → 5V Power
  3. GND (Brown/Black) → Ground

⚠️ For multiple servos or heavy loads, use an external power supply instead of powering directly from the Raspberry Pi.


Camera Options:

  1. Raspberry Pi Camera Module (CSI)
  2. USB Camera


Speaker Options:

  1. 3.5mm audio jack
  2. USB audio adapter
  3. Bluetooth speaker


Quick Start

  1. Download and install Grablo software on your Raspberry Pi
  2. Connect camera, speaker, and servo motor
  3. Get this project
  4. Open Grablo app in your browser
  5. Connect to your Raspberry Pi and hit RUN!
  6. Type a name and click Enroll to register faces
  7. Walk up to the camera and hear your personalized greeting


To build it yourself, continue to Step 2.

Create Dashboard

2026-02-10_16-40-57.png

Create Project & Dashboard

  1. Go to https://app.grablo.co
  2. Click "Create Project"
  3. Name your project
  4. Select your device (Raspberry Pi 4 for this tutorial)
  5. Create a new dashboard


Add Widgets

  1. Camera Widget: Select your camera to display the live video feed
  2. Push Button Widget: Create an "Enroll" variable to trigger face registration
  3. Input Widget: Create a "Name to Enroll" variable for typing the person's name
  4. Label Widget: Display the total number of enrolled faces
  5. LED Widget: Indicate whether the detected face is a registered one
  6. Label Widget: Display the recognized person's name
  7. LED Widget: Show whether the door is currently open or closed


Logic - Start Camera & Face Recognition

2026-02-10_17-09-18.png

Control 1: Start Camera with Face Recognition

Start the camera and enable face recognition when the project begins.

  1. Condition (Once): Runs once at project start
  2. Action (AI Analysis): Create a new AI Analyzer, select camera, set AI Model to Face Recognition, Type to Recognize Face, assign output variables (Registered and Recognized Name)
  3. Action (Camera): Select camera, Command to Start


Control 2: Enroll Face

Register a new face whenever the Enroll button is pressed on the dashboard.

  1. Condition (Compare): Enroll = True, Option = Rising Edge
  2. Action (AI Analysis): Select AI Analyzer, Command = Add Analysis, Type = Enroll Face, Face Name = From Variable (Name to Enroll)


Control 3: Enrolled Face Count

Continuously track the total number of registered faces.

  1. Condition (Always): Runs on every cycle
  2. Action (AI Analysis): Select AI Analyzer, Command = Add Analysis, Type = Get Enrolled Count, assign to Face Count variable


Logic - Door Opening/Closing

2026-02-10_17-11-18.png

Control 4: Open Door

Open the door when a registered face is detected continuously for 3 seconds. This prevents false triggers.

  1. Condition (Compare): Registered = True, Option = Hold Time: 3 seconds
  2. Condition (Compare): Door Open = False (only open if currently closed)
  3. Action (TTS): Create new TTS, Command = Play, Output Text = use block editor to join "Welcome home, " + Recognized Name + ". Door opening."
  4. Action (IO Device): Create Servo Motor, select GPIO pin, Command = Set Position, 90 degrees
  5. Action (Set Variable): Door Open = True

💡 Tip: Use the block editor to compose the TTS greeting. Connect a text join block to the return block, expand to 3 slots, and include the Recognized Name variable in the middle.


Control 5: Close Door

Close the door when no registered face is detected for 3 seconds.

  1. Condition (Compare): Registered = False, Option = Hold Time: 3 seconds
  2. Condition (Compare): Door Open = True (only close if currently open)
  3. Action (TTS): Command = Play, Output Text = "Door closing."
  4. Action (IO Device): Select Servo Motor, Command = Set Position, 0 degrees
  5. Action (Set Variable): Door Open = False

💡 Tip: Duplicate Control 4 and modify the conditions and actions to quickly create this control.

Launch Your Project

That's it—you're done!

Launch Your Project

  1. Open Grablo app in your desktop or mobile browser
  2. Select your project
  3. Connect to your Raspberry Pi
  4. Hit RUN and enjoy!


Expected Results

When you run your project:

  1. Camera view appears with face detection overlay
  2. Unregistered face: Red border labeled "Unknown"—door stays closed
  3. Enroll a face: Type name, click Enroll → face count increases, recognized immediately
  4. Registered face for 3 seconds: TTS greets by name, servo rotates to 90°, door opens
  5. No registered face for 3 seconds: TTS says "Door closing", servo returns to 0°, door closes
  6. Register hundreds or even thousands of faces!


Video Tutorial

Face Recognition Smart Door

Watch the complete build process in action!


Expand Your Project

Add more functionality:

  1. Add a buzzer alert for unregistered faces
  2. Log entry/exit times to the dashboard
  3. Integrate with a relay to control an electric door lock
  4. Add a "Delete Face" button for managing enrolled faces


Troubleshooting

Face not detecting:

  1. Ensure adequate lighting on the face
  2. Check camera connection and orientation
  3. Make sure the face is within the camera's field of view

Door opens for unknown faces:

  1. Verify the Compare condition checks Registered = True
  2. Ensure Hold Time is set (3 seconds recommended)
  3. Check that the correct variable is assigned

TTS not speaking:

  1. Check speaker connection
  2. Verify TTS action is configured with Command = Play
  3. Test with simple text first before using variables

Servo not moving:

  1. Verify GPIO pin matches your wiring
  2. Check power supply to the servo
  3. Test with different angle values (0° and 90°)

Door keeps opening and closing rapidly:

  1. Verify Hold Time is set in both open and close conditions
  2. Ensure Door Open variable is properly toggled in both controls
  3. Check that conditions include the door state check


Resources

  1. Website: https://grablo.co
  2. Download: https://grablo.co/download
  3. Web App: https://app.grablo.co
  4. Docs: https://doc.grablo.co
  5. Support: support@grablo.co