Do you want to check what your pets are doing at home anytime using your phone? Want to remotely see if your kids are seriously doing their homework?Today, I will introduce a project that is a smart home monitoring system based on ESP32, allowing you to monitor the situation at home anytime with your phone and adjust the monitoring angle. Let’s see how 【Fresh Mango】 implements this project!
The complete project has been open-sourced to Electronic Forest:
https://www.eetree.cn/project/detail/3454

No.1
Hardware Introduction
ESP32-S3-WROOM-1U is a general-purpose Wi-Fi + low-power Bluetooth MCU module, equipped with the ESP32-S3 series chip. In addition to having a rich set of peripheral interfaces, the module also has powerful neural network computing capabilities and signal processing capabilities, suitable for various application scenarios in the AIoT field, such as wake word detection, voice command recognition, face detection and recognition, smart home, smart appliances, smart control panels, smart speakers, etc.

The adafruit ov5640 is a high-quality OV5640 camera launched by Adafruit, with a 5-megapixel sensor element, a 120-degree wide-angle lens, and all the supporting circuits needed.

WS2812B is an intelligent external control LED light source that integrates control circuits and light-emitting circuits. Its appearance is the same as a 5050 LED bead, and each element is a pixel point. The pixel point contains smart digital interface data latching signal shaping amplification driving circuits, as well as a high-precision internal oscillator and programmable constant current control part, effectively ensuring that the light color of the pixel point is highly consistent.


No.2
Function Overview
Real-time Video Monitoring: The system continuously monitors the dynamics at home through the connected camera, and users can view the situation at home in real-time through a mobile application.
Remote Control: Users can remotely operate smart devices at home, such as lights, air conditioning, door locks, etc., to achieve home automation.
PTZ Control: Users can remotely operate the camera’s pan-tilt-zoom function.
Design Concept
-
Modular Design: The system is divided into functional modules such as video acquisition, data transmission, and user interaction, with each module being relatively independent, facilitating maintenance and upgrades.
-
Efficient Data Processing: Utilizing the dual-core processor characteristics of ESP32 to process video data and sensor data in parallel.
-
Security Considerations: During video transmission, encryption algorithms are used to ensure data security.
-
Smart Home Platform Integration: Integrated into a smart home application platform, utilizing the powerful features of the smart home platform to achieve home automation, UI interaction, and remote control.

No.3
Function Implementation
Hardware Design
ESP32-S3-EYE is a small AI (Artificial Intelligence) development board launched by Espressif, equipped with the ESP32-S3 chip and the Espressif AI development framework ESP-WHO. This design refers to the ESP32-S3-EYE schematic, adding the adafruit ov5640, WS2812B, and servo control circuit based on the ESP32-S3-WROOM-1U module. The hardware design block diagram of this project is shown below:

Software Function Implementation
In terms of software, many mature solutions have been referenced, and after comprehensive evaluation of various functions, it was finally decided to use ESPHome + Home Assistant for firmware development and remote control.
Home Assistant is a home automation platform that runs on Python 3. It can track and control all devices in the home and provides an automation control platform. It has a simple, mobile-friendly interface to control all your devices without storing any data in the cloud to protect personal privacy.
ESPHome is a system that controls your ESP8266/ESP32 and RP2040 through simple and powerful configuration files and remotely controls them through home automation systems.
This project uses ESPHome for firmware development, so the firmware is configured for corresponding functions in the form of configuration files.
The software implementation part is mainly divided into the following functional implementations:
-
Network Configuration: Set the WiFi connection parameters and configured static IP when needed to ensure the device can connect to the network stably.
-
Basic Switch: Configured basic switch functions for controlling device restarts and other operations.
-
Servo Control: Control the camera’s pan-tilt-zoom using PWM signals to achieve X-axis and Y-axis rotation of the camera, thus controlling the camera’s field of view.
-
Light Control: Use WS2812B beads as fill lights, controlling the light’s switch, brightness, and color through the ESP32_RMT_LED_STRIP platform to adapt to different monitoring environments.
-
Video Recording: Configured the ESP32 camera module to obtain real-time video streams, supporting remote viewing of real-time images in homes or offices.
-
Button PTZ Control: Implemented control of the camera’s pan-tilt-zoom through configured button components, including left, right, up, down, and return-to-center functions.
The specific code for the implementation of each part will not be introduced in detail here; detailed information can be found in the complete project report.
The key to the entire software implementation part is to set and control hardware devices through ESPHome’s configuration files, while Home Assistant is used to achieve remote control and home automation management of devices. This combination allows the project to not only achieve basic video monitoring functions but also integrate into smart home systems, achieving broader automation and remote control functions.

No.4
Function Demonstration
PCB Design


3D Preview of Hardware


Physical Display


Shell + PTZ Display


The project implementation function demonstration can be seen in the complete project video.

No.5
Conclusion
This project successfully implements a smart home video monitoring application based on ESP32, covering multiple functional modules such as video acquisition, data transmission, intelligent detection, and user interaction. Through modular design and efficient data processing mechanisms, the system has stable, reliable, and easy-to-expand characteristics. In the future, we can further optimize video compression algorithms to improve data transmission efficiency and image quality, while expanding more smart home functions, such as linking security devices and appliance control, to achieve a complete smart home system.
Problems Encountered
The PTZ X-axis servo has jitter during control. After investigation, it was found that the entire PTZ plus control board is too heavy, causing the X-axis motor output shaft to be unbalanced. It is necessary to reduce the weight of the shell and the X and Y axis transmission mechanism, or of course, replace the servo with a more powerful one to improve it.
Insufficient fill light: The original idea was quite good, and four WS2812B beads were placed around the camera module for fill light operation, but due to the limited power of these beads, the actual fill light effect is quite limited, only noticeable at close range, and ineffective at slightly further distances. If there is a need for fill light at a slightly longer distance, it can be integrated into the smart home system for linkage control.
The hardware solution includes a low-power lithium battery charging circuit, which can achieve charging and power supply for the lithium battery. The shell also reserves a slot for the lithium battery interface, but in actual use, it is still somewhat inconvenient. The lithium battery should be placed inside the shell. However, since the lithium battery interface socket has already been soldered during PCB soldering, the shell design only considered the interface and not the internal placement of the lithium battery.
Insights
The “FastBond” activity has a high degree of freedom, maximizing personal imagination and creativity in creation. Of course, the required knowledge is also quite comprehensive, and a project can integrate and apply one’s knowledge, combining theory with practice.
Finally, I would like to thank the Hard Grain Academy for this event in collaboration with DigiKey! This event has given me many valuable practical experiences and opportunities. See you at the next event!
Data Acquisition
The project reference materials and complete project design documents have also been uploaded to Electronic Forest. Interested friends can go and take a look.

The new Hard Grain activity has been launched, welcome to participate: https://www.eetree.cn/project#activity
END
Hard Grain Academy
The Hard Grain team is dedicated to providing standardized core skills courses for electronic engineers and related professionals, helping everyone effectively enhance their professional abilities at all stages of learning and work.

Hard Grain Academy
Let’s explore and advance together in the field of electronics
Follow the Hard Grain WeChat public account to reach the classroom anytime

Click to read the original text and view the complete project