MDD3A motor driver twitch

Hi
The linier motors i am using work briliiantly with the MDD3A driver. The only problem that i have is that when I power everything on the motors move seamingly of there own accord.

is there anything i can do so that the motors do not move when the board and drivetrs are foirst powerd up?

#include "CytronMotorDriver.h"

// Configure the motor driver.
CytronMD motor1(PWM_PWM, 3, 9); // PWM 1A = Pin 3, PWM 1B = Pin 9.
CytronMD motor2(PWM_PWM, 10, 11); // PWM 2A = Pin 10, PWM 2B = Pin 11.

// The setup routine runs once when you press reset.
void setup() {
motor2.setSpeed(0);
}

// The loop routine runs over and over again forever.
void loop() {

motor2.setSpeed(0);
for (int i = 0; i <= 255; i++) {

delay(10);

motor2.setSpeed(i);  // Motor 2 runs backward at 50% speed.
delay(1000);

}
}

Cheers
Rob

There could be a cure.
Could You post a link to the drivers data sheet and schematics for the driver wiring?

https://www.robotshop.com/media/files/content/c/cyt/pdf/cytron-3a-4-16v-dual-channel-dc-motor-driver-datasheet.pdf

I have run the arduino Example Blink program with no referance to the motor driver libary, the motor starts and runs continuesly

Thanks. How is it wired to the controller?
Schenatics of that, please.
At power up the controller I/O pins are either in treestate or set as inputs. Connect pulldown resistors to the controller-driver pins. Some 4.7 kOhm to 10 kOhm would do.

Thanks

Exactly as in this diagram
for two motors
https://www.robotshop.com/media/files/content/c/cyt/pdf/cytron-3a-4-16v-dual-channel-dc-motor-driver-datasheet.pdf
no pullup resistors AFAIK

Hi,
Unfortunately they are not schematics.

They are images with coloured wires.
Please draw a proper schematic, hand drawn image is fine.
Include Power Supplies, component labels and pin names, your controller.
Reverse engineer your project and draw a circuit diagram.

What model controller are you using?

Thanks.. Tom... :grinning: :+1: :coffee: :australia:

No pulls.... Instal 10 kOhm pulldowns, or ups, to the 4 PWM lines.

Before i installed the pull down resistor I tried the driver on pins on 3 and 9
CytronMD motor1(PWM_PWM, 3, 9); // PWM 1A = Pin 3, PWM 1B = Pin 9.

Rather than 10 and 11.
//CytronMD motor2(PWM_PWM, 10, 11); // PWM 2A = Pin 10, PWM 2B = Pin 11.

On 3 and 9 there is no Twitch, on 10 and 11 there is the Twitch.

is there some fundermental diffarence between thease pins?
or is it just chance and i should use the pulldown to be on the safe side?

For My project im using 6 motors so will need 3 x MDD3A boards controled by 12 pins.

Mega 2560

Cheers Rob

Aha. I'm an UNO guy so I can't tell for sure. Information like this, which controller is used should always be told in the first post.
My reply #5... At power up some built in code is executed. For instance, is a download in progress or not? If not (some second or two later) the execution of the code, setup and the loop takes place. During that initial startup some small things take place with the/some? I/O pins.

Nice You got it working. Keep the pulldowns on the desk.... See them as a spare try if things go strange again.

Thanks, Glad i did not mention mega in first post, as you may not have responed with the very usefull info you have given me,, Thanks.

Though in future I will be putting boad in first post :grinning:

Maybe some Mega expert had stepped in earlier.....
Mysteries never help. It's frustrating to spend time and effort to create the original question.
The pulldown possibility works for several, maybe even many, controllers....

For referance I got the 12 PWM pins needed
2,3,5,6,7,8 ,9,11,12,44,45,46 on Mega v.3

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.