What you'll learn:
- What types of peripheral board form factors are available?
- What are Qwiic, Stemma, Grove, PMOD, XBee, and mikroBUS?
Do you have or know someone who has a development board like a BeagleBoard, Raspberry Pi, or Arduino (Fig. 1)? Then they probably need a peripheral module or two to enhance their system. Now each one of these has a specific set of add-on boards that only fit their form factor, but many have standard interfaces like USB and Ethernet. Some also include de facto standard expansion interfaces that provide access to a plethora of sensors and control modules.
Five popular, de facto interfaces include mikroBUS, Qwiic, Grove, Stemma, XBee and PMOD (Fig. 2). You want to make sure which of them are supported by the host processor board. However, in many cases there are expansion boards for each form factor that provide access to these. For example, SparkFun's Digi XBee Arduino Shield plugs into an Arduino-compatible board and provides access to XBee and Qwiic interfaces.
More Development and Single Board Computers
The modules can be stackable, although only power and I2C interfaces can be shared. Other interfaces need to be specific to one module. Many modules can't be stacked, requiring additional mikroBUS sockets for expansion. Multiple interfaces tend to be handy since the peripherals on the module can utilize the most appropriate one with the proper device drivers.
You may not find every peripheral you need in a mikroBUS form factor, but given its popularity, there are a lot of options to choose from. Availability of device drivers could be more of a challenge, although many have C code versions that can be adapted to most embedded programming environments.
Why Do I Need Qwiic, Grove, or Stemma?
SparkFun, Adafruit, and Seeed Studio are OEMs and distributors of electronic components and modules. They all have a similar set of I2C interface systems, Qwiic, Stemma, and Grove, respectively, to provide easy access to peripheral modules (Fig. 4). The 4-wire cabling provides the two I2C signaling channels plus 5- or 3.3-V power and ground.
One advantage of this approach is that the host doesn't necessarily need a matching header. It just requires a compatible I2C interface and a way to connect a cable to it. That end of the cable must match the host connector. The main differences betwen the three systems is the connector and possibly the voltage supply.
It's possible to incorporate modules from any of the sources assuming compatible cabling and voltages. Adapters, like the one in Figure 4 from Seeed Studio, bridges between Grove and Qwiic.
Many devices have a pair of connectors for building a daisychain. I2C is not the fastest interface, but it's one of the most flexible. Almost any I2C device can be easily patched into a system.
Drivers usually aren't required, as a generic I2C driver is sufficient. It's more an issue of mapping the device addresses to an application programming interface (API) for the device. Often, generic C code is provided to implement or support custom driver creation.
What is a PMOD?
Digilent's PMOD is another popular prototyping peripheral interface (Fig. 5) because of the ease of including it on a board.
PMODs have the advantage of simplicity, but it depends on users to match the host interface to the device. Connections are host- and device-specific, and incorrect connections can potentially damage the host or device.
One advantage with PMODs is the ability to use a simple ribbon table to connect the host to a device. A disadvantage is the inability to make a rugged connection. PMODs tend to not include mounting holes or other ways to fix the module in place. Often they simply hang off the host board, which is usually sufficient for lab work but not necessarily a good idea in the field.
PMODs tend to have a lot of support with both host boards and peripheral modules due to the simplicity of the interface. There may be multiple connectors on a host. Also, hosts can typically be configured to handle different PMOD interfaces using the reconfigurability available in many microcontrollers that allow for remapping of functions to different pins.
Device drivers tend to be device- and host-specific, too, if they exist. Often just the device description in terms of pins or ports is provided for non-serial interfaces. I2C support would be similar to Qwiic, while serial interfaces tend to have a protocol defined. Oftentimes, an AT-style serial protocol is used for many devices.
How Does XBee Work?
XBee (Fig. 6) comes by way of Digi International. It supports the company's wireless chip and module solutions. The interface has been adopted by many others primarily to support wireless chores. The number of pins are usually sufficient to hold a module in place; many systems employ it in production solutions. It's not as rugged as M.2 or Mini-PCIe.
XBee is interesting as it can be a host or device. Typically, the wireless devices are controlled by a host using an AT-style serial protocol on the serial interface pins. The other interfaces are available on some devices that act more like hosts driving or capturing the digitial or analog data.
What To Buy?
When it comes to ordering a peripheral module, you want to make sure you're very specific when asking someone to gift it. Likewise, if you're looking to stuff a stocking, then take the same care. It may not work even if it looks like it will connect to that Raspberry Pi or Arduino board.