qwiic - dwilson2547/wiki_demo GitHub Wiki

Qwiic is just a JST SH 4 pin cable

Qwiic Connectors

Qwiic (pronounced "quick") is a proprietary I2C connector system developed by SparkFun Electronics. It provides a standardized, polarized, and lockable connection system specifically designed for I2C communication between development boards and sensors. The Qwiic ecosystem eliminates the need for soldering and breadboarding when prototyping I2C-based projects.

Overview

Qwiic connectors feature:

  • 4-pin JST SH 1.0mm pitch connector
  • Polarized design prevents incorrect connections
  • Locking mechanism ensures secure connections
  • Standardized pinout across all Qwiic devices
  • 3.3V logic level operation
  • Hot-pluggable connections
  • Chainable/daisy-chain capable
  • Compact form factor suitable for small projects
  • Operating voltage: 3.3V
  • Operating temperature: -40°C to +85°C
  • Current rating: 1A per pin maximum

Connector Specifications

Physical Characteristics

Parameter Specification
Connector Type JST SH 4-pin
Pitch 1.0mm
Mating Height 1.5mm
Board Thickness 1.6mm (standard PCB)
Housing Color White (standard), Black (alternative)
Contact Material Phosphor bronze
Contact Plating Gold
Housing Material PA66 (Nylon)
Operating Force 0.3N insertion, 0.15N withdrawal
Mating Cycles 20 cycles minimum

Electrical Specifications

Parameter Value Notes
Voltage Rating 50V AC/DC Maximum
Current Rating 1A per contact Continuous
Contact Resistance 20mΩ maximum Initial
Insulation Resistance 1000MĪ© minimum At 500V DC
Withstanding Voltage 1000V AC 1 minute
Operating Temperature -40°C to +85°C Standard range
Storage Temperature -40°C to +100°C Non-operating

Pin Configuration and Layout

Standard Qwiic Pinout

Pin Signal Function Wire Color Voltage Level
1 GND Ground Black 0V
2 3.3V Power Supply Red 3.3V ± 0.3V
3 SDA I2C Serial Data Blue 3.3V logic
4 SCL I2C Serial Clock Yellow 3.3V logic

Connector Pinout Diagram

Qwiic Connector (Top View - PCB Side):
ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
│ 1   2   3   4   │
│ o   o   o   o   │
│                 │
ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜
 GND 3V3 SDA SCL

Cable View (Looking into plug):
ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
│                 │
│ o   o   o   o   │
│ 4   3   2   1   │
ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜
 SCL SDA 3V3 GND

Physical Layout:
Pin 1 (GND)  - Black wire  - Ground reference
Pin 2 (3V3)  - Red wire    - 3.3V power supply
Pin 3 (SDA)  - Blue wire   - I2C data line (bidirectional)
Pin 4 (SCL)  - Yellow wire - I2C clock line (from master)

I2C Signal Details

SDA (Serial Data)

  • Bidirectional data line
  • Open-drain configuration with pull-up resistors
  • Standard pull-up: 2.2kĪ© to 4.7kĪ©
  • Data valid when SCL is high
  • Data transitions when SCL is low

SCL (Serial Clock)

  • Clock signal generated by I2C master
  • Open-drain configuration with pull-up resistors
  • Standard pull-up: 2.2kĪ© to 4.7kĪ©
  • Clock stretching supported by slaves

Pull-up Resistor Configuration

Most Qwiic boards include 2.2kΩ pull-up resistors on SDA and SCL lines:

3.3V ----[2.2kΩ]---- SDA line
3.3V ----[2.2kΩ]---- SCL line

Qwiic Cable Types and Specifications

Standard Cable Lengths

Length Part Number Applications
50mm PRT-14426 Board-to-board, tight spaces
100mm PRT-14427 Short connections
200mm PRT-14428 Medium connections
300mm PRT-14429 Longer connections
500mm PRT-14430 Extended reach

Cable Specifications

Parameter Specification
Wire Gauge 28 AWG
Conductor Tinned copper
Insulation PVC
Cable Type 4-conductor ribbon
Bend Radius 5mm minimum
Temperature Rating -20°C to +80°C

Specialized Cables

Type Description Part Number Use Case
Right Angle 90° connector PRT-17260 Space-constrained mounting
Breadboard 4-pin header adapter PRT-14425 Breadboard prototyping
Grove Adapter Qwiic to Grove conversion PRT-15109 Grove ecosystem compatibility
5-Pin Adapter Adds interrupt/reset line PRT-17257 Advanced applications

I2C Communication Standards

Speed Modes Supported

Mode Clock Frequency Maximum Distance Applications
Standard 100 kHz 1m+ Basic sensors
Fast 400 kHz 0.5m Most Qwiic devices
Fast Plus 1 MHz 0.2m High-speed applications

Address Range

  • 7-bit addressing: 0x08 to 0x77
  • Reserved addresses: 0x00-0x07, 0x78-0x7F
  • Most Qwiic devices have configurable addresses
  • Address conflict resolution through hardware pins or software

Qwiic Ecosystem Components

Development Boards with Qwiic

Board Manufacturer Qwiic Connectors Features
RedBoard Qwiic SparkFun 1 Arduino Uno compatible
Thing Plus SparkFun 1 ESP32-based
Artemis Nano SparkFun 1 Ultra-low power
Raspberry Pi Hat SparkFun 4 Pi expansion
Micro:bit Carrier SparkFun 2 Educational platform

Common Qwiic Modules

Category Examples Typical I2C Addresses
Environmental BME280, SHT30, CCS811 0x76, 0x44, 0x5A
Motion MPU6050, LSM6DS3 0x68, 0x6A
Display OLED, LCD, 7-Segment 0x3C, 0x72, 0x71
GPS u-blox modules 0x42
RTC RV-3028, RV-8803 0x52, 0x32
ADC ADS1015, ADS1115 0x48-0x4B
Digital I/O PCA9534, TCA9548A 0x20-0x27, 0x70-0x77

Daisy Chaining and Bus Architecture

Simple Chain Configuration

ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”    ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”    ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”    ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
│ Master   │    │ Sensor 1 │    │ Sensor 2 │    │ Sensor 3 │
│ Board    ā”œā”€ā”€ā”€ā”€ā”¤ (0x76)   ā”œā”€ā”€ā”€ā”€ā”¤ (0x44)   ā”œā”€ā”€ā”€ā”€ā”¤ (0x5A)   │
│          │    │          │    │          │    │          │
ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜    ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜    ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜    ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜

Star Configuration with Multiplexer

                ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
                │ TCA9548A │
ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”    │    MUX   │    ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
│ Master   ā”œā”€ā”€ā”€ā”€ā”¤  (0x70)  ā”œā”€ā”€ā”€ā”€ā”¤ Sensor 1 │
│ Board    │    │          │    ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜
ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜    │          ā”œā”€ā”€ā”€ā”€ā”¤ Sensor 2 │
                │          │    ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜
                │          ā”œā”€ā”€ā”€ā”€ā”¤ Sensor 3 │
                ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜    ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜

Bus Loading Considerations

  • Maximum 400pF total bus capacitance
  • Each device adds ~10-20pF
  • Practical limit: ~20-30 devices per bus
  • Use I2C buffers or multiplexers for larger systems

Design Guidelines

PCB Layout Best Practices

  • Place Qwiic connector near board edge for accessibility
  • Use 4-layer PCB with dedicated ground and power planes
  • Keep I2C traces short and matched in length
  • Route I2C signals away from switching circuits
  • Include test points for debugging
  • Add mounting holes for mechanical stability

Standard Qwiic Board Dimensions

Size Category Width Ɨ Height Applications
Mini 12.7mm Ɨ 12.7mm Tiny sensors
Small 25.4mm Ɨ 25.4mm Basic modules
Standard 25.4mm Ɨ 38.1mm Complex sensors
Large 50.8mm Ɨ 50.8mm Breakout boards

Connector Placement Guidelines

  • Primary connector on top-left or top-right corner
  • Secondary connector for daisy-chaining (if space allows)
  • 2mm minimum from board edge
  • Consider cable routing and strain relief

Software Integration

Arduino Libraries

Popular Qwiic Arduino libraries:

// Environmental Sensors
#include "SparkFunBME280.h"
#include "SparkFunCCS811.h"

// Motion Sensors  
#include "SparkFunMPU9250-DMP.h"
#include "SparkFunLSM6DS3.h"

// Displays
#include "SparkFunOLED.h"
#include "SparkFunSerLCD.h"

// GPS
#include "SparkFun_u-blox_GNSS_Arduino_Library.h"

Basic I2C Communication Example

#include <Wire.h>

void setup() {
  Wire.begin();        // Initialize I2C as master
  Serial.begin(9600);
}

void loop() {
  Wire.beginTransmission(0x76); // Device address
  Wire.write(0xF4);            // Register address
  Wire.write(0x27);            // Data to write
  Wire.endTransmission();
  
  delay(100);
  
  Wire.requestFrom(0x76, 1);    // Request 1 byte
  if (Wire.available()) {
    byte data = Wire.read();
    Serial.println(data, HEX);
  }
  
  delay(1000);
}

Python Support (Raspberry Pi)

import smbus
import time

# Initialize I2C bus
bus = smbus.SMBus(1)  # Bus 1 on Raspberry Pi

# Read data from device
def read_sensor(address, register):
    return bus.read_byte_data(address, register)

# Write data to device  
def write_sensor(address, register, data):
    bus.write_byte_data(address, register, data)

Troubleshooting Common Issues

Connection Problems

Symptom Possible Cause Solution
Device not detected Loose connection Check cable seating
Intermittent communication Bad solder joints Reflow connector
Address conflict Multiple devices same address Change device address
Bus lockup SDA/SCL stuck low Power cycle system

Electrical Issues

Problem Cause Fix
Weak pull-ups Too many devices Add stronger pull-ups
Signal integrity Long cables/high speed Reduce speed or length
Power supply noise Inadequate decoupling Add bypass capacitors
Ground loops Multiple ground paths Use single ground reference

Debugging Tools

  • Logic analyzer for signal inspection
  • Oscilloscope for analog signal quality
  • I2C scanner sketch for device detection
  • Multimeter for voltage/continuity checks

Advantages and Limitations

Advantages

  • Plug and play: No soldering required
  • Standardized: Consistent pinout across ecosystem
  • Polarized: Prevents incorrect connections
  • Chainable: Multiple devices on single bus
  • Compact: Small form factor
  • Robust: Locking connector mechanism
  • Ecosystem: Large library of compatible modules

Limitations

  • Proprietary: SparkFun-specific system
  • Voltage limited: 3.3V operation only
  • Speed limited: I2C speed constraints
  • Cable length: Limited by I2C specifications
  • Mechanical: Limited mating cycles (20 typical)
  • Cost: More expensive than header pins

Compatibility and Alternatives

Compatible Systems

  • STEMMA QT (Adafruit): Uses same JST SH connectors
  • Grove (Seeed): Different connector, adapter available
  • Click Boards (MikroElektronika): Different standard

Migration Paths

  • Standard 0.1" headers with adapters
  • Direct I2C connection via breadboard cables
  • Custom PCB designs with Qwiic connectors

Assembly and Manufacturing

Connector Installation

  1. PCB Design: Include proper footprint and keepouts
  2. Stencil: Use appropriate stencil apertures for SMT
  3. Pick and Place: Ensure correct orientation
  4. Reflow: Follow JST recommended temperature profile
  5. Inspection: Check for proper seating and solder joints

Quality Control

  • Electrical testing: Continuity and insulation
  • Mechanical testing: Insertion/withdrawal force
  • Functional testing: I2C communication verification
  • Environmental testing: Temperature and humidity

Future Developments

Upcoming Standards

  • Higher speed I2C implementations
  • Power delivery enhancements
  • Smaller form factor connectors
  • Enhanced locking mechanisms

Ecosystem Expansion

  • More third-party manufacturers adopting Qwiic
  • Increased module variety and capabilities
  • Integration with IoT and edge computing platforms
  • Educational market growth

Safety and Compliance

Electrical Safety

  • Low voltage operation (3.3V)
  • Current limited by connector rating
  • ESD protection recommended on sensitive lines
  • Proper grounding essential

Regulatory Compliance

  • RoHS compliant materials
  • REACH regulation compliance
  • UL recognition available for connectors
  • CE marking for complete assemblies

Best Practices

  • Use appropriate wire gauge for current requirements
  • Implement proper strain relief
  • Consider environmental protection for outdoor use
  • Follow manufacturer's handling guidelines
āš ļø **GitHub.com Fallback** āš ļø