Pages

Chapter 7.4 - Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board - Practical Tutorial

Alright, we hope that you have your components ready. Now lets start with the Practical Tutorial.

First remove the IR LED and photodiode from the setup. 

1. Now Take L293D motor driver IC and place it on the breadboard as shown in the following image. Just make sure the notch of the IC is pointed towards the 7805 Regulator IC.
Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board
Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board
2. See here in the below image is the closer view of the placement. So that you can understand the spacing of placement of L293D more clearly.

Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board
Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board

3. Now short the pin no. 4 and 5 of L293d Motor Driver. See the following image for comparison.

Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board
Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board

4. The setup will look something like this as shown in the below image.

Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board
Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board

5. Now similarly connect Pin no. 12 and 13 and short it as shown in the following image.

Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board
Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board

6. Now connect the pin no 4 to Gnd. Just try to make it clean.

Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board
Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board

7. Similarly connect the pin no. 13 to the Gnd lane of breadboard as shown in the below figure.

Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board
Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board

8. Just try to make it clean as shown in the below image.

Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board
Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board

9. Now Connect the Pin No 16 into +5V lane of breadboard. It is powersupply pin for L293d Motor Driver IC.

Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board
Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board

10. Now connect the Pin no 1 of L293d Motor Driver to the +5V lane of the breadboard. It is enable pin, which will enable the 1st part of the IC.

Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board
Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board

11. Now, similarly, connect the Pin no 9 to the +5V lane of breadboard, this is enable pin for other part of the circuit. When it is connected to +5V lane, the Enable pin will receive login 1 which will enable the circuit.

Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board
Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board

12. Once again, just tally your breadboard connections with the below image.

Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board
Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board

13. Now, L293d Motor Driver IC needs external power source to run a motor for that we need to prepare a setup for that too. As you can see in the following image, We have extended the Gnd Terminal(Top Right corner Black wire coming out from gnd lane) and VCC (green wire connection coming out from the Pin No. 8). Just copy the connections. We will tell you in the end why we had done so.

Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board
Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board

14. Now, connect the Input1 or 1A to the Pin No. 17 or Port 3.7 of Microcontroller.

Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board
Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board
15. If you are confused, follow the below image for instructions. Just make sure the length wire must be not too short or not too long.

Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board
Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board

16. It would look something like this.

Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board
Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board

17. Now, connect it to Port 3.7 or Pin no. 17 of the Micrcontroller like shown in the below image.

Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board
Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board


18. Now connect the 2A or Input2 or Pin no 7 of L293d Motor Driver IC to Port 3.6 or Pin no. 16 of 8051 Microcontroller.

Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board
Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board

19. See the following image for the quick reference.

Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board
Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board

20. The whole setup will look like as shown in the below image.

Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board
Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board

21. Now, similarly connect the Pin No. 15 or Port 3.5 of Microcontroller to 4A or Input 4 of L293d Motor Driver IC.

Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board
Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board

22. See the below image for the quick reference.

Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board
Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board

23. Now, connect 3A or Input 3 or pin no 10 of L293d Motor Driver IC to Port 3.4 of Microcontroller.

Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board
Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board

24. It is connected to Pin no 14 or Port 3.4 of 8051 microcontroller.

Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board
Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board

25. Now, just tally up your breadboard connection to the below image.

Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board
Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board

26. Now, there is a slight of extra part in this tutorial. In this tutorial itself, we are also going to make a setup for line following robot also. But we are not programming it, We are only making the breadboard connection for the further chatper. Now Take a 10k Potentiometer and place it just in front of the previously placed 10k Potentiometer and connect 1st pin of 10k Pot to positive lane of breadboard.

Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board
Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board

27. Now. connect the 2nd pin of 10k Pot to the Pin no. 12 of LM324 comparator IC as shown in the below image. And connect the third pin of 10k Pot to the gnd lane of breadboard.

Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board
Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board

28. See, the setup will look something like this shown in the following image.

Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board
Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board

29. Now, take a blue LED and connect the anode of LED to the Pin no 14 of LM324 Comparator IC and cathode into the gnd terminal of Bread board lane.

Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board
Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board

30. Now connect the pin no 14 of LM324 comparator IC to the Port 2.1 of the 8051 Microcontroller as shown in the following image.

Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board
Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board

31. This is the closer look of the connection. Just cross check your connection.

Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board
Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board

32. Oh, and yes one more small important thing, take a 0.01 uf capacitor and place it between the pin no. 4 and 6 of L293d Motor Driver IC. which is between output1 and output2 of L293d Motor Driver IC. See the following image for the reference. It is just to prevent our circuit from getting reset due to power consumed by the motor to run.

Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board
Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board

33. Similarly take another 0.01uf capacitor and place it between Pin no 11 and 14 or between Output 3 and Output 4 of L293d Motor Driver IC

Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board
Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board

34. Once again, compare your whole setup with the following image.

Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board
Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board

35. Now Take your DC Geared motor and place one of its terminal wire in the pin no. 3 of L293d Motor Driver IC.

Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board
Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board


36. Place one of its terminal wire in the pin no. 6 of L293d Motor Driver IC.

Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board
Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board

38. The setup will look as shown in the below image.

Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board
Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board

39. Now take your battery snapper and put the red wire into the extended Pin no 8. Remember we extended pin no. 8 of L293D, yes just put your red or positive terminal of battery snapper there as shown in the following image.

Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board
Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board

40. Similarly connect the gnd of battery snapper to the extended gnd terminal through breadboard gnd lane as shown in the below image.

Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board
Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board

41. Thats it, The whole setup will look something as shown in the below image.

Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board
Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board

42. Now power up the breadboard and also the  L293d Motor Driver IC by the AA battery holder set as shown in the following image. 

Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board
Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board

43. The bread board setup will look something like shown in the following image. Now, place your finger on the L293D Motor Driver IC. Seems like and idiot suggestion? Well its just to check if you have messed up with the connections. If your connections are wrong, it there are chances that  L293D Motor Driver IC would heat up too much. Quickly pull off the power supply if it happens and cross check the connections again.

Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board
Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board

44. Once you are confident about the setup, similarly connect the second motor also in the following way. Connect the one terminal to the Pin no. 11 and second terminal to Pin no. 14. Like shown in the following image.

Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board
Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board

45. Take the reference of the following image for more clear view.

Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board
Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board


46. Just program the circuit and power it up, both the motors will rotate in a particular sequence.

Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board
Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board

That's it. You have completed Interfacing L293d Motor Driver with 8051 Microcontroller on Bread Board. Continue to the next subchapter to get the source code and and output sequence of video.

Go8051 Tutorial

Go8051.com is a medium for hobbyist and enthusiasts to learn 8051 microcontroller from scratch on bread board.

No comments:

Post a Comment

Stuck Somewhere ? Comment Your Queries and Experts will Guide You.