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

How to Use Gravity 1-8 I2C Multiplexer: Examples, Pinouts, and Specs

Image of Gravity 1-8 I2C Multiplexer
Cirkit Designer LogoDesign with Gravity 1-8 I2C Multiplexer in Cirkit Designer

Introduction

The Gravity 1-8 I2C Multiplexer by DFRobot is a versatile device designed to expand the capabilities of a single I2C bus. It allows up to eight I2C devices to be connected and managed simultaneously, even if they share the same I2C address. This is achieved by dynamically switching between the connected devices, ensuring seamless communication without address conflicts.

Explore Projects Built with Gravity 1-8 I2C Multiplexer

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 Enabled Sensor Hub with ESP8266 and ADS1115 ADC
Image of Node Mcu Gas Sensor: A project utilizing Gravity 1-8 I2C Multiplexer in a practical application
This circuit features two ESP8266 NodeMCU microcontrollers, each interfaced with a Gravity I2C ADS1115 16-Bit ADC module for analog-to-digital conversion. The microcontrollers communicate with the ADC modules via I2C protocol, with one set of connections for each microcontroller-ADC pair, and are powered through a common 3.3V and ground connection.
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 Gravity 1-8 I2C Multiplexer 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
Arduino UNO with MPU-6050 Sensor Array and Multiplexer Control Circuit
Image of smrpe: A project utilizing Gravity 1-8 I2C Multiplexer in a practical application
This circuit is designed to interface multiple MPU-6050 sensors with an Arduino UNO for motion tracking purposes. The HCF4052BE analog multiplexer/demultiplexer is used to switch between the MPU-6050 sensors' SCL and SDA lines, allowing for multiple sensors to share the same I2C bus. The Arduino runs embedded code to read capacitive touch inputs, accelerometer and gyroscope data from the MPU-6050 sensors, and transmit this information via Bluetooth and Wi-Fi using software serial communication.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Multi-Sensor Data Logger with MPU-6050 and I2C Multiplexing
Image of project_final: A project utilizing Gravity 1-8 I2C Multiplexer in a practical application
This circuit features an ESP32 Devkit V1 microcontroller connected to four MPU-6050 sensors via an Adafruit TCA9548A I2C multiplexer. The ESP32 facilitates communication with each MPU-6050 sensor, which are likely used for motion tracking due to their integrated gyroscope and accelerometer. The multiplexer allows the ESP32 to interface with multiple sensors that share the same I2C address by providing separate I2C channels for each sensor.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with Gravity 1-8 I2C Multiplexer

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 Node Mcu Gas Sensor: A project utilizing Gravity 1-8 I2C Multiplexer in a practical application
Wi-Fi Enabled Sensor Hub with ESP8266 and ADS1115 ADC
This circuit features two ESP8266 NodeMCU microcontrollers, each interfaced with a Gravity I2C ADS1115 16-Bit ADC module for analog-to-digital conversion. The microcontrollers communicate with the ADC modules via I2C protocol, with one set of connections for each microcontroller-ADC pair, and are powered through a common 3.3V and ground connection.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Indoor Lounge: A project utilizing Gravity 1-8 I2C Multiplexer 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 smrpe: A project utilizing Gravity 1-8 I2C Multiplexer in a practical application
Arduino UNO with MPU-6050 Sensor Array and Multiplexer Control Circuit
This circuit is designed to interface multiple MPU-6050 sensors with an Arduino UNO for motion tracking purposes. The HCF4052BE analog multiplexer/demultiplexer is used to switch between the MPU-6050 sensors' SCL and SDA lines, allowing for multiple sensors to share the same I2C bus. The Arduino runs embedded code to read capacitive touch inputs, accelerometer and gyroscope data from the MPU-6050 sensors, and transmit this information via Bluetooth and Wi-Fi using software serial communication.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of project_final: A project utilizing Gravity 1-8 I2C Multiplexer in a practical application
ESP32-Based Multi-Sensor Data Logger with MPU-6050 and I2C Multiplexing
This circuit features an ESP32 Devkit V1 microcontroller connected to four MPU-6050 sensors via an Adafruit TCA9548A I2C multiplexer. The ESP32 facilitates communication with each MPU-6050 sensor, which are likely used for motion tracking due to their integrated gyroscope and accelerometer. The multiplexer allows the ESP32 to interface with multiple sensors that share the same I2C address by providing separate I2C channels for each sensor.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Connecting multiple sensors or modules with identical I2C addresses.
  • Expanding the I2C bus for complex projects with multiple peripherals.
  • Prototyping and testing multiple I2C devices in parallel.
  • Robotics, IoT, and automation systems requiring multiple I2C devices.

Technical Specifications

  • Manufacturer Part ID: Gravity I2C Multiplexer
  • Operating Voltage: 3.3V to 5V
  • I2C Address: Configurable (default: 0x70)
  • Number of Channels: 8
  • Communication Protocol: I2C
  • Dimensions: 42mm x 32mm
  • Mounting: Gravity-compatible interface

Pin Configuration and Descriptions

The Gravity 1-8 I2C Multiplexer has the following pin layout:

Pin Name Type Description
GND Power Ground connection for the module.
VCC Power Power supply input (3.3V to 5V).
SDA I2C Data Line Serial Data Line for I2C communication.
SCL I2C Clock Line Serial Clock Line for I2C communication.
CH0-CH7 I2C Channels Eight independent I2C channels for connecting devices with identical addresses.

Usage Instructions

How to Use the Component in a Circuit

  1. Power the Module: Connect the VCC pin to a 3.3V or 5V power source and the GND pin to ground.
  2. Connect the I2C Bus: Attach the SDA and SCL pins to the corresponding I2C lines of your microcontroller (e.g., Arduino UNO).
  3. Connect I2C Devices: Attach up to eight I2C devices to the CH0 to CH7 channels. Ensure proper wiring for power and ground.
  4. Select a Channel: Use I2C commands to select the desired channel for communication. Only one channel can be active at a time.

Important Considerations and Best Practices

  • Address Conflicts: The multiplexer resolves address conflicts by isolating devices on different channels. Ensure devices with the same address are connected to separate channels.
  • Pull-Up Resistors: The module includes onboard pull-up resistors for the I2C bus. Avoid adding additional pull-ups unless necessary.
  • I2C Address Configuration: The default I2C address is 0x70. If multiple multiplexers are used, configure their addresses using the onboard solder pads.

Example Code for Arduino UNO

Below is an example of how to use the Gravity 1-8 I2C Multiplexer with an Arduino UNO:

#include <Wire.h>

// Default I2C address of the multiplexer
#define MULTIPLEXER_ADDR 0x70

// Function to select a specific channel (0-7)
void selectChannel(uint8_t channel) {
  if (channel > 7) return; // Ensure channel is within range
  Wire.beginTransmission(MULTIPLEXER_ADDR);
  Wire.write(1 << channel); // Activate the desired channel
  Wire.endTransmission();
}

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

  Serial.println("Initializing I2C Multiplexer...");
  selectChannel(0); // Select channel 0 as an example
  Serial.println("Channel 0 selected.");
}

void loop() {
  // Example: Communicate with a device on channel 0
  selectChannel(0); // Ensure channel 0 is active
  Wire.beginTransmission(0x40); // Replace 0x40 with your device's I2C address
  Wire.write(0x00); // Example command
  Wire.endTransmission();

  delay(1000); // Wait for 1 second
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. I2C Devices Not Responding:

    • Ensure the correct channel is selected using the selectChannel() function.
    • Verify the wiring of the I2C devices, including power and ground connections.
    • Check for address conflicts if multiple devices are connected.
  2. Multiplexer Not Detected:

    • Confirm the I2C address of the multiplexer (default: 0x70).
    • Use an I2C scanner sketch to detect the multiplexer and connected devices.
  3. Communication Errors:

    • Ensure the I2C bus voltage matches the operating voltage of the connected devices.
    • Check for loose or faulty connections in the circuit.

FAQs

Q: Can I use multiple multiplexers in the same project?
A: Yes, you can use multiple multiplexers by configuring their I2C addresses using the onboard solder pads.

Q: Can I activate multiple channels simultaneously?
A: No, the multiplexer allows only one channel to be active at a time to prevent address conflicts.

Q: Do I need external pull-up resistors?
A: The module includes onboard pull-up resistors. Additional pull-ups are generally not required unless specified by your circuit design.