This is an old revision of the document!
Smart Video Doorbell
Severin Teona - AAC2
teona.severin@stud.acs.upb.ro
Description
The main idea behind this project is to have a smart video doorbell, whose camera is triggered by pressing a button. After the photo is taken, you get an e-mail (as a notification) to let you know somebody is at your door. In the e-mail you get a link to a simple HTTP server where you can see the photo. On the server there are also 2 buttons: one of them is used to open the door for the guest and greet him with a nice message using an LCD, and a button used just for sending a message that the owner is not home. If the first button is pressed, the door will also open. The main motivation for this project came actually from my parents: they have been asking me for the past year if I can build them a system like this, because at home, we don’t have any window facing the gate or the outside of the door. Furthermore, we don’t know if anyone enters our yard.
Hardware
For this project, I used 2 ESP32 modules:
This project contains 2 ESP32 modules, and is therefore divided in 2:
The first system is controlled by the ESP32-CAM module, which doesn’t have any power supply socket. Because of that, I used a CP2102 USB to Serial converter to power on the device and to also have access to its serial port. On this board I also connected a button on GPIO13 pin to trigger the photo being taken. With this module, I also had some problems: I managed to destroy the external flash memory chip and I had luck I managed to find someone to change it.
The second system uses the ESP32 WROOM module that controls a I2C LCD display that shows different messages and a SG90 servo motor that opens and closes the door. The servo motor is connected on the GPIO13 digital pin.
Software
When it comes to software, I used Arduino IDE and the following libraries:
ESP32-Wroom
WiFi.h - to connect to the internet
HTTPClient.h - to send HTTP requests
Arduino_JSON.h - to parse the response from the HTTP requests
Wire.h & LiquidTWI2. h - to communicate via I2C with the LCD display
ESP32-Cam
esp_camera.h - the official library of the camera inside the module
WiFi.h - to connect to the internet
HTTPClient.h - to send HTTP requests
Arduino_JSON.h - to parse the response from the HTTP requests
FS.h & SD_MMC.h - to access the file system inside the SD card
The functionalities of both these modules are described in the following diagrams:
Final result
Demo