Hello, I am having trouble getting my motor spinning when wiring up the MC33926 per the instructions on the product page.
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!