- 1 Introduction
- 2 Hardware Spec
- 3 Hardware Setup
- 4 Run Test Program
- 5 Resources
- 6 Update Log
- The NanoHat Motor is a motor module with I2C. It uses NXP’s PCA9685 and Toshiba’s TB6612FNG.
- A single module can drive four 5V PWM steering motors and four 12V DC motors or four 5V PWM steering motors and two 12V four-wire step motors. You can drive more motors by stacking multiple modules with different I2C addresses together.
- It uses TI's TPS54331 device to provide stable power source.
- An onboard 32K EEPROM AT24C32D can save user data,
- The NanoHat Motor has the same form factor as the NanoPi NEO and can be stacked on a NanoPi NEO.
- Input Voltage: 12V
- Capable of driving four 5V PWM steering motors
- Capable of driving four 12V DC motors
- Capable of driving two 12V four-wire step motors
- Onboard 32K EEPROM
- Stackable and Configurable I2C address
Diagram, Layout and Dimension
- 24-Pin Pin Description
Pin# Name Pin# Name 1 SYS_3.3V 2 VDD_5V OUT 3 I2C_SDA 4 VDD_5V OUT 5 I2C_SCL 6 GND 7 NC 8 NC 9 GND 10 NC 11 NC 12 NC 13 NC 14 GND 15 NC 16 NC 17 SYS_3.3V 18 NC 19 NC 20 GND 21 NC 22 NC 23 NC 24 NC
- 2-Pin Connector Pin Description
Pin# Name Description 1 12V 12V Input 2 GND Ground
- 4Pin PWM Steering Motor Connector Pin Description
Pin# Name Description 1 PWM* PWM * Output 2 NC Not Connected 3 5V 5V Output 4 GND Ground
- Motor Connector Pin Description
Name Description M1 DC Motor #1 output/Step Motor #1 (Wire 1 & 2) output M2 DC Motor #2 output/Step Motor #1 (Wire 3 & 4) output M3 DC Motor #3 output/Step Motor #2 (Wire 1 & 2) output M4 DC Motor #4 output/Step Motor #2 (Wire 3 & 4) output
Connect NanoHat Motor to NanoPi NEO
The NanoHat Motor has the same form factor as the NanoPi NEO and can be stacked on a NanoPi NEO
Here are some hardware setups:
The I2C address on the module can be reset by adjusting the onboard resistor. You can stack multiple motor modules together with different I2C addresses. Here is a hardware setup:
Run Test Program
The NanoHat Motor's test program is included in the NanoHAT-Motor-Python-Library.
The NanoHAT-Motor-Python-Library is a Python library which provides various APIs for motor control.
NanoPi NEO Plus2
As for other FriendlyElec's nano boards as long as they have an I2C interface you can make them work with this module by making some wiring.
To make a NEO work with the motor module you need to install this library on NEO. You can install the library by logging into your NEO via ssh and type the following commands:
sudo apt-get install python-dev python-smbus git cd ~ git clone https://github.com/friendlyarm/NanoHAT-Motor-Python-Library cd NanoHAT-Motor-Python-Library sudo python setup.py install
Use of NanoHAT-Motor-Python-Library
Control DC Motor
cd ~/NanoHAT-Motor-Python-Library/examples python DCTest.py <motor port>
"<motor port>" is a motor's port
Control Step Motor
cd ~/NanoHAT-Motor-Python-Library/examples python StepperTest.py <motor port>
"<motor port>" is a step motor's port
Control Steering Motor
cd ~/NanoHAT-Motor-Python-Library/examples python ServoTest.py <pwm port>
"<pwm port>" is a steering motor's port
- [Schematic](Schematic - NanoHat Motor.pdf)
- [Datasheet](PCA9685 datasheet)
- [Datasheet](TB6612FNG datasheet)
- [Dimension](2.0mm 4Pin PWM Steering Motor Connector Pin File in PDF)
- Released English Version