MC33926 Motor Driver Issue

Hello;

I try to control a brushed DC motor and I use MC33926 motor driver (https://www.pololu.com/product/1212). When I searched on google, I found a site about driver control (Dual MC33926 motor driver - control pins - General Discussions - RobotShop Community) I adjusted the IN1 and IN2 pins as seen in the attach1 image. I choose the pins according to the A table. So I connected IN2 pin to D6 (PWM Pin) and IN1 pin to D8 pin. I set the other pins connection as in the attach2 image. The only difference between the driver I use is that one DC motor can be driven with my driver. I wrote a simple code to test it, but the motor doesn't work. I don't know to why. Let me share you to test code. I connected a button to the D10 pin and made the connection as pull-down (I use 10k resistor). When I pressed the button, I wanted to set the motor run for 5 seconds in forward direction, stop for 3 seconds, after that run for 5 seconds in reverse direction, stop for 3 seconds. However, when I pressed the button I can't read any voltage values on the out pins on the driver. My motor operates 24V. D8 and D6 pins turn to HIGH position as 5V when the button is pressed. I also did voltage check on the driver. I would be glad if you could help with the problem.

#define motorSpeed 6
#define motorDir 8
#define button 10

int buttonState=0;
int _start=0;
void setup()
{
  pinMode(motorSpeed, OUTPUT);
  pinMode(motorDir, OUTPUT);
  pinMode(button,INPUT);
}

void loop()
{
  buttonState=digitalRead(button);
  if(buttonState==1)
  {
    _start++;
  }
  while(_start>0)
  {
    digitalWrite(motorDir,HIGH);
    analogWrite(motorSpeed,255);
    delay(5000);
    analogWrite(motorSpeed,0);
    delay(3000);
    digitalWrite(motorDir,LOW);
    analogWrite(motorSpeed,0);
    delay(5000);
    analogWrite(motorSpeed,255);
    delay(3000);
  }
  
}

attach1.PNG

attach1.PNG

What do you connect as power supply to the motor driver?

Hi,
Have you got the gnd of both boards connected together?
Can you please draw a proper/complete circuit diagram, including how you wired your button, labeling the pins and including your power supplies.

Use a pen and paper, it is quickest and easiest way to draw.

Thanks.. Tom... :slight_smile:

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.