Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use 8-channel I2C relay module: Examples, Pinouts, and Specs

Image of 8-channel I2C relay module
Cirkit Designer LogoDesign with 8-channel I2C relay module in Cirkit Designer

Introduction

The 8-Channel I2C Relay Module by KRIDA is a versatile electronic component designed to control up to 8 relays using the I2C communication protocol. This module enables seamless integration with microcontrollers and single-board computers, allowing users to switch high-voltage devices (such as lights, fans, or appliances) using low-voltage control signals. Its compact design and I2C interface make it ideal for applications requiring multiple relay controls with minimal wiring.

Explore Projects Built with 8-channel I2C relay module

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Wi-Fi Controlled Smart Relay Switch with ESP8266 and MCP23017
Image of Bed Room: A project utilizing 8-channel I2C relay module in a practical application
This circuit is designed to control an 8-channel relay module via an ESP8266 microcontroller, which interfaces with an MCP23017 I/O expander over I2C. The ESP8266 connects to a WiFi network and subscribes to MQTT topics to receive commands for toggling the relays. Additionally, there are toggle switches connected to the MCP23017 that allow manual control of the relays, with the system's state being reported back via MQTT.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Powered 8-Channel Relay Controller with Wi-Fi Connectivity
Image of Olimex ESP32-POE2 4Ch X 2 Switches: A project utilizing 8-channel I2C relay module in a practical application
This circuit features an ESP32 microcontroller connected to an 8-channel relay module. The ESP32 controls the relay channels via its GPIO pins, allowing for the switching of external devices or loads through the relays.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32 and MCP23017-Based Smart Relay Control System with DHT22 Sensors
Image of Indoor Lounge: A project utilizing 8-channel I2C relay module in a practical application
This circuit is a control system that uses an ESP32 microcontroller to manage multiple relays and read data from DHT22 temperature and humidity sensors. The DFRobot Gravity MCP23017 I2C module expands the GPIO capabilities of the ESP32, allowing it to control additional relays for switching high-power devices.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Powered Wi-Fi Controlled 8-Channel Relay Module
Image of Olimex ESP32-POE2 8Ch Switch and Sensors: A project utilizing 8-channel I2C relay module in a practical application
This circuit features an ESP32 microcontroller connected to an 8-channel relay module. The ESP32 controls the relay channels via its GPIO pins, allowing it to switch multiple external devices on and off. The ESP32 also provides power to the relay module.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with 8-channel I2C relay module

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of Bed Room: A project utilizing 8-channel I2C relay module in a practical application
Wi-Fi Controlled Smart Relay Switch with ESP8266 and MCP23017
This circuit is designed to control an 8-channel relay module via an ESP8266 microcontroller, which interfaces with an MCP23017 I/O expander over I2C. The ESP8266 connects to a WiFi network and subscribes to MQTT topics to receive commands for toggling the relays. Additionally, there are toggle switches connected to the MCP23017 that allow manual control of the relays, with the system's state being reported back via MQTT.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Olimex ESP32-POE2 4Ch X 2 Switches: A project utilizing 8-channel I2C relay module in a practical application
ESP32-Powered 8-Channel Relay Controller with Wi-Fi Connectivity
This circuit features an ESP32 microcontroller connected to an 8-channel relay module. The ESP32 controls the relay channels via its GPIO pins, allowing for the switching of external devices or loads through the relays.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Indoor Lounge: A project utilizing 8-channel I2C relay module in a practical application
ESP32 and MCP23017-Based Smart Relay Control System with DHT22 Sensors
This circuit is a control system that uses an ESP32 microcontroller to manage multiple relays and read data from DHT22 temperature and humidity sensors. The DFRobot Gravity MCP23017 I2C module expands the GPIO capabilities of the ESP32, allowing it to control additional relays for switching high-power devices.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Olimex ESP32-POE2 8Ch Switch and Sensors: A project utilizing 8-channel I2C relay module in a practical application
ESP32-Powered Wi-Fi Controlled 8-Channel Relay Module
This circuit features an ESP32 microcontroller connected to an 8-channel relay module. The ESP32 controls the relay channels via its GPIO pins, allowing it to switch multiple external devices on and off. The ESP32 also provides power to the relay module.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Home automation systems
  • Industrial equipment control
  • Robotics and IoT projects
  • Smart lighting systems
  • Prototyping and testing high-voltage circuits

Technical Specifications

The following table outlines the key technical details of the 8-Channel I2C Relay Module:

Parameter Specification
Operating Voltage 5V DC
Communication Protocol I2C
Default I2C Address 0x20 (configurable via jumpers)
Relay Channels 8
Relay Type SPDT (Single Pole Double Throw)
Maximum Relay Voltage 250V AC / 30V DC
Maximum Relay Current 10A
Power Consumption ~300mA (all relays active)
Dimensions 135mm x 55mm x 20mm

Pin Configuration and Descriptions

The module has a set of pins for power, I2C communication, and relay outputs. Below is the pin configuration:

Power and Communication Pins

Pin Name Description
VCC 5V DC power supply input
GND Ground connection
SDA I2C data line
SCL I2C clock line

Relay Output Terminals

Each relay has three terminals: COM, NO, and NC. These are used to connect the high-voltage devices.

Terminal Description
COM Common terminal for the relay
NO Normally Open terminal (connected when relay is active)
NC Normally Closed terminal (connected when relay is inactive)

Usage Instructions

How to Use the Module in a Circuit

  1. Power the Module: Connect the VCC and GND pins to a 5V DC power source.
  2. Connect to a Microcontroller: Use the SDA and SCL pins to connect the module to the I2C bus of your microcontroller (e.g., Arduino UNO).
  3. Configure the I2C Address: If using multiple modules, adjust the I2C address using the onboard jumpers.
  4. Connect High-Voltage Devices: Wire the devices to the relay terminals (COM, NO, NC) as per your switching requirements.
  5. Control the Relays: Use I2C commands to activate or deactivate the relays.

Important Considerations and Best Practices

  • Ensure the total current drawn by the relays does not exceed the power supply's capacity.
  • Use proper insulation and safety precautions when working with high-voltage devices.
  • Avoid switching inductive loads (e.g., motors) without proper flyback diodes or snubber circuits to protect the relays.
  • Verify the I2C address of the module to avoid conflicts with other devices on the same bus.

Example Code for Arduino UNO

Below is an example code snippet to control the 8-Channel I2C Relay Module using an Arduino UNO:

#include <Wire.h> // Include the Wire library for I2C communication

#define RELAY_MODULE_ADDR 0x20 // Default I2C address of the relay module

void setup() {
  Wire.begin(); // Initialize I2C communication
  Serial.begin(9600); // Initialize serial communication for debugging

  // Turn off all relays at startup
  Wire.beginTransmission(RELAY_MODULE_ADDR);
  Wire.write(0x00); // Send command to turn off all relays
  Wire.endTransmission();
  Serial.println("Relay module initialized. All relays are OFF.");
}

void loop() {
  // Example: Turn on relay 1
  Wire.beginTransmission(RELAY_MODULE_ADDR);
  Wire.write(0x01); // Send command to turn on relay 1
  Wire.endTransmission();
  Serial.println("Relay 1 is ON.");
  delay(2000); // Wait for 2 seconds

  // Example: Turn off relay 1
  Wire.beginTransmission(RELAY_MODULE_ADDR);
  Wire.write(0x00); // Send command to turn off relay 1
  Wire.endTransmission();
  Serial.println("Relay 1 is OFF.");
  delay(2000); // Wait for 2 seconds
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. Relays Not Responding

    • Cause: Incorrect I2C address or wiring.
    • Solution: Verify the I2C address and ensure proper connections for SDA, SCL, VCC, and GND.
  2. High-Voltage Device Not Switching

    • Cause: Incorrect wiring to the relay terminals.
    • Solution: Double-check the connections to COM, NO, and NC based on your switching requirements.
  3. Module Overheating

    • Cause: Exceeding the maximum current or voltage ratings.
    • Solution: Ensure the connected devices are within the relay's rated specifications.
  4. I2C Communication Errors

    • Cause: Conflicts with other devices on the I2C bus.
    • Solution: Change the module's I2C address using the onboard jumpers.

FAQs

Q: Can I use this module with a 3.3V microcontroller?
A: Yes, but you will need a level shifter for the I2C lines, as the module operates at 5V.

Q: How do I change the I2C address?
A: Adjust the onboard jumpers according to the address configuration table in the module's datasheet.

Q: Can I control multiple modules on the same I2C bus?
A: Yes, as long as each module has a unique I2C address.

Q: Is the module safe for inductive loads?
A: Yes, but you should use flyback diodes or snubber circuits to protect the relays from voltage spikes.