Connecting 37Dmm gearmotor to Motor Hat

Which terminals should I use to connect the 37Dmm gearmotor to this Motor Hat for the Pi?

And, do I need to connect all 6 wires even I just want to move two wheels back-&-forth at a constant speed and I don’t care about the position of the wheels?

Hello.

On the 37Dmm gearmotor page you linked, there is a table under the Using the Encoder section that lists the function of each wire on the motor. If you do not need feedback from the encoder, you only need to connect the red and black motor power wires. To see where to connect them to the Adafruit HAT you will have to look into the datasheet on their product page.

-Rocky

Hi.

It looks like that Adafruit Pi HAT uses a TB6612FNG motor driver that is only capable of providing about 1.2A continuously, so it is not appropriate for one of our 37D gearmotors. Instead, you might consider using our Dual MC33926 Motor Driver for Raspberry Pi, which can provide 3A continuously and 5A peak.

Also, if you really need the speed of your motor to be constant, you will probably want to use the encoder, but processing encoder feedback from an RPi directly is not really practical.

-Claire