I used arduino due and Cytron 10A, 3-25V Single DC Motor Controller
(http://www.robotshop.com/ca/cytron-single-dc-motor-controller-3.html)
to control Banebots 12V 15500rpm, 16.65oz-in (stall) RS-395 Brushed DC Motor (http://www.robotshop.com/ca/banebots-12v-15500rpm-16-65oz-in-stall-rs-395-brush-dc-motor.html)
I tested the driver shield with the program below:
// PWM is connected to pin 3.
const int pinPwm = 3;
// DIR is connected to pin 2.
const int pinDir = 2;
// Speed of the motor.
static int iSpeed = 0;
// Acceleration of the motor.
static int iAcc = 1;
/*******************************************************************************
- FUNCTIONS *
*******************************************************************************/
// The setup routine runs once when you press reset.
void setup() {
// Initialize the PWM and DIR pins as digital outputs.
pinMode(pinPwm, OUTPUT);
pinMode(pinDir, OUTPUT);
}
// The loop routine runs over and over again forever.
void loop() {
// Control the motor according to the speed value.
// Positive speed value = CW,
// Negative speed value = CCW.
if (iSpeed >= 0) {
analogWrite(pinPwm, iSpeed);
digitalWrite(pinDir, LOW);
}
else {
analogWrite(pinPwm, -iSpeed);
digitalWrite(pinDir, HIGH);
}
// Increase/Decrease the speed according to the acceleration.
iSpeed += iAcc;
// Change the acceleration sign when full speed is reached.
if ((iSpeed >= 255) || (iSpeed <= -255)) {
iAcc = -iAcc;
}
delay(10);
}
but the result is the motor works well on the CW part, speed up to the highest speed and then slow down to zero.
but the speed keeps zero in the CCW part. which is very wield. So then I test the program below:
// PWM is connected to pin 3.
const int pinPwm = 3;
// DIR is connected to pin 2.
const int pinDir = 2;
void setup() {
// Initialize the PWM and DIR pins as digital outputs.
pinMode(pinPwm, OUTPUT);
pinMode(pinDir, OUTPUT);
}
// The loop routine runs over and over again forever.
void loop() {
analogWrite(pinPwm, 200);
digitalWrite(pinDir, HIGH);
delay(10);
}
Nothing happens, the motor is off and the LED B on the motor drive controller is off.
Can anyone tell me if I have made any mistakes? Thanks a lot.

