WatchBot S3

by Arnov Sharma in Circuits > Cameras

29 Views, 1 Favorites, 0 Comments

WatchBot S3

WatchBot S3 ESP32 S3 AI Camera Module #esp32
22.gif
27.gif
26.gif
25.gif
IMG_5093.JPG

Greetings everyone and welcome back. Here's something fun and useful.

The WatchBot S3 project is a portable surveillance camera built from scratch with the ESP32 S3 AI Camera Board, Custom Power Module, and a robot-themed 3D-printed body.

The objective was to create a portable security camera with its own battery power source, allowing it to be placed anywhere with ease. To add personality to the design, the enclosure was crafted to resemble a robot, with camera lenses functioning as its eyes.

The live camera stream can be accessed through a web app by entering the camera's IP address into any browser.

Since this camera is compact and powered by a battery pack, it can be placed anywhere in the home. I keep it near my workbench to see myself in the feed, but it’s versatile enough for surveillance, pet monitoring, or even as a baby cam. The possibilities are endless.

This article serves as a comprehensive guide to building the camera, detailing its creation process and key aspects. Let’s dive into the build!

Supplies

These are the materials required in this project:

  1. ESP32 S3 AI CAM
  2. Custom PCB (provided by NEXTPCB)
  3. Battery 3.7V Li-Po cell 2000mAh
  4. 3D Printed Enclosure and parts
  5. IP5306 IC
  6. 1uH Inductor SMD
  7. 1206 Capacitor 10uF
  8. Vertical Push Switch
  9. Type C port
  10. Indicator LED 0805
  11. 10K Resistor
  12. 3 Ohms 1206 Resistor
  13. M2.5 Screws
  14. 3.7V 2000mAh Li-ion Cell

ESP32-S3 AI CAM

01.gif
21557c4dd23b63b915462b8f108380f9.png
IMG_5054.JPG
IMG_5055.JPG

Let's have a look at the brain of this project, which is the new ESP32-S3 AI CAM made by DF ROBOT.

https://www.dfrobot.com/product-2899.html

The ESP32-S3 AI CAM is a powerful camera module built around the ESP32-S3 microcontroller and optimized for advanced video processing and voice interaction. It is designed for AI-powered applications and excels at tasks like video surveillance, edge-based image recognition, and conversational speech interfaces.

The ESP32-S3's strong neural network computing and signal processing capabilities enable the module's advanced image recognition and intelligent voice interaction features.

The ESP32-S3 AI CAM is powered by the Xtensa Dual-core 32-bit LX7 microprocessor, which runs at 240 MHz and includes 512KB of SRAM and 16MB of Flash for efficient processing.

It has a high-performance OV3660 camera sensor with 2-megapixel resolution, a 160° field of view, and infrared sensitivity for better image identification. The module supports IEEE 802.11b/g/n Wi-Fi and Bluetooth 5 with Mesh capabilities, ensuring seamless connectivity.

With a wide operational voltage range (3.3V-12V) and Type-C input, as well as an operating temperature range of -10°C to 60°C, it is ideal for AI applications in a variety of conditions.

You can learn more about this Dev Board from its Wiki page-

https://wiki.dfrobot.com/SKU_DFR1154_ESP32_S3_AI_CAM#target_0

POWER CIRCUIT

01.PNG
02.PNG
power.PNG
POWERBOARD_page-0001.jpg

We then designed the power board's schematic, which revolved around the IP5306 Power Management IC, which delivers a consistent 5V/2A of power from a 3.7V lithium battery.

After constructing the basic layout per the datasheet, we utilized a Cad file to add components such as the Type-C port, right-angle switch, and LEDs after converting the schematic to a board file.

After finalizing both boards, we exported their Gerber data and shared it with HQ NextPCB for samples.

HQ NextPCB Service

IMG_5110.JPG

After completing the PCB design, we export the Gerber data and send it to HQ NextPCB for samples.

Gerber Data was sent to HQ NextPCB, and a Green Solder Mask PCB with White Screen was ordered.

After placing the order, the PCBs were received within a week, and the PCB quality was pretty great.

In addition, I have to bring in HQDFM to you, which helped me a lot through many projects. Huaqiu’s in-house engineers developed the free Design for Manufacturing software, HQDFM, revolutionizing how PCB designers visualize and verify their designs.

HQDFM: Free Online Gerber Viewer and DFM Analysis Tool

06.PNG

Also, NextPCB has its own Gerber Viewer and DFM analysis software.

Your designs are improved by their HQDFM software (DFM) services. Since I find it annoying to have to wait around for DFM reports from manufacturers, HQDFM Is the most efficient method for performing a pre-event self-check.

Here is what the online Gerber Viewer shows me could not be clearer.

However, for full function, like DFM analysis for PCBA, you need to download the software. The online version only provides a simple PCB DFM report.

With comprehensive Design for Manufacture (DFM) analysis features, HQDFM Is a free, sophisticated online PCB Gerber file viewer.

It provides insights into advanced manufacturing by utilizing over 15 years of industry expertise. You guys can check out HQ NextPCB if you want great PCB service at an affordable rate.

CIRCUIT ASSEMBLY

08.gif
09.gif
10.gif
  1. Using a solder paste dispensing needle, we apply solder paste to each component pad after assembling the power board to begin the PCB assembly process. In this case, we are using 63/37 SnPb solder paste.
  2. The pick-and-place process comes next, in which each component is placed in its allotted location.
  3. The circuit is then placed on our MHP50 Reflow hotplate, which melts solder paste by heating the surface from below. This causes the components to be soldered to their pads.
  4. After adding each THT component to the PCB, we use a soldering iron to solder the pads from the bottom of the board.

BASIC SETUP

05.gif
06.gif
07.gif
IMG_5073.JPG

We started by preparing the basic electronics setup, which includes the Power Circuit, the ESP32 S4 Camera Module, and the lithium polymer battery.

  1. We begin by wiring the 5V out and GND of the Power circuit to the ESP32 S3's VCC and GND via connecting wires.
  2. Next, we connected the Li-PO Cell's positive and negative terminals to the Power Circuit's BAT and GND contacts.

The device powers on by pressing the power circuit's push button once. Double tapping the push button will turn the device off.

WEB SERVER CODE

08.gif
09.gif

Here's the code that we have used in this project, and it's a simple one.

#include "esp_camera.h"
#include <WiFi.h>

#define PWDN_GPIO_NUM -1
#define RESET_GPIO_NUM -1
#define XCLK_GPIO_NUM 5
#define Y9_GPIO_NUM 4
#define Y8_GPIO_NUM 6
#define Y7_GPIO_NUM 7
#define Y6_GPIO_NUM 14
#define Y5_GPIO_NUM 17
#define Y4_GPIO_NUM 21
#define Y3_GPIO_NUM 18
#define Y2_GPIO_NUM 16
#define VSYNC_GPIO_NUM 1
#define HREF_GPIO_NUM 2
#define PCLK_GPIO_NUM 15
#define SIOD_GPIO_NUM 8
#define SIOC_GPIO_NUM 9

// ===========================
// Enter your WiFi credentials
// ===========================
const char *ssid = "**********";
const char *password = "**********";

void startCameraServer();
void setupLedFlash(int pin);

void setup() {
Serial.begin(115200);
Serial.setDebugOutput(true);
Serial.println();

camera_config_t config;
config.ledc_channel = LEDC_CHANNEL_0;
config.ledc_timer = LEDC_TIMER_0;
config.pin_d0 = Y2_GPIO_NUM;
config.pin_d1 = Y3_GPIO_NUM;
config.pin_d2 = Y4_GPIO_NUM;
config.pin_d3 = Y5_GPIO_NUM;
config.pin_d4 = Y6_GPIO_NUM;
config.pin_d5 = Y7_GPIO_NUM;
config.pin_d6 = Y8_GPIO_NUM;
config.pin_d7 = Y9_GPIO_NUM;
config.pin_xclk = XCLK_GPIO_NUM;
config.pin_pclk = PCLK_GPIO_NUM;
config.pin_vsync = VSYNC_GPIO_NUM;
config.pin_href = HREF_GPIO_NUM;
config.pin_sccb_sda = SIOD_GPIO_NUM;
config.pin_sccb_scl = SIOC_GPIO_NUM;
config.pin_pwdn = PWDN_GPIO_NUM;
config.pin_reset = RESET_GPIO_NUM;
config.xclk_freq_hz = 20000000;
config.frame_size = FRAMESIZE_UXGA;
config.pixel_format = PIXFORMAT_JPEG; // for streaming
//config.pixel_format = PIXFORMAT_RGB565; // for face detection/recognition
config.grab_mode = CAMERA_GRAB_WHEN_EMPTY;
config.fb_location = CAMERA_FB_IN_PSRAM;
config.jpeg_quality = 12;
config.fb_count = 1;

// if PSRAM IC present, init with UXGA resolution and higher JPEG quality
// for larger pre-allocated frame buffer.
if (config.pixel_format == PIXFORMAT_JPEG) {
if (psramFound()) {
config.jpeg_quality = 10;
config.fb_count = 2;
config.grab_mode = CAMERA_GRAB_LATEST;
} else {
// Limit the frame size when PSRAM is not available
config.frame_size = FRAMESIZE_SVGA;
config.fb_location = CAMERA_FB_IN_DRAM;
}
} else {
// Best option for face detection/recognition
config.frame_size = FRAMESIZE_240X240;
#if CONFIG_IDF_TARGET_ESP32S3
config.fb_count = 2;
#endif
}

#if defined(CAMERA_MODEL_ESP_EYE)
pinMode(13, INPUT_PULLUP);
pinMode(14, INPUT_PULLUP);
#endif

// camera init
esp_err_t err = esp_camera_init(&config);
if (err != ESP_OK) {
Serial.printf("Camera init failed with error 0x%x", err);
return;
}

sensor_t *s = esp_camera_sensor_get();
// initial sensors are flipped vertically and colors are a bit saturated
if (s->id.PID == OV3660_PID) {
s->set_vflip(s, 1); // flip it back
s->set_brightness(s, 1); // up the brightness just a bit
s->set_saturation(s, -2); // lower the saturation
}
// drop down frame size for higher initial frame rate
if (config.pixel_format == PIXFORMAT_JPEG) {
s->set_framesize(s, FRAMESIZE_QVGA);
}

#if defined(CAMERA_MODEL_M5STACK_WIDE) || defined(CAMERA_MODEL_M5STACK_ESP32CAM)
s->set_vflip(s, 1);
s->set_hmirror(s, 1);
#endif

#if defined(CAMERA_MODEL_ESP32S3_EYE)
s->set_vflip(s, 1);
#endif

// Setup LED FLash if LED pin is defined in camera_pins.h
#if defined(LED_GPIO_NUM)
setupLedFlash(LED_GPIO_NUM);
#endif

WiFi.begin(ssid, password);
WiFi.setSleep(false);

Serial.print("WiFi connecting");
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected");

startCameraServer();

Serial.print("Camera Ready! Use 'http://");
Serial.print(WiFi.localIP());
Serial.println("' to connect");
}

void loop() {
// Do nothing. Everything is done in another task by the web server
delay(10000);
}

This is already existing code that can be found in the ESP32 camera example sketch. The difference between the Example and this one is that the GPIO pins for the camera module are explicitly defined at the start, whereas the original one requires us to include an additional camera_pins.h file.

We uploaded the code and powered the ESP32 S3 camera setup with our Power Module. The IP address for the web app can be accessed via the Serial monitor; we need to copy this IP address and paste it into our browser to display the VIDEO STREAMING WEB APP. We have to choose the resolution at which we want our video to stream and then press the Start Streaming button to begin the camera Live feed.

ENCLOSURE DESIGN

Screenshot 2025-05-05 105902.png
Screenshot 2025-05-05 105932.png
Screenshot 2025-05-05 110005.png
Screenshot 2025-05-05 110122.png
untitled.216.png
untitled.217.png
untitled.218.png

After testing the Camera Setup, we moved on to the next step, which was to create an enclosure for this project. For this setup, we intended to create a little robot-like enclosure that would house the ESP32 Module, Power Module, and Battery. The robot's eyes are the lenses of the ESP32 camera module, and because we only have one camera lens, we modeled an X mark on the other half of the robot's face, indicating that his second eye has been damaged or is not functional.

Over the eyes, we have designed a part that will be printed in a different color and attached with an enclosure using super glue, resulting in a duotone color theme.

Similarly, to make the enclosure look more like a face, we created a mouth-like part with the robot's teeth. This component will be printed individually.

The enclosure or body is separated into two pieces, one for the camera and power module and the other for the lid that holds the battery.

Both halves are held together by m2 screws, two from the top and three from the bottom. From the bottom, we've added a stand part that's screwed to both halves with three M2.

After finishing the model design, we exported the Mesh files and printed them all on my Ender 3 printer using a 0.4mm nozzle and 0.2mm layer height. The body was printed in white PLA, the eyes in orange PLA, and the teeth in grey PLA.

ASSEMBLY PROCESS—Front Body Eye Part and Mouth

03.gif
04.gif
  1. We begin by mounting the Eye Cover Part to the front enclosure, applying superglue to the front enclosure, and then positioning the Eye Cover Part over its position. This will firmly attach the eye cover component to the front enclosure.
  2. Next, we apply super glue to the mouth area and position the mouth part over its place, securing the mouth section to the front enclosure.

FINAL ASSEMBLY

10.gif
11.gif
12.gif
13.gif
14.gif
15.gif
16.gif
17.gif
18.gif
  1. The final assembly process now begins, with the ESP32 S3 Camera module being placed in its proper location. The Camera module's lens is then passed through the Camera hole on the front enclosure.
  2. Similarly, we installed the Power Circuit over two screw bosses.
  3. Both the ESP32 S3 camera module and the power module are then secured in place with M2 screws, four for the camera module and two for the power module.
  4. The lithium battery is then placed inside the back enclosure and secured in place using hot glue.
  5. We then assembled the front and back enclosures, placed the stand portion on the bottom face, and used three M2 screws to connect the stand component to the enclosure, followed by two more M2 screws from the top face.
  6. Assembly is now complete, so let's take a look at the end result of this project.

RESULT

WatchBot S3 ESP32 S3 AI Camera Module #esp32
25.gif
19.gif
27.gif
23.gif

Here's the result of this build, WatchBot S3, which is basically a portable surveillance camera setup that resembles a robot.

The device operates smoothly, delivering a clear, real-time video feed via its built-in web interface. Users can access the live stream by entering the camera's IP address in any browser, making it highly accessible and versatile.

This device serves multiple functions, from home security and workbench monitoring to pet surveillance and baby monitoring, making it a flexible solution for various needs. The web interface simplifies user interaction, allowing quick access to the live feed, easy settings adjustments, and multi-device compatibility without requiring additional software.

In terms of improvements, we plan to expand the webapp's features to include AI-based motion detection, human detection, and so on. Perhaps an SD card that allows you to record video and store it on the SD card slot of the ESP32 S3 AI Camera board.

We can also control the Camera module by adding servos that allow us to rotate, or move it up and down. During testing, I realized that making the camera stationary was a terrible idea, and that in order to tilt the device, I had to manually tilt it by placing things below its support part, which was really janky and inconvenient. In the upcoming version, I will address this issue and add a few more features.

Special thanks to HQ NextPCB for providing components that I've used in this project; check them out for getting all sorts of PCB or PCBA-related services for less cost.

Thanks for reaching this far, and I will be back with a new project soon.