Pololu Robotics & Electronics
Menu
My account Comments or questions? About Pololu Contact Ordering information Distributors

Pololu Forum

Dual MC33926 motor driver shield not providing full voltage to one motor

Hi,
I’m using the dual MC33926 motor driver shield with arduino uno to power 2 linear actuators for a standing desk. I’ve used 2 toggle switches to change direction of either linear actuator.
When I connect the 12V (6A) power source to the shield and run the program, the LEDs on the shield light up as expected on the board and the M1A/M1B terminal runs one linear actuator perfectly. However, the M2A/M2B terminal only provides 4V when I try to use it (LEDs still light up) so the 12V linear actuator does not work. I’ve switched the two linear actuators over and it is the same result for the M2A/M2B terminal.

What can I do to troubleshoot?


Code:

#include "DualMC33926MotorShield.h"
DualMC33926MotorShield md;
//add toggle switch states to arduino pins
const int LEFT_UP = 11;
const int LEFT_DWN = 13;
const int RIGHT_UP = 2;
const int RIGHT_DWN = 3;

// fault program from sheild demo
void stopIfFault()
{
if (md.getFault())
{
Serial.println("fault");
while(1);
}
}
void setup()
{
  //define pin modes for toggle switches
  pinMode(LEFT_UP, INPUT);
  pinMode(LEFT_DWN, INPUT);
  pinMode(RIGHT_UP, INPUT);
  pinMode(RIGHT_DWN, INPUT);
  
// from sheild demo program
Serial.begin(115200);
Serial.println("Dual MC33926 Motor Shield");
md.init();
}
void loop()
{
  int L_UP; //variables for loop, int makes analogue pins digital
  int L_DWN;
  int R_UP;
  int R_DWN;

  L_UP = digitalRead(LEFT_UP); //to read the pin states
  L_DWN = digitalRead(LEFT_DWN);
  R_UP = digitalRead(RIGHT_UP);
  R_DWN = digitalRead(RIGHT_DWN);
  
  
Serial.print("M1 current: "); 
Serial.println(md.getM1CurrentMilliamps());
Serial.print("M2 current: ");
Serial.println(md.getM2CurrentMilliamps());
Serial.print("Left Up: ");
Serial.println(L_UP);
Serial.print("Left Down: ");
Serial.println(L_DWN);
Serial.print("Right Up: ");
Serial.println(R_UP);
Serial.print("Right Down: ");
Serial.println(R_DWN);

if(L_UP==LOW && R_UP==HIGH && R_DWN==HIGH){
  md.setM1Speed(400);
  md.setM2Speed(0);
  stopIfFault();
  Serial.print("LEFT_UP");
  
}
  else if (L_UP==LOW && R_UP==LOW && R_DWN==HIGH)
  {
    md.setM1Speed(400);
    md.setM2Speed(400);
    stopIfFault();
    Serial.print("LEFT UP");
    Serial.print("RIGHT UP");
  }
      else if (L_UP==LOW && R_UP==HIGH && R_DWN==LOW)
      {
        md.setM1Speed(400);
        md.setM2Speed(-400);
        stopIfFault();
        Serial.print("LEFT_UP");
        Serial.print("RIGHT DOWN");
      }
   
  else if(L_DWN== LOW && R_UP==HIGH && R_DWN==HIGH){
    md.setM1Speed(-400);
    md.setM2Speed(0);
    stopIfFault();
    Serial.print("LEFT DOWN");
      }
      else if (L_DWN==LOW && R_UP==LOW && R_DWN==HIGH){
        md.setM1Speed(-400);
        md.setM2Speed(400);
        stopIfFault();
        Serial.print("LEFT DOWN");
        Serial.print("RIGHT UP");
      }
      else if (L_DWN==LOW && R_UP==HIGH && R_DWN==LOW){
        md.setM1Speed(-400);
        md.setM2Speed(-400);
        stopIfFault();
        Serial.print("LEFT DOWN");
        Serial.print("RIGHT DOWN");
      }
      
  else if(R_UP==LOW && L_UP == HIGH && L_DWN==HIGH)
      {
    md.setM1Speed(0);
    md.setM2Speed(400);
    stopIfFault();
    Serial.print("Right Up");
      }
      
      else if(R_DWN==LOW && L_UP==HIGH && L_DWN==HIGH)
      {
        md.setM1Speed(0);
        md.setM2Speed(-400);
        stopIfFault();
        Serial.print("Right Down");
      }
  else {
    md.setM1Speed(0);
    md.setM2Speed(0);
    stopIfFault();
  }

delay(2000);


}

Hello.

It looks like several of your solder joints might not be wetting well to the pads on the board. Before troubleshooting more of your setup, I suggest reflowing those solder joints until they look like the examples in Adafruit’s Guide to Excellent Soldering. For the larger terminal block pins, please note that they typically require a little more heat to flow properly due to their size.

If that does not fix the problem, can you post updated pictures of both sides of your board? Additionally, can you post more details about your actuators (preferably links to their datasheets or product page)? You might also try disconnecting the actuators and uploading a program that just drives the outputs at full speed, then measuring the voltage at each of the output pins.

Brandon

Hi,
I’ve re-soldered and it seems to have done the trick.
Thanks!

2 Likes