baishundianzi TCA9548A

TCA9548A 1-to-8 I2C Multiplexer Breakout Module User Manual

Model: TCA9548A | Brand: baishundianzi

1. Introduction

The TCA9548A is an 8-channel I2C (Inter-Integrated Circuit) multiplexer breakout module designed to expand the capabilities of your I2C bus. It allows a single I2C master to communicate with up to eight different I2C slave devices, even if those devices share the same I2C address. This module is ideal for projects requiring multiple sensors or peripherals that would otherwise conflict on a standard I2C bus.

Video: Overview of the TCA9548A I2C Multiplexer Module.

2. Key Features

  • 8-Channel I2C Expansion: Connect up to eight separate I2C buses to a single master I2C port.
  • Address Conflict Resolution: Enables communication with multiple I2C devices that have identical addresses.
  • Bidirectional Switches: Features 8 bidirectional changeover switches controllable via the I2C bus.
  • Voltage Level Translation: Supports voltage level conversion between 1.8V, 2.5V, 3.3V, and 5V buses, allowing seamless integration with various microcontrollers and sensors.
  • Low-Level Effective Reset: Includes a reset input (/RESET) for easy initialization without powering off the component.
  • Hot Insertion Support: Designed to handle hot insertion without issues.
  • Low Standby Current: Efficient power consumption.
  • 5V Tolerant I/O Pins: All I/O pins are 5V voltage resistant.
  • Cascadable: Up to 8 multiplexers can be cascaded, allowing control of up to 64 devices with the same address.

3. Specifications

ParameterValue
Operating Voltage1.65V to 5.5V
Clock Frequency0 to 400KHz
Operating Temperature-40°C to +85°C
Module Dimensions31.5mm x 21.4mm
Mounting HolesTwo M3 holes
Weight4.01g
I/O Pin Tolerance5V tolerant
TCA9548A Module Dimensions and Weight
Figure 1: TCA9548A Module Dimensions (31.5mm x 21.4mm) and Weight (4.01g).

4. Pinout and Pin Functions

The TCA9548A module features various pins for power, I2C communication, address selection, and reset. Understanding each pin's function is crucial for proper integration.

TCA9548A Pinout Diagram
Figure 2: Top view of the TCA9548A module with pin labels.
Pin NameTypeDescription
VINPowerInput voltage for the module. Connect to VCC.
GNDGroundGround connection.
SDAI/OSerial data bus (main I2C). Connect to VCC through a pull-up resistor.
SCLI/OSerial clock bus (main I2C). Connect to VCC through a pull-up resistor.
RSTInputActive-low reset input. Connect to VCC or VDPU(1) through a pull-up resistor if not used.
A0, A1, A2InputAddress input pins. Connect directly to VCC or ground to set the module's I2C address.
SD0-SD7I/OSerial data lines for channels 0-7. Connect to VDPU(1) through a pull-up resistor.
SC0-SC7I/OSerial clock lines for channels 0-7. Connect to VDPU(1) through a pull-up resistor.

Note: VDPU refers to the pull-up voltage, which can be 1.65V to 5.5V depending on your system's logic level.

5. Setup and Connection

This section details how to connect the TCA9548A module to your microcontroller and I2C devices.

5.1. Setting the I2C Slave Address

The TCA9548A has a default I2C address of 0x70. This address can be modified by configuring the A0, A1, and A2 pins. These pins are internally pulled up to 10K resistors on the module, so no external pull-ups are required for them. Connect them to GND (Low) or VCC (High) to set the desired address.

A2A1A0I²C Bus Slave Address (Decimal)I²C Bus Slave Address (Hexadecimal)
LLL1120x70
LLH1130x71
LHL1140x72
LHH1150x73
HLL1160x74
HLH1170x75
HHL1180x76
HHH1190x77
I2C Slave Address Reference Table
Figure 3: I2C Slave Address Configuration based on A0, A1, A2 pin states.

5.2. Basic Wiring Diagram

Connect the TCA9548A to your microcontroller (e.g., Arduino) as follows:

  1. Power: Connect the VIN pin to your microcontroller's 3.3V or 5V power supply (depending on your system's logic level). Connect the GND pin to the microcontroller's ground.
  2. Main I2C Bus: Connect the SDA pin of the TCA9548A to your microcontroller's SDA pin. Connect the SCL pin of the TCA9548A to your microcontroller's SCL pin.
  3. I2C Channels: For each I2C device you want to connect, use one of the 8 channels (SC0/SD0 to SC7/SD7). Connect the SDA of your I2C device to the corresponding SDx pin and the SCL of your I2C device to the corresponding SCx pin.
  4. Pull-up Resistors: The module has internal pull-up resistors for SDA, SCL, RST, A0, A1, A2. For the individual channel lines (SDx/SCx), external pull-up resistors (typically 10KΩ) are recommended if your I2C devices do not have them built-in.
  5. Reset Pin (RST): The /RESET pin is active-low. It can be connected to a digital pin on your microcontroller if you need to programmatically reset the multiplexer. If not used, it can be connected to VCC through a pull-up resistor.
TCA9548A Wiring Diagram for Channels 0-5
Figure 4: Example wiring diagram for connecting I2C devices to channels 0-5. Note the pull-up resistors for each channel.
TCA9548A Wiring Diagram for Channels 6-7
Figure 5: Example wiring diagram for connecting I2C devices to channels 6-7.

6. Operating Instructions

To use the TCA9548A, you need to communicate with it via its own I2C address (set by A0-A2 pins) to select which of the 8 downstream I2C channels you want to enable.

6.1. Channel Selection

The TCA9548A operates by writing a single byte to its control register. Each bit in this byte corresponds to one of the eight I2C channels (SC0/SD0 to SC7/SD7).

  • To enable a specific channel, write a byte to the TCA9548A's I2C address where the corresponding bit for that channel is set to '1'.
  • For example, to enable channel 0, write 0x01 to the multiplexer.
  • To enable channel 1, write 0x02.
  • To enable channel 2, write 0x04.
  • And so on, up to channel 7, which would be 0x80.
  • You can enable multiple channels simultaneously by setting multiple bits in the byte. For instance, to enable channels 0 and 1, write 0x03 (0x01 | 0x02).
  • To disable all channels, write 0x00.

Once a channel (or channels) is enabled, all subsequent I2C communications from your microcontroller will be routed through the selected channel(s) to the connected I2C device(s) until a new channel selection byte is written to the TCA9548A.

6.2. Example (Conceptual Arduino Code)

#include <Wire.h>

#define TCAADDR 0x70 // Default I2C address of the TCA9548A

void tcaSelect(uint8_t i) {
  if (i > 7) return;
  Wire.beginTransmission(TCAADDR);
  Wire.write(1 << i);
  Wire.endTransmission();
}

void setup() {
  Wire.begin();
  Serial.begin(9600);
  Serial.println("TCA9548A Test");

  // Example: Scan all channels for I2C devices
  for (uint8_t t = 0; t < 8; t++) {
    tcaSelect(t);
    Serial.print("TCA9548A Channel #");
    Serial.println(t);
    for (uint8_t addr = 0; addr <= 127; addr++) {
      if (addr == TCAADDR) continue; // Skip the multiplexer's own address
      uint8_t error, address;
      Wire.beginTransmission(addr);
      error = Wire.endTransmission();
      if (error == 0) {
        Serial.print("  I2C device found at address 0x");
        if (addr < 16) Serial.print("0");
        Serial.print(addr, HEX);
        Serial.println("!");
      } else if (error == 4) {
        Serial.print("  Unknown error at address 0x");
        if (addr < 16) Serial.print("0");
        Serial.println(addr, HEX);
      }
    }
  }
  Serial.println("Done.");
}

void loop() {
  // Your main program logic here
}

6.3. Reset Functionality

The /RESET pin is an active-low input. Pulling this pin low will deselect all channels and initialize the I2C/SMBus state machine. This can be useful for recovering from a timeout or other improper I2C bus operation without needing to power cycle the module.

7. Maintenance

  • Keep the module clean and free from dust and moisture.
  • Avoid exposing the module to extreme temperatures or static electricity.
  • Ensure proper ventilation if used in an enclosed space.
  • Handle with care to prevent physical damage to components or solder joints.

8. Troubleshooting

Problem: I2C devices are not detected or not responding.
Solution:
  1. Verify all power (VIN, GND) and I2C connections (SDA, SCL) are correct.
  2. Ensure the TCA9548A's I2C address (set by A0-A2) is correctly configured and used in your code.
  3. Check if the target I2C channel is correctly selected in your code before attempting to communicate with the device.
  4. Confirm that external pull-up resistors are present on the SDx/SCx lines for your I2C devices if they don't have internal ones.
  5. Check the voltage levels. The TCA9548A supports voltage translation, but ensure your devices are within the 1.65V-5.5V range and that pull-up resistors are connected to the appropriate voltage rail (VDPU).
  6. Try resetting the module by momentarily pulling the /RESET pin low.
  7. Ensure no other I2C devices on the main bus are conflicting with the TCA9548A's address.
Problem: Multiple devices on the same channel are not working.
Solution: The TCA9548A allows devices with the same address to be connected to different channels. If you connect multiple devices with the same address to the same channel, they will still conflict. Ensure each device with a duplicate address is on its own dedicated channel.
Problem: Module gets hot.
Solution: Check for short circuits in your wiring. Ensure the input voltage (VIN) does not exceed 5.5V. Verify that the current draw from connected devices is within acceptable limits.

9. User Tips

  • When cascading multiple TCA9548A modules, ensure each multiplexer has a unique I2C address (by configuring A0-A2 pins differently).
  • Always test your I2C devices directly with your microcontroller before introducing the multiplexer to isolate potential issues.
  • Consider using an I2C scanner sketch to confirm the addresses of your devices and the multiplexer itself.

10. Warranty and Support

For technical support, please refer to the official product documentation or contact the manufacturer/seller. A detailed user manual in PDF format is available for download: TCA9548A User Manual (PDF).

Related Documents - TCA9548A

Preview Elektronika dla Wszystkich - Sierpień 2018
Magazyn Elektronika dla Wszystkich z sierpnia 2018 roku, zawierający projekty elektroniczne, artykuły techniczne, nowości ze świata technologii i porady dla hobbystów. Odkryj projekty takie jak Minizegar Nixie, odbiornik STAŚ, kursy Arduino, mierniki, regulatory mocy oraz nowości od Samsung, Nokia, Huawei i Microsoft.