here i am trying to interface dc motor with arduino uno for this i am using L293d, following is my code for rotating motor in either direction
void setup() {
// put your setup code here, to run once:
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(2, HIGH);
digitalWrite(3, LOW);
}
following is my circuit of L293D and the circuit board in the attachment
now the problem i am facing is when i connect the motor input and output at the left side of the motor( out 1 and out 2) the motor rotates but when i connect motor at Right of IC(out 3 and out 4) the motor does not rotate
left side of the ic working right side doesn't .. even i have cross checked that both Enable pin is shorted to vcc
void setup() {
// put your setup code here, to run once:
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(2, HIGH);
digitalWrite(3, LOW);
}
following is my circuit of L293D and the circuit board in the attachment
now the problem i am facing is when i connect the motor input and output at the left side of the motor( out 1 and out 2) the motor rotates but when i connect motor at Right of IC(out 3 and out 4) the motor does not rotate
left side of the ic working right side doesn't .. even i have cross checked that both Enable pin is shorted to vcc
Attachments
-
1.7 MB Views: 23
-
1.7 MB Views: 19
-
2.3 MB Views: 19