Labs / Electronic modules

GraftSense - 4-channel I2C Multiplexer Expansion Module Based on PCA9546ADR (Open Version)

Author: Li Zisheng · Source: FreakStudio open documentation, v1.3 · License: CC BY 4.0 · Driver code (misc/pca9546_driver): MIT License

Contents
GraftSense - 4-channel I2C Multiplexer Expansion Module Based on PCA9546ADR (Open Version)
GraftSense - 4-channel I2C Multiplexer Expansion Module Based on PCA9546ADR (Open Version)

I. Module Introduction

4-channel I2C Multiplexer Expansion Module Based on PCA9546ADR With the core adopting PCA9546ADR (a 4-channel TI I2C / SMBus switch chip), it supports switching from 1 master I2C to 4 slave I2C devices, solving the address conflict issue of I2C devices; the module integrates a DC-DC 5V-to-3.3V circuit (XC6209F332MR) to adapt to master controllers of different voltages, and is equipped with power filter capacitors and LED power indicators to ensure stable power supply;The chip address can be set via the A0 / A1 / A2 jumper caps to avoid multi-module conflicts; meanwhile, it is equipped with an MCU interface (connected to the main controller's I2C) and 4 sets of I2C expansion interfaces (for connecting external I2C devices). With a clear interface layout, it is suitable for embedded system designs that require expanding the number of I2C devices.

II. Introduction to Main Chips

2.1 Chip Overview

GraftSense - 4-channel I2C Multiplexer Expansion Module Based on PCA9546ADR (Open Version)
GraftSense - 4-channel I2C Multiplexer Expansion Module Based on PCA9546ADR (Open Version)

The previous block diagram illustrates the operating architecture of the 4-channel PCA9546A I2C / SMBus multiplexer: on the left is an I2C master device (e. g., a processor), whose SDA and SCL pins are connected to the corresponding pins of the PCA9546A, and the RESET pin is used to control the chip reset; the PCA9546A is powered via Vcc, its A0 / A1 / A2 address pins (grounded here) set its own I2C address, and GND is the ground terminal;The 4 channels on the right (Channel 0-3) respectively correspond to the SD (SDA) and SC (SCL) pins, and are connected to different groups of I2C slave devices (such as Slaves A0, B0, etc.).

The master device can control the PCA9546A via I2C commands to select and turn on a specific channel, thereby establishing communication with the slave device on that channel. This enables the switching connection between 1 master I2C bus and 4 groups of slave devices, solving the problem of I2C address conflict among multiple slave devices.

2.2 Pin Definition

GraftSense - 4-channel I2C Multiplexer Expansion Module Based on PCA9546ADR (Open Version)
GraftSense - 4-channel I2C Multiplexer Expansion Module Based on PCA9546ADR (Open Version)

2.3 Functional Block Diagram

GraftSense - 4-channel I2C Multiplexer Expansion Module Based on PCA9546ADR (Open Version)

This is the functional block diagram of PCA9546A, which clearly illustrates its internal modules and signal interaction logic:

This entire block diagram corresponds to the core function of its "4-channel I2C bidirectional switch", while supporting auxiliary features such as reset, address configuration, and bus filtering.

2.4 Performance Parameters

GraftSense - 4-channel I2C Multiplexer Expansion Module Based on PCA9546ADR (Open Version)

This is the absolute maximum rating table for PCA9546A, the key points are as follows:

NOTE: Exceeding these rated values may damage the device, and these are stress parameters that do not imply the device can operate properly under such conditions; prolonged exposure will affect reliability.

GraftSense - 4-channel I2C Multiplexer Expansion Module Based on PCA9546ADR (Open Version)

This section contains PCA9546A 's ESD ratings and key points of recommended operating conditions:

GraftSense - 4-channel I2C Multiplexer Expansion Module Based on PCA9546ADR (Open Version)

This is the thermal information sheet for PCA9546A, which mainly presents the junction-to-ambient thermal resistance (in ℃/W) corresponding to its various 16-pin packages (DGV, DW, PW, RGV, RGY, D): RθJA. The thermal resistance values vary across different packages; for instance, the DW package has a value of 57, the RGY package has a value of 50, and the DGV package has a value of 120. This parameter represents the thermal transfer resistance between the device junction temperature and the ambient temperature. Different packages correspond to different thermal resistances, which directly affects the heat dissipation performance of the device.

GraftSense - 4-channel I2C Multiplexer Expansion Module Based on PCA9546ADR (Open Version)

This is the electrical characteristics table for PCA9546A, with the core key points as follows:

  1. Power-on reset voltage: VPOCR (when Vcc rises): typical 1.2V, maximum 1.5V;VPOCF (when Vcc falls): typical 1V; different thresholds correspond to different Vcc levels, which are used to reset the I2C bus logic during power-on.
  2. Switching Characteristics: Vpass (switch output voltage) has a corresponding range that varies with the Vcc range and load;RON (switch on-resistance) ranges from 4 to 45Ω under different Vcc conditions.
  3. Current parameters: IOL (SCL / SDA low-level output current) ranges from 3 to 10 mA;II (input leakage current) has a maximum value of ±1 μA for each pin;ICC (power supply current) is in the microampere range in operating mode, and the current in standby mode is even lower (minimum 0.7 μA), reflecting the low-power characteristic.
  4. Capacitance Parameters: Ci (input capacitance) is approximately 4.5~6pF;Cx (on)(capacitance when the channel is conducting) on pins such as SCL / SDA is 5~19pF.
GraftSense - 4-channel I2C Multiplexer Expansion Module Based on PCA9546ADR (Open Version)

These are the PCA9546A I2C interface timing requirements (Standard Mode), the key points are as follows:

GraftSense - 4-channel I2C Multiplexer Expansion Module Based on PCA9546ADR (Open Version)

This is the PCA9546A I2C interface fast-mode timing requirements, the key points (more efficient than the standard mode) are as follows:

GraftSense - 4-channel I2C Multiplexer Expansion Module Based on PCA9546ADR (Open Version)

This section covers PCA9546A the key points of reset timing and switching characteristics:

GraftSense - 4-channel I2C Multiplexer Expansion Module Based on PCA9546ADR (Open Version)

This section contains PCA9546A parameter measurement related information, the key points include:

GraftSense - 4-channel I2C Multiplexer Expansion Module Based on PCA9546ADR (Open Version)

This is the PCA9546A I2C interface voltage waveform diagram, which illustrates the actual timing characteristics of the SCL and SDA signals. The corresponding waveform positions are marked in the diagram for parameters including clock high/low time (t_scl / t_sch), bus idle time (t_buf), timing parameters related to start/repeated start/stop conditions (t_sth / t_sts / t_sps), and data setup/hold time (t_sds / t_sdh);The notes below supplement that the load capacitance includes the capacitance of the probe and the fixture, the characteristics of the generator for the input pulse, and the output adopts the mode of "single measurement for a single transition".

GraftSense - 4-channel I2C Multiplexer Expansion Module Based on PCA9546ADR (Open Version)

This is the reset timing waveform diagram of PCA9546A , showing the timing coordination of SCL , SDA and RESET signals: the figure wins the bidding for the RESET signal's tREC (recovery time from reset to start), tWL (low-level pulse duration), and tRST (delay time from RESET to SDA returning to high level); at the same time, it is associated with the signal stage of start conditions and ACK /read cycles, clearly showing the timing interaction of each signal during the reset process.

GraftSense - 4-channel I2C Multiplexer Expansion Module Based on PCA9546ADR (Open Version)

These three graphs are PCA9546A design reference curves:

2.5 Reference Circuit

2.5.1 Reference Circuit

In the following figure, the I2C master device connects to the SDA / SCL / RESET pins of the chip. Each of the 4 channels is connected to an independent pull-up resistor, and the chip address is configured via the A0/A1/A2 pins, so as to realize orderly communication management of multiple slave devices.

GraftSense - 4-channel I2C Multiplexer Expansion Module Based on PCA9546ADR (Open Version)

PCA9546A is a 4-channel I2C switch, which is primarily used to resolve address conflicts of I2C slave devices (for example, 4 temperature sensors with the same address are connected to 4 channels respectively, and the corresponding channel is enabled as needed to read data), and can also distribute bus capacitance (connect non-conflicting slave devices to multiple channels to reduce the load of a single channel).

It supports voltage conversion: pull-up resistors of different voltages can be connected to the master device and each channel; if the voltages are consistent, the turn-on voltage of the switch will be the same as the pull-up voltage, which facilitates adaptation to devices with different voltages.

2.5.2 Power Supply Requirements

GraftSense - 4-channel I2C Multiplexer Expansion Module Based on PCA9546ADR (Open Version)
GraftSense - 4-channel I2C Multiplexer Expansion Module Based on PCA9546ADR (Open Version)
GraftSense - 4-channel I2C Multiplexer Expansion Module Based on PCA9546ADR (Open Version)

PCA9546A has two power-on reset modes:

The above figure presents timing parameters such as the power supply falling/rise rate and power-on reset waiting time, as well as the voltage transition point of POR when Vcc rises/falls; it also indicates that power supply glitches will affect reset performance, so the width and height of glitches need to be controlled.

2.6 Chip Configuration

GraftSense - 4-channel I2C Multiplexer Expansion Module Based on PCA9546ADR (Open Version)

We can configure the chip address by configuring A0 to A2 to connect to GND / VCC.

2.7.1 Brief Introduction

GraftSense - 4-channel I2C Multiplexer Expansion Module Based on PCA9546ADR (Open Version)

PCA9546A is a 4-channel I2C bidirectional switch, whose core functions are based on the basic features of the I2C bus:

RESET reset pin is an active-low pin. When the pin is held at a low level for at least tWL (6ns in the previous table), the chip will reset the registers, I2C finite-state machine, and turn off all channels (restore the initial state of the bus):

Note at power-on reset:

2.7.2 Fundamentals of I2C Communication

We read from and write to I2C PCA9546A via its control register:

I2C is a two-wire (SDA / SCL, requiring pull-up resistors) bidirectional communication protocol. When the bus is idle, both lines are at a high level; during bit transmission, SDA must remain stable while SCL is at a high level. The falling/rising edge of SDA when SCL is high corresponds to the start (S) and stop (P) conditions respectively. The master device controls the bus, while the slave device responds. After every 8 bits of data, the receiver must send an ACK (pulling SDA low) for acknowledgment.

GraftSense - 4-channel I2C Multiplexer Expansion Module Based on PCA9546ADR (Open Version)
GraftSense - 4-channel I2C Multiplexer Expansion Module Based on PCA9546ADR (Open Version)
GraftSense - 4-channel I2C Multiplexer Expansion Module Based on PCA9546ADR (Open Version)
GraftSense - 4-channel I2C Multiplexer Expansion Module Based on PCA9546ADR (Open Version)
GraftSense - 4-channel I2C Multiplexer Expansion Module Based on PCA9546ADR (Open Version)
GraftSense - 4-channel I2C Multiplexer Expansion Module Based on PCA9546ADR (Open Version)
GraftSense - 4-channel I2C Multiplexer Expansion Module Based on PCA9546ADR (Open Version)

PCA9546A Device Address and Control Register Rules:

GraftSense - 4-channel I2C Multiplexer Expansion Module Based on PCA9546ADR (Open Version)

2.8 PCB Routing Precautions

GraftSense - 4-channel I2C Multiplexer Expansion Module Based on PCA9546ADR (Open Version)

PCA9546A PCB layout precautions are as follows:

III. Instructions for Circuit Engineering and Module Usage

3.1 Circuit Source Engineering

To obtain the source code of the circuit, please follow the official account [Freak Embedded]

3.2 Module Usage Instructions

The schematic diagram of this module is as follows:

SCH_4-Channel I2C Multiplexer Expansion Module Based on PCA9546ADR_v1.0_2025-11-26.pdf 2.3 MB

GraftSense - 4-channel I2C Multiplexer Expansion Module Based on PCA9546ADR (Open Version)
GraftSense - 4-channel I2C Multiplexer Expansion Module Based on PCA9546ADR (Open Version)

This module provides an I2C interface: simply connect the I2C interface of the MCU to the 4P communication interface on the left side of the module; then connect the I2C interfaces of other sensor modules to the four I2C interfaces on the right side of the module to complete the connection.

GraftSense - 4-channel I2C Multiplexer Expansion Module Based on PCA9546ADR (Open Version)
GraftSense - 4-channel I2C Multiplexer Expansion Module Based on PCA9546ADR (Open Version)

In addition to the basic interface connection operation, we can also complete the setting of the module's I2C address by soldering the short-circuit points on the back of the module — these short-circuit points correspond to the A2, A0, and A1 pins respectively, and different addresses can be configured by soldering as needed.

3.3 Application Experiment

Here, we use the GraftPort-RP2040 development board for testing, and we will mount a 4-channel I2C multiplexer expansion module with the PCA9546ADR chip to establish a communication connection with the main control unit via the I2C interface. Meanwhile, two types of functional modules are additionally connected to this expansion module:

Here, we first use the HY2.0-4P cable to connect the module to the GraftPort-RP2040 development board's I2C1 interface:

The module connections are shown in the following table:

Development Board Pins

Module Pins

Description

Pin 2

SDA

I2C data transmission line, corresponding to the I2C1 SDA

Pin 3

SCL

I2C clock signal line, corresponding to I2C1 's SCL

-

I2C0 - IIC device

Here we use the RTC real-time clock module based on the DS1307 chip with an address of 0x68

-

I2C1 - IIC Device

Here we use the 0.96-inch SSD1306-OLED module with the address of 0x3D

Here, we need to search for relevant driver packages on uPyPI: https://upypi.net/zh/

GraftSense - 4-channel I2C Multiplexer Expansion Module Based on PCA9546ADR (Open Version)

Enter pca9546_driver to search, and the following will be displayed:

GraftSense - 4-channel I2C Multiplexer Expansion Module Based on PCA9546ADR (Open Version)

Click to copy the local installation command:

GraftSense - 4-channel I2C Multiplexer Expansion Module Based on PCA9546ADR (Open Version)

Here, we can use the mip tool to import module driver library code. Below are the usage commands for the mpremote tool:

mpremote mip install github:FreakStudioCN/GraftSense-Drivers-MicroPython/misc/pca9546_driver

Import the 4-channel I2C multiplexer expansion module based on PCA9546ADR - MicroPython driver code, then copy the following main.py code into our project:

# Python env   : MicroPython v1.23.0
# -*- coding: utf-8 -*-
# @Time    : 2025/09/08 15:00
# @Author  : 侯钧瀚
# @File    : mian.py
# @Description : Example program of I2C multiplexing based on the PCA9546ADR 4-channel multiplexer
# ======================================== Import Modules =========================================
# Import MicroPython standard library modules
from machine import Pin, I2C
# Import the time module
import time

from pca9546adr import PCA9546ADR
# ======================================== Global Variables ============================================

# ======================================== Functions ============================================

# ======================================== Custom Classes ============================================

# ======================================== Initialization ==========================================
# Power-on delay of 3 s
time.sleep(3)
# Print debug message
print("FreakStudio: Testing PCA9546ADR4 I2C Multiplexer Modules")

# Initialize I2C bus
i2c = I2C(1, scl=Pin(2), sda=Pin(3))

pca = PCA9546ADR(i2c)


# ========================================  Main Program  ===========================================

while True:
    
    pca.disable_all()
    pca.select_channel(0)
    print("0 address",i2c.scan())
    
    time.sleep(4)
    
    pca.disable_all()
    pca.select_channel(1)
    print("1 address",i2c.scan())

To flash the code, open a terminal and use the mpremote tool to connect to the main controller; the output is as follows:

GraftSense - 4-channel I2C Multiplexer Expansion Module Based on PCA9546ADR (Open Version)

It can be seen that we are able to scan out the correct address on the specified channel;

4-channel I2C multiplexer expansion module based on PCA9546ADR has the address of 112, which is 0x70

0.96-inch SSD1306-OLED module, with the address being 61, i. e. 0x3D

RTC real-time clock module based on the DS1307 chip, with the address being 104, which is 0x68

IV. Drivers

pca9546_driver.zip 4 KB

None.

VI. Revision History

Document Version

Date of Revision

Modifier

Revised Content

v1.0

2025-11-26

Li Zisheng

Initialize the document

The BOM sheet has not been finally checked, the driver has not been re-verified, and the 3.3 application experiment

Not yet specified.

v1.1

2025-12-29

Li Zisheng

Added application experiments and production files

v1.2

2025-12-31

Xin Ruili

Create an open version of the document based on the internal document version v1.1.

v1.3

2026-03-29

Xin Ruili

Modified the application experiment section

VII. Relevant Materials

7.1 Chip Datasheet

pca9546a.pdf 2.8 MB

7.2 Unique Icons for PCB Silk Screen

GraftSense - 4-channel I2C Multiplexer Expansion Module Based on PCA9546ADR (Open Version)