Seeed Arduino 4a motor shield only uses in3 & in4

If you need technical help with anything you've bought from Dawn Robotics, please post here.

Seeed Arduino 4a motor shield only uses in3 & in4

Postby Bastian » Sat Nov 14, 2015 6:14 pm

Hi I'm trying to get this shield working, but up till now only one half works (i.e. the motor connected to in3 and in4). Maybe someone recognizes this and has found a solution.

What I've tried so far:
- installed the Seeed library (MotorDrive20121210) and ran the example sketch through the arduino ide
- switched motors => both worked fine with in3 and in4 but stayed dead while connected to in1 and in2
- switched several times the power source: lipo 7.4V/2200mAh, NiMh 9V/2400mAh, powerbank 5V/12000mAH
- switched to another (brand new) arduino uno
- used a sketch to address the pins directly (without using the Seeed library) The pins used in1=8, in2=11, in3=12, in4=13, pwmA=9, pwmB=10.

Using a multimeter I can read in3 and in4 while a sketch runs and get a positive value (or negative when I switch the polarity) between 6 and 9 volts.

So now I think there are 2 options left:
- I'm using the wrong pins for in2/3 (but they're the same as in the Seeed library)
- The shield is malfunctioning (also brandnew and recieved it in a originally sealed box)

I'm realy looking forward to some help/advice here.
Bastian
 
Posts: 23
Joined: Fri Nov 28, 2014 11:30 am

Re: Seeed Arduino 4a motor shield only uses in3 & in4

Postby Bastian » Sun Nov 15, 2015 10:08 pm

Eventually it turned out that the pin settings were causing the problem.
The scheme of the shield published by Pololu is wrong. (Can be checked with a multimeter.)
In line with that the pinsettings of the Pololu library are also wrong! (A bit sloppy of Pololu)

The right pinsettings should be:

const unsigned int MOTORSHIELD_IN1 = 5;
const unsigned int MOTORSHIELD_IN2 = 6;
const unsigned int MOTORSHIELD_IN3 = 7;
const unsigned int MOTORSHIELD_IN4 = 8;
const unsigned int SPEEDPIN_A = 9;
const unsigned int SPEEDPIN_B = 10;

The #defines can be easily edited in the .cpp file, but one might as well code the statements directly in a sketch (The library is in fact just a module, coded in C++)

Cheers!
Bastian
 
Posts: 23
Joined: Fri Nov 28, 2014 11:30 am

Re: Seeed Arduino 4a motor shield only uses in3 & in4

Postby Alan » Tue Nov 17, 2015 7:22 pm

Dear Bastian,

Glad to hear that you're up and running with the shield. Sorry you had problems with it, I've updated the product page to point here, explaining that there's a bug in the supplied Arduino library.

Also, for people coming to this post later on I'm assuming that you meant Seeed Studio, not Pololu, in your second post? We never stocked Pololu products, but as far as I know, they have a reputation for not being sloppy. ;)

Regards

Alan
Alan
Site Admin
 
Posts: 311
Joined: Fri Jun 14, 2013 10:09 am


Return to Technical Support

Who is online

Users browsing this forum: No registered users and 2 guests