Tag Archives: hardware attached on top

Types of HATs suitable for the Raspberry Pi

Among several versions of the low-cost, versatile, single board computer, the credit card sized Raspberry Pi or RBPi as it is commonly called, the latest is the Model B+. Along with many new features, the RBPi Model B+ is designed to make intelligent use of expansion cards. Keeping in view of the appendage called a β€œhat” that many people place on their heads, the RBPi too has expansion cards known as HATs. These are Hardware Attached on Top, and they work by sitting atop the single board computer.

In reality, the RBPi is a bare-bones computer, where only the most essential peripherals are present on-board. This not only helps to keep the prices down, but also allows the primary user to start work with the SBC without being unnecessarily distracted. The primary objective for the makers of the RBPi was to let school children learn about computer programming. The RBPi achieves this objective excellently by allowing the students to start with the bare minimum requirements. They progress by using different HATs to get additional functionality. The advantage is the RBPi behaves as the revolutionary fundamental building block on which widely differing concepts can be easily proven.

Any sort of physical computing with the RBPi generally necessitates setting up extra hardware. Instead of soldering the components directly to the GPIO pins, it is prudent to add the necessary hardware in the form of an expansion card or a HAT, which you simply plug in. To use the HAT, the user has to modify the software suitably, mainly by installing the required drivers and configuring them.

The original models of the RBPi, the A and B, are really not conducive for expansion boards. The 26-pin ribbon cable connector provided on-board offer only the GPIO pins. However, several companies have made expansion boards suitable for direct plug-in to the connector, and they sit on the RBPi, making an electronic sandwich.

With introduction of the RBPi Model B+, the most noticeable change was the transformation of the GPIO connector to a 40-pin PCB header. The first 26 pins of the new header have remained identical to those on the models A and B – maintaining backwards compatibility. That allows HATs developed for the older models to be also used on the RBPi Model B+. The Model B+ has two new pins, ID_SD and ID_SC to allow connecting a serial EEPROM. That allows proper identification of the HAT and RBPi can load the necessary drivers for it. Therefore, as long as the manufacturer designs the HAT or the expansion board correctly, RBPi can configure it automatically.

The Raspberry Pi Foundation has issued specifications that all boards should follow for compatibility with the new model. According to these specifications, an expansion board can be called a HAT only if the board supports the two new pins and has an EEPROM for identification. This identification must include information about the vendor, the GPIO map and the device tree. The board must also conform to the mechanical dimensions specified and not overload the power supply of the RBPi. However, HATs need only meet the minimum specifications, which leave plenty of scope for innovation and stacking.

An Explorer HAT Pro for the Raspberry Pi

If you are looking for a HAT or Hardware Attatched on Top for your Raspberry Pi (RBPi) that has motor and touchscreen drivers, integrated sensors and interfaces with 5V devices, the Explorer HAT is for you. Standard add-on board HATs allow the Linux-ready SBC, the RBPi, to configure its GPIO signals and drivers to control and use external devices.

Pimoroni has two models of HATs for the RBPi – the Explorer HAT and the Explorer HAT Pro. They support the HAT standard set by the Raspberry Pi Foundation, matching requirements for the RBPi 2 Model B, including the first-generation Model B+ and Model A+ boards as well.

To integrate inputs from 5V Trinkets or Arduino boards, the Explorer HAT offers four buffered 5V inputs. In addition, four powered 5V outputs on the board can supply 500mA to drive stepper motors, relays and or solenoids. The Explorer HAT also has a mini-breadboard, four capacitive touchpads, four LEDs and four capacitive alligator clips.

In addition to all the above features of the Explorer HAT, the Explorer HAT Pro has analog inputs and two motor drivers in H-bridge configuration to drive micro-metal geared motors and similar. The Explorer HAT Pro also comes with plenty of 3v3 features from the GPIO. However, these are unprotected.

According to the specifications defined for the Explorer HAT, each board has four inputs each 5V tolerant including 5-channel buffers with 2-5V support. There are four 5V powered Darlington-array outputs capable of 500mA per channel, limited to 1A total. The front edge of the board has four capacitive touch pads along with four LEDs, controlled independently. Including the mini-breadboard, the dimensions of the Explorer HAT are 65x56x13mm.

The Explorer HAT Pro version adds four analog inputs including two bi-directional motor drive outputs of the H-bridge type capable of handling 200mA per channel. It supports soft-PWM for full speed control. Additionally, there are the unprotected 3V3 GPIO features.

Compared to the Pibrella, another board made by Pimoroni, both the Explorer HAT and the Explorer HAT Pro share many similarities, but also add a lot more besides. For example, the analog and digital inputs are a great help, especially since you can connect inexpensive and simple sensors such as the TMP36, while taking advantage of the built-in ADC.

The capacitive touch buttons of the Explorer HAT not only allow interfacing with connected components, but also allow independent working. For example, you can send a tweet, an email or a text message by simply tapping one of the buttons. There are many other possibilities with these capacitive touch buttons. You can connect crocodile clips and brass contacts for using fruits as buttons. Of course, the software will have to be tweaked somewhat to get the proper sensitivity.

Plugging HATs on the RBPi invariably causes loss of access to some GPIO pins. The Explorer HAT breaks out the most useful pins from the GPIO, making them easily accessible. Pimoroni provides intuitive Python libraries and a built-in tutorial for all to use.
Overall, both the Explorer HAT boards are a great value for money not only for kids playing and learning to interface with the RBPi, but also for grown-ups.