Raspberry Pi HATs for your real-world prototype

In today’s internet age, you can learn how to fix your car, master a programming language and even earn an electrical engineering degree, without ever leaving home

In today’s internet age, you can learn how to fix
your car, master a programming language and even earn an electrical engineering
degree, without ever leaving home. If you want to apply this knowledge to make
something entirely new, you can design and order custom product PCBs online and
have them delivered in a few days.

Along with this knowledge and rapid manufacturing
capabilities, there are a wide variety of ready-made computing solutions
available, such as Arduinos, BeagleBoards
and several flavors of the Raspberry Pi. You can create and load custom
computing programs for these with standard USB interfaces, but what if you want
them to physically do something?
For prototyping new accessories or uses, each of these systems features
expansion boards to help you with this task.

Building with the Raspberry Pi

In the Raspberry Pi’s case, these expansion
boards are known as HATs (Hardware
Attached on Top). This moniker is often used
liberally, but in its strictest sense,
it’s defined by the Raspberry
Pi Foundation as a 65 x 56-millimeter board with an EEPROM
chip that helps the Pi load the proper drivers for the device.

Other less official standards include the pHAT
(partial HAT, also known as a Bonnet), which is optimized to fit on a Pi Zero,
and SHIMs (Shove Hardware in the Middle), which tend to be small breakouts for
specific purposes, like easy battery integration. These boards can help you
take your idea to something physical that can be tested out before moving it to
production—or as a one-off for your personal use.

You might
be thinking that this sounds good if the Raspberry Pi was more than a
toy for powering retro arcade systems or even something best used for
education. While those are both popular and legitimate uses, Pi boards can be
found in a variety of roles, even going so far as to be used as hardened industrial
PCs.

Sfera Labs, for example, sells a line of Raspberry Pi HATs/enclosures that are DIN rail
mountable and feature communication via RS-232 and RS-485, along with a
real-time clock. One version even features a single relay output for limited
direct control of machinery. Other exciting options include the DIN
rail-mountable Revolution Pi and ThreeML’s
Rhubarb
IO breakout. For even more possibilities, the ComfilePi acts
as a Pi-based panel PC.

Since much of the production machinery in use
today is custom-made, each of these accessories can function as real-world
Raspberry Pi prototyping tools in their own right. If you’re not looking to
monitor or control industrial machinery, there are other HATs more suited
towards independent inventors who want to make their ideas a reality. Here are a
few examples to get you started.

Prototype HAT

In very early development and experimentation
with Raspberry Pi boards, you would normally run wires from the GPIO pins to an
external breadboard, allowing it to interact with lights, sensors and other peripherals.
When you need to move on to something semi-permanent, you'll want actual
soldered connections.

For a compact solution that sits on top of the
Raspberry Pi itself, go with a prototype HAT. Because it fits on top of the Pi,
the prototyping area is rather small, so it works best when you only need to
control a few external devices. Also, these boards are technically only
"HAT-like," as they don't normally include an EEPROM chip, per the
official specification.

Analog HAT

The Raspberry Pi comes with a variety of GPIO
pins but no analog inputs. This can be critical if you need more than a simple
on/off signal, so naturally, there's a HAT for that. Some Analog HATs follow
the "almost-HAT" paradigm—they don’t feature an EEPROM chip, but are
still easily compatible with Python.

Automation HAT

For a HAT that “does it all,” the Automation
HAT fits the bill. It features four analog-to-digital converters to sense the
environment, along with channel indicator LEDs for easy diagnostics and a trio
of relays and other IO capabilities. Best of all (depending on your use case),
it breaks each pin out into 3.5-mm screw terminals, which means you don’t have
to solder external components into place and can change them around with a few
twists of a screwdriver.

Sense HAT

For another very versatile board (albeit
without the relay abilities of the Automation HAT), the Sense HAT is another
great option. Notably, this device was sent to the International Space Station
in 2015, but it works quite well in many terrestrial roles. It features an 8x8
RGB LED matrix for feedback, along with a tiny joystick and several sensors to
take in data about its environment.

Retro Built Games

Of course, it’s possible to come full-circle on
the “toy” argument, as there’s no reason this can’t also be a business. Ryan
Bates, for example, has created his own
niche on the internet with Retro Built Games. He sells kits to make miniature
arcade cabinets meant to be used with
Raspberry Pi boards, as well as other similar electromechanical machines and
accessories.

Whether you need to monitor industrial
machinery, make a prototype of your next million-dollar idea or even build the
custom arcade cabinet that you've been dreaming of since the late ’80s, there's
a Raspberry Pi HAT that can help.

Zach Wendt is a mechanical engineer
with Arrow Electronics, a major supplier of Raspberry Pi products. Jeremy S. Cook is an engineer
who has worked in manufacturing automation and writes for a variety of
technical publications.