Issue with Seeed Studio Motor Shield V2.0 and Arduino UNO

Hi,

I created a video to illustrate my issue, you can find it here: Issue with Seeed Studio Motor Shield V2.0 and Arduino UNO - YouTube

I’m failing to make an Arduino UNO work with a Seeed Studio Motor Shield V2.0 to control a pair of Geeetech Smart Car Tire/Wheel with DC Gear Motor

You can find my code below based on a similar post in the forum. I also tried to make it run with the provided example that includes the library on the wiki with the same results.

I tried using a 9V/170mA battery and a 12V/500mA power adapter. The motor specs are:

Parameter Operating voltage: 3V ~ 12V DC (recommended value is 6 ~ 8V)
Load current: 70mA (250mA MAX)

I don’t think the problem is code related, since I see the LED indicators show the activity expected, as you can see on the video.

Thanks in advance for any help,

Alejandro

    #define M1   8
    #define M2   11
    #define M3   12
    #define M4   13
    #define SPA   9
    #define SPB   10

    int i;

    void setup()
    {
      for (i=8; i<14; i++) pinMode(i,OUTPUT);
    }

    void loop()
    {
      digitalWrite(M1,HIGH);  // direction motor 1
      digitalWrite(M2,LOW);
      digitalWrite(M3,HIGH);  // direction motor 2
      digitalWrite(M4,LOW);

      analogWrite(SPA,130); // 50% to motor 1
      analogWrite(SPB,192); // 75% to motor 2
      delay(1000);
      for (i=130; i>0; i--)
      {
         analogWrite(SPA,i); // reduce speed Motor 1
         delay(50);
      }
      digitalWrite(SPB,LOW); // stop motor 2
      delay (3000);  // wait - then repeat
    }

Those little 9V batteries belong in smoke detectors not robots.

The h-bridge isn't 100% efficient (if it's an older one it's not even close). You need a better power supply (battery pack) to power the motor through the h-bridge.

Four or five NiMH AA cells would probably work great.

BTW, Thanks for making a video showing the problem. That make it very easy to see what was wrong.