Professional Documents
Culture Documents
Mini Project Vikram
Mini Project Vikram
NAME : VIKRAMAN D
But a DC Motor needs much more currents. It also needs more voltages as
6v, 12v, 24v etc., (depending upon the type of motor used). One more
thing to notice is that the back emf produced by the motor may affect the
proper functioning of the microcontroller and reversing the direction can
damage the controller.
It takes a low current signal and gives out a high current signal which can
drive a motor. It can also control the direction of motor. We can use any
dual H-bridge IC like L293D or L298.
#include <reg51.h>
sbit switch1= P2^0;
sbit switch2 = P2^1;
sbit clk=p3^0;
sbit anticlk=p3^1;
void main()
switch1=switch2=1;
switch1=switch2=0;
clk=anticlk=0;
while(1)
{
if ((switch1))
clk=1;
else if((switch2))
anticlk=1;
else
p3=0x00;
}
}
WORKING of dc motor interfacing with 8051
microcontorller
After loading the program in the controller, the motors will not start
turning until the buttons are not pressed. According to my coding:
When I press button 1, motor 1 starts rotate in clockwise direction.
When I leave button 1, motor 1 will stop.
When I press button 2, motor 2 will start rotating in Anti-clockwise
direction.
When I leave button 2, motor 2 will stop.
PINS STATUS:
video demonstration
LINK : https://drive.google.com/file/d/14ZPgoiFleZjOr01CStPyafMujXYLMDEi/view?usp=drivesdk
THANK YOU!!!