logo elektroda
logo elektroda
X
logo elektroda

[YT] ESP32-S3-Relay-6CH six relays controller - schematic, flashing, Home Assistant

p.kaczmarek2  1 396 Cool? (+2)
📢 Listen (AI):
Waveshare ESP32-S3-Relay-6CH relay module with six green terminal channels
Waveshare ESP32-S3-Relay-6CH is an industrial-grade relay control module based on ESP32-S3 WiFi & BT module. It features RS485 connectivity, on-board USB to UART converter, six relays connected via PC817 optocouplers, a single WS2812B diode (for status display), onboard GPIO connector compatible with Raspberry Pi Pico Hats and can run on up to 36V thanks to the built-in XL1509-ADJE1 step down converter.

Unboxing
Let's see what's in the box. It seems that antenna and small screwdriver are included.
Waveshare ESP32-S3-Relay-6CH controller with ports and connectors in a box
The module is fully encased and all IO terminals are labeled. Relays are on the front side, each has three terminals (both normally open and closed):
Waveshare ESP32-S3-Relay-6CH relay module with six green terminal channels
On the rear side, you have antenna connector, boot and reset buttons, buzzer, USB connector, RGB diode, status LEDs, power terminal and RS485.
WaveShare ESP32-3S-Relay-6CH controller with visible connectors and function labels

Documentation
Most of the information can be found on Waveshare wiki:
https://www.waveshare.com/wiki/ESP32-S3-Relay-6CH
Here is the board schematic - it shows which GPIOs are used for features like relays, WS2812 or which extra GPIOs are available inside.
Electronic schematic of ESP32-S3 module with interfaces, relays, and power supply
ESP32-S3 relay board with 6 relays, isolation features and protection components shown
Wiring diagram for ESP32 relay module with AC 220V and DC 30V devices
ESP32-S3 board with RS485 interface and 40-pin Raspberry Pi Pico HAT header




Quick teardown
This is not needed for flashing and usage, but it's always interesting to check how things are made. You can unscrew the cover with the screwdriver that is included in the set.
ESP32-S3 module with 6 relays and green terminal blocks
The device is made mostly out of surface mount components. There are two extra 2.54mm pin headers inside, which can be used to route out GPIO. They are compatible with Raspberry Pi Pico Hats.
ESP32-S3 board with relay module and green terminal connectors
Some closeups:
ESP32-S3 board with six relays and screw connectors visible Close-up of ESP32-S3 relay board with relays, capacitors, and labeled pins Waveshare ESP32-S3-Relay-6CH board with labeled pins and electronic components Close-up of a circuit board with labeled IC and SMD components


PlatformIO demo
Device can be very easily programmed directly in PlatformIO. Here's a simple relay "hello world" that toggles a single relay in a loop:
Code: C / C++
Log in, to see the code




The WS2812 is on GPIO38. It can be controlled either with a WS2812 library like FastLED or, for example, directly with RMT:
https://www.elektroda.com/rtvforum/topic4115010.html
There is also a Neopixel function that can work well with WS2812 as well:
Code: C / C++
Log in, to see the code

Close-up of USB cable and blue LEDs on an electronic board with labeled connections
NOTE: This particular photo is taken from the similar Waveshare board, but the one in the topic was tested as well.


OpenESP32 demo
OpenESP32 is a port of our OBK open source firmware. It runs on many chips from ESP family, including ESP32 S3. Flashing procedure and pairing with Home Assistant is shown here:



I'm attaching flashing script:

esptool.exe --port COM47 --baud 460800 write_flash 0x0 OpenESP32S3_1.18.156_4M.factory.bin

Change COM port to suit your system.

Template:
Code: JSON
Log in, to see the code


The video does not cover it, but WS2812 can be also controlled in OpenESP. Just set pin role:
Configuration interface with dropdowns and value fields for IO35–IO44
and setup driver:

startDriver SM16703P
SM16703P_Init 1 GRB
SM16703P_SetPixel 0 255 0 0
SM16703P_Start
startdriver pixelanim

This way you can also get this to HA, but you must run HA discovery after running the script.
Light control interface with color wheel and 24% brightness level



Summary
Waveshare ESP32-S3-Relay-6CH is a very easy to use module - you can either program it from yourself in PlatformIO, or flash a premade software like Tasmota - in this case I've presented our OpenESP32. This way you can easily pair it with Home Assistant and control and script relays, WS2812 LED also works well with our WS2812 driver. Futhermore, you can later script it in Berry language:
Berry scripting for various IoT platforms - tutorial for OBK new script integration part 1
Do you think that ESP32-S3-Relay-6CH module is a good idea for home automation and DIY projects, or would you prefer another one? Let us know!

About Author
p.kaczmarek2
p.kaczmarek2 wrote 12728 posts with rating 10554 , helped 593 times. Been with us since 2014 year.

Comments

krzbor 12 Sep 2025 19:19

Perhaps someone knows - why do the Chinese, so renowned for their economy in electronics, use opto-isolation for relays? Even their cheap executive modules have opto-isolation. [Read more]

%}