Motor Driver MC33926

I have five of these motor controllers installed on 5 separate, small (8" diameter) robots. They work fine, however, I would like to change the operation from coasting to braking. Presently, the direction input goes to IN1 which is connected to IN2 through an inverter. The PWM is connected to PMW/D2. How can I convert this arrangement to dynamic braking or do I need to make the connections differently.


Hello, John.

To get drive/brake operation, you will need to hold the D2 pin high and control the speed and direction by sending PWM signals to the IN1 and IN2 pins. This means you will need to use 2 PWM-capable pins from your controller. More details about the input and output conditions of the driver can be found in the MC33926 datasheet, which is located under the “Resources” tab of the MC33926 carrer’s product page.


Thanks for the reply. That’s a lot of PWM lines. I’m using an Arduino Mega so they are available. I tried using just IN1 and IN2, applying PWM to one and either a digital.write high or low to the other to go forward or reverse. Setting the PWM to the same value as the other IN pin (high or low) does brake. However I’m having other problems which so far I don’t understand and must be a coding error.
Should just using IN1 and IN2 in the manner described work?


Depending on which IN pin you are sending PWM and which one you are sending digital signals, the operation mode would be different when driving the motor forward and reverse.

For example, if you send a PWM signal to IN1 and hold IN2 low, it would be in a “Free Wheeling Low” state when the PWM signal is low and driving in the “Forward” state when it is high. Then, when you switch the IN2 pin to high, it would be in a “Free Wheeling High” state when the PWM signal is high and “Reverse” (when the PWM signal is low). The datasheet uses the term “Free Wheeling Low” and “Free Wheeling High” to describe braking low and braking high respectively.

If you want the operation to be the same for forward and reverse, you would need to switch which IN pin you are sending the PWM to when you want to switch directions. For example, if you wanted to always brake low, you would send your PWM signal to IN1 and hold IN2 low to go in one direction, and hold IN1 low and send the PWM signal to IN2 to go in the other direction.


Thanks for the feedback.

What I have been doing is using three small functions, one for
Forward, one for Reverse, and one for Stop.

I discovered the hard way that forward and reverse use the opposite
PWM high/low states.

Forward: IN2 high, PWM to IN1.

Reverse: IN2 Low, PWM to IN1

Brake seems to work with either IN1 & IN2 both low or both hi.
If this is true, it seems that

if IN2 low, PWM to IN1 should result in not free wheel low when the
PWM is low, but rather, braking when IN2 low an PWM low.