Problems with a single MC33926 board

I’m having similar problems with a single MC33926 board. I have hooked it up in a couple different ways and even tried borrowing code from the dual MC33926 board library (to no avail). I’m back down to simple basic code for testing, as follows:

#define motorpin1 7
#define motorpin2 6
#define D1pin 4
#define D2pin 9
#define ENpin 3
#define INVpin 13

int speed = 200;

void setup() 
{
   pinMode(motorpin1, OUTPUT);
   pinMode(motorpin2, OUTPUT);
   
   // pinMode(D2pin, OUTPUT); don't need to define for analog
   pinMode(D1pin, OUTPUT);
   pinMode(ENpin, OUTPUT);
   pinMode(INVpin, OUTPUT);
   
 }
 void loop()
 {
   digitalWrite(ENpin,HIGH);
   digitalWrite(INVpin, HIGH);
   digitalWrite(D1pin,LOW);
   digitalWrite(motorpin1, LOW);
   digitalWrite(motorpin2, HIGH);
   
   
   analogWrite(D2pin, speed);
   
   
   delay(1000);
   analogWrite(D2pin, 0);
   digitalWrite(INVpin,LOW); //this line is here to reverse the direction of the motor in subsequent code
   delay(1000);
   
 }

I have the board connected as follows:

MC33926 Pin Arduino Duemilanove Pin
Vin Vin
Gnd Gnd
Vdd 5V
IN2 6
IN1 7
D2 9
D1 GND
SF not connected
FB Not Connected
EN 3 (also tried just tying this to Vdd)
SLEW Not connected
INV 13

VIN (large connection) not connected- using small Vin (5V) for testing with small hobby motor
GND (large) not connected see above

OUT1 motor
OUT2 motor

I have tested the connections at the board, and they all seem to test appropriately, as far as +5V or gnd. The motor does not spin. If I disconnect the motor, I get no output voltage at the OUT1/2 connectors. I’ve been messing with this for hours, and I’m beginning to think there is something wrong with the board. I successfully got a Arduinoshield motor driver to work with the same motor, so I know the motor works, and I know the Arduino can drive a motor via PWM.

Assuming I can get this to work, I also read a post where it was better to drive PWM on IN1/IN2, and not use D2. Do you have an example sketch of that? The other post didn’t have it.

Hello.

I am sorry you are having trouble with our MC33926 Motor Driver Carrier.

I split your your post into its own topic because it is unlikely you are having the same problem as the person who started that topic. For reference, the topic was:

I have put your code inside [code ] tags to make it readable. You can do that in future posts by selecting the code and clicking “Code” button above the text area. Those tags could also be a useful for formatting your pin assignment tables.

How is power getting to your system? What power supply are you using and is it plugged into the Arduino’s power input jack?

I recommend simplifying your system as much as possible. You should not need to change the INV pin to reverse the direction of the motor, because you have full control over the IN1 and IN2 pins. You should just disconnect the INV pin and remove the corresponding code. Also, since D1 is connected directly to GND, you should remove the code for D1.

Are you really sure that “pinMode(D2pin, OUTPUT);” isn’t needed? The example code for AnalogWrite uses pinMode.

Posting pictures of your connections here would help us spot problems with your soldering or wiring.

I do not have the example sketch you are asking for.

–David