Inquire: Call 0086-755-23203480, or reach out via the form below/your sales contact to discuss our design, manufacturing, and assembly capabilities.
Quote: Email your PCB files to Sales@pcbsync.com (Preferred for large files) or submit online. We will contact you promptly. Please ensure your email is correct.
Notes: For PCB fabrication, we require PCB design file in Gerber RS-274X format (most preferred), *.PCB/DDB (Protel, inform your program version) format or *.BRD (Eagle) format. For PCB assembly, we require PCB design file in above mentioned format, drilling file and BOM. Click to download BOM template To avoid file missing, please include all files into one folder and compress it into .zip or .rar format.
After years of hand-soldering dozens of sensor breakouts and watching beginners struggle with I2C wiring mistakes, I’ve become a firm believer in standardized connector systems. The STEMMA QT and Qwiic ecosystems have fundamentally changed how I prototype—and honestly, how quickly I can get projects working.
This guide covers everything you need to know about these plug-and-play I2C connection systems, including when to use an I2C multiplexer like the TCA9548 to handle address conflicts.
What is STEMMA QT and How Does It Work
STEMMA QT (pronounced “cutie”) is Adafruit’s standardized connector system for I2C devices. It uses JST SH 1.0mm pitch 4-pin connectors—the same physical connector as SparkFun’s Qwiic system, making them fully cross-compatible.
The beauty of Adafruit I2C STEMMA QT boards lies in the built-in level shifting and voltage regulation. Unlike raw Qwiic boards that operate strictly at 3.3V, STEMMA QT devices can safely connect to both 3.3V and 5V systems. This matters when you’re working with an Arduino UNO (5V logic) alongside modern 3.3V sensors.
STEMMA QT Connector Pinout
Pin
Function
Wire Color
1
GND
Black
2
VCC (3.3-5V)
Red
3
SDA (Data)
Blue
4
SCL (Clock)
Yellow
The pin order matches Qwiic exactly, so cables are interchangeable between systems.
STEMMA QT vs Qwiic vs Grove: Compatibility Guide
Multiple connector ecosystems exist in the maker space, and understanding their compatibility prevents costly mistakes.
Feature
STEMMA QT
Qwiic
Grove
Gravity
Connector
JST SH 1.0mm
JST SH 1.0mm
JST PH 2.0mm
JST PH 2.0mm
Operating Voltage
3-5V
3.3V only
3-5V
3-5V
Level Shifting
Built-in
None
Varies
Varies
Cross-compatible
Yes with Qwiic
Yes with STEMMA QT
No
No
Manufacturer
Adafruit
SparkFun
Seeed Studio
DFRobot
Critical note: While STEMMA QT and Qwiic use identical connectors, connecting a 5V Arduino directly to a Qwiic board can damage 3.3V-only sensors. STEMMA QT boards include protection circuitry that Qwiic boards lack.
Setting Up Your First Adafruit I2C Connection
Getting started with STEMMA QT requires minimal effort—that’s the whole point.
What You Need
Most modern Adafruit development boards include at least one STEMMA QT port. The Feather series, QT Py, and many CircuitPython boards have them built-in. For boards without native STEMMA QT ports, adapter cables convert standard 0.1″ headers to the JST SH connector.
Basic Wiring
Connect your microcontroller to the sensor using a STEMMA QT cable
That’s it—no breadboard, no loose wires, no wrong connections
The I2C bus allows daisy-chaining multiple devices. Most STEMMA QT sensor boards include two connectors specifically for this purpose. Connect your microcontroller to the first sensor, then chain additional sensors together.
Arduino Code Example
cpp
#include <Wire.h>void setup() { Serial.begin(115200); Wire.begin(); // Scan for I2C devices for (uint8_t addr = 1; addr < 127; addr++) { Wire.beginTransmission(addr); if (Wire.endTransmission() == 0) { Serial.print(“Found device at 0x”); Serial.println(addr, HEX); } }}void loop() {}
This scanner sketch identifies all connected I2C devices and their addresses—essential for troubleshooting.
Solving I2C Address Conflicts with the TCA9548 Multiplexer
Here’s where things get interesting. You’ve found the perfect sensor, ordered three of them for your project, and then realized they all share the same fixed I2C address. Standard I2C protocol doesn’t allow duplicate addresses on the same bus.
The TCA9548 (and its sibling the PCA9548) I2C multiplexer solves this elegantly. It creates eight separate I2C buses, each capable of hosting devices with identical addresses.
How the TCA9548 I2C Multiplexer Works
The multiplexer sits between your microcontroller and your sensors. It has a single I2C connection to your controller and eight separate I2C buses on the output side. By sending a single byte to the multiplexer’s address (default 0x70), you select which output bus becomes active.
Think of it as an electronic switch that connects your microcontroller to one sensor group at a time.
TCA9548 Specifications
Parameter
Value
Input Voltage
1.65V to 5.5V
Output Channels
8 independent I2C buses
Default I2C Address
0x70
Address Range
0x70 to 0x77 (configurable)
Maximum Bus Speed
400 kHz (Fast mode)
Arduino Code for TCA9548 Multiplexer
cpp
#include <Wire.h>#define TCAADDR 0x70void tcaselect(uint8_t channel) { if (channel > 7) return; Wire.beginTransmission(TCAADDR); Wire.write(1 << channel); Wire.endTransmission();}void setup() { Wire.begin(); Serial.begin(115200); // Scan each multiplexer channel for (uint8_t t = 0; t < 8; t++) { tcaselect(t); Serial.print(“Channel “); Serial.println(t); for (uint8_t addr = 0; addr <= 127; addr++) { if (addr == TCAADDR) continue; Wire.beginTransmission(addr); if (!Wire.endTransmission()) { Serial.print(” Found: 0x”); Serial.println(addr, HEX); } } }}void loop() {}
The tcaselect() function is the key—call it before communicating with any sensor to route traffic to the correct channel.
Expanding PWM Outputs with the PCA9685
While the TCA9548 handles I2C bus expansion, the PCA9685 addresses a different problem: limited PWM outputs. This 16-channel PWM driver communicates over I2C but outputs independent PWM signals for controlling servos, LEDs, or other PWM-driven devices.
PCA9685 Key Features
Feature
Specification
PWM Channels
16
Resolution
12-bit (4096 steps)
PWM Frequency
24 Hz to 1526 Hz
I2C Address
0x40 to 0x7F (configurable)
Output Current
25mA per channel (sink)
Chainable
Up to 62 boards (992 outputs)
The PCA9685 is particularly popular for robotics projects. A hexapod robot needs 18 servos minimum—far more than most microcontrollers provide natively. Two PCA9685 boards handle this easily using just two I2C pins.
Basic PCA9685 Servo Control
cpp
#include <Wire.h>#include <Adafruit_PWMServoDriver.h>Adafruit_PWMServoDriver pwm = Adafruit_PWMServoDriver();#define SERVOMIN 150 // Minimum pulse length#define SERVOMAX 600 // Maximum pulse lengthvoid setup() { pwm.begin(); pwm.setPWMFreq(60); // Analog servos run at ~60 Hz}void loop() { // Sweep servo on channel 0 for (uint16_t pulse = SERVOMIN; pulse < SERVOMAX; pulse++) { pwm.setPWM(0, 0, pulse); } delay(500); for (uint16_t pulse = SERVOMAX; pulse > SERVOMIN; pulse–) { pwm.setPWM(0, 0, pulse); } delay(500);}
Practical Applications and Project Ideas
Multi-Sensor Weather Station
Connect multiple environmental sensors via STEMMA QT:
BME280 for temperature, humidity, and pressure
VEML7700 for ambient light
SGP30 for air quality
SCD-40 for CO2 levels
All four sensors chain together with STEMMA QT cables, requiring zero soldering.
Robotic Arm with Multiple Servos
Using the PCA9685 with STEMMA QT connection:
Single I2C connection to the controller
16 independent servo channels
Smooth 12-bit positioning resolution
Expandable by chaining additional boards
Multi-Display Dashboard
Eight OLED displays with identical addresses become possible using the TCA9548 I2C multiplexer. Each display connects to a separate multiplexer channel, allowing individual addressing.
Confirm pull-up resistors exist (STEMMA QT boards include them)
Try a different cable—JST connectors can have intermittent contacts
Devices Detected But Not Responding
The scanner finds the address, but the sensor library fails:
Wrong I2C address in your code (some sensors have multiple address options)
Library expects a different sensor variant
Power supply insufficient for the sensor’s requirements
Multiplexer Channel Issues
When using TCA9548:
Always call the channel select function before accessing any sensor
Remember the multiplexer address (0x70) conflicts with some devices—change it using address jumpers
Only one channel can be active simultaneously unless you specifically enable multiple
Frequently Asked Questions
Can I mix STEMMA QT and Qwiic devices on the same bus?
Yes, but with caution. STEMMA QT devices include level shifting for 5V compatibility, while Qwiic devices expect 3.3V only. When using a 5V microcontroller, connect STEMMA QT devices directly, but use a level shifter or 3.3V regulator for Qwiic boards.
How many I2C devices can I connect to one Arduino?
The I2C protocol supports 127 unique addresses (0x00-0x7F), but practical limits exist. Bus capacitance increases with each device and cable length. Most projects work fine with 10-20 devices. For more, use an I2C multiplexer like the TCA9548 to create separate buses.
What’s the maximum cable length for STEMMA QT connections?
Standard I2C specifies 400pF maximum bus capacitance, which translates to roughly 1 meter of total cable length at 100kHz. For longer runs, reduce the bus speed or use an I2C bus extender. Keeping cables under 50cm works reliably in most cases.
Can I use multiple TCA9548 multiplexers together?
Absolutely. Each TCA9548 has configurable addresses from 0x70 to 0x77. With eight multiplexers, you can theoretically address 64 separate I2C buses—enough for 64 sensors with identical addresses. Practical projects rarely need this many, but the capability exists.
Do I need external pull-up resistors with STEMMA QT?
No. Adafruit I2C STEMMA QT boards include 10K pull-up resistors on SDA and SCL lines. Adding external pull-ups to a bus with multiple STEMMA QT devices can actually cause problems by making the combined pull-up resistance too low.
Choosing the Right I2C Expansion Strategy
Different projects call for different expansion approaches. Here’s my decision framework after working with these systems extensively.
When to Use a TCA9548 I2C Multiplexer
The TCA9548 makes sense when:
You need multiple identical sensors (temperature arrays, distance sensor grids)
Devices have non-configurable addresses
You want complete electrical isolation between sensor groups
The multiplexer adds minimal overhead—selecting a channel takes microseconds. For most applications, the switching time is negligible compared to sensor read times.
When to Use Address Configuration Instead
Many I2C devices offer configurable addresses through hardware pins or software commands. Before reaching for a multiplexer:
Check if your sensor has address selection pins (A0, A1, A2)
Some sensors support address changes via I2C commands
Newer sensor variants often expand address ranges
For example, the BME280 environmental sensor supports addresses 0x76 and 0x77 depending on the SDO pin state. Two sensors work on the same bus without any multiplexer.
Combining Multiple Expansion Techniques
Complex projects might combine approaches. A robotic system could use:
PCA9685 for servo control (addresses 0x40-0x5F)
TCA9548 for multiple identical distance sensors
Direct connections for unique-address sensors
The key is planning your I2C address map before wiring. I keep a simple spreadsheet listing every device, its address, and which bus or multiplexer channel it uses.
Best Practices for Reliable I2C Systems
Cable Management
STEMMA QT cables come in various lengths (50mm to 400mm). Use the shortest cable that reaches—excess cable adds capacitance and acts as an antenna for noise pickup. In electrically noisy environments (near motors or switching power supplies), consider shielded cables or shorter runs.
Power Distribution
Each I2C device draws current from the bus power lines. STEMMA QT cables carry this current through relatively thin conductors. For power-hungry devices (OLED displays, sensor arrays), consider:
Adding local decoupling capacitors near sensors
Using separate power feeds for high-current devices
Monitoring voltage at the end of long chains
Debugging Techniques
When I2C communications fail intermittently:
Run the scanner sketch repeatedly—unstable devices appear and disappear
Use a logic analyzer to capture actual bus traffic
Check for address conflicts systematically
Monitor power supply voltage under load
Final Thoughts
The STEMMA QT and Qwiic ecosystems have genuinely improved the prototyping experience. What used to require careful wire routing, proper pull-up resistor selection, and voltage level considerations now becomes a matter of plugging in cables.
When address conflicts arise, the TCA9548 I2C multiplexer provides an elegant solution. When you need more PWM outputs, the PCA9685 delivers sixteen channels over a simple I2C connection.
The standardization of these connector systems means sensors, displays, and driver boards from different manufacturers can work together seamlessly. That interoperability accelerates development and reduces the friction between having an idea and seeing it work on the bench.
For production designs, the same STEMMA QT devices often have castellated edges or through-hole pads for permanent soldering. The rapid prototyping connector becomes a bridge to more permanent implementations, making the ecosystem valuable beyond just initial development.
Inquire: Call 0086-755-23203480, or reach out via the form below/your sales contact to discuss our design, manufacturing, and assembly capabilities.
Quote: Email your PCB files to Sales@pcbsync.com (Preferred for large files) or submit online. We will contact you promptly. Please ensure your email is correct.
Notes: For PCB fabrication, we require PCB design file in Gerber RS-274X format (most preferred), *.PCB/DDB (Protel, inform your program version) format or *.BRD (Eagle) format. For PCB assembly, we require PCB design file in above mentioned format, drilling file and BOM. Click to download BOM template To avoid file missing, please include all files into one folder and compress it into .zip or .rar format.