1. Product Overview
The Geekworm Full Function Motor HAT is an expansion board designed for Raspberry Pi models including 4B, 3B+, 3B, 2B, B+, and Zero. It enables control over various motor types, making it suitable for robotics and automation projects. This HAT utilizes an I2C interface for communication, allowing for efficient control of multiple motors with minimal GPIO pin usage.
Key features include:
- Motor Control: Supports up to 4 bi-directional DC motors with 8-bit speed control, or up to 2 stepper motors (unipolar or bipolar) with various stepping modes.
- Servo Control: Provides 4 channels of 12-bit PWM/Servo control (5V).
- Driver Chip: Features the TB6612 chipset, offering 1.2A per bridge (3A peak) with thermal shutdown protection and internal kickback protection diodes. Motors can operate from 5VDC to 12VDC.
- Infrared Receiver: Includes one Infrared Receiver on GPIO26.
- Power Input: Polarity-protected 2-pin terminal block and jumper for external 5-12VDC power.
- Connectivity: Large terminal block connectors for easy wire hook-up (18-26AWG).
Figure 1: Geekworm Raspberry Pi Full Function Motor HAT.
2. Setup Instructions
This product requires some assembly and basic DIY skills. The HAT comes with a 2x20 plain header and terminal blocks that need to be soldered onto the board.
2.1. Required Components
- Geekworm Motor HAT Expansion Board
- 2x20 Pin Female Header (included)
- Installation Screw Pack (included)
- Soldering iron and solder
- Wire strippers and small screwdriver
- Compatible Raspberry Pi board (e.g., Raspberry Pi 4B, 3B+, 3B, 2B, B+, Zero)
- External 5-12VDC power supply (for motors/servos)
2.2. Assembly Steps
- Solder the 2x20 Pin Header: Carefully solder the included 2x20 pin female header to the designated pins on the Motor HAT. Ensure all pins are securely connected.
- Solder Terminal Blocks: Solder the terminal blocks for motor power and motor/servo connections.
- Attach to Raspberry Pi: Align the soldered 2x20 pin header on the Motor HAT with the GPIO pins of your Raspberry Pi. Gently press down to ensure a firm connection.
- Secure with Screws: Use the provided installation screw pack to secure the Motor HAT to your Raspberry Pi board, if applicable.
- Connect External Power: For driving motors and servos, connect an external 5-12VDC power supply to the polarity-protected 2-pin terminal block on the HAT. Ensure the voltage matches the requirements of your motors/servos.
- Connect Motors/Servos: Connect your DC motors, stepper motors, or servos to the appropriate terminal blocks or servo headers on the HAT. Refer to the board's labels for correct connections.
Figure 2: Motor HAT mounted on a Raspberry Pi board.
3. Operating Instructions
The Motor HAT is controlled via the I2C bus of the Raspberry Pi. A Python library is available to simplify programming motor and servo movements.
3.1. Software Installation
- Enable I2C: Ensure the I2C interface is enabled on your Raspberry Pi. This can typically be done via
sudo raspi-configunder Interface Options. - Install Python Library: Install the necessary Python library for the Motor HAT. Refer to the official Geekworm Wiki for detailed instructions and sample code: wiki.geekworm.com/Robot_Expansion_Board.
3.2. Motor Control
- DC Motors: Control up to 4 DC motors. Each motor's direction and speed can be set independently using the library functions.
- Stepper Motors: Control up to 2 stepper motors. The library supports single coil, double coil, interleaved, and micro-stepping modes.
- Servos: Control up to 4 servos. The 12-bit PWM provides precise positioning. Ensure servos are powered by 5VDC only; higher voltages can cause damage.
Consult the Geekworm Wiki for specific code examples and API documentation to implement motor and servo control in your projects.
4. Maintenance
Proper maintenance ensures the longevity and reliable operation of your Motor HAT.
- Power Disconnection: Always disconnect power to the Motor HAT and Raspberry Pi before making any wiring changes or adjustments.
- Cleanliness: Keep the board free from dust and debris. Use a soft, dry brush or compressed air for cleaning. Avoid liquids.
- Environmental Conditions: Operate the HAT in a dry environment, away from extreme temperatures and humidity.
- Secure Connections: Periodically check all wire connections to ensure they are secure and free from corrosion.
5. Troubleshooting
This section addresses common issues encountered during the use of the Motor HAT.
5.1. Motors/Servos Not Responding
- Power Supply: Verify that the external 5-12VDC power supply is connected correctly to the HAT and is providing sufficient current for all connected motors/servos.
- Wiring: Check all motor and servo wiring for correct polarity and secure connections.
- I2C Communication: Ensure I2C is enabled on your Raspberry Pi and the Python library is correctly installed. Use
sudo i2cdetect -y 1to check if the HAT is detected (default address 0x6F). - Servo Voltage: Confirm that servos are only receiving 5V. Applying higher voltage will damage them.
5.2. Intermittent I2C Communication (when stacking multiple HATs)
If using multiple Motor HATs stacked together, intermittent I2C communication can occur. Each HAT has solder drops (A0-A3) that control its I2C address. The default address is 0x6F (all drops soldered). To use multiple HATs, you must change the address of each additional HAT by desoldering specific drops to achieve unique addresses between 0x60 and 0x6F.
- Unique Addresses: Ensure each stacked HAT has a unique I2C address.
- I2C Bus Speed: While increasing I2C baud rate might seem helpful, it can lead to missed steps or communication errors. It is generally recommended to use the default I2C speed.
5.3. GPIO Pin Bending
When removing the HAT from the Raspberry Pi, apply even pressure to avoid bending the GPIO pins. Always pull straight up, not at an angle.
6. Specifications
| Feature | Detail |
|---|---|
| Brand | Geekworm |
| Model Name | S460 |
| Model Number | TB-418460 |
| Connectivity Technology | Infrared (for IR Receiver) |
| Compatible Devices | Raspberry Pi 4B, 3B+, 3B, 2B, B+, Zero |
| Motor Driver Chipset | TB6612 |
| DC Motor Channels | Up to 4 bi-directional (1.2A per bridge, 3A peak) |
| Stepper Motor Channels | Up to 2 (unipolar or bipolar) |
| PWM/Servo Channels | Up to 4 (12-bit, 5V) |
| External Power Input | 5VDC to 12VDC |
| Included Components | 1 x Robot Motor HAT Expansion Board, 1 x 2x20 Pin Female Header, 1 x Installation Screw Pack |
7. Warranty Information
This product comes with a 3-month warranty from the date of purchase. Please retain your proof of purchase for warranty claims. The warranty covers manufacturing defects but does not cover damage caused by improper use, incorrect wiring, or unauthorized modifications.
8. Support
For detailed documentation, sample code, and further support, please visit the official Geekworm Wiki:
wiki.geekworm.com/Robot_Expansion_Board
The Wiki page contains comprehensive information for this DIY product, including setup guides and programming examples.