8xDC Motor Hat


An updated draft of 8xDC Motor Hat with TVS diodes and spike cutters. I am not happy with the connectors here. They are “ok”, but they are not easily to mount from within a stack and a bit expensive. I need to find alternatives. The 5.08 Power Connector is fine, it’s the 2.54 pitch motor connector in front I need to re-work.

A DC Motor driver like LM9110 that we use here is very popular and sufficient to drive a lot of small motors. In this case I need 5 to drive a toy robot arm so added 8. The input to the driver is 2x PWM signals driving a H-Bridge. The principle is simple as you switch on the PWM signal in the direction you want to drive. A bit more complicated is functions like speed, break and acceleration. The difference from the 32xServo is that we this time need to use PWM at a selected frequency with a duty cycle to indicate speed. With 8 motors this means we will be using 16 PWM signals.

Bit-banging will not work this time because we would need to iterate at 10,000Hz to achieve a frequency of 500Hz with 10% accuracy. I would like to adjust the frequency out for optimized motor drive and this is a perfect job for the Hardware Timers on the MCU. We will be using STM32F103RB or STM32F105RB that have a load of timers supporting 4 channels each. Each have a resolution of 16 – 32 bits, so we will not have any challenge with accuracy.

Finding 16 PWM signals works fine on F103 & F105 LQFP64 with Timer1,2,3 & 4 as they all have all 4 channels available on the same pins.

Leave a Reply