how to control dc motor with l293d

Thread Starter

bobparihar

Joined Jul 31, 2014
93
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
 

Attachments

BtoomBoom

Joined Mar 31, 2015
5
If I understand it properly you are sending a signal 1 on L293d's pin 2, 0 on pin 3 but nothing on pins 4 and 5. Motor 2 is not going to run on 0,0. Send a high signal on pin 4 or 5 to run it.
 
Top