
CameraWifiMotion is an open-source project based on Arduino IDE that transforms a cheap ESP32 camera module (for example, a module priced at £7 on eBay) into a powerful motion detection security camera. This project utilizes the power of the ESP32 to achieve local image processing and storage, and provides various extended functionalities such as email, FTP image upload, and SD card storage. This article will detail the features, usage, and some advanced tips for CameraWifiMotion.
Feature Details
The core functionality of CameraWifiMotion is motion detection and image capture. It captures images at a rate of about 4 times per second and compares them with the previous frame to detect significant changes. Once motion is detected, it captures higher resolution images and stores them in the internal memory of the ESP32, with options to send images to email, FTP server, or store them on an SD card.

In addition to motion detection and image capture, CameraWifiMotion also includes the following additional features:
-
Real-time Video Streaming: View live video streams through the web interface. -
Image Playback: View up to the last 8 images (stored in internal SPIFFS flash) and can further expand storage space via SD card. -
Web Interface Control: Users can easily configure camera parameters through the web interface, such as motion detection sensitivity, image resolution, network settings, etc. -
OTA Upgrade: Supports over-the-air (OTA) upgrades for easy firmware updates. -
Custom Mask: Customizable motion detection areas to ignore areas that do not need monitoring, reducing false alarms. -
Logging: Logs camera operational status, motion detection events, and system logs. -
Remote Control: Remote reboot and restore default settings via HTTP API.
Usage Instructions
-
Hardware Preparation: You will need an ESP32 camera module (recommended to use a module with PSRAM), a power adapter (at least 5V 500mA, and it is recommended to use a power supply with good filtering capacitors), and an optional SD card. -
Software Installation: Install Arduino IDE and add ESP32 board support. You will also need to install libraries such as ESP32_mail_client, ESP_wifimanager, and Time. The project repository provides a compressed package of the related library files. -
Firmware Upload: Upload the Arduino code of CameraWifiMotion to the ESP32 camera module. Note to select the correct board model (ESP32 Dev Module and enable PSRAM), as well as customize the partition scheme. -
WiFi Configuration: Upon first run, CameraWifiMotion will create an access point named “ESPCamera”. Connect to this access point and configure your WiFi network information through the web interface. -
Parameter Adjustment: Adjust motion detection sensitivity, image resolution, and other parameters via the web interface to meet your specific needs.
Advanced Tips
-
Lens Upgrade: The original lens performs poorly in low-light conditions. Consider replacing it with a higher quality lens, especially to improve shooting performance in low-light conditions. -
External Antenna: The WiFi signal strength of the ESP32 camera may be weak, especially when placed inside a case. It is recommended to use an external antenna to enhance signal strength. -
Power Filtering: Good power filtering is very important to prevent system instability caused by power fluctuations.
Common Issues and Solutions
-
WiFi Connection Issues: Ensure your router is set up correctly and that the power supply to the ESP32 camera module is stable. -
False Motion Detection: Adjust motion detection sensitivity and use custom masks to reduce false alarms. -
Firmware Upgrade Failure: Ensure you have selected the correct board model and partition scheme.
Conclusion
CameraWifiMotion is a powerful and easy-to-use ESP32 camera motion detection project. With simple configuration and adjustments, you can transform it into a reliable home security monitoring system.
Project Address:https://github.com/alanesq/CameraWifiMotion