Loading…
A simple Raspberry Pi HAT for controlling four DC motors.
While making my WRO robot, I ran into a problem: I needed to control multiple motors from a Raspberry Pi without a mess of separate boards and wiring.
There are already plenty of motor HATs available, but I wanted something simple that fit what I needed. So I decided to design my own.
The repository includes quadmotorhat.py, which provides a simple interface for controlling the four motors.
First, install gpiozero:
pip install gpiozero
Then place quadmotorhat.py in the same directory as your Python program:
your_project/
├── quadmotorhat.py
└── main.py
Import the motor controls:
from quadmotorhat import M1, M2, M3, M4
You can then use M1, M2, M3, and M4 to control the four motor outputs.
The full board design is included in the repository.
QuadMotorHAT.kicad_sch — SchematicQuadMotorHAT.kicad_pcb — PCB layoutQuadMotorHAT.kicad_pro — KiCad projectYou can open these files in KiCad to inspect or modify the design.
This project is licensed under the terms of the license included in this repository.
Loading 3D model… large boards can take a moment.
No comments yet. Be the first to ask about this board.