Close
0%
0%

WatchBot S3

WatchBot S3 is an ESP32 S3-based Streaming Camera made from scratch.

Public Chat
Similar projects worth following
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.

ESP32-S3 AI CAM

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

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

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

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.

EYE v3.f3d

fusion - 2.26 MB - 05/08/2025 at 19:19

Download

EYE v4.step

step - 1.06 MB - 05/08/2025 at 19:19

Download

F.3mf

3mf - 218.14 kB - 05/08/2025 at 19:19

Download

mouth.3mf

3mf - 98.88 kB - 05/08/2025 at 19:19

Download

B.3mf

3mf - 164.13 kB - 05/08/2025 at 19:19

Download

View all 7 files

  • 1
    CIRCUIT ASSEMBLY
    • 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.
    • The pick-and-place process comes next, in which each component is placed in its allotted location.
    • 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.
    • After adding each THT component to the PCB, we use a soldering iron to solder the pads from the bottom of the board.
  • 2
    BASIC SETUP

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

    • We begin by wiring the 5V out and GND of the Power circuit to the ESP32 S3's VCC and GND via connecting wires.
    • 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.

  • 3
    WEB SERVER CODE

    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.

View all 7 instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates