You are on page 1of 5

Robotics (ME G511 Motors

Prof.. YVD Rao


BITS Pilani
Hyderabad Campus
DC Motor

DC Motor (60 RPM) L293D Motor Driver IC 16 Pins in L293D Motor Driver IC
Max. Operating Voltage-36V
Max. Operating Load- 600mA

BITS Pilani, Hyderabad Campus


Max. Operating Voltage-36V
L293D Motor Driver IC Max. Operating Load- 600mA

5V 5V

Pin 3
Motor
GND
GND
Motor
Pin 4
Battery +ve

BITS Pilani, Hyderabad Campus


Circuit Diagram-Single Motor

BITS Pilani, Hyderabad Campus


Arduino Code-DC
Servo Motor
//Motor Pin Initialization //Motor Control -: motorPin1,motorpin2
int motorPin1 = 3; //This code will turn the Motor clockwise for 2 sec.
int motorPin2 = 4; digitalWrite (motorPin1, HIGH);
//This will run only one time. digitalWrite (motorPin2, LOW);
void setup() delay(2000);
{ //This code will turn the Motor counter-clockwise for 2 sec.
//Set pins as outputs digitalWrite (motorPin1, LOW);
pinMode(motorPin1, OUTPUT); digitalWrite (motorPin2, HIGH);
pinMode(motorPin2, OUTPUT); delay(2000);
//And this code will stop motor
digitalWrite (motorPin1, LOW);
digitalWrite (motorPin2, LOW);
}
void loop()
{
}
Thank you
BITS Pilani, Hyderabad Campus

You might also like