Академический Документы
Профессиональный Документы
Культура Документы
USINGMICROCONTROLLER 8051
Submitted by
UCID NO
Name of student
2013110014
Ravindra gomase
CERTIFICATE
P.V.Kasambe
S.S.Rathod
Project Guide
Head of Department
Dr. Prachi Gharpure
Principal
External Examiner
Internal Examiner
(signature)
(signature)
Name:
Name:
Date:
Date:
ACKNOWLEDGEMENT
CONTENTS
1. Introduction
2. Literature Review
3. Project Objective
4. Theory
5. System Design
6. Software
7. Simulation & Experimental Results
8. Conclusions
ABSTRACT
In industries machines are used for mass production of certain product. These machines
have different purposes and used for different applications. These machines use the same
movement to mass produce certain product. It would be advantageous if speed and
accuracy of these machines are improved. It is important to understand the principal used
by factories to mass produce certain product. The research work is concerned with this
idea and illustrating this concept by a prototype. Basic mechanical movements are used in
industries to do same thing again and again efficiently. Hence this helps in reducing
manufacturing cost of product.
Direct current (DC) motor has already become an important drive configuration
for many applications across a wide range of powers and speeds. The ease of control and
excellent performance of the DC motors will ensure that the number of applications using
them will continue to grow for the foreseeable future. In this paper, a method to control
the speed of DC motor using Pulse Width Modulation (PWM) is explained. PWM is
generated using Microcontroller 8051. To drive the motor, H-bridge is used which is
made up of four MOSFETs. Precise control of low torque DC motor is obtained by using
simple and inexpensive hardware. This paper shows that accurate and precise control of
small DC motors can be done effectively and efficiently without using complicated
circuitry and costly components.
LIST OF FIGURES
Fig 1 PWM wave
Fig 2 Microcontroller 8051
Fig3 DC motor
Fig 4 Circuit diagram
Fig 5 Keil V5
Fig 6 Flash magic
CHAPTER 1
Introduction
This work is concerned about the different mechanical movements used in factories to
manufacture certain product. For different movements different machines are used. So
every machine in factory is used for doing different job. Together final product is made.
It is important to understand concept behind it.
1.1 Motivation
It is very important to understand the production process. This is also used in controlling
robots. This very simple concept is used in advanced applications. Hence it is very
important to understand this concept and study this prototype.
CHAPTER 2
Literature Survey
The main objective is to generate PWM signal in Microcontroller 8051 and control speed
of DC motor using it. It achieves this by using concept of duty cycle. By varying duty
cycle of PWM signal we can control speed of DC motor.
2.1 Introduction
This mechanical movement is used in many applications. From robots to factories this
concept is used widely. It is very easy to implement in action and cost effective.
2.4 Conclusion
Concept of this prototype can be used widely in advanced and complex applications.
CHAPTER3
Project Objective
10
CHAPTER4
Theory
PWM:
Pulse-width modulation (PWM), or pulse-duration modulation (PDM), is a
modulation technique used to encode a message into a pulsing signal. Although
this modulation technique can be used to encode information for transmission, its
main use is to allow the control of the power supplied to electrical devices,
especially to inertial loads such as motors. In addition, PWM is one of the two
principal algorithms used in photovoltaic solar battery chargers, [1] the other
being maximum power point tracking. The average value of voltage (and
current) fed to the load is controlled by turning the switch between supply and
load on and off at a fast rate. The longer the switch is on compared to the off
periods, the higher the total power supplied to the load. The PWM switching
frequency has to be much higher than what would affect the load (the device that
uses the power), which is to say that the resultant waveform perceived by the load
must be as smooth as possible. The rate (or frequency) at which the power supply
must switch can vary greatly depending on load and application, for example
Switching has to be done several times a minute in an electric stove; 120 Hz in a
lamp dimmer; between a few kilohertz (kHz), to tens of kHz for a motor drive;
and well into the tens or hundreds of kHz in audio amplifiers and computer power
supplies. The term duty cycle describes the proportion of 'on' time to the regular
interval or 'period' of time; a low duty cycle corresponds to low power, because
the power is off for most of the time. Duty cycle is expressed in percent, 100%
being fully on. The main advantage of PWM is that power loss in the switching
devices is very low. When a switch is off there is practically no current, and when
it is on and power is being transferred to the load, there is almost no voltage drop
across the switch. Power loss, being the product of voltage and current, is thus in
both cases close to zero. PWM also works well with digital controls, which,
because of their on/off nature, can easily set the needed duty cycle.
Fig1
11
DC Motor: motor has two terminals. We have to connect one of the motor
terminal to the controller pin and other to the ground. A DC motor is any of a
class of electrical machines that converts direct current electrical power into
mechanical power. The most common types rely on the forces produced by
magnetic fields. Nearly all types of DC motors have some internal mechanism,
either electromechanical or electronic, to periodically change the direction of
current flow in part of the motor. Most types produce rotary motion; a linear
motor directly produces force and motion in a straight line. DC motors were the
first type widely used, since they could be powered from existing direct-current
lighting power distribution systems. A DC motor's speed can be controlled over a
wide range, using either a variable supply voltage or by changing the strength of
current in its field windings. Small DC motors are used in tools, toys, and
appliances. The universal motor can operate on direct current but is a lightweight
motor used for portable power tools and appliances. Larger DC motors are used in
propulsion of electric vehicles, elevator and hoists, or in drives for steel rolling
mills. The advent of power electronics has made replacement of DC motors with
AC motors possible in many applications.
Microcontroller 8051: The Intel MCS-51 (commonly termed 8051) is an
internally Harvard architecture, complex instruction set
computing (CISC) instruction set, single chip microcontroller (C) series
developed by Intel in 1980 for use in embedded systems .[1] Intel's original
versions were popular in the 1980s and early 1990s and enhanced binary
compatible derivatives remain popular today. Intel's original MCS-51 family was
developed using N-type metal-oxide-semiconductor ( NMOS) technology like its
predecessor Intel MCS-48, but later versions, identified by a letter C in their
name (e.g., 80C51) used complementary metaloxidesemiconductor ( CMOS)
technology and consume less power than their NMOS predecessors. This made
them more suitable for battery-powered devices. The family was continued in
1996 with the enhanced 8-bit MCS-151 and the 8/ 16 /32-bit MCS-251 family of
binary compatible microcontrollers. [2] While Intel no longer manufactures
the MCS-51, MCS-151 and MCS-251 family, enhanced binary
compatible derivatives made by numerous vendors remain popular today.
Some derivatives integrate a digital signal processor (DSP). Beyond these
physical devices, several companies also offer MCS-51 derivatives as IP cores
for use in field-programmable gate array (FPGA) or application-specific
integrated circuit (ASIC) designs.
12
CHAPTER 5
System design
5.1 Introduction
We going to generate PWM (pulse width modulation) signal using timers in 8051. As
duty cycle of PWM (pulse width modulation) signal increases speed of DC motor will
increase.
Computer
Keil version 5
Flash magic
13
Microcontroller 8051
Fig2
14
DC motor
Fig3
Power supply
Switch (Button)
15
5.5 Diagram
Fig 4
16
CHAPTER 6
Softwares
Keil version5
Keil was founded in 1982 by Gnter and Reinhard
German GbR. In April 1985 the company was
Keil, initially as a
converted to Keil
Elektronik GmbH to market add-on products for the development tools provided
by many of the silicon vendors. Keil implemented the first C HYPERLINK
"https://en.wikipedia.org/wiki/Compiler" compiler designed from the ground-up
specifically
for
the
8051
HYPERLINK
"https://en.wikipedia.org/wiki/Microcontroller" microcontroller.
Fig 5
17
Flash magic
(PC tool) for programming ash based microcontrollers from NXP using a serial or
Ethernet protocol while in the target hardware. Straightforward and intuitive user
interface Five simple steps to erasing and programming a device and setting key
options Programs Intel Hex Files Automatic verifying after programming Fills
unused Flash to increase firmware security Automatically program checksums.
Using the supplied checksum calculation routine your firmware can easily verify
the integrity of a Flash block, ensuring no unauthorized or corrupted code can
ever be executed.
Fig 6
18
Fig
CHAPTER 7
Simulation and Experimental Results
#include<reg51.h>
sbit MTR=P1^0;
void MSDelay(unsigned int value);
void main()
{
unsigned char z;
P2=0xFF;
z=P2;z=z&0x03;
MTR=0;
while(1)
{
switch(z)
{
case(0):
{
MTR=1;
MSDelay(25);
MTR=0;
MSDelay(75);
break;
}
case(1):
{
MTR=1;
MSDelay(50);
MTR=0;
MSDelay(50);
break;
}
19
case(2):
{
MTR=1;
MSDelay(75);
MTR=0;
MSDelay(25);
bresk;
}
default:
MTR=1;
}
20
21
CHAPTER 5
Conclusion
22
Bibliography
23