This Wireless Security Camera Runs Entirely on an ESP32

Based on the ESP32-CAM board and a solar panel, Max Imagination's security camera is loaded with features at just a fraction of the cost.

The concept

A normal security camera will typically cost about $50 or more for a wired version, with an even steeper cost if powered from a battery which requires occasionally charging it. The YouTuber known as Max Imagination had previously built a homemade security camera by combining an old battery and an ESP32 camera module, but it lacked some important features. This new version, however, would support motion detection, infrared, pan/tilt, and most importantly, a solar panel circuit.

Turning the ESP32-CAM module into a camera webserver

The first step in this project was to get the ESP32 camera to output its video feed over the network and present a web interface for easy user control. Conveniently, Espressif already provides a thorough example project that does exactly this. Beyond the networking features, the interface provides a way to control the pan and tilt angles of the camera, which is why Max connected two servo motors along with capacitors to smooth out current spikes. To speed up processing, motion detection was moved from measuring movement between frames to instead reading the values of a pair of passive infrared sensors that emit a high signal once a heat signature is detected nearby.

Power management

While getting the battery management module set up, Max accidentally connected the battery cells backwards, thus frying some of the more advanced circuitry on the module. But since these features were not crucial to the camera's operation, they could be bypassed and turn the module back into a simple charging/boost circuit.

Building out the camera

After carefully designing and 3D printing the two halves of the security camera's shell along with its base, Max started the assembly process by attaching the two PIR sensors and the pair of IR emitting LEDs for night vision. Next, the ESP32-CAM module, power button, antenna, and cooling fan were all placed inside of the enclosure and wired together via a distribution perfboard circuit. Lastly, the battery holder and solar charging modules were added in the middle before everything was sealed inside with silicone and screws.

Using it

Once the servo movements for panning and tilting had been slightly adjusted, it was finally time to mount the camera to a building and test how well it worked. On purely battery power, the camera can remain active for 5 to 8 hours, and nearly indefinitely once the solar panel's contribution is added. Using just a web browser on either his phone or PC, Max could tell if motion had been detected, maneuver the camera in two axes, and record videos to an internal microSD card. To see more about this project, you can watch its build log here on YouTube.

Evan Rust
IoT, web, and embedded systems enthusiast. Contact me for product reviews or custom project requests.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles