Issue with SMC05A

Hi, I just got my hands on SMC05A. All seems kosher while no load (motors) is connected to the controller. The leds respond as expected to forward/reverse, speed settings. However once the load is connected (Tamiya high speed gearboxes) one of the motors stops responding to commands (leds for that motor stop working as well) at speeds above certain threshold. Below is a sample test code I use replicate the issue, the motors will go back in force until reaching certain speed, after which motor1 stops responding all together until the entire circuit is reset. Checking the forums I can see that noise could be an issue and I am about to get on my way to pick up some capacitors for the motors (don’t have any now) to see if this helps. Any other ideas would be greatly appreciated.


unsigned char buff[4];
void setup()  { 
  Serial.begin(19200); 
 
  // Reset the motor controller on startup
  pinMode(13, OUTPUT);      // sets the digital pin as output
  digitalWrite(13, LOW);
  delay(200); 
  digitalWrite(13, HIGH);
  delay(200);
} 

void loop() { 
  buff[0]=0x80;//start byte
  buff[1]=0x00;//device type
  buff[2]=0x00;//motor
  buff[3]=0x00;
  for (unsigned char speed = 0; p < 127; p ++) {
     for (unsigned char direction = 0; j < 2; j ++) {
        buff[3] = speed;
        for (unsigned char motor = 2; k < 4; k++) {
           buff[2] = motor * 2 + direction;
           for(int i=0;i<4;i++){
              Serial.print(buff[i],BYTE);
           }
       }
       // let the motors spin for a second
       delay(1000);
     }
  }

  // repeat after two seconds
  delay(2000);
}