Introduction
A Smart Doorbell with Camera is an advanced home security device that allows homeowners to see and communicate with visitors remotely via a mobile app. This system combines IoT, video streaming, and notification alerts to enhance home safety and convenience.
It is widely used in smart homes, offices, and gated communities.
Objective of the Project
- To detect visitors at the door in real time
- To stream video to a mobile app
- To notify homeowners instantly when someone presses the doorbell
- To enable communication via audio or video
Working Principle
- A doorbell button triggers the system
- Camera module captures live video of the visitor
- Microcontroller / microcomputer (ESP32-CAM / Raspberry Pi) processes the video
- IoT integration sends notifications and live video to a smartphone
- Optional: Two-way audio allows communication with the visitor
Components Required
- ESP32-CAM module (with built-in camera)
- Push button (doorbell)
- MicroSD card (for video storage, optional)
- Power supply (5V / 2A)
- Wi-Fi network
- Smartphone or PC for monitoring
Block Diagram
Doorbell Button
↓
ESP32-CAM
↓
Capture Video
↓
Wi-Fi / IoT
↓
Mobile App / Web Browser
↓
Notification & Live Stream
Circuit Connections (ESP32-CAM Example)
Push Button:
One pin → 3.3V
Other pin → GPIO 13
Pull-down resistor → GND
ESP32-CAM:
Power → 5V (external)
GND → GND
TX / RX → Not required unless serial debugging
ESP32-CAM has a built-in camera; you just need to provide power and connect the doorbell trigger pin.
Arduino Code (ESP32-CAM Smart Doorbell)
#include "esp_camera.h"
#include <WiFi.h>
#define BUTTON_PIN 13
const char* ssid = "Your_SSID";
const char* password = "Your_PASSWORD";
void setup() {
Serial.begin(115200);
pinMode(BUTTON_PIN, INPUT_PULLDOWN);
WiFi.begin(ssid, password);
while(WiFi.status() != WL_CONNECTED){
delay(500);
Serial.print(".");
}
Serial.println("WiFi Connected");
camera_config_t config;
config.ledc_channel = LEDC_CHANNEL_0;
config.ledc_timer = LEDC_TIMER_0;
config.pin_d0 = 5;
config.pin_d1 = 18;
config.pin_d2 = 19;
config.pin_d3 = 21;
config.pin_d4 = 36;
config.pin_d5 = 39;
config.pin_d6 = 34;
config.pin_d7 = 35;
config.pin_xclk = 0;
config.pin_pclk = 22;
config.pin_vsync = 25;
config.pin_href = 23;
config.pin_sccb_sda = 26;
config.pin_sccb_scl = 27;
config.pin_pwdn = 32;
config.pin_reset = -1;
config.xclk_freq_hz = 20000000;
config.pixel_format = PIXFORMAT_JPEG;
config.frame_size = FRAMESIZE_VGA;
config.jpeg_quality = 10;
config.fb_count = 2;
esp_camera_init(&config);
}
void loop() {
if(digitalRead(BUTTON_PIN) == HIGH) {
Serial.println("Doorbell Pressed!");
// Capture Image
camera_fb_t * fb = esp_camera_fb_get();
if(!fb){
Serial.println("Camera capture failed");
return;
}
// Send image via Wi-Fi / save to server
esp_camera_fb_return(fb);
delay(5000); // Debounce and avoid repeated triggers
}
}
Code Explanation
- ESP32-CAM is configured to connect to Wi-Fi
- Push button triggers image capture
- Captured image/video can be sent to cloud or mobile app
- ESP32-CAM allows integration with Blynk, Firebase, or custom web server for live streaming
- Optional: Two-way audio can be implemented with I2S microphone and speaker
Advantages
- Real-time visitor monitoring
- Remote notification via mobile app
- Enhances home security
- Low-cost and DIY-friendly
Applications
- Smart homes
- Offices and workplaces
- Gated communities and apartments
- Elderly care or monitoring
Future Enhancements
- Two-way audio communication
- Cloud storage of video history
- Integration with facial recognition for authorized visitors
- Push notifications with snapshots
Conclusion
The Smart Doorbell with Camera is an essential mini + innovation project that combines IoT, embedded systems, and security. It provides remote monitoring, notifications, and safety, making it perfect for smart home enthusiasts and students.
