Linux Format

SparkFun qwiic pHat

Les Pounder wants another slice of Raspberry Pi and he needs it real ‘qwiic’! Complaints about bad gags to the usual address…

-

Les Pounder wants another slice of Raspberry Pi and he needs it real ‘qwiic’!

Electronic­s with the Raspberry Pi’s GPIO are amazing, but at first it can seem exceptiona­lly daunting. The many wires and connection­s can scare many away, but once you get the hang of it the workflow becomes second nature. There are ways to simplify the wiring and one of those is the I2C protocol which uses only four wires to form a bus, with devices connected at addresses.

SparkFun’s qwiic pHat, designed for the Raspberry Pi Zero form factor but compatible with all 40-pin GPIO, provides four “qwiic” connectors which we can connect compatible devices to. Two of the connectors are mounted to the side of the board; the others are mounted in the centre pointing upwards. The board also has a 5V power terminal breakout for powering 5V components, and a push button connected to GPIO17. Around the perimeter there are mounting holes for M2.5 mounts and to secure qwiic-compatible components.

There is no specialist SparkFun software to install as the qwiic pHat is really just an I2C breakout board. All we need to do is enable the I2C interface in the Raspberry Pi Configurat­ion tool and we are ready to read devices. We dug around in our box of bits and found an Adafruit MPR121, which we used in a previous CircuitPyt­hon tutorial. Adafruit’s MPR121 has a Stemma QT connection, and right now you’re thinking that we’ve made a mistake. Not so, as Stemma QT and qwiic are one and the same interface. They both breakout I2C and are pin-compatible; all that is different is the brand name.

Stemma QT and qwiic components can also be chained together, as many of the components have connectors at two sides of the boards. As I2C uses a bus and address, as long as we don’t have clashing addresses we can chain multiple devices to one interface.

A quick CircuitPyt­hon install and our MPR121 was easily read by our Python code and detected touch inputs with ease. Qwiic/Stemma QT components are a little more expensive than their standard counterpar­ts, but what extra we spend in money we gain in time and ease of use. This makes them ideal both for the classroom and the makerspace.

So experience­d electronic­s experts will now be thinking that the qwiic pHAT is useful, but they already know I2C so this board isn’t for them. Well, yes and no. If you are comfortabl­e with I2C and can work with the pullup resistors and wiring necessary, go for it. But if you need a little help, or want to neaten up a project, then qwiic pHat is both useful and much safer than some of the wiring in projects we have come across. We can see qwiic pHat being used in education, embedded projects and art installati­ons for makers who want to get projects built and don’t have the time to mess around with I2C.

The biggest issue with the qwiic pHat is that we do not have access to the GPIO. This is more by design than anything else. SparkFun’s qwiic pHat is designed to make connecting devices simple, so why add the GPIO? A longer GPIO header would’ve been a nice addition, but if you are buying this, you will most likely understand and accept that decision. If you really need GPIO access, right now the best option is SparkFun’s £6 qwiic pHat for Raspberry Pi 400, which has two qwiic connectors and a full 40-pin GPIO. If you need just a single qwiic connector, the £1.20 qwiic SHIM fits directly to the GPIO using friction and provides a ‘qwiic; connection for smaller projects.

SparkFun’s qwiic pHat is a cost-effective and simple board that does one job exceptiona­lly well.

 ??  ?? SparkFun’s qwiic pHat works with both qwiic and Stemma QT boards from Adafruit, enabling access to many different add-ons.
SparkFun’s qwiic pHat works with both qwiic and Stemma QT boards from Adafruit, enabling access to many different add-ons.
 ??  ??
 ??  ?? Designed for the Pi Zero, qwiic pHat works with all 40-pin GPIO models of Raspberry Pi.
Designed for the Pi Zero, qwiic pHat works with all 40-pin GPIO models of Raspberry Pi.

Newspapers in English

Newspapers from Australia