Integrate hardware components with pluggable systems

Plugged In

© Lead Image © dmitr1,

© Lead Image © dmitr1,

Article from Issue 259/2022

Ecosystems with pluggable Raspberry Pi modules, sensors, and displays are a great choice if you don't want to – or can't – solder but still want to extend your hardware.

If you use your Raspberry Pi to control sensors or displays, you will frequently have to deal with wiring problems or resort to using a soldering iron. Plug-and-play systems such as Adafruit STEMMA-QT [1], Seeed Grove [2], SparkFun Qwiic [3], and DFRobot Gravity [4] provide connection systems for electronic components. A system recently introduced by Tinkerforge [5] can also be plugged together, but it plays in a different league, because it comes with an additional microcontroller for management tasks on each module.

The systems I will discuss in this article offer special cable connections on the devices (Figure 1). Common to all systems are reverse-polarity-proof connectors and symmetrical cables. In other words, the cable has connectors that look identical on both sides, but they are not the same internally and only fit one way. Cables also are color coded, but this is not significant from a technical point of view.

Figure 1: Connection types in the Adafruit (STEMMA/STEMMA-QT, left), SparkFun (Qwiic, center), and Seeed (Grove, right) systems.

Advantages and Disadvantages

Even though you have four manufacturers with four different pluggable systems, you do not have to make a decision and be tied to one ecosystem. However, caveat emptor still applies; I will look at the details a little later.

First, I'll look at the obvious advantages. Of great importance is the stable connection: The pluggable systems are self-locking, which is helpful not only during prototyping, but later when building solutions, as well. Even the classic jumper cables with Dupont connectors can sometimes come loose inside a housing, especially when exposed to vibrations or shocks.

The standardized connections offer another advantage. The widely used inter-integrated circuit (I2C) is standardized on the bus, but each breakout comes with its own sequence of voltage, ground, SDA, and SCL, usually because of the arrangement of the pins on the installed chip. The connector systems put an end to this setup; as a user, however, this convenience comes at the price of a larger breakout and more complicated cable routing.

Cable Only?

On closer inspection, the different systems are surprisingly compatible. The oldest system, Grove (2010), uses a proprietary four-pin connector with a pin spacing of 2mm. Adafruit's STEMMA connectors (2014), on the other hand, rely on four- or three-pin JST-PH connectors, a widely used system. However, Japanese solderless terminals (JST, although they were developed in Germany) is not a standard. Adafruit only rarely uses the original STEMMA; sensors in particular are only available with STEMMA-QT, which I'll get back to later.

The four-pin STEMMA connector is intended for I2C and the three-pin variant for pulse-width modulation (PWM)/analog/digital connections. The four-pin STEMMA is in principle cable-compatible with Grove thanks to an identical pin-out sequence, as well as with Gravity from DFRobot through the three-pin connection. STEMMA connectors – contrary to Adafruit's claim – do not match up with Grove connectors. Adapter cables can be made very easily, though.

To use the right terms, the plugs are the things with pins that sit on the components, whereas the connector on the cable is a socket, although this terminology is counterintuitive and not what people actually call them; thankfully, what people mean is usually clear from the context.

The small STEMMA variant, known as STEMMA-QT (2017), uses the JST-SH connector, with a pin spacing of only 1mm. QT (cutie) is an intentional play on words. The advantage of STEMMA-QT is that it takes up less space on the breakouts, which is offset by the disadvantage that the smaller connectors cannot handle as many plugging operations. JST does not publish an exact number, but it will be somewhere in the double-digit range.

Adafruit deliberately chose the STEMMA-QT connector format to be compatible with SparkFun's Qwiic (2017), both of which are limited to I2C only.

At the cable level, the systems from the four manufacturers form two groups: STEMMA, Grove, and Gravity use large connectors with 2mm spacing, and STEMMA-QT and Qwiic use JST-SH connectors with 1mm spacing. Adapter cables or special breakouts with matching connectors convert between the individual systems (Figure 2).

Figure 2: A Grove hub with a Qwiic connector.

Fine Differences

Mechanical compatibility is not everything. For example, sensor and breakout components will only work with 3.3V or 5V. A normal BME280 sensor breakout (3.3V) will therefore not work on an Arduino Uno (5V) without a voltage converter; therefore, STEMMA-, Grove-, and Gravity-compatible controllers or devices come with voltage converters so that, as a user, you don't have to worry about the voltage. Qwiic only supports the 3.3V variant, so Qwiic sensors will not work with 5V microcontrollers.

Both Grove and Gravity use the four-pin connector for more than just I2C. For example, Grove has a double push button (Figure 3) on offer, but because STEMMA only supports I2C, there is little point in plugging a button like this into a STEMMA HAT (a hardware attached on top add-on board). The same is true for Gravity devices with a universal asynchronous receiver/transmitter (UART) connection.

Figure 3: A double push button from the Seeed Grove portfolio.

All in all, however, the differences between the systems are not so major that hobbyists have to commit for all time. You can pick and choose components to suit needs and availability. Many I2C components are on offer simply because of SparkFun, with its more than 150 components. Apart from I2C, however, things look a little more sparse, because Adafruit does not offer much in terms of three-pin products, and DFRobot's Gravity components are difficult to get in Germany – which is why I chose Grove.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • PCIe SSDs

    A PCIe SSD can accelerate your system considerably, but you need to do your homework and choose the right product for your computer.

  • Rasp Pi Symfonisk

    Build open software, open hardware smart WiFi speakers for the home with the Sonos and Ikea Symfonisk.

  • Pi Zero USB Gadget

    In just a few simple steps, you can turn a Pi Zero into a universal USB flash drive that emulates storage, a serial port, Ethernet, and more.

  • Perl: Arduino Project

    With a few lines of self-written firmware and a simple Perl script, Perlmeister Mike Schilli trains one of his Linux computers with a plugged in Arduino board to switch electrical equipment on and off using a relay. Enchanting.

  • Ubuntu Notebook: HP NC4200

    Linux often requires several kernel patches, or even Windows drivers, to work properly on a portable computer. HP originally intended to market their NC4200 notebook with Ubuntu, so they went the extra mile to get the system working with Linux.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More