Is Adafruit Motor shield able to control multiple motors?

by jiapei100 on Sun Mar 17, 2013 2:16 am

Hi, sorry for my naive question. Just about to purchase an adafruit Arduino motor shield.
I'm just wondering if Adafruit Motor shield is able to control multiple motors?

Cheers
Pei
Welcome to Vision Open
http://www.visionopen.com
jiapei100
 
Posts: 17
Joined: Sun Mar 17, 2013 2:13 am

Re: Is Adafruit Motor shield able to control multiple motors?

by adafruit_support_bill on Sun Mar 17, 2013 6:12 am

Yes. It can control up to 4 DC motors or 2 stepper motors. Plus 2 servo motors.

http://www.adafruit.com/products/81
User avatar
adafruit_support_bill
 
Posts: 25402
Joined: Sat Feb 07, 2009 9:11 am

Re: Is Adafruit Motor shield able to control multiple motors?

by jiapei100 on Mon Mar 18, 2013 2:30 am

Thank you very much for your prompt reply.
Can I ask you a further question?

What is the difference between a Adafruit Motor shield with a normal Arduino motor shield? Are they the same thing?


Thank you.
Pei

adafruit_support wrote:Yes. It can control up to 4 DC motors or 2 stepper motors. Plus 2 servo motors.

http://www.adafruit.com/products/81
Welcome to Vision Open
http://www.visionopen.com
jiapei100
 
Posts: 17
Joined: Sun Mar 17, 2013 2:13 am

Re: Is Adafruit Motor shield able to control multiple motors?

by adafruit_support_bill on Mon Mar 18, 2013 5:29 am

The newest Arduino motor shield is based on an L298 chip and can control 2 DC motors or 1 stepper. The maximum current for the motors is 2A.
The Adafruit motor shield is based on 2 L293D chips and can control 4 DC motors or 2 steppers. The maximum current for the motors is 600mA.
User avatar
adafruit_support_bill
 
Posts: 25402
Joined: Sat Feb 07, 2009 9:11 am

Re: Is Adafruit Motor shield able to control multiple motors?

by jiapei100 on Mon Mar 18, 2013 11:43 pm

Wow...Thank you !! But ... sorry. Little hardware/circuit experience. shameful.
Anyway, to use an Adafruit motor shield or the newest Arduino motor sheild has no difference, right? Just combine(plug in accordingly) two boards together and make both become a whole piece, right? Sorry for my naive word - I really have no idea how to describe it.

I mean, do I have to know the currency is 2A or 660mA? Or, just plug motor shield into the Arduino Uno, and that's it?


adafruit_support wrote:The newest Arduino motor shield is based on an L298 chip and can control 2 DC motors or 1 stepper. The maximum current for the motors is 2A.
The Adafruit motor shield is based on 2 L293D chips and can control 4 DC motors or 2 steppers. The maximum current for the motors is 600mA.
Welcome to Vision Open
http://www.visionopen.com
jiapei100
 
Posts: 17
Joined: Sun Mar 17, 2013 2:13 am

Re: Is Adafruit Motor shield able to control multiple motors?

by adafruit_support_bill on Tue Mar 19, 2013 4:58 am

If you check specifications for your motors, they should indicate the maximum current required. If it is more than 600mA (0.6A) then the Arduino motor shield is a better choice.

Both shields will plug directly into the UNO.

You should also check the specification for the motor voltage. If the motor requires something other than 8-9v, then you will need an external power supply for the motors also.
User avatar
adafruit_support_bill
 
Posts: 25402
Joined: Sat Feb 07, 2009 9:11 am

Re: Is Adafruit Motor shield able to control multiple motors?

by jiapei100 on Thu Apr 04, 2013 4:30 am

Hi,

After I received the motor shield from Adafruit, I started testing.

I'm now trying to trigger 2 motors at the same time, it seems this is still a bit tough for me. I simply modified
MotorTest in AFMotor a bit, the code is attached as:

Code: Select all
// Adafruit Motor shield library
// copyright Adafruit Industries LLC, 2009
// this code is public domain, enjoy!

#include <AFMotor.h>

AF_DCMotor motorLeft(1);
AF_DCMotor motorRight(4);

void setup() {
  Serial.begin(9600);           // set up Serial library at 9600 bps
  Serial.println("Motor test!");

  // turn on motor
  motorLeft.setSpeed(200);
  motorRight.setSpeed(200);
 
  motorLeft.run(RELEASE);
  motorRight.run(RELEASE);
}

void loop() {
  uint8_t i;
 
  Serial.print("tick");
 
  motorLeft.run(FORWARD);
  motorRight.run(FORWARD);
  for (i=0; i<255; i++) {
    motorLeft.setSpeed(i);
    motorRight.setSpeed(i);
    delay(10);
 }
 
  for (i=255; i!=0; i--) {
    motorLeft.setSpeed(i); 
    motorRight.setSpeed(i);
    delay(10);
 }
 
  Serial.print("tock");

  motorLeft.run(BACKWARD);
  motorRight.run(BACKWARD);
  for (i=0; i<255; i++) {
    motorLeft.setSpeed(i); 
    motorRight.setSpeed(i);
    delay(10);
 }
 
  for (i=255; i!=0; i--) {
    motorLeft.setSpeed(i); 
    motorRight.setSpeed(i);
    delay(10);
 }
 

  Serial.print("tech");
  motorLeft.run(RELEASE);
  motorRight.run(RELEASE);
  delay(1000);
}


As you can see, I'm trying to use M1 and M4. The current phenomenon is:
1) Whenever I tried to use M4 to trigger any single motor, it works ok, noiseless at all.
2) Whenever I tried to use the other 3 motor pins, there is a noise from the motor, which seems to hint that the power is not strong enough to trigger the motor (and the wheels)


I am actually using Tamiya 70097 Twin-Motor Gearbox Kit + Tamiya 70100 Track and Wheel Set
which can be respectively found at
http://www.pololu.com/catalog/product/61
http://www.pololu.com/catalog/product/106


From the specification http://www.pololu.com/catalog/product/61/specs, I'm guessing the Arduino Motor Sheild V1.1 should be able to provide enough power (my Arduino is USB connected to my desktop.)


So, any suggestions please?


Cheers
Pei


adafruit_support wrote:If you check specifications for your motors, they should indicate the maximum current required. If it is more than 600mA (0.6A) then the Arduino motor shield is a better choice.

Both shields will plug directly into the UNO.

You should also check the specification for the motor voltage. If the motor requires something other than 8-9v, then you will need an external power supply for the motors also.
Welcome to Vision Open
http://www.visionopen.com
jiapei100
 
Posts: 17
Joined: Sun Mar 17, 2013 2:13 am

Re: Is Adafruit Motor shield able to control multiple motors?

by jiapei100 on Thu Apr 04, 2013 5:53 am

Okay, I noticed it here
http://forums.adafruit.com/viewtopic.php?f=31&t=26873 .
But my motors are only 3v.
If you are having trouble getting your low-voltage hobby gear motors to run, we have 4.5-9v replacement motors that fit many of these drivetrains in the store. http://www.adafruit.com/products/711


But, are you sure this motor http://www.adafruit.com/products/711 is of the same size of the 3volt motor here http://www.pololu.com/catalog/product/61 ???


Cheers
Pei


adafruit_support wrote:If you check specifications for your motors, they should indicate the maximum current required. If it is more than 600mA (0.6A) then the Arduino motor shield is a better choice.

Both shields will plug directly into the UNO.

You should also check the specification for the motor voltage. If the motor requires something other than 8-9v, then you will need an external power supply for the motors also.
Welcome to Vision Open
http://www.visionopen.com
jiapei100
 
Posts: 17
Joined: Sun Mar 17, 2013 2:13 am

Re: Is Adafruit Motor shield able to control multiple motors?

by adafruit_support_bill on Thu Apr 04, 2013 6:11 am

Yes. Those gearboxes use "130" size motors, so our replacement motors will fit.
User avatar
adafruit_support_bill
 
Posts: 25402
Joined: Sat Feb 07, 2009 9:11 am

Re: Is Adafruit Motor shield able to control multiple motors?

by jiapei100 on Thu Apr 04, 2013 7:02 am

Purchased. Waiting for the posting.

My god...
Limor Fried is definitely a talent...


Cheers
Pei

adafruit_support wrote:Yes. Those gearboxes use "130" size motors, so our replacement motors will fit.
Welcome to Vision Open
http://www.visionopen.com
jiapei100
 
Posts: 17
Joined: Sun Mar 17, 2013 2:13 am