Skip to content
Buy 10+ on select items — save 10% auto-applied
Free US shipping on orders $35+
Order by 3pm ET — ships same-day from the US
Skip to main content

ESP32-CAM OV2640: Build a WiFi Surveillance Robot | ShillehTek

August 23, 2026 24 views

ESP32-CAM OV2640: Build a WiFi Surveillance Robot | ShillehTek
Project

Build an ESP32-CAM OV2640 WiFi surveillance robot car with live video streaming, app driving, and pan-tilt camera control using ShillehTek parts.

Intermediate6 parts

Project Overview

ESP32-CAM + OV2640 camera: Build a WiFi surveillance robot car you can drive from your phone with live video streaming, pan/tilt aiming, and full motor control using an L298N motor driver.

Send it to the kitchen to check whether you left the kettle on.

  • Time: An afternoon
  • Skill level: Intermediate
  • What you will build: A phone-controlled rover with a streaming camera head on a pan/tilt mount, driven by an ESP32-CAM and an L298N motor driver.
Completed ESP32-CAM OV2640 WiFi surveillance robot car with camera mounted at the front
The finished rover: streaming camera up front, phone in your hand.

Parts List

From ShillehTek

External

  • Robot chassis with two DC gear motors and wheels (or use the 4WD kit above)
  • SG90 micro servo for the pan mount
  • Battery pack (Li-ion cells or AA holder) for the motor supply
  • Double-sided mounting tape and a small piece of foam

Note: The ESP32-CAM module itself runs about $10 - a camera, WiFi radio, and dual-core micro in one thumb-sized board. It's the entire brain of this robot.

Step-by-Step Guide

Step 1 - Meet the ESP32-CAM

Goal: Understand the board doing all the work.

What to do: The ESP32-CAM pairs an ESP32-S with an OV2640 camera and a handful of spare GPIOs - enough to stream video and drive a motor controller at the same time. It's programmed from the Arduino IDE, with one quirk: no onboard USB, so a serial adapter does the flashing.

ESP32-CAM board with OV2640 camera module attached, showing the compact camera and WiFi controller
The ESP32-CAM: camera, WiFi, and GPIO in one tiny board.

Expected result: You know the architecture: one board streams video and drives the robot.

Step 2 - Assemble the Chassis

Goal: Build the rolling platform.

ESP32-CAM robot build parts laid out including chassis, DC motors, wheels, L298N driver, MB102 power module, and pan-tilt hardware
The main ingredients: chassis, motors, L298N, ESP32-CAM, MB102, and pan/tilt hardware.

What to do: Mount the two DC gear motors and wheels on the chassis (a caster makes the third wheel), then bolt the L298N motor driver onto the platform.

Robot chassis platform with the L298N motor driver mounted in place
The L298N takes its place on the chassis.
Robot chassis assembled with DC gear motors and wheels installed
Motors and wheels on - the platform rolls.
Pan-tilt servo bracket being assembled for the ESP32-CAM camera mount
The servo-driven pan mount comes together...
Robot assembly showing pan-tilt mount being attached to the chassis
...and joins the platform...
Nearly complete robot assembly with pan-tilt mount installed on the chassis
...giving the camera a full range of motion.

Expected result: A drivable platform with a pan/tilt head waiting for its camera.

Step 3 - Power It Right with the MB102

Goal: Give the ESP32-CAM and servo a clean 5V rail.

What to do: You can steal 5V from the L298N's regulator, but a dedicated MB102 power module is far more convenient - it adds a power button and flexible wiring. Trim the pins on its underside and stick it to the chassis with double-sided mounting tape.

MB102 breadboard power supply module mounted on the robot chassis to provide a stable 5V rail
The MB102 supplies stable 5V with an actual power switch.
MB102 power module with pins trimmed and taped flat to the robot chassis
Pins trimmed flat so the module tapes down flush.

Expected result: Reliable power - the #1 cause of ESP32-CAM brownouts, solved.

Step 4 - Wire Everything

Goal: Connect camera board, motor driver, servo, and power.

What to do: Follow the schematic: ESP32-CAM GPIOs to the L298N inputs (two per motor for direction, plus enable pins), the servo signal to a spare GPIO, motor battery into the L298N, and the MB102's 5V to the ESP32-CAM and servo. Mount the camera to the pan/tilt head with foam and tape.

Wiring schematic showing ESP32-CAM connected to L298N motor driver, servo signal pin, MB102 5V supply, and motor battery
The full schematic: ESP32-CAM, L298N, servo, and both supplies.
ESP32-CAM surveillance robot car fully wired with jumper wires between the ESP32-CAM, L298N, servo, and power modules
All connections made per the schematic.
ESP32-CAM with OV2640 camera mounted on a pan-tilt servo platform using a foam pad
The camera rides the pan/tilt mount on a foam pad.

Expected result: Hardware complete.

Step 5 - Flash the Firmware

Goal: Upload the robot sketch through the FT232RL.

What to do: Install the ESP32 board package in the Arduino IDE, open the robot sketch (grab it from the original project page's code download), and drop in your network credentials:

Code:

const char* ssid     = "Your_WIFI_Network";
const char* password = "Your_WIFI_Password";

Wire the FT232RL to the ESP32-CAM per the diagram, and the critical detail: GPIO 0 to GND puts the board in flashing mode. Press the onboard RST button, then hit Upload.

FT232RL USB-to-TTL adapter wired to ESP32-CAM for flashing with TX and RX crossed plus GPIO0 to GND for upload mode
Programming hookup: TX/RX crossed, 5V, GND, and GPIO 0 grounded for upload mode.
Arduino IDE configured for ESP32-CAM using the AI Thinker board profile
IDE board settings for the ESP32-CAM (AI Thinker profile).
Pressing the ESP32-CAM reset button before uploading firmware from the Arduino IDE
RST press, then upload.

Expected result: Sketch flashed. Disconnect GPIO 0 from GND afterward.

Step 6 - Get the IP and Drive

Goal: Connect the app and take the wheel.

What to do: Open the Serial Monitor at 115200, press RST, and note the IP address the board prints. Reconnect the camera to the robot, power up, and point the companion app (linked on the original project page) at that IP. Live video should appear with drive and pan controls.

Phone app showing live video stream and drive controls for the ESP32-CAM surveillance robot
Live video + drive controls on the phone.
Completed ESP32-CAM WiFi robot car with camera mounted and ready to drive
Mission ready - go check on that kettle.
Final assembled ESP32-CAM OV2640 surveillance rover on its chassis
The finished surveillance rover.

Expected result: A WiFi rover streaming live video, driven from your phone. Prefer to skip the chassis work? The ShillehTek 4WD kit ships the drivetrain and app-ready firmware out of the box.

Conclusion

With an ESP32-CAM (OV2640 camera), an L298N motor driver, and a pan/tilt mount, you built a WiFi surveillance robot car that streams live video and drives from your phone while letting you aim the camera independently of the wheels.

Want the exact parts used in this build? Grab them from ShillehTek.com. If you want help customizing this project or building something similar for your product, check out our IoT consulting services.

Credit: Photos and images in this tutorial are credited to KDPA on Hackster.io. The original guide by KDPA served as the reference for this ShillehTek version.