Arduino Romeo DC motor issue with de-coupling (missing capacitor)

Hi All,

I'm excited with my new Arduino experience. I got Arduino Romeo (aka. DFDruino / DFRobot),
http://www.dfrobot.com/wiki/index.php?title=DFRduino_Romeo-All_in_one_Controller_(Arduino_Compatible_Atmega_328)_(SKU:DFR0004)

I'm using it to control 1 DC motor. When I ran the code and simulate the Serial communication,
the motor ran for a while. After a few tries and changing the PWM speed, the motor couldn't move anymore.
It has a noise / high sound. Even when I put the PWM speed back to initial speed (100), the motor doesn't move at all.

But when I connect the motor directly to the battery, it works fine. I'm using 9V battery.

After I did much research, I found out it has something to do with de-coupling.
It says I need to put a capacitor.
http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html

The problem is I'm new to arduino.

  1. Does Arduino Romeo has a capacitor? Please refer to the board picture in the wiki page.
  2. Where should I put the capacitor on this Arduino Romeo? Can you show me from the board picture. Schema is too difficult for me.
  3. Does it need to be soldered?

Thanks in advance. I would appreciate your comment and your input.

int E1 = 5;     //M1 Speed Control
int E2 = 6;     //M2 Speed Control
int M1 = 4;    //M1 Direction Control
int M2 = 7;    //M1 Direction Control
 
///For previous Romeo, please use these pins.
int E1 = 6;     //M1 Speed Control
int E2 = 9;     //M2 Speed Control
int M1 = 7;    //M1 Direction Control
int M2 = 8;    //M1 Direction Control
 
 
void stop(void)                    //Stop
        {
          digitalWrite(E1,LOW);  
          digitalWrite(E2,LOW);     
        }  
void advance(char a,char b)          //Move forward
        {
          analogWrite (E1,a);      //PWM Speed Control
          digitalWrite(M1,HIGH);   
          analogWrite (E2,b);   
          digitalWrite(M2,HIGH);
        } 
void back_off (char a,char b)          //Move backward
        {
          analogWrite (E1,a);
          digitalWrite(M1,LOW);  
          analogWrite (E2,b);   
          digitalWrite(M2,LOW);
}
void turn_L (char a,char b)             //Turn Left
        {
          analogWrite (E1,a);
          digitalWrite(M1,LOW);   
          analogWrite (E2,b);   
          digitalWrite(M2,HIGH);
        }
void turn_R (char a,char b)             //Turn Right
        {
          analogWrite (E1,a);
          digitalWrite(M1,HIGH);   
          analogWrite (E2,b);   
          digitalWrite(M2,LOW);
        }
void setup(void)
{
    int i;
    for(i=6;i<=9;i++)
    pinMode(i, OUTPUT); 
    Serial.begin(19200);      //Set Baud Rate
}
void loop(void)
{
     char val = Serial.read();
     if(val!=-1)
       {
          switch(val)
           {
             case 'w'://Move Forward
                     advance (100,100);   //PWM Speed Control
                     break;
             case 's'://Move Backward
                     back_off (100,100);
                     break;
             case 'a'://Turn Left
                     turn_L (100,100);
                     break;      
             case 'd'://Turn Right
                     turn_R (100,100);
                     break;         
            }    
          delay(40);
       }
      else stop(); 
}

The board's motor controller is designed to drive motors, it will have all the necessary decoupling built in!

Is your motor compatible with this board - the fact it stopped working suggests it might have overloaded it. There may be a thermal-cut-out on the motor driver chip - try waiting a few minutes and trying again briefly. Is the motor power supply to the board OK (A 9V PP3 battery is not beefy enough to drive motors, note)

Thanks MarkT.

You are right! It has something to do with the motor. I have 2 motors from 2 different cars. Both are operating under 3v. The first motor, has an issue.
The second motor has the issue because it requires more power. So when I used 9v battery it works well now.
I don't know why it doesn't work on 3v battery. Is it because some of the power goes to the board.
Anyway, thanks again for pointing this out.

Yes, if that motor controller is using bipolar H-bridge it could easily lose a couple of volts (or more if Darlingtons). Just add some more volts to the power source to compensate.