

The RelayModuleI2C is a versatile electronic component designed to control high-voltage devices using low-voltage signals. It features an I2C interface, enabling seamless communication with microcontrollers such as Arduino, Raspberry Pi, and other platforms. This module typically includes multiple relays, each of which can be activated individually, making it ideal for applications requiring the switching of electrical loads.








Below are the key technical details of the RelayModuleI2C:
| Parameter | Value |
|---|---|
| Operating Voltage | 5V DC |
| Communication Protocol | I2C |
| I2C Address Range | 0x20 to 0x27 (configurable via jumpers) |
| Number of Relays | 4 (can vary depending on the module) |
| Relay Voltage Rating | 250V AC / 30V DC |
| Relay Current Rating | 10A |
| Power Consumption | ~70mA per active relay |
| Dimensions | 50mm x 70mm x 20mm |
| Operating Temperature | -40°C to 85°C |
The RelayModuleI2C typically has the following pinout:
| Pin Name | Description |
|---|---|
| VCC | Power supply input (5V DC) |
| GND | Ground connection |
| SDA | I2C data line |
| SCL | I2C clock line |
| RELAY1 | Normally Open (NO), Common (COM), Normally Closed (NC) for Relay 1 |
| RELAY2 | Normally Open (NO), Common (COM), Normally Closed (NC) for Relay 2 |
| RELAY3 | Normally Open (NO), Common (COM), Normally Closed (NC) for Relay 3 |
| RELAY4 | Normally Open (NO), Common (COM), Normally Closed (NC) for Relay 4 |
VCC pin to a 5V power source and the GND pin to ground.SDA and SCL pins to the corresponding I2C pins on your microcontroller:SDA → A4, SCL → A5NO, COM, NC) as per your requirements:Below is an example code to control the RelayModuleI2C using an Arduino UNO:
#include <Wire.h> // Include the Wire library for I2C communication
#define RELAY_MODULE_ADDRESS 0x20 // Default I2C address of the module
void setup() {
Wire.begin(); // Initialize I2C communication
Serial.begin(9600); // Start serial communication for debugging
// Set all relays to OFF initially
Wire.beginTransmission(RELAY_MODULE_ADDRESS);
Wire.write(0x00); // Send command to turn off all relays
Wire.endTransmission();
Serial.println("Relay Module Initialized");
}
void loop() {
// Example: Turn on Relay 1
Wire.beginTransmission(RELAY_MODULE_ADDRESS);
Wire.write(0x01); // Command to activate Relay 1
Wire.endTransmission();
delay(1000); // Keep Relay 1 ON for 1 second
// Example: Turn off Relay 1
Wire.beginTransmission(RELAY_MODULE_ADDRESS);
Wire.write(0x00); // Command to deactivate all relays
Wire.endTransmission();
delay(1000); // Wait for 1 second before repeating
}
Relays Not Activating
SDA and SCL.Module Overheating
No Response from Module
Can I use this module with a 3.3V microcontroller?
How do I change the I2C address?
Can I control multiple relays simultaneously?
Is the module safe for high-voltage applications?
By following this documentation, you can effectively integrate the RelayModuleI2C into your projects and control high-voltage devices with ease.