The underlying functionality is pretty simple

You can build your own smart doorbell with an ESP32-S3 board, an OV2640 camera sensor, and ESPHome.

The ESP32-S3 can stream low-FPS video and costs only around $10. Even after adding the camera sensor and a button for doorbell duties, this makes for an inexpensive, local-only DIY doorbell. To prevent the camera from overheating, you'll need to make some adjustments in ESPHome. And you can add a PIR sensor to add motion detection to the setup.

Zigbee bridge to pull all your devices into a single smart home

Why buy expensive hubs and smart devices?

The standard ESP32 boards can't communicate with your Zigbee or Thread devices, so you'll need the ESP32-C6 for this one. It features Wi-Fi 6 support along with Bluetooth 5, Zigbee 3.0, and Thread 1.3. It uses a RISC-V core running at 160 MHz and has 512KB of SRAM.

Power Supply Configuration Breakdown

1. Existing Doorbell Wiring (16V–24V AC to 5V DC Step-Down)

  • How it Works: Standard wired doorbells use a low-voltage transformer running 16V to 24V AC. Because the ESP32 operates on 5V DC (or 3.3V DC directly), you cannot feed AC directly to the board.

  • Required Hardware: An AC-to-DC step-down buck converter (such as a compact 12V–24V AC to 5V DC step-down module with built-in full-bridge rectification) step-down regulator.

  • Chime Bypass: If maintaining an existing mechanical chime, you must install a small resistor/relay circuit across the chime, or bypass it entirely to provide continuous, uninterrupted AC power to the step-down converter.

  • Pros: Permanent, continuous power; zero maintenance; keeps Wi-Fi and live video streaming running 24/7.

  • Cons: Requires basic wiring knowledge; requires enough space inside the wall box or custom 3D enclosure to fit the AC-DC converter module safely.

2. Direct USB Power (5V DC Mains Adapter)

  • How it Works: Running a micro-USB or USB-C cable directly to the ESP32 board from a standard 5V wall adapter (e.g., 5V/2A phone charger).

  • Pros: Easiest plug-and-play setup; provides continuous power without electrical conversion; stable voltage for high Wi-Fi transmission bursts.

  • Cons: Requires drilling a hole through the door frame or exterior wall to route a USB cable indoors to the nearest outlet.

3. Battery Power (18650 / LiPo Configuration)

  • How it Works: Uses single or dual 18650 rechargeable Lithium-ion batteries connected via a TP4056 charge/protection board and a 3.3V/5V boost-buck converter module.

  • Pros: Fully wireless installation; no drill holes or existing wiring needed.

  • Cons: Unsuitable for continuous video streaming. The ESP32-S3 with active camera streaming consumes ~160mA–260mA, which drains a standard 18650 battery in less than 15–20 hours unless aggressive Deep Sleep mode is used (which disables constant Wi-Fi streaming and live camera viewing).


Power Delivery Comparison Table

Power Source | Voltage Input | Hardware Required | Continuous Video Stream? | Primary Advantage | Main Limitation

Existing AC Wiring | 16V–24V AC | AC-to-DC 5V Buck Converter | Yes | Permanent power, clean install | Complex wiring & space constraints

USB Power Adapter | 5V DC | 5V/2A USB Wall Adapter | Yes | Simple setup, reliable power | Visible cables / wall penetration

LiPo / 18650 Battery | 3.7V–4.2V DC


Audio Component Setup

The standard OV2640 module only captures video. To enable audio streaming and doorbell notifications, add an INMP441 I2S digital microphone module and an optional MAX98357A I2S amplifier with a small 8Ω speaker.

  • INMP441 Connections:

    • VDD / GND: Connect to ESP32 3.3V and GND.

    • SD (Serial Data): Connect to GPIO1

    • SCK (Serial Clock): Connect to GPIO2

    • WS (Word Select): Connect to GPIO42

    • L/R (Left/Right Channel): Connect to GND (sets audio output to the left channel).


GPIO Wiring Schematic

To avoid pin conflicts with the ESP32-S3 camera interface (which reserves a 10-pin parallel bus), route additional peripherals to dedicated GPIOs:

Component | Pin Function | ESP32-S3 GPIO Pin | Notes

Doorbell Button | Signal | GPIO0 / GPIO4 | Internal pull-up enabled in ESPHome

PIR Motion Sensor | Signal (OUT) | GPIO7 | Active high detection

I2S Microphone (INMP441) | SD, SCK, WS | GPIO1, GPIO2, GPIO42 | Audio input for voice clips

Status LED / IR Illumination | Output (PWM) | GPIO3 or GPIO47 | Toggles night vision or status


ESPHome YAML Configuration

To prevent the camera module from overheating and draining bandwidth, add this snippet to optimize frame rates, configure the doorbell push button, and set up the I2S microphone:

YAML

esphome:
  name: diy-smart-doorbell
  platform: ESP32
  board: esp32-s3-devkitc-1

# Enable PSRAM for higher camera resolution and buffer stability
psram:
  mode: octal

# Camera Configuration
esp32_camera:
  name: "Doorbell Video Stream"
  external_clock:
    pin: GPIO10
    frequency: 20MHz
  i2c_pins:
    sda: GPIO40
    scl: GPIO39
  data_pins: [GPIO15, GPIO17, GPIO18, GPIO16, GPIO14, GPIO12, GPIO11, GPIO48]
  vsync_pin: GPIO38
  href_pin: GPIO47
  pixel_clock_pin: GPIO13
  
  # Heat & Bandwidth Management
  resolution: 800x600
  max_framerate: 10 fps
  idle_framerate: 0.1 fps

# Audio Input Config
i2s_audio:
  i2s_lrclk_pin: GPIO42
  i2s_bclk_pin: GPIO2

microphone:
  - platform: i2s_audio
    id: doorbell_mic
    i2s_din_pin: GPIO1
    adc_type: external
    pdm: false

# Doorbell Button Input
binary_sensor:
  - platform: gpio
    pin:
      number: GPIO4
      mode: INPUT_PULLUP
      inverted: true
    name: "Doorbell Ring Button"
    on_press:
      - homeassistant.event:
          event: esphome.doorbell_press

  - platform: gpio
    pin: GPIO7
    name: "Motion Detector"
    device_class: motion

3D-Printed Enclosure Specifications

Add a dedicated physical layout section with printable design files (or STEP models) so readers can build a weatherproof housing:

  • Material Selection: Recommend printing in PETG or ASA filament. Avoid PLA, as UV light and outdoor thermal cycles will warp the casing within weeks.

  • Weather Sealing: Incorporate a 1.5mm O-ring/rubber gasket channel along the back casing seam and apply a clear acrylic lens cover sealed with silicone over the OV2640 camera cutout.

  • Heat Vents & Angled Hood: Design downward-slanted ventilation louvers on the underside to dump heat from the ESP32 chip while blocking rainwater ingress, alongside a 15° angled wall mount bracket for improved door entryway coverage.


Smart Home Setup

This package allows you to connect your Zigbee or Thread devices to your existing smart home setup.

  • The ESP32-C6 supports Matter natively, running on top of Thread or Wi-Fi. The ESP Matter SDK makes it relatively simple to build Matter-compatible devices for your smart home. You can essentially use the ESP32-C6 to build a Zigbee hub to integrate most of your smart home devices at a fraction of the cost, since the board costs only around $5.

Credits - This is an expanded version of the amazing article from https://www.xda-developers.com/esp32-projects-that-punch-above-their-weight/

Areas where I felt it had to be expanded more -

  • Power Supply Strategy: Smart doorbells run 24/7. Missing details on step-down converters (e.g., converting existing 16V–24V AC doorbell wire power to 5V DC) versus battery/USB power configurations.
    I had to do a bit more research as a newbie and sharing the extended detailed version.

  • Audio Support: Doorbells usually require two-way audio or at least a microphone. The standard OV2640 handles video, but adding an I2S microphone (like an INMP441) and a speaker/buzzer is missing.

  • Wiring Schematics: No pinout diagram or wiring instructions for linking the push button, PIR sensor, and camera module to the ESP32 GPIO pins.

  • 3D Printed Case:

    • Weatherproofing & Material Selection: Specify outdoor-grade filament (PETG or ASA/ABS) rather than PLA, which degrades under UV light and high outdoor heat.

    • Camera & Lens Alignment: Detail dimensions for the lens cutout, including a clear acrylic lens shield or angled hood to prevent glare and rain spots on the OV2640 camera.

    • Heat Dissipation: Design passive cooling vents or a heat sink cutout near the ESP32 chip, especially since camera streaming generates significant heat.

    • Button & PIR Sensor Placement: Include cutouts for a standard 12mm tactile button and a dome cutout for the PIR sensor lens.

    • Wall Mounting & Gaskets: Detail mounting screw locations and rubber gasket grooves to seal the front and back shell against water ingress.