motor shield v2.3

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
jdelcamp11
 
Posts: 283
Joined: Mon Nov 17, 2014 12:30 am

motor shield v2.3

Post by jdelcamp11 »

I am running a motor shield v2.3 with two 6V dc motors on a Due, IDE1.62
My shield works fine for about 10 minutes, then stops responding to commands.
The issue seems to arise immediately after switching from forward to reverse.
The program continues to run and my debug shows it is sending the motor control commands.
But the shield is not executing them.
It doesn't happen every time. But once it does the shield will not execute any new commands.
I suspect the instantaneous switch in polarity is causing some kind of back emf that knocks out the shield communication.
To reestablish motor control, I have to remove all power to the system and then restart.
I have already checked all the solder joints.
Because the motors are reversable I can't use diodes.
I think I remember something about soldering capacitors on the motors. Would this help resolve the issue.
Alternatively, do I need to issue a stop motors / delay / restart in reverse.
Here is the snippet of code that seems to initiate the issue (there are equivilant ones for "turn right" and for "reverse")

Code: Select all

case 'a'://Turn Left
           neopixel(150,0,150);  
           
           leftspeed  = 150; 
           rightspeed = 150;  
           mtr_4_dir = "BACKWARD";
           mtr_3_dir = "FORWARD";
           motor4->run(BACKWARD);
           motor3->run(FORWARD);
           motor_ctrl ();
           
           targetHeading =  targetHeading - 90;
            if (targetHeading < 0) 
                { targetHeading = targetHeading + 360; }
           readCompass();
                
           while(errDir > 5 )
                { readCompass();  
                  chkClient();
                  delay(300);  //needed for read errors??
                }
               
           // reset to forward    
           mtr_3_dir = "FORWARD";
           mtr_4_dir = "FORWARD";
           motor3->run(FORWARD);
           motor4->run(FORWARD);
           
           neopixel(0,150,150);
         break;
  return;   
   }  // end of switch case
 
    // update controls with command received
    motor_ctrl ();
    setServo(panservo, angle);

//****  Motor control subroutine **** 
        void motor_ctrl()
  {
      motor4->setSpeed(leftspeed);  
      motor3->setSpeed(rightspeed);  
     //*
     Serial.print("   Left: ");
     Serial.print(leftspeed);
     Serial.print("     Right: ");
     Serial.println(rightspeed);
    //*/
  }   // end of motor control  ************************************/
I haven't yet tried rewiring the motors to M1 and M2. I'll try that tomorrow.
Any suggestions?

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: motor shield v2.3

Post by adafruit_support_bill »

Do you have a spec sheet for the motors you are using?
The abrupt reversal will create substantial back-emf, but there are kickback diodes built into the bridge chips.

User avatar
jdelcamp11
 
Posts: 283
Joined: Mon Nov 17, 2014 12:30 am

Re: motor shield v2.3

Post by jdelcamp11 »

They are the adafruit motors id 711

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: motor shield v2.3

Post by adafruit_support_bill »

EMI from the motor is somewhat proportional to the current draw and the abrupt reversal is creating a momentary stall condition. That may be enough interference to disrupt the operation of one or more chips on the shield.

You can try soldering some capacitors to the motors to help suppress the brush noise. There are some details on that in the FAQ in the shield guide.
Adding a short stop and delay before reversing may help also.

User avatar
jdelcamp11
 
Posts: 283
Joined: Mon Nov 17, 2014 12:30 am

Re: motor shield v2.3

Post by jdelcamp11 »

The FAQ I saw shows three capacitors. But does not list the size (or polarity if needed).
Is there a separate FAQ that gives details or can you recommend the appropriate capacitors for your 711 motors?
Thanks

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: motor shield v2.3

Post by adafruit_support_bill »

0.1uF ceramic is a good value to use.

User avatar
jdelcamp11
 
Posts: 283
Joined: Mon Nov 17, 2014 12:30 am

Re: motor shield v2.3

Post by jdelcamp11 »

Thanks. I'll give it a try.

User avatar
jdelcamp11
 
Posts: 283
Joined: Mon Nov 17, 2014 12:30 am

Re: motor shield v2.3

Post by jdelcamp11 »

Nothing has worked so far.
M1 and M2 show the same issue as M3 and M4 (perhaps failing sooner).
Adding the stop / delay / restart did not improve the situation.
I have not yet added the capacitors to the motors.
Is it possible I fried something on the motor shield?

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: motor shield v2.3

Post by adafruit_support_bill »

Try the capacitors on the motors. These have helped in the past.

User avatar
jdelcamp11
 
Posts: 283
Joined: Mon Nov 17, 2014 12:30 am

Re: motor shield v2.3

Post by jdelcamp11 »

I have finally received and installed the capacitors.
This has not resolved the issue.
The bot runs properly for 10-15 minutes then the motor board stops responding to commands.
The program continues running but there is no motor control. They continue in whatever mode they were in when communication to the shield locks up. Pressing reset does not fix it. I have to power down.
If I remove all power then restart, everything is normal again for a short time then locks up again.

Is my motor shield damaged??????????????

User avatar
Will35
 
Posts: 5
Joined: Thu May 14, 2015 1:41 pm

Re: motor shield v2.3

Post by Will35 »

Hi, I'm a beginner, I'm trying to build small car built from an Actobotics Kit (the ActoBitty, which has two dc motors used to drive wheels) an Arduino uno, and the Adafruit motor shield v2. I set up the motor shield to be stackable. The problem I'm having is that the motors are not running at the same speed. The wheel hooked up to M1 runs faster than the one hooked to M2. I switched the motors around and M1 is consistently going faster. Any ideas as to what I might be doing wrong?
Also the motors do not run forward and backward at the same speed. Should they? Thanks!

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino Shields from Adafruit”