Modules
Adding a Qwiic/I2C Connector to Your Board
Add a Qwiic I2C connector with the correct JST-SH pinout, 3.3 V power, calculated pull-ups, a verified footprint, bus protection, and scope tests.
Published Updated
Qwiic is a defined 3.3 V interface
Qwiic standardizes a four-wire I2C connection on a 1.0 mm-pitch, four-position JST-SH-style connector. The board-side reference part is commonly SM04B-SRSS-TB(LF)(SN) or an equivalent with the same mating geometry. The electrical order is:
Pin 1 GND black
Pin 2 3.3V red
Pin 3 SDA blue
Pin 4 SCL yellow
Verify that order against the current Qwiic drawing and the exact connector datasheet. A footprint viewed from the solder side can look reversed relative to a cable viewed from the mating side. Pin numbers, not left-to-right appearance, are the source of truth.
Qwiic means the connector-side bus is 3.3 V. A 5 V MCU or sensor needs level translation and suitable power conversion on its own board. Do not put raw 5 V on the red wire and label it Qwiic. Interrupt, reset, and address-select signals are not part of the four-pin connector; expose them separately if needed.
Decide who provides pull-ups
I2C SDA and SCL are open-drain lines. Devices pull them low; resistors return them high. The bus needs pull-ups somewhere, but every attached module does not need another pair. If a controller board and four sensor boards each fit 4.7 kΩ, the effective resistance is:
R_effective = 4.7 kΩ / 5 = 940 Ω
I_low = 3.3 V / 940 Ω = 3.5 mA approximately
That may exceed what a low-power device can sink at the required low-level voltage. Conversely, one 10 kΩ pair on a long, high-capacitance cable may rise too slowly for 400 kHz operation.
Calculate a range rather than copying 4.7 kΩ automatically. For a first-order RC bus estimate, the 30%–70% rise time is:
t_r ≈ 0.8473 × R_pullup × C_bus
R_max ≈ t_r(max) / (0.8473 × C_bus)
R_min ≈ (VDD - V_OL(max)) / I_OL
Use the I2C-mode rise-time limit and each device’s sink-current specification from its datasheet. As an example, a 200 pF bus with a 300 ns rise-time target gives R_max ≈ 1.77 kΩ. That does not mean 1.8 kΩ is always right: connector/cable capacitance may differ, devices may not sink the resulting current, and a 100 kHz bus permits more rise time.
A practical controller board can fit pull-ups through solder jumpers or use marked DNP footprints. Document the default. If the board has two Qwiic connectors for daisy-chaining, they are the same electrical bus and still need only one intentional pull-up network.
Budget connector power
The 3.3 V pin usually powers small sensors, not motors, heaters, servos, or LED strips. Add the worst-case current of every possible chained board, include startup and measurement peaks, then compare it with the regulator, connector, cable, and trace limits. SparkFun gives 226 mA as a conservative cable limit; a product should choose its own lower documented budget where voltage drop or hot-plug stress matters.
Place local bypass capacitance near the connector-fed device. A large capacitor on every add-on can create significant inrush when a cable is attached. If hot plugging is expected, consider a current-limited load switch on the controller’s Qwiic 3.3 V output. Do not let the Qwiic rail back-power an unpowered MCU through SDA/SCL protection diodes; check device I/O behavior and use a bus switch or isolator when power domains can be off independently.
The decoupling capacitor guide explains why the sensor needs local charge even though the controller already has bulk capacitance.
Protect an externally accessible bus
I2C was designed for short board-level connections. A cable adds capacitance, picks up noise, and creates an ESD path. Keep cables short and lower the clock rate if waveforms are marginal. For a connector users can touch, consider a low-capacitance ESD array on SDA and SCL and protection/current limiting on 3.3 V.
Place the protector at the connector with a short ground return. Check leakage: ultra-low-power sensors and large pull-ups can be affected by a protection device that looks harmless at room temperature. Avoid large series resistors that combine with bus capacitance to slow edges; small damping resistors are a measurement-driven option, not a substitute for correct pull-ups.
For long runs, noisy machinery, or cables leaving the enclosure, use a differential I2C extender, isolated interface, or a protocol intended for cables. A connector family does not change I2C’s electrical limits.
Build and audit the KiCad footprint
Use the exact connector’s recommended land pattern. Check pad size, solder-mask openings, courtyard, insertion direction, body overhang, and the cable’s bend space. Side-entry JST-SH parts often sit at a board edge; a connector placed behind a tall enclosure wall can be electrically perfect and unusable.
In KiCad:
- Give the schematic symbol numbered pins
1 GND,2 +3V3,3 SDA,4 SCL. - Assign the verified four-pad footprint.
- Put a keepout or mechanical note where the mating plug and cable need space.
- Add silkscreen labels
GND 3V3 SDA SCLif space permits. - Inspect front, back, and 3D views, then print at 1:1.
Do not trust a generic “JST 4-pin” footprint. JST-PH, GH, SH, and other families have different pitches and mating parts. Connector errors are prominent on the list of PCB mistakes that cause respins because a bodge rarely fixes the mechanics.
Verify with instruments, not only a bus scan
Before attaching a sensor, check pin order and measure 3.3 V between pins 2 and 1. With power off, confirm neither SDA nor SCL is shorted to a rail. Attach one known-good sensor and run an address scan at 100 kHz, then at the intended speed.
Use an oscilloscope at the farthest connector. Measure low level, high level, and rise time with the maximum planned cable and devices. Repeat while connecting and disconnecting other modules. Confirm that the board starts when no sensor is attached, that duplicate addresses are handled, and that a powered add-on cannot energize the main board unexpectedly.
If the carrier is ESP32-based, reserve non-strapping GPIO for the bus as described in ESP32-C3 carrier basics. A status indicator can help field diagnosis, but calculate it with the status LED resistor method so it does not consume more power than the sensor chain.