OSHWLab
check in
Completed

ESP32-H2-Custom-Zigbee

PROESP32-H2-Custom-Zigbee

tag

963
0
0
2
Mode:OSHWLab Stars
OSHWLab Stars 2026
Reproduction cost: $20

License

Public Domain

Creation time:2026-04-09 15:04:29Update time:2026-04-13 07:13:51

Description

Custom Zigbee Controller – ESP32-H2

A family of Zigbee-based controllers built around the ESP32-H2, designed for lighting automation, shutter/blind control, switch retrofitting, and LED dimming applications. Multiple PCB variants are available to fit different installation scenarios. All devices operate as Zigbee routers and support Zigbee OTA firmware updates.

Source code and flashing tools: https://github.com/scavenrage/ESP32-H2-Custom-Zigbee

Assemblying and testing video: https://www.youtube.com/watch?v=BoSZvjjPbms


1. Overview

All three hardware variants share a single unified firmware, configured per-device at first programming via configure.py — no recompilation needed. Configuration is stored in the NVS partition and survives OTA firmware updates.


2. PCB Variants

✅ A) 4-Relay Modular PCB

A compact, modular relay board for multi-channel automation.

Features:

  • Up to 4 relay outputs (10 A rated)
  • Up to 4 digital inputs (3.3 V pull-up)
  • Cuttable PCB: supports 2, 3, or 4 relays depending on physical trimming
  • Integrated 230 VAC → 5 VDC AC/DC supply
  • Suitable for lighting and shutter motor control

For inductive loads (e.g. shutter motors), install a suitable snubber/filter near the motor.


✅ B) Single-Relay PCB (Universal Input/Output Variant)

Designed for single-load automation and wall-switch retrofits.

Features:

  • 1 relay output (10 A rated)
  • Output selectable by hardware: dry-contact or switched 230 V
  • Input selectable by hardware: dry-contact or 230 V optoisolated sensing
  • Integrated 230 VAC → 5 VDC AC/DC supply

For inductive loads, installation of a snubber/filter is required.


✅ C) MOSFET / LED Control PCB

A solid-state board for LED lamps and drivers with external low-voltage supply.

Features:

  • AO3400 MOSFET output stage
  • Powered via 5 VDC external (internal LDO to 3.3 V)
  • Input compatible with capacitive touch modules or any 3.3 V digital signal
  • Ideal for lamps/drivers that already include their own AC supply

3. Power Supply Summary

PCB Variant Power Source
A – 4-Relay 230 VAC → 5 VDC (integrated)
B – 1-Relay 230 VAC → 5 VDC (integrated)
C – MOSFET LED 5 VDC external

4. Firmware Architecture

4.1 Per-device configuration via NVS

Device behaviour is configured at first programming using configure.py (Python 3, no ESP-IDF required), which generates an NVS partition (nvs_config.bin) containing all parameters. The firmware reads this partition at boot — no recompilation needed to change a device's function.

Configurable parameters include:

  • Number of active channels (1–4)
  • Channel type: stable relay, impulse relay, roller shutter, or PWM dimmer
  • Input type per channel: momentary pushbutton or bistable switch
  • Timing parameters: debounce, impulse duration, shutter travel times, etc.

NVS configuration survives OTA firmware updates.

4.2 Channel Types

Type Description
Stable relay Standard ON/OFF — state saved in NVS, restored at power-on
Impulse relay Output pulses for a configurable duration, then returns OFF
Roller shutter Paired UP/DOWN outputs with travel-time calibration and position tracking
PWM dimmer LEDC-based dimmer with fade and long-press dimming

4.3 Zigbee

  • Always operates as a Zigbee router
  • Exposes one endpoint per active channel
  • On/Off cluster (0x0006) for relay and dimmer channels
  • Window Covering cluster (0x0102) for roller shutter channels
  • OTA Upgrade cluster (0x0019) for wireless firmware updates

5. Target Applications

  • Lighting automation (relay or MOSFET)
  • Motorized shutters and blinds
  • Wall-switch retrofits
  • LED dimming with external drivers
  • General-purpose load control

 

Design Drawing

The preview image was not generated, please save it again in the editor.

BOM

Bom empty

Attachments

OrderFile nameDownload times
1
IMG_20260409_105704.jpg
8
2
IMG_20260409_105716.jpg
2
3
IMG_20260409_105733.jpg
3
4
IMG_20260409_164604.jpg
2
5
IMG_20260409_164723.jpg
2
6
IMG_20260409_164919.jpg
3
7
IMG_20260409_164923.jpg
3
8
IMG_20260409_165140.jpg
2
9
IMG_20260409_165135.jpg
2
10
Immagine 2026-04-09 170849.jpg
5
Clone
Add to Album
0
0
Share
Report
Intellectual Property Statement & Reproduction Instructions

This is an open-source hardware project. All intellectual property rights belong to the creator. The project is shared on the platform for learning, communication, and research only; any commercial use is prohibited. If your intellectual property rights are infringed on EasyEDA, please notify us by submitting relevant materials in accordance with the Rules for Complaints and Appeals of IPR Infringement.

Users must independently verify the circuit design and suitability when replicating this project. All risks and consequences are borne by the user, and the platform assumes no liability.

Comment

All Comments(1)
Sort by time|Sort by popularity
Followers0|Likes0
Related projects
Empty

Bottom Navigation