MC33926 Motor Driver Carrier - Basic Setup

Hello, I am having trouble getting my motor spinning when wiring up the MC33926 per the instructions on the product page. :open_mouth:

I have a fritzing diagram of my setup as well as some pictures, code, and a description of my setup below.

const int LEDPIN =  13;
const int ENPIN = 7; // red
const int IN1PIN = 4; // yellow
const int IN2PIN = 5; // green
const int D1PIN = 11; // blue
const int D2PIN = 10; // purple

void setup()   {                
  pinMode(LEDPIN, OUTPUT);
  
  pinMode(ENPIN, OUTPUT);
  
  pinMode(IN1PIN, OUTPUT);
  pinMode(IN2PIN, OUTPUT);
  
  pinMode(D1PIN, OUTPUT);
  pinMode(D2PIN, OUTPUT);
  
}

void loop()
{
  digitalWrite(ENPIN, HIGH);
  digitalWrite(LEDPIN, HIGH);
  
  digitalWrite(IN1PIN, HIGH);
  digitalWrite(IN2PIN, LOW);
  
  pinMode(D1PIN, LOW);
  analogWrite(D2PIN, 150);

  delay(25);
}

I am more concerned about the code. I have two other boards (MC33926) of varying soldering quality.

Things i’ve tried:
[ul]Checking the power source
Running the motor directly from the battery
Manually checked that the EN pin is getting 5 volts.
Manually checked that the D2 pin is getting 3 volts.
Manually checked that the IN2 pin is getting 0 volts.
Manually checked that the IN1 pin is getting 5 volts.[/ul]

Any help/guidance is greatly appreciated, its gotta be something silly of course!

I am sorry you are having trouble controlling your motor from that driver. It looks like some of your soldered connections could potentially be cold joints. You can see examples of what good soldered joints look like in this Adafruit guide.

After you fix your soldered connections, can you try running your code again, but replacing:

pinMode(D1PIN, LOW); analogWrite(D2PIN, 150);

with

digitalWrite(D1PIN, LOW); digitalWrite(D2PIN, HIGH);

and letting me know what you observe?

-Jon