Relay boards with ESP32

Hello all,
some time ago I got some ESP32-C3 boards with 1 relay output similar to:

devices.esphome.io

ESP32 Relay x1 | devices.esphome.io

This website is a repository of device configuration templates and setup guides for devices running ESPHome firmware.

but with a different ESP and (important for me) AC-powered.
see: https://manuals.plus/asin/B0B7VPZ6WC
The ESP used is a “ESP-C3-12F” and is actually a standard ESP32-C3.
The official manufacturers way of programming is through the serial port, but for Esphome I prefer using the Jtag/USB, which is way easier!
Only… one of the pre-defined 2 USB pins is … the output to the relay circuit so I had to modify a few things. In fact I could flash the unit without any modification but it is not an elegant solution.
So I modded the pinout to the relay and did cut the track of IO19 and connected a small wire to IO10 instead and to one side of R13 which is actually not fitted. And this setup works fine!
USB Serial/JTAG Controller Console - ESP32-C3 - — ESP-IDF Programming Guide v5.5.1 documentation

See my setup in the pics:

Detail of Jtag/USB connection with “special” USB cable

The unit was readily recognized by Esphome with Improv and works!
see my test .yaml

esphome:
  name: relais-deur
  friendly_name: Relais-Deur
  min_version: 2025.9.0
  name_add_mac_suffix: false

esp32:
  variant: esp32c3
  framework:
    type: esp-idf

# Enable logging
logger:

# Enable Home Assistant API
api:

web_server:
  port: 80

# Allow Over-The-Air updates
ota:
- platform: esphome

improv_serial:

wifi:
  ap: {}


captive_portal:

#dashboard_import:
#  package_import_url: github://esphome/firmware/esphome-web/esp32c3.yaml@v2
 # import_full_config: true

# Sets up Bluetooth LE (Only on ESP32) to allow the user
# to provision wifi credentials to the device.
esp32_improv:
  authorizer: none

switch:
  - platform: gpio
    name: "Relay"
    pin: 10

BTW, do NOT use the usb cable to power the board, the voltage regulator on the board does NOT like it… I used the Micro-USB to power for testing.

In ESPHome Builder you can now “visit” the site and manipulate the relay in order test it!

Have fun,

Jacques

3 Likes