Hello guys,
I am trying to drive a DC motor with Arduino Due and L293D Motor Shield but using this simple (and others) code my motor wont even turn (12v).
I tried with a multimeter and i noticed that i have 0v on all M and 12v in EXT_POWER, with jumper in and off.
Which problem coult it be?
void setup() {
pinMode(12,OUTPUT); //Channel A Direction Pin Initialize
}
void loop() {
analogWrite(11, 0); //Channel A Speed 0%
delay(100); //100ms Safety Delay
digitalWrite(12, HIGH); //Channel A Direction Forward
analogWrite(11, 255); //Channel A Speed 100%
delay(1000); //1 Second Delay
analogWrite(11, 0); //Channel A Speed 0%
delay(100); //100ms Safety Delay
digitalWrite(12, LOW); //Channel A Direction Reverse
analogWrite(11, 255); //Channel A Speed 100%
delay(1000);
}
Do you have a high enough voltage to the L293's VCC1 logic supply? If that's hooked up to the Due it will be getting 3.3 but it needs 4.5 to 7 according to L293 datasheet.
Are there actually 3x 293s on the shield? I wonder which one is proving the power to the connector you're using for the motor.
Apart from that, are you enabling the motors though: you need 5V on 293 pin 1 for a 293's "left side motor" and 5V on 293 pin 8 for the "right side motor". I don't know which Arduino pins those translate to.
And then you need high/low or low/high on 293's pin 2/7 for left side and 293's pin 10/15 for the right, whatever Arduino pins those connect to.
JimboZA:
Are there actually 3x 293s on the shield? I wonder which one is proving the power to the connector you're using for the motor.
Apart from that, are you enabling the motors though: you need 5V on 293 pin 1 for a 293's "left side motor" and 5V on 293 pin 8 for the "right side motor". I don't know which Arduino pins those translate to.
And then you need high/low or low/high on 293's pin 2/7 for left side and 293's pin 10/15 for the right, whatever Arduino pins those connect to.
Uhm so i should change my code to try right side motors?
also isnt 8 going to C8?