Can't seem to get Dual G2 24v18 to work

Hi!

We recently started doing mechatronics for a school project, and I’m fairly new to this, so sorry if my questions are stupid.

We got a Pololu Dual G2 24v18, but I can’t seem to get it to work. I’ve connected it to an Arduino Uno as a shield, with a 14V battery to the controller itself and uploaded the demo code. It gives feedback to the serial monitor about the current, but I can’t seem to get it to drive motors. The M1 and M2 onboard LEDs won’t light either.

I’ve included the demo code here.

#include "DualG2HighPowerMotorShield.h"

// Uncomment the version corresponding with the version of your shield.
//DualG2HighPowerMotorShield24v14 md;
// DualG2HighPowerMotorShield18v18 md;
DualG2HighPowerMotorShield24v18 md;
// DualG2HighPowerMotorShield18v22 md;

void stopIfFault()
{
  if (md.getM1Fault())
  {
    md.disableDrivers();
	delay(1);
    Serial.println("M1 fault");
    while (1);
  }
  if (md.getM2Fault())
  {
    md.disableDrivers();
	delay(1);
    Serial.println("M2 fault");
    while (1);
  }
}

void setup()
{
  Serial.begin(115200);
  Serial.println("Dual G2 High Power Motor Shield");
  md.init();
  md.calibrateCurrentOffsets();

  delay(10);

  // Uncomment to flip a motor's direction:
  //md.flipM1(true);
  //md.flipM2(true);
}

void loop()
{
  md.enableDrivers();
  delay(1);  // The drivers require a maximum of 1ms to elapse when brought out of sleep mode.

  for (int i = 0; i <= 400; i++)
  {
    md.setM1Speed(i);
    stopIfFault();
    if (i%200 == 100)
    {
      Serial.print("M1 current: ");
      Serial.println(md.getM1CurrentMilliamps());
	}
    delay(2);
  }

  for (int i = 400; i >= -400; i--)
  {
    md.setM1Speed(i);
    stopIfFault();
    if (i%200 == 100)
    {
      Serial.print("M1 current: ");
      Serial.println(md.getM1CurrentMilliamps());
	}
    delay(2);
  }

  for (int i = -400; i <= 0; i++)
  {
    md.setM1Speed(i);
    stopIfFault();
    if (i%200 == 100)
    {
      Serial.print("M1 current: ");
      Serial.println(md.getM1CurrentMilliamps());
	}
    delay(2);
  }

  for (int i = 0; i <= 400; i++)
  {
    md.setM2Speed(i);
    stopIfFault();
    if (i%200 == 100)
    {
      Serial.print("M2 current: ");
      Serial.println(md.getM2CurrentMilliamps());
    }
    delay(2);
  }

  for (int i = 400; i >= -400; i--)
  {
    md.setM2Speed(i);
    stopIfFault();
    if (i%200 == 100)
    {
      Serial.print("M2 current: ");
      Serial.println(md.getM2CurrentMilliamps());
    }
    delay(2);
  }

  for (int i = -400; i <= 0; i++)
  {
    md.setM2Speed(i);
    stopIfFault();
    if (i%200 == 100)
    {
      Serial.print("M2 current: ");
      Serial.println(md.getM2CurrentMilliamps());
    }
    delay(2);
  }

  md.disableDrivers(); // Put the MOSFET drivers into sleep mode.
  delay(500);

}

I am sorry you are having an issue driving your motors from that shield. Do the indicator LEDs light if you run the demo code with your motor disconnected from the shield? Can you post pictures of the soldered joints on the underside of the shield?

-Jon

No the LEDs don’t light with or without the motor.

It looks like you have not soldered anything to your shield. Soldering is necessary for electronics like these to work.

By the way, if you are new to soldering you might find this soldering guide by Adafruit useful. In particular, this page has a nice visual aide for what an ideal solder joint should and should not look like. If you still have trouble running the demo sketch after soldering, you can post pictures of your solder joints here, and I can help you figure out what to focus on.

-Jon