The ESP32_Relay_X4_V1.1 is a versatile module manufactured by LC that integrates an ESP32 microcontroller with four relays. This combination allows for wireless control of multiple high-power devices via Wi-Fi or Bluetooth. The module is ideal for home automation, industrial control, and IoT applications where remote control and monitoring are essential.
Parameter | Value |
---|---|
Microcontroller | ESP32 |
Number of Relays | 4 |
Relay Voltage | 5V DC |
Relay Current | 10A @ 250V AC / 10A @ 30V DC |
Wi-Fi Standard | 802.11 b/g/n |
Bluetooth Standard | Bluetooth v4.2 BR/EDR and BLE |
Operating Voltage | 5V DC |
Power Consumption | < 500mA |
Dimensions | 100mm x 70mm x 20mm |
Pin Number | Pin Name | Description |
---|---|---|
1 | VCC | Power supply (5V DC) |
2 | GND | Ground |
3 | IN1 | Control signal for Relay 1 |
4 | IN2 | Control signal for Relay 2 |
5 | IN3 | Control signal for Relay 3 |
6 | IN4 | Control signal for Relay 4 |
7 | TX | UART Transmit |
8 | RX | UART Receive |
9 | GPIO0 | General Purpose Input/Output 0 |
10 | GPIO2 | General Purpose Input/Output 2 |
11 | EN | Enable pin for ESP32 |
12 | 3V3 | 3.3V output from ESP32 |
#include <WiFi.h>
// Define relay control pins
#define RELAY1 5
#define RELAY2 18
#define RELAY3 19
#define RELAY4 21
// Wi-Fi credentials
const char* ssid = "your_SSID";
const char* password = "your_PASSWORD";
void setup() {
// Initialize serial communication
Serial.begin(115200);
// Initialize relay control pins as outputs
pinMode(RELAY1, OUTPUT);
pinMode(RELAY2, OUTPUT);
pinMode(RELAY3, OUTPUT);
pinMode(RELAY4, OUTPUT);
// Connect to Wi-Fi
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(1000);
Serial.println("Connecting to WiFi...");
}
Serial.println("Connected to WiFi");
}
void loop() {
// Example: Turn on Relay 1 and Relay 2
digitalWrite(RELAY1, HIGH);
digitalWrite(RELAY2, HIGH);
delay(5000); // Keep relays on for 5 seconds
// Example: Turn off Relay 1 and Relay 2
digitalWrite(RELAY1, LOW);
digitalWrite(RELAY2, LOW);
delay(5000); // Keep relays off for 5 seconds
}
ESP32 Not Connecting to Wi-Fi:
Relays Not Switching:
Power Supply Issues:
Overheating:
By following this documentation, users can effectively utilize the ESP32_Relay_X4_V1.1 module for various applications, ensuring reliable and efficient control of high-power devices.