Instructables
Hey friends this is my 3rd year BE project " Speed control of DC motor"which i could like to share with you .In this you will learn how to interface LCD,hex keypad and motor .The code is written in assembly      
to simplify I have first explained separately LCD interfacing hex keypad interfacing ,motor interfacing with L293D 

so Lets get Started !!!
 
Remove these adsRemove these ads by Signing Up

Step 1: Materials required

Picture of Materials required
CAM01951.jpg
CAM01956.jpg
CAM02001.jpg
*89S52
*LCD 
*Hex keypad
*DC motor 



I assume u have basic knowledge of 8051 programming in assembly

Step 2: Interfacing DC motor -L293D

Picture of interfacing DC motor  -L293D
L293D is a dual H-Bridge motor driver, So with one IC we can interface two DC motors which can be controlled in both clockwise and counter clockwise direction we can control speed of each dc motor by giving PWM to enable pin .L293D has output current of 600mA and peak output current of 1.2A per channel. Moreover for protection of circuit from back EMF ouput diodes are included within the IC. The output supply (VCC2) has a wide range from 4.5V to 36V, which has made L293D a best choice for DC motor driver.

    As you can see in the circuit, three pins are needed for interfacing a DC motor (A, B, Enable). If you want to control speed enable pin is connetcted to the PWM pin of microcontroller . I have connected only one motor and  used the enable pin to contol the speed of dc motor.
abasit32 months ago

SIR SUGGEST ME

abasit32 months ago

SIR..

IF THE MOTOR MOTION IS AUTOMATIC, MEANS WHEN CONTROLLER POWER UP, IT KNOWS THE ROUTINE AND IT DOING IT BECAUSE OF FEEDBACK. LIKE IN INDUSTRIES, ROBOT KNOWS ROUTINE AND IT ALWAYS DOING WITHOUT ANY INTERRUPTS.IN SHORT, IT RESERVE FOR ONLY ONE PURPOSE.. SUGGEST ME A GOOD ARTICLE ABOUT THIS AUTOMATIC CODING.

THANKS....

abasit32 months ago

yes sir.. i have this book.

thanks for guidence.

abasit32 months ago

THANKS SIR.. THIS IS GOOD ARTICLE.

SIR MY PROJECT IS THAT A ROBOTIC ARM WHICH ROTATES IN 3 DIRECTION.SIR I WANT THAT I CONNECT LCD WITH 8051 uc & WHEN ROBOTIC ARM GOES ANY DIRECTION, IT SHOWS ON LCD,LIKE IF ARM IS MOVING UP SO THE LINE "ROBOTE MOVING UP" IS DISPLAY ON LCD. IS THIS POSSIBLE??? IS THIS POSSIBLE WITH PROGRAMMING????

sunil93 (author)  abasit32 months ago

Hey buddy its possible ,I recommend you to first learn programming of 8051,better to study C as it is easy then assembly and complex logic can easily be written and debug-ed.

refer muhammad ali mazide 8051 its a great book you will get LCD code there.

abasit33 months ago

hello sir.....

this motor has variable speed . if i want to drive in clockwise as well as anticlockwise what the code of this operation????

also L293d this ic can drive two motors at a time,so if i connect two motors , do both motors rotate at the same time?????

sunil93 (author)  abasit32 months ago

You need only 2 L293D driver IC, actually you can drive 4 motors with two L293D

sunil93 (author)  abasit33 months ago

For changing the direction of the motor you simple need to change the inputs A B of L293D

yeah you can connect the two motors but to make it rotate you need to connect the AB inputs and Enable2 inputs of second motor. study L293D and all your doubts will be cleared.

abasit32 months ago

HELLO SIR..

sir if i want to drive 3 motors, can i use 2 l293d to drive 3 ic or we can use 3 ic with one l293d ic??????

i am making a robotic arm which moves in 3 direction so i have to use 3 motors....

carlos66ba1 year ago
This is an interesting circuit and well made instructable. Note that what you are controlling is the power, not speed, however. For a future development consider adding a feedback loop that measures actually controls the speed.
sunil93 (author)  carlos66ba1 year ago
thanx man........yeah you are right by varying PWM power is controlled