Motor Speed controller with DFRobot Expansion Hat

userHead Lubomyr.Zyla 2023-03-17 21:41:26 639 Views0 Replies

I have a Raspberry Pi 4B and have been trying to drive a heavy duty DC motor with speed control. The motor controller is the HiLetgo BTS7960 High Power Motor driver. I am using the IO Expansion HAT for Raspberry Pi 4B/3B+ to interface my devices. The image below shows the pins for the HLetgo motor controller. Ignore the column that shows the correct Arduino hookup as I am using Raspberry Pi.

 

 

The DF Robot IO Expansion HAT for Raspberry Pi has separate PWM pins.The PWM section has 4 groups of PWM ports, each labeled P, + and -. The manual for the Hat mentions an STM32 but I have a high power HiLetgo BTS7960. So how do I connect my  IO Hat to the  HiLetgo. This motor controller is 2 channel with reversible motor capability. The enable pins are simple  Hi Lo digital output pins. I am guessing the P pin on the Hat PWM is the actual RPWM and LPWM pins on the controller but I am not sure. There is only a single power Vcc and ground connection to the  HiLetgo to power the interface chip. The HiLetgo has connectors for your heavy duty power supply connection.. I don't know what the STM32 is so don't know if it is needed. I have not actually hooked it up because I am not certain of the connections.Any help would be appreciated.

Thanks, Lou