

An I2C HUB is a device that facilitates the connection of multiple I2C devices to a single I2C bus. It acts as a signal distributor, enabling communication between the master controller (e.g., a microcontroller) and multiple slave devices. The I2C HUB ensures proper signal routing and data flow management, making it an essential component in complex I2C-based systems.








Below are the general technical specifications for a typical I2C HUB. Note that specific values may vary depending on the manufacturer and model.
The pin configuration of an I2C HUB may vary, but a typical 6-pin configuration is shown below:
| Pin Name | Description |
|---|---|
| VCC | Power supply input (3.3V or 5V, depending on the HUB model). |
| GND | Ground connection. |
| SDA_IN | Serial Data Line input from the I2C master. |
| SCL_IN | Serial Clock Line input from the I2C master. |
| SDA_OUTx | Serial Data Line output to the I2C slave devices (x = 1, 2, 3, ...). |
| SCL_OUTx | Serial Clock Line output to the I2C slave devices (x = 1, 2, 3, ...). |
Below is an example of connecting an I2C HUB to an Arduino UNO and reading data from two I2C sensors.
#include <Wire.h>
// Define I2C addresses for the two sensors
#define SENSOR1_ADDR 0x40 // Replace with the actual address of sensor 1
#define SENSOR2_ADDR 0x41 // Replace with the actual address of sensor 2
void setup() {
Wire.begin(); // Initialize the I2C bus
Serial.begin(9600); // Start serial communication for debugging
}
void loop() {
// Read data from sensor 1
Wire.beginTransmission(SENSOR1_ADDR);
Wire.write(0x00); // Replace with the register address to read from
Wire.endTransmission();
Wire.requestFrom(SENSOR1_ADDR, 2); // Request 2 bytes of data
if (Wire.available() == 2) {
int data1 = Wire.read() << 8 | Wire.read(); // Combine two bytes
Serial.print("Sensor 1 Data: ");
Serial.println(data1);
}
// Read data from sensor 2
Wire.beginTransmission(SENSOR2_ADDR);
Wire.write(0x00); // Replace with the register address to read from
Wire.endTransmission();
Wire.requestFrom(SENSOR2_ADDR, 2); // Request 2 bytes of data
if (Wire.available() == 2) {
int data2 = Wire.read() << 8 | Wire.read(); // Combine two bytes
Serial.print("Sensor 2 Data: ");
Serial.println(data2);
}
delay(1000); // Wait 1 second before the next loop
}
No Communication with Devices
Address Conflicts
Data Corruption
Devices Not Detected
Q: Can I connect devices with different voltage levels to the same I2C HUB?
A: Only if the HUB supports voltage level translation. Otherwise, use level shifters.
Q: How many devices can I connect to an I2C HUB?
A: This depends on the HUB model and the total bus capacitance. Most HUBs support 4 to 8 devices.
Q: Do I need external pull-up resistors if the HUB has integrated ones?
A: No, but ensure the integrated resistors are suitable for your application.