fbpx

Interface DC Motor with 8051

DC Motor is small in size, inexpensive and powerful.It is widely used in robotics for their small size and high energy out

  • A typical DC motor operates at very high speed.
  • Gear reduces the speed of motor and increases the torque

L293D Motor Driver

  • L293D is a H-BRIDGE dc motor controller,which can control dc motor upto 36V.
  • Driver can allow dc motor to rotate in both direction,which can interface and control the two motor at a time with microcontroller.
  • Driver allow voltage to flow in both direction hence motor can rotate in both clock wise and anti-clock wise direction.
L293D Motor Driver

Direction Table

Direction Table

Hardware Required

  • Dc Motor.
  • L293D Motor Driver.
  • 8051 MicroController.

Circuit

Virtual Circuit

Code

#include <REGx51.h> 
 void delay()
 {
   int i,j;
   for(i=0;i<1000;i++)
   {
    for(j=0;j<100;j++);
   }
 }
 void main()
 {
  // Rotate In Clock Wise Direction
  P0_0=1;
  P0_1=0;
  delay();
  // Rotate In AntiClock Wise Direction
  P0_0=0;
  P0_1=1;
  delay();
 }

Leave a Reply

Your email address will not be published. Required fields are marked *