What is Qwiic?
Qwiic is a convenient interconnection ecosystem for microcontrollers and related hardware. The typical application features a Qwiic equipped microcontroller along with one or more daisy-chained breakout boards. The purpose of Qwiic is reflected in the name as a play on the words “Qwick” and Inter-Integrated Circuit (I2C). The Qwiic breakout ecosystem ranges from a simple pushbutton interface to environmental sensors up to GPS receivers.
The Sparkfun redboard DEV-15123, as shown in Figure 1, is a representative Qwiic-equipped microcontroller featuring a Microchip (Atmel) ATMega328. The 4-pin JST connector is visible on the upper right-hand side of the Printed Circuit Board (PCB).
This FAQ was written by an engineer for students. Content is organized by experience level, starting with DigiKey logistics progressing to advanced topics such as data corruption. It concludes by identifying popular Qwiic alternatives that retain the breadboard-free benefits.
Figure 1: Image of a representative Qwiic microcontroller. The Qwiic JST connector is located on the top right-hand side of the PCB.
Where can I find Qwiic cables?
A variety of cables are offered by Digikey. We recommend short cables when possible, however, cables up to 1.6 ft (500 mm) are available.
You may be interested in the SparkFun Qwiic cable kit which includes a variety of cables as shown in Figure 2.
Figure 2: Image of Qwiic cables included in the SparkFun KIT-15081.
Where can I purchase Qwiic microcontrollers and breakout boards?
DigiKey offers a large number of devices from the Qwiic ecosystem. Start by locating the Expansion Boards, Daughter Cards category. Next, enter the term “qwiic” into the platform field as shown in Figure 3. Select all remaining products, and then press enter.
A similar process may be used to locate products from DigiKey’s Embedded MCU, DSP category
Figure 3: Select Qwiic components using DigiKey’s parametric search engine.
How many devices (nodes) may be connected to the Qwiic network and what is the maximum cable length?
The answer depends on several factors:
-
Real time performance: It takes time to communicate with each module. This delay can become significant when many modules are installed. This manifests as sluggish system response. Your microcontroller or network may not have the necessary resources to keep up with the real-world constraints.
-
Network constraints: As will be described later in this document, network speed and susceptibility to interference increase undesirably as the number of node increases.
-
Power constraints: The microcontroller provides power to all Qwiic modules. Many modules can overload the microcontroller boards regulator leading to unexpected thermal resets or even damaged equipment.
Tech Tip: It is good practice to construct a worst-case power budget for your Qwiic network. We calculate the sum of all module currents and then ensure that this is less than the microcontroller can deliver. Good engineering practice includes a derating factor to mitigate for unexpected operation and elevated temperatures. A reasonable starting point is to keep the current less that 50% of the microcontroller PCB rated current.
Tech Tip: Novice programmers are often encounter problems when implementing delays into their code. For example, many will use the Arduino delay( ) function or their platform-specific equivalent. This is undesirable as it cripples the microcontroller by effectively halting all activity. Non-blocking techniques should be implemented, as they allow the microcontroller to continue with tasks such as network communication while waiting for the delay to complete.
How can I add Qwiic if not natively supported by my microcontroller board?
The Quiic system is based on I2C which is supported by most microcontrollers. At a hardware level, you will need an adapter board such as the Spark Fun DEV-14495. The software may be more complex as you will need to configure and then interface your microcontroller’s I2C hardware. In some situations, this will be as simple as using the Arduino Wire library. In others, you may be able to use a Hardware Descriptive Language (HAL) or even direct control of the microcontrollers Special Function Registers (SFRs).
Figure 4: Image of the Spark Fun DEV-14495 Qwiic adapter board.
Tech Tip: Many microcontrollers feature more than one I2C peripheral. You could implement two Qwiic networks to accommodate additional devices and to lower the overall cable length. The Spark Fun DEV-14495 adapter would allow you to do this with relative ease.
What are the advantages of Qwiic?
When compared to traditional methods, Qwiic minimizes the wiring complexity by delivering both power and communications on a single connector. It takes a fraction of the time to use a Qwiic system when compared to the traditional board. This is facilitated by a 4-pin JST connector which includes wires for:
- 3.3 VDC
- GND
- SDA: Serial data
- SCL: Serial clock
The Qwiic advantage extends to the software. Most manufacturers provide libraries for the Qwiic board. An example is the Arduino Plug and Make Kit which features a collection of Qwiic equipped Modulino boards as shown in Figure 5. The “drivers” for these boards is loaded using the Arduino IDE’s library manager.
Figure 5: Image of the Arduino Plug and Make kit with 4 Qwiic Modulino installed boards.
What are the limitations of Qwiic
The Qwiic limitations reflect the underlying I2C communications protocol. This underlying dependency determines the data transfer speed, length of cabling, and total number of devices allowed on the network.
Signal Speed
Recall that I2C was originally designed over 40 years ago as a simplified method for on-board passing of information. Its dependency on open drain and open collector circuitry with corresponding pullup resistors makes signal transition slow relative to complimentary driver.
The situation degrades as additional devices are added. Capacitance from each device plus cable capacitance slows down the signal transition. This is a known problem, therefore the Qwiic clock signal is often throttled down to the 100 kHz frequency.
Signal corruption
The Qwiic system with its I2C signals is susceptible to interference. For example, running a Qwiic cable next to a motor’s power cable invites data corruptions as the magnetic energy from the motor’s cable bleeds into the communication cable. Be sure to isolate communication and power cables. Also, cross cables at right angles to minimize the interference associated with coupled magnetic fields.
Tech Tip: Consider using an RS-422/485 when signal corruption is anticipated. The twisted pair wire along with balanced signal can operate over long distance with good noise rejection. For critical application, consider using fiber optic connections.
Bandwidth
In this context, the term bandwidth refers to the amount of data that may be shared on a Qwiic network. Each network device consumes a certain amount of time. For example, in Figure 6 we can examine the beginning portion of the frame used to communicate with the Arduino Pixels Modulino. With a 100 kHz clock, this frame takes about 3 ms to transfer. By itself, this is not significant. However, many such devices can lead to a sluggish real-time system.
Figure 6: Portion of I2C frame destined for the Arduino Pixels module initiated by the show( ) method The frame starts with the default Pixels 0x6C address.
What are the alternatives to Qwiic?
Previously, we defined Qwiic as a fast and easy platform from which we can explore a variety of breakout boards for microcontroller related devices. We also identified some of the limitation of the Qwiic system based on the underlying I2C technology.
All things considered; speed is a limitation of the Qwiic system. Consequently, there are limits to the range and performance of the devices featured on the Qwiic breakout boards. For example, we can certainly find an I2C Analog to Digital Converter (ADC). However, it will not be a high-speed device. Contrast this with a Serial Peripheral Device (SPI) ADC which could operate perhaps 25 to 100 times faster. For improved performance, a parallel output ADC may be used. With proper attention to signal termination, we could gain another 25 to 100 times improvement.
Tech Tip: As a rule of thumb, I2C is used for slow communication across many devices. SPI is used for fast communication for a few (preferably one) devices. A typical I2C clock is in the 100 kHz range while a SPI may operate at 10 MHz. SPI is also faster as it does not have the address overhead of I2C.
Qwiic-adjacent alternatives
There are several different Qwiic-adjacent systems including Gravity (DFRobot), Grove (Seeed Studio), and STEMMA (Adafruit). These systems do not differ significantly in term of speed as they all use the I2C interface; they are Qwiic adjacent in performance. A description of those systems is beyond the scope of this article.
MikroBUS alternative
The MikroElektronika MikroBUS, with its 8-pin connector, offers a distinct speed advantage. While individual breakout boards may still use I2C, the manufacturer may also use the faster SPI interface. An example is the MikroElektronika ADC 23 CLICK featuring the Texas Instruments ADS127L11 as shown in Figure 7.
Figure 7: Image of the MikroElektronika ADC 23 CLICK featuring the MikroElektronika MikroBUS 8-pin bus.
Pmod alternative
Digilent Pmod system provides easy-to-use breadboard-free breakout boards. They also have a device dependent mix of I2C and SPI interfaces. The Digilent PmodAD5 as shown in Figure 8 is a representative device. This is a breakout board for the Analog Devices AD7193.
Figure 8: Image of the Digilent PmodAD5 featuring the 6-pin Pmod connection.
Feather and FeatherWing alternative
The Adafruit Feather products provide a compact stackable assembly. A representative feather product is shown as Figure 9. This Adafruit 3231 features a SPI interface for the RF Solutions RFM95W LoRa modem.
Figure 9: Image of the Adafruit 3231 Featherwing LoRa modem. This module features a SPI connection.
Other
Our list could certainly be expanded. However, the previously mentioned devices are the most popular when we include the “easy” and “beginner” stipulation. For example, we could talk about Field Programmable Gate Arrays (FPGA) and the associated FPGA Mezzanine Card High Pin Count (FMC HPC), however, such devices are no longer in the beginner category from a complexity and a cost perspective.
Parting thoughts
The Qwiic ecosystem provides an easy-to-use breadboard-free method of test driving a variety of microcontrollers and microcontroller accessories. The ease of use of expanded by the large number of supporting software libraries. These attributes allow a novice programmer to quickly stand up new projects.
There are limitations to this popular system related to the underlying reliance on the 40-year old I2C protocol. Advanced user may wish to expand to faster SPI based technologies such as MikroBUS, Pmod, and Feather. Alternatively, some students (looking at you EE) could benefit from breadboard construction and design of their own PCBs.
Please give a thumbs up if you found this information useful.
Also, you could help us expand this FAQ by adding your Qwiic related questions in the comments section below.
Best wishes,
APDahlen
Related information
Please follow these links to related and useful information:
About this author
Aaron Dahlen, LCDR USCG (Ret.), serves as an application engineer at DigiKey. He has a unique electronics and automation foundation built over a 27-year military career as a technician and engineer which was further enhanced by 12 years of teaching (interwoven). With an MSEE degree from Minnesota State University, Mankato, Dahlen has taught in an ABET-accredited EE program, served as the program coordinator for an EET program, and taught component-level repair to military electronics technicians. Dahlen has returned to his Northern Minnesota home and thoroughly enjoys researching and writing articles such as this.