Integrate hardware components with pluggable systems

Application Examples

In a typical application scenario, a small-board computer (SBC) or microcontroller controls several sensors and outputs the data on a display. System providers offer suitable HATs for this purpose – or shields for the Arduino world.

The SparkFun Qwiic HAT has four I2C connections, although your devices must be on different addresses [6]. The Grove HAT (Figure 4), on the other hand, offers different connections – an I2C, PWM, and UART each – as well as two digital connections with two connected GPIOs each and three analog-to-digital converters (ADCs) with two channels each. The HAT has its own microcontroller for analog input and is available for $10 (~EUR10) – and in a variant with even more connections for the large Raspberry Pi models. The ADC connector alone is worth the money. For a Pico, it is best to go for the Maker Pi Pico by Cytron with its six sockets [7].

Figure 4: A Grove HAT for the Raspberry Pi Zero.

The double push button in Figure 3 ($2.40/EUR2.20; $2.10/EUR1.90 as a single button) is clear evidence that the plugin system is useful for solder agnostics. The cost might seem quite high at first sight, in that typical 6x6mm buttons cost just a few cents; however, the Grove push button sits on a carrier board with a socket on the back, which means you can mount it easily in a housing. As a bonus, it comes with caps in different colors. Even if DIY is not rocket science, the time you save easily justifies the price.

Grove tags these components as optimized for assembly with a P suffix (for "panel"). The button is also available in a version with the connector pointing upward, which is ideal for prototyping. A mini-breadboard ($3.20/EUR3) is also intended for the same purpose (Figure 5). You can use it to test your own components. A fuse (aptly labeled FUSE on the board) protects the connection.

Figure 5: A mini-breadboard with Grove connector and fuse.

Adapter cables with Dupont plugs or sockets at one end provide an alternative to normal breadboards. You can use them to connect Grove devices directly to a Raspberry Pi or Pi Pico, and vice versa to connect existing sensors with classic pins to a Grove HAT. The other manufacturers also offer this kind of adapter cable.

If you want your device to have a permanent Grove connection, a small proto shield (Figure 6) offers the solution ($2.10/EUR1.90). Strictly speaking, you would still need voltage converters, but for your own tinkering, you can do without them as long as you know your device's limits.

Figure 6: Proto shield for a permanent Grove connection.

Assembly-optimized breakouts, a mini-breadboard, and the proto shield are good arguments for the Grove system, against which other manufacturers can't compete.

Conclusions

None of the plugin systems take the work of programming off your hands. However, you can concentrate fully on the software instead of being driven to despair by assumed programming errors that turn out to be bad connections after hours of troubleshooting. Nor do the manufacturers leave you high and dry with the programming: Each manufacturer provides wikis and sample code for its products. Seeed even gives developers a complete Python library [8] for Grove, which gives you a standardized way to control the sensors.

If you are not a hard core solderer or a penny-pincher, then it is definitely worthwhile investing in a cable. The system decision is more about the HAT (or the shield) than the sensors, which can be connected with an adapter cable. If you are a newcomer, Grove is the best choice. Seeed's system offers the greatest flexibility, and the connectors are more robust than those of the smaller alternatives STEMMA-QT and Qwiic, which are restricted to I2C.

The Author

Bernhard Bablok works at Allianz Technology SE as a SAP HR developer and likes to relax by listening to music, cycling, or going for walks. Besides this, he focuses on Linux-related topics, programming, and small-board computers. You can reach him at mailto:mail@bablokb.de.

Buy this article as PDF

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

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
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

News