hi, how are you today
Let's learn how to interface a DC Motor with our baby (8051uC)
Direction of rotation is totally depends on the polarity of voltage applied on dc motor. By changing polarity i.e. +ve & -ve terminals, we can change the polarity of dc motor to change the direction of motion. So in working state it is not possible to change the polarity each and every time physically.
Here one pin of bc547 is connected to first pin of port3 of AT89C51 that controls on-off function of dc motor and other is permanently connected to the voltage source. So to change motion here you have to change the polarity on the fixed terminal of dc motor, and little bit change in connection of bc546 transistor.
Here we will learn how to control dc motor in uni-direction motion .
Let's learn how to interface a DC Motor with our baby (8051uC)
Description
This article helps you to understand the concept behind the interfacing of dc motor to produce uni-direction motion. The concept behind the working of dc motor is simple, it consist of a magnetic coil and a magnet that rotates as per the magnetic field generated in coil by applying the voltage from outer source.Direction of rotation is totally depends on the polarity of voltage applied on dc motor. By changing polarity i.e. +ve & -ve terminals, we can change the polarity of dc motor to change the direction of motion. So in working state it is not possible to change the polarity each and every time physically.
Here one pin of bc547 is connected to first pin of port3 of AT89C51 that controls on-off function of dc motor and other is permanently connected to the voltage source. So to change motion here you have to change the polarity on the fixed terminal of dc motor, and little bit change in connection of bc546 transistor.
Here we will learn how to control dc motor in uni-direction motion .
Programming
1: #include<reg51.h> // header file
2: void delay(int time) // function to generate delay
3: {
4: int i,j;
5: for(i=0;i<=time;i++) // i will run from 0 to user defined value
6: for(j=0;j<=1275;j++); // j will run from 0 to 1275 "time" times
7: }
8: sbit m=P3^0; // as here we need only single pin to contol motor
9: void main() // main function
10: {
11: while(1) // while(1)used to provide continuous loop
12: {
13: m=1;
14: delay(500);
15: m=0;
16: delay(500);
17: }
18: }
For enhance concept just visit www.salahtutorials.com
Hope you all like this post and I wish this must be useful for you.
Thanks :)
Comments
Post a Comment