L293D Motor Driver | Speed Control Robot

L293D Motor Driver

l293d

L293D is a H-bridge motor driver IC . This is used mostly as a speed controller . L293D Motor Driver act as driver because it drives the motor . Reason : Motor Driver is used as a current amplifiers as it amplifies the current signal by taking low – current signal and amplifying it to higher – current signal .This is standard 16 pin dual-in line Integrated Circuit ( IC ).

 

 

L293D Data Sheet

 

 

 

ln293d

Pin Configuration

 Pin No
 Function
 Name
1
Enable pin for Motor 1; active high
Enable 1,2
2
Input 1 for Motor 1
Input 1
3
Output 1 for Motor 1
Output 1
4
Ground (0 V)
Ground
5
Ground (0 V)
Ground
6
Output 2 for Motor 1
Output 2
7
Input 2 for Motor 1
Input 2
8
Supply voltage for Motors; 9-12 V (up to 36 V)
 V cc 2
9
Enable pin for Motor 2; active high
Enable 3,4
10
Input 1 for Motor 1
Input 3
11
Output 1 for Motor 1
Output 3
12
Ground (0 V)
Ground
13
Ground (0 V)
Ground
14
Output 2 for Motor 1
Output 4
15
Input 2 for Motor 1
Input 4
16
Supply voltage; 5 V (up to 36 V)
V cc 1

 

As it is said to be H-bridge driver circuit because it consists of two inbuilt H-Bridge driver circuits . when in common mode it can be used to drive the two motors simultaneously both in forward direction and reverse direction giving input as 1001 &  o11o according to user comparability .    When the Input logic is 00 or 11 will stop the corresponding motors . Input logic 01 and 10 will rotate the motors in clockwise and anticlockwise direction respectively . This motor driver to drive motor can be controlled by giving the input logic at pin 2 & 7 for one motor and 10 & 15 for the other motor . Pin 1 and Pin 9 should be at high to make the motor work operations . When this given input is high the motor driver gets enabled and hence the motor start working in respective direction , whereas when the input is low the motor driver get disabled and as a result the motor stop working , hence the output is zero and there is a high impedance .


Small code for functioning L293D

#define ENABLE 3 #define DIRB 4 #define DIRA 5 void setup() { int i; //—set pin direction pinMode(ENABLE,OUTPUT); pinMode(DIRA,OUTPUT); pinMode(DIRB,OUTPUT); //—back and forth exampledigitalWrite(ENABLE,HIGH); // enable on for (i=0;i<5;i++) { digitalWrite(DIRA,HIGH); //one way digitalWrite(DIRB,LOW); delay(500); digitalWrite(DIRA,LOW); //reverse digitalWrite(DIRB,HIGH); delay(500); } digitalWrite(ENABLE,LOW); // disable delay(4000); //—fast/slow stop example digitalWrite(ENABLE,HIGH); //enable on digitalWrite(DIRA,HIGH); //one way digitalWrite(DIRB,LOW); delay(1000); digitalWrite(ENABLE,LOW); //slow stop delay(3000); digitalWrite(ENABLE,HIGH); //enable on digitalWrite(DIRA,HIGH); //one way digitalWrite(DIRB,LOW); delay(1000); digitalWrite(DIRA,LOW); //fast stop delay(3000); //—PWM example, full speed then slow digitalWrite(ENABLE,HIGH); //enable on digitalWrite(DIRA,HIGH); //one way digitalWrite(DIRB,LOW); delay(2000); analogWrite(ENABLE,128); //half speed delay(2000); digitalWrite(ENABLE,LOW); }void loop() { } 

For More Free Gyaan Visit Here

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s