Thinking about using the ESP32 Relay Board x8 for your home automation, automation or irrigation projects? In this guide I explain in a clear and practical way everything you need to know to get started: what this board is, how it works and how you can program it from scratch.
Although this content accompanies a step-by-step video, here you will find all the detailed information in written form, with diagrams, explanations and example code. You don't need to watch the video to understand it - but if you like to learn visually, you can complement it with it.
Contents
- 1 Introducing the ESP32 Relay Board x8
- 2 Possible applications
- 3 Features and Capabilities
- 4 Power supply and electrical characteristics
- 5 ESP32 Relay Board x8 connectors, buttons and GPIOs
- 6 Complete ESP32 Relay Board x8 Pin Table
- 7 Programming with USB-TTL Converter
- 8 How to program it (with Arduino IDE)
- 9 Complementary video: Discover the ESP32 Relay Board x8 in action
- 10 The shopping basket
- 11 What next?
Introducing the ESP32 Relay Board x8
The ESP32 Relay Board x8 is a development board based on the popular microcontroller ESP32 WROOMspecifically designed to control up to 8 relays from a single board. It is perfect for home automation projects, industrial automation or any system that needs to manage multiple electrical devices independently.

Possible applications
There are many possible applications for this board, but I would like to highlight the following, which I think may be the most common:
- Irrigation valve control
- Automation of lights or blinds
- Activation of pumps or fans
- Remote management via Wi-Fi
Features and Capabilities
This board offers not only relay control, but also great versatility. Some of its most outstanding features:
- ESP32-WROOM-32 Microcontroller with Wi-Fi and Bluetooth
- 8 relay outputs with optocouplers for electrical isolation
- 5V or 7 to 30V power supply
- Reset button
- Programming button
- Status LEDs for each relay for immediate display
- Firmware controllable LEDs (GPIO23)
Power supply and electrical characteristics
Each relay on the board has output terminals labeled COM (common), NO (normally open), and NC (normally closed). Although the product description doesn’t specify the maximum load, the silkscreen printed on each relay module indicates a rating of up to 10 A.
The board can be powered in two different ways:
- You can power the board directly through the 5 VDC input by applying 5 V between the GND (negative) and 5 V (positive) terminals.
- You can also power the board via the 7–30 VDC input, which routes the voltage through its internal regulator. Apply a DC voltage between the GND (negative) and 7–30 VDC (positive) terminals, within the supported range of 7 to 30 volts.

💡 Important: Keep in mind that this board must be powered with direct current (DC). If you’re using it to control irrigation solenoid valves, note that many of them operate at 24 V alternating current (AC), which is not compatible with the board’s power input. In such cases, you’ll need a separate DC power source to supply the ESP32 Relay Board x8.
In terms of electricity consumption:
- With all relays switched off, the consumption is about 100mA
- With all eight relays activated simultaneously, the power consumption can exceed 500mA
Therefore, make sure that your power supply can deliver enough current if you plan to activate several relays at the same time.
ESP32 Relay Board x8 connectors, buttons and GPIOs
The board is designed to be easy to use.
There are two buttons on the board:
Botón | Main function | Description |
---|---|---|
EN | Microcontroller reset | Performs a full hardware reset of the ESP32. It doesn’t erase the program, just reboots it. |
001 | Programming mode | Used to flash firmware by holding it down when starting the upload from the IDE. |
También hay una serie de pines y conectores:
Connector | Main function |
---|---|
DC input terminal | 5V external power supply or 7 to 30V external power supply |
Relay terminals (3 per channel) | Normally Open (NO), Common (C), Normally Closed (NC) |
GPIO exposed | Additional pins for sensors or inputs |
The eight relays are controlled via dedicated ESP32 GPIO pins, from GPIO25 to GPIO33. Each GPIO is mapped directly to one relay channel.

Complete ESP32 Relay Board x8 Pin Table
GPIO pin | Assigned function | Description |
---|---|---|
GPIO32 | Relay 1 | Controls relay channel 1 |
GPIO33 | Relay 2 | Controls relay channel 2 |
GPIO25 | Relay 3 | Controls relay channel 3 |
GPIO26 | Relay 4 | Controls relay channel 4 |
GPIO27 | Relay 5 | Controls relay channel 5 |
GPIO14 | Relay 6 | Controls relay channel 6 |
GPIO12 | Relay 7 | Controls relay channel 7 |
GPIO13 | Relay 8 | Controls relay channel 8 |
GPIO23 | Status LED | General LED on the board, useful as indicator |
GPIO0 | Programming button | Conectado al botón 001 para flasheo |
TX / RX | Serial communication | Pins for USB-TTL adapter (3.3V level) |
5V / GND | Power input | Power input for the board (5V DC) |
💡Todos los relés están conectados a través de un optoacoplador a pines GPIO del ESP32-WROOM-E. El control se realiza mediante lógica activa HIGH, es decir, el relé se activa cuando el pin se pone en estado alto
Programming with USB-TTL Converter
The ESP32 Relay Board x8 does not include a USB port or an integrated USB-to-serial converter, so to load the firmware you need to use a external USB-TTL adaptersuch as those based on CH340, CP2102 o FTDI.

I have many similar adapters but not all of them have worked well for me. I am currently using one that I bought on Amazon. It has given me no problems and allows you to select logic levels of 3.3 or 5V (for this board make sure you have it at 3.3V, whatever your adapter is).
Connecting the USB-TTL adapter
Here's how to connect it:
USB-TTL adapter pin | Pin on ESP32 Relay Board x8 |
---|---|
TX (3.3V) | RX |
RX (3.3V) | TX |
GND | GND |
5V | 5V |

As you can see there are two GND terminals. You can use either of them, they are linked internally).
GPIO0 is used to put the board into bootloader mode for firmware flashing (make sure the voltage level is 3.3 V!). Instead of connecting GPIO0 manually, you can press the 001 button on the board to activate programming mode.
💡 Make sure that the voltage levels on the RX and TX lines of the adapter are 3.3 V. Also remember that the ESP32 requires you to press the 001 button at the moment of uploading the firmware.
Loading the firmware
Once the adapter is connected, you can load the firmware (e.g. from the Arduino IDE) as follows:
- Connect the USB-TTL adapter to the board and to the PC.
- Press the button 001 on the board and hold it down.
- Reinicia el ESP32 pulsando brevemente el botón EN.
- Start the firmware upload from the Arduino IDE or your environment (Visual Studio Code, for example).
- Release the button 001 when the process begins.
How to program it (with Arduino IDE)
Programming this board is child's play. Here is a basic configuration that simulates the factory-loaded program: activate the eight relays sequentially, with a short pause between each one, until they are all on. Then it switches them off one by one, keeping the rhythm. It is a perfect visual example to check that the board is working correctly, that the relays respond and that the programming from the Arduino IDE has been successful. Ideal for a first contact before going into more advanced configurations.
/*********
eMariete
Complete project details at https://emariete.com
*********/
// Orden físico de relés: del 1 al 8
const int relays[] = {32, 33, 25, 26, 27, 14, 12, 13};
void setup() {
for (int i = 0; i < 8; i++) {
pinMode(relays[i], OUTPUT);
digitalWrite(relays[i], LOW); // Apaga todos al iniciar
}
}
void loop() {
// Encendido secuencial
for (int i = 0; i < 8; i++) {
digitalWrite(relays[i], HIGH);
delay(500);
}
delay(1000); // Mantén todos encendidos durante 1 segundo.
// Apagado secuencial
for (int i = 0; i < 8; i++) {
digitalWrite(relays[i], LOW);
delay(500);
}
delay(1000); // Haz una pausa antes de repetir.
}
You just need to open the Arduino IDE, connect the board with the USB-TTL adapter, upload the firmware and you're done!
Complementary video: Discover the ESP32 Relay Board x8 in action
If you prefer to see how this board works in real time, I invite you to watch the video that accompanies this article. In it I show how it is connected, how it is programmed and how the relays behave sequentially.
💡 Although this article includes all the necessary details, the video gives you a practical and visual overview that can help you understand it even better.
The shopping basket
He comprado la ESP32 Relay Board x8 en AliExpress y el adaptador USB-TTL en Amazon, pero aquí te dejo los enlaces de compra de ambos sitios para que elijas el que prefieras.
ESP32 Relay Board x8
Yo la compré en AliExpress, en el enlace que te dejo, y me tardó unos 8 días. Sin embargo, puedes comprarla en Amazon si lo prefieres o si estás en España y quieres recibirla más rápido.

ESP32 WROOM WiFi/Bluetooth relay card - 8 channels
Automation controller with 8 relays. WiFi and Bluetooth 5.0 connectivity, ideal for projects with Home Assistant, Node-RED and customised home automation systems.
Buy on AliExpress
ESP32-WROOM-32E WiFi 8 Relay BLE Module - Development Board
Relay controller with WiFi and Bluetooth 5.0 connectivity. Ideal for home automation, Home Assistant, Node-RED and ESP32 projects. Compatible with 5-30 V DC.
Buy on AmazonUSB-TTL Adapter
En mi caso, lo adquirí en Amazon (el paquete de tres unidades), pero también puedes conseguirlo en AliExpress, que es exactamente el mismo y más económico, aunque tendrás que esperar un poco más.

USB to TTL Adapter CH340G - UART Converter
USB to UART converter with CH340G chip. Compatible with Arduino, ESP32, and more. Ideal for serial communication between microcontrollers and PCs.
Buy on AliExpress
USB to UART TTL adapter with CH340G - AZDelivery
Converts UART signals to USB with support for 3.3V and 5V. Includes jumper cable and is compatible with Arduino, ESP32, and other microcontrollers. With quick setup eBook.
Buy on AmazonWhat next?
Esta es solo la primera parada. Próximamente te enseñaré a configurar la placa con ESPHome, integrarla en Home Assistant y llevarla al terreno con un sistema de riego inteligente. ¡Te sorprenderá todo lo que puedes hacer con ella!