Monster Moto Shiled - Low Output (no Load) , NO Output on Load

Hello Guys,

I`m a bit confused and wondering if anyone came across this issue perhaps (i couldn’t find answers on the forum regarding this).

Long Story short:

I bought 2x chineese copies of the monster motoshield bellow. (from different UK suppliers).

I want to use it to control a solenoid (12V) , and for testing purposes, I was coding and trying to use it with a simple DC motor I had.

Problem is following:

With motor connected to outputs the voltage is 0Volts. Onboard LED’s that are supposed to indicate direction etc, don`t work.

Remove motor, and you get 2.4 Volts output, and onboard LED’s with are supposed to indicate motor direction, motor ON/OFF all work fine.

Motor connected directly to powersupply works. Motor resistance = 10 Ohms.

Powersupply used = from my 3D printer, powersupply is working fine with the printer, outputing up to 12Amps under load, and a steady 12.5volts. .

Wiring is also fine, as i used the shield to go on top of the arduino mega. (to eliminate wiring issues)

Example Code also seems to work fine, as with load removed, you can see LED shifting directions.

I don’t understand what am I missing, because if it’s anything as a 293D Hbridge, a logic High on inA, logic Low on inB, pwm to 255, enabler on logic High, I should have it turn. but it doesnt. (tried this first, then I resumed on copy pasting example code, just in case there is something to do with the CS pins).

One thing maybe, I`m using arduino mega instead of the uno. however code comiples fine, shield attached correctly, (even when I done manual wiring, still same results). I wouldn’t think this should be the issue since when measuring the supposed High and low outputs on the board itself I do have the expected values.

/*  MonsterMoto Shield Example Sketch
  date: 5/24/11
  code by: Jim Lindblom
  hardware by: Nate Bernstein
  SparkFun Electronics
 
 License: CC-SA 3.0, feel free to use this code however you'd like.
 Please improve upon it! Let me know how you've made it better.
 
 This is really simple example code to get you some basic
 functionality with the MonsterMoto Shield. The MonsterMote uses
 two VNH2SP30 high-current full-bridge motor drivers.
 
 Use the motorGo(uint8_t motor, uint8_t direct, uint8_t pwm) 
 function to get motors going in either CW, CCW, BRAKEVCC, or 
 BRAKEGND. Use motorOff(int motor) to turn a specific motor off.
 
 The motor variable in each function should be either a 0 or a 1.
 pwm in the motorGo function should be a value between 0 and 255.
 */
#define BRAKEVCC 0
#define CW   1
#define CCW  2
#define BRAKEGND 3
#define CS_THRESHOLD 100

/*  VNH2SP30 pin definitions
 xxx[0] controls '1' outputs
 xxx[1] controls '2' outputs */
int inApin[2] = {7, 4};  // INA: Clockwise input
int inBpin[2] = {8, 9}; // INB: Counter-clockwise input
int pwmpin[2] = {5, 6}; // PWM input
int cspin[2] = {2, 3}; // CS: Current sense ANALOG input
int enpin[2] = {0, 1}; // EN: Status of switches output (Analog pin)

int statpin = 13;

void setup()
{
  Serial.begin(9600);
  
  pinMode(statpin, OUTPUT);

  // Initialize digital pins as outputs
  for (int i=0; i<2; i++)
  {
    pinMode(inApin[i], OUTPUT);
    pinMode(inBpin[i], OUTPUT);
    pinMode(pwmpin[i], OUTPUT);
  }
  // Initialize braked
  for (int i=0; i<2; i++)
  {
    digitalWrite(inApin[i], LOW);
    digitalWrite(inBpin[i], LOW);
  }
  // motorGo(0, CW, 1023);
  // motorGo(1, CCW, 1023);
}

void loop()
{
  motorGo(0, CW, 1023);
  motorGo(1, CCW, 1023);
  delay(500);

  motorGo(0, CCW, 1023);
  motorGo(1, CW, 1023);
  delay(500);
  
  if ((analogRead(cspin[0]) < CS_THRESHOLD) && (analogRead(cspin[1]) < CS_THRESHOLD))
    digitalWrite(statpin, HIGH);
}

void motorOff(int motor)
{
  // Initialize braked
  for (int i=0; i<2; i++)
  {
    digitalWrite(inApin[i], LOW);
    digitalWrite(inBpin[i], LOW);
  }
  analogWrite(pwmpin[motor], 0);
}

/* motorGo() will set a motor going in a specific direction
 the motor will continue going in that direction, at that speed
 until told to do otherwise.
 
 motor: this should be either 0 or 1, will selet which of the two
 motors to be controlled
 
 direct: Should be between 0 and 3, with the following result
 0: Brake to VCC
 1: Clockwise
 2: CounterClockwise
 3: Brake to GND
 
 pwm: should be a value between ? and 1023, higher the number, the faster
 it'll go
 */
void motorGo(uint8_t motor, uint8_t direct, uint8_t pwm)
{
  if (motor <= 1)
  {
    if (direct <=4)
    {
      // Set inA[motor]
      if (direct <=1)
        digitalWrite(inApin[motor], HIGH);
      else
        digitalWrite(inApin[motor], LOW);

      // Set inB[motor]
      if ((direct==0)||(direct==2))
        digitalWrite(inBpin[motor], HIGH);
      else
        digitalWrite(inBpin[motor], LOW);

      analogWrite(pwmpin[motor], pwm);
    }
  }
}
void motorOff(int motor)

{
  // Initialize braked
  for (int i=0; i<2; i++)
  {
    digitalWrite(inApin[i], LOW);
    digitalWrite(inBpin[i], LOW);
  }
  analogWrite(pwmpin[motor], 0);
}

That looks wrong. Telling it to turn off one specific motor also changes some of the outputs related to the other motor.

The voltage values seem wrong too. If the motor isn’t connected then 12.4V input should give pretty close to 12.4V output. (Did you mis-type the “1”?)

If both copies of the shield are doing the same thing then it is less likely to be a problem with the actual shield. It must be something that you are doing which is common to both. Did you connect the power to the big power connectors or just the Vin pin?

Double-check the traces on the board to ensure that you do have the correct pin assignments. Using a board from one source and code from another might require you to change the pin numbers. The Chinese seem to think that changing one thing on someone else’s design means they didn’t steal the design.