SparkFun Auto pHAT Hookup Guide

Pages
Contributors: santaimpersonator
Favorited Favorite 0

Hardware Assembly

Assembly for the Auto pHAT is fairly straight forward. It plugs directly into the GPIO pins of a Raspberry Pi. Most importantly, users need pay attention to the orientation of the pHAT and double check that the pin are lined up properly. below are a few examples for users to follow.

Auto pHAT on Pi3 Model A+
Auto pHAT on Raspberry Pi 3 Model A+.
Auto pHAT on Pi3 Model B
Auto pHAT on Raspberry Pi 3 Model B.
(Click images to enlarge)

Attaching Accessories

Users will want to attach additional accessories to the Auto pHAT.

Servos

Servos are attached to the 3x4 right angle header. The channels and pins are indicated on the top and right of the header, when reading the silk screen. Below is an example with servos connected to channels 0 and 3. Users should pay close attention to the orientation of the servo connector, in order to match up the pin connections properly.

Servo on channels 0 and 3
Servos attached to channels 0 and 3.
Close up of wiring orientation
Verify that the connector is in the proper orientation.
(*Hint: The signal wire is the uppermost header.)
(Click images to enlarge)

Note: Users who are unfamiliar with servos and their operation should check out our hobby servo and basic servo control tutorials. Additionally, here is a quick reference for common servo wiring colors.

Hobby Servo Tutorial

May 26, 2016

Servos are motors that allow you to accurately control the rotation of the output shaft, opening up all kinds of possibilities for robotics and other projects.

Basic Servo Control for Beginners

February 25, 2020

An introductory tutorial demonstrating several ways to use and interact with servo motors!

servo cable colors

Annotated image of servo wiring harness. (Click to enlarge)

Motors

DC motors should be connected to the inner screw terminals indicated by MTRA and MTRB on the silk screen. Below, is an example of a pair of motors connected to the Auto pHAT. The orientation of the wires (between 1 or 2) shouldn't matter as the drive direction can be configured in software.

motors attached
DC hobby motors (with wheels attached) connected to the Auto pHAT.
external power through USB-C
An external power source provided by the USB-C connetor.
(Click images to enlarge)

Note: Users unfamiliar with DC motors should check out our motors tutorial.

Motors and Selecting the Right One

December 12, 2013

Learn all about different kinds of motors and how they operate.

Quadrature Encoders

Connecting quadrature encoders to the Auto pHAT is relatively simple with the screw terminals. Users should use the silk screen on the board (+, A, B, and -) to match the connections for the encoder. The datasheet for other encoders should be used if the connections aren't apparent or labeled on the product.

motors attached
external power through USB-C
DC motors with encoders connected to the Auto pHAT on a Raspberry Pi 3 Model B and Nvidia Jetson Nano.

motors attached
Motor and encoder wiring on the Auto pHAT.

motors attached
Cable attachment to DC hobby motor with encoder.

(Click images to enlarge)

For the hobby motor with encoder, that is offered in our catalog, pin connections match the Auto pHAT screw terminal layout; with the pin map shown below. (For more details, users can check out the datasheet.)

motor/encoder pin map
Pin map for the motor with encoder.

Note: Users who are unfamiliar with quadrature encoders and their operation should check out our Adventures in Science blog post on encoders.

Clearance Issues

Another consideration is the clearance of the pHAT from other components. Users can cover the header and screw terminal through hole pins with an insulator to avoid shorting the pins. Additionally, if the clearance between the pHAT and other components (including things like a the heat sink case for the Raspberry Pi 4) becomes an issue, a header should be used to increase the spacing.

Note: The details for this section are in progress while we await the arrival of the compatible header.

Desktop

To configure the Raspberry Pi for use with the Auto pHAT, the PIXEL desktop is recommended. It will be the most convenient for users, but users can still use other methods like SSH to remotely access the Raspberry Pi. To utilize the desktop, users will need to add peripherals like a monitor and keyboard.

Desktop setup
Pi 3 Model B setup to access the PIXEL desktop. (Click to enlarge)