Documente Academic
Documente Profesional
Documente Cultură
BY MICRO CONTROLLER
Project report submitted in partial fulfillment of the requirements
For the award of the degree of
BACHELOR OF TECHNOLOGY
IN
ELECTRICAL AND ELECTRONICS ENGINEERING
By
MD.ABDUL BASID (08241A0256)
K.DHANASEKHAR REDDY (08241A0265)
B.RAMAKRISHNA (08241A0289)
P.SRAVAN KUMAR (08241A02A3)
E.Venkateswarlu
Assistant Professor
CERTIFICATE
This is to certify that the project report entitled BRUSHLESS DC MOTOR DRIVE
CONTROLLED BY MICROCONTROLLER that is being submitted by Mr. MD.
ABDUL BASID, K.DHANASEKHAR REDDY, B.RAMAKRISHNA and P.SRAVAN
KUMAR in partial fulfillment for the award of the Degree of Bachelor of Technology in
Electrical and Electronics Engineering to the Jawaharlal Nehru Technological University is a
record of bonafide work carried out by him under my guidance and supervision. The results embodied in
this project report have not been submitted to any other University or Institute for the award of any
graduation degree.
Mr.P.M.Sarma
HOD, EEE
GRIET, Hyderabad
Mr. E.Venkateswarlu
Assistant Professor.
GRIET, Hyderabad
(Internal Guide)
Acknowledgement
This is to place on record my appreciation and deep gratitude to the persons without whose
support this project would never seen the light of day.
I have immense pleasure in expressing my thanks and deep sense of gratitude to my guide
MR. E.VENKATESWARLU, Assistant Professor Department of Electrical Engineering,
and G.R.I.E.T for his guidance throughout this project.
I express my gratitude to The Dr.S.N.Saxena, Project Supervisor G.R.I.E.T for his valuable
recommendations and for accepting this project report.
Finally I express my sincere gratitude to all the members of faculty and my friends who
contributed their valuable advice and helped to complete the project successfully.
MD.ABDUL BASID
K.DHANASEKHAR REDDY
B.RAMAKRISHNA
P.SRAVAN KUMAR
Abstract
A DC Brushless Motor uses a permanent magnet external rotor, three phases of driving coils, one
or more Hall effect devices to sense the position of the rotor, and the associated drive electronics.
The coils are activated, one phase after the other, by the drive electronics as cued by the signals
from the Hall effect sensors, they act as three-phase synchronous motors containing their
own variable frequency drive electronics.
The following are properties of BLDC Motor
ii
Abbreviations
1.
2.
3.
4.
5.
6.
7.
8.
iii
CONTENTS
S.NO TITLE
Page No.
a)
Acknowledgement
vi
b)
Abstract
vi
c)
Abbreviations
vi
d)
List of Figures
e)
List of Tables
vi
1.
INTRODUCTION
1.1 BLDC MOTORS
1.2 COMPARISION OF BLDC AND PMSM
1.3 BLDC MOTOR CONTROL
1
2
3
2.
ELECTRIC MOTOR
2.1 DC MOTOR
2.2 AC MOTOR
2.3 MOTOR SELECTION
5
5
6
6
3.
HALL SENSORS
3.1 HALL EFFECT
3.2 BLOCK DIAGRAM AND WORKING
3.3 HALL EFFECT SENSOR INTERFACE
3.4 HALL PROBE
9
10
10
11
11
4.
MICROCONTOLLER
4.1 HISTORY
4.1.1 Volumes
4.2 IMPORTANT FEATURES AND APPLICATIONS
4.3 MEMORY ARCHITECHTURE
4.4 PROGRAMMING
4.5 INSTRUCTION SET
4.6 RELATED PROCESSORS
4.7 USE AS INTELLECTUAL PROPERTY
INVERTER
5.1 INTRODUCTION
5.2 THREE PHASE INVERTERS
5.3POWER MOSFETS
5.3.1 MOSFET STRUCTURE
5.3.2 ON-STATE RESISTANCE
5.3.3 MOSFET OPERATION
5.4MOSFET DRIVER
12
12
13
13
15
16
16
17
18
19
19
20
22
24
24
25
26
5.
6.
SIMULATION
6.1 SOFTWARE USED
6.2 KEIL VISION
6.2.1 Features
6.3 PROGRAM FOR MICROCONTROLLER
6.4 PROTEUS
6.4.1 INTRODUCTION
6.4.2 SCHEMATIC ENTRY
6.4.3 CIRCUIT SIMULATION
6.4.4ADVANTAGES OF PROTEUS
6.5 PSIM
6.6 KEY FEATURES OF PSIM
6.6.1 EASY TO USE
6.6.2Fast Simulation
6.6.3 Flexible Control Representation
6.6.4 COSIMULATION WITH MATLAB/SIMULINK
6.6.5 FREQUENCY RESPONSE ANALYSIS
6.7 SIMULATION CIRCUIT
6.7.1 CIRCUIT DIAGRAM
6.7.2 OUTPUT WAVEFORMS
HARDWARE IMPLEMENTATION
7.1 CIRCUIT SPECIFICATION
7.2 CIRCUIT DESCRIPTION
7.2.1 STARTING POWER SUPPLY
7.2.2WORKING OF HALL SENSORS
7.2.3 MICROCONTOLLER CIRCUIT
7.2.4 BLDC MOTOR DEMONSTRATION
7.2.5 MOSFET DRIVER AND INVERTER
7.2.6 TOTAL CIRCUIT
7.3 HARDWARE OUTPUT WAVEFORMS
27
27
27
28
28
30
30
31
31
32
32
33
33
33
33
33
33
34
34
35
36
36
36
36
36
37
37
37
39
40
8.
41
41
9.
Appendix-A
Appendix-B
Appendix-C
Appendix-D
43
45
56
64
7.
iv
LIST OF FIGURES
1. Figure.1.1 A three-phase synchronous motor with a one permanent magnet pair pole rotor
2. Figure 1.2 Electrical Waveforms in the Two Phase ON Operation and Torque Ripple
3. Figure.1.3 Torque Ripple in a Sinusoidal Motor Controlled as a BLDC
4. Figure.3.1 Hall sensor
5. Figure.3.2 Block diagram of hall sensor
6. Figure.4.1 8051 Microcontroller
7. Figure 4.2 Block diagram of Microcontroller
8. Figure 4.3: Intel 8031 processors
9. Figure 5.1 Basic inverter circuit
10. Figure 5.2: Three Phase VSI Topology
11. Figure5.3: Waveforms of Three Phase Inverter with 120 degrees of operation
12. Figure5.4 Device symbols:(a)n-channel enhancement mode;
(b)p-channel enhancement mode
(c)n-channel depletion mode;
(d) p-channel depletion mode
13. Figure 5.5 Mosfet characteristics
14. Figure 5.6: vertical cross sectional view of Power Mosfet
15. Figure 6.1: simulation circuit of microcontroller.
16. Figure 6.2: Three phase Inverter with 120 degrees of operation
17. Figure 6.3 output waveforms
18. Figure 7.1 BLDC demonstration
19. Figure 7.2: Mosfet driver and inverter
LIST OF TABLES
1. Table-1.1 Comparison of BLDC and PMSM motors
2.Table-2.1:Advantages and Disadvantages of different types of motor
3. Table-2.2: Characteristic between a DC, BLDC and an Induction motor
4. Table -5.1 Valid Switch states for a three phase VSI
vi
1. INTRODUCTION
The economic constraints and new standards legislated by governments place increasingly stringent
requirements on electrical systems. New generations of equipment must have higher performance
parameters such as better efficiency and reduced electromagnetic interference. System flexibility must
be high to facilitate market modifications and to reduce development time. All these improvements
must be achieved while, at the same time, decreasing system cost.
Brushless motor technology makes it possible to achieve these specifications. Such motors combine
high reliability with high efficiency, and for a lower cost in comparison with brush motors. This paper
describes the use of a Brushless DC Motor (BLDC). Although the brushless characteristic can be apply
to several kinds of motors AC synchronous motors, stepper motors, switched reluctance motors, AC
induction motors - the BLDC motor is conventionally defined as a permanent magnet synchronous
motor with a trapezoidal Back EMF waveform shape. Permanent magnet synchronous machines with
trapezoidal Back-EMF and (120 electrical degrees wide) rectangular stator currents are widely used as
they offer the following advantages first, assuming the motor has pure trapezoidal Back EMF and that
the stator phases commutation process is accurate, the mechanical torque developed by the motor is
constant; secondly, the Brushless DC drives show a very high mechanical power density
Fig.1.1 A three-phase synchronous motor with a one permanent magnet pair pole rotor
On the stator side, three phase motors are the most common. These offer a good compromise between
precise control and the number of power electronic devices required to control the stator currents. For
the rotor, a greater number of poles usually create a greater torque for the same level of current. On the
other hand, by adding more magnets, a point is reached where, because of the space needed
between magnets, the torque no longer increases. The manufacturing cost also increases with the
number of poles. As a consequence, the number of poles is a compromise between cost, torque and
volume.
Permanent magnet synchronous motors can be classified in many ways, one of these that is of
particular interest to us is that depending on back-emf profiles: Brushless Direct Current Motor
(BLDC) and Permanent Magnet Synchronous Motor (PMSM). This terminology defines the shape of
the back-emf of the synchronous motor. Both BLDC and PMSM motors have permanent magnets on
the rotor but differ in the flux distributions and back-emf profiles. To get the best performance out of
the synchronous motor, it is important to identify the type of motor in order to apply the most
appropriate type of control as described in the next chapters.
PMSM
Synchronous machine
Fed with sinusoidal currents
Sinusoidal Bemf
Continuous stator flux position variation
Possible to have three phases ON at the same
time
No torque ripple at commutations
Less harmonics due to sinusoidal excitation
Lower core loss
Higher switching losses at the same switching
freq.
Control algorithms are mathematically intensive
motor types are synchronous machines. The only difference between them is the shape of the
induced voltage, resulting from two different manners of wiring the stator coils. The back-emf is
trapezoidal in the BLDC motor case, and sinusoidal in the PMSM motor case.
machines could be driven with sinusoidal currents and PMSM with direct currents, but for
better performance, PMSM motors should be excited by sinusoidal currents and BLDC machines by
direct currents.
can structure (hardware and software) of a sinusoidal motor required several current sensors
and sinusoidal phase currents were hard to achieve with analog techniques. Therefore many motors
(sinusoidal like trapezoidal) were driven with direct current for cost and simplicity reasons ,
compromising efficiency and dynamic behavior.
Fig 1.2 Electrical Waveforms in the Two Phase ON Operation and Torque Ripple
If the motor used has a sinusoidal Back EMF shape, this control can be applied but the produced
torque is:
Firstly, not constant but made up from portions of a sine wave. This is due to its being the
combination of a trapezoidal current control strategy and of a sinusoidal Back EMF. Bear in mind that a
sinusoidal Back EMF shape motor controlled with a sine wave strategy (three phase ON) produces a
constant
torque.
Secondly, the torque value produced is weaker.
2. ELECTRIC MOTOR
An electric motor is an electromechanical device that converts electrical energy into mechan-ical
energy.
Most electric motors operate through the interaction of magnetic fields and current-carrying conductors
to
generate force. The reverse process, producing electrical energy from mechanical energy, is
done by generators such as an alternator or a dynamo; some electric motors can also be used as
generators, for example, a traction motor on a vehicle may perform both tasks. Electric motors and
generators are commonly referred to as electric machines.
Electric motors are found in applications as diverse as industrial fans, blowers and pumps, machine
tools, household appliances, power tools, and disk drives. They may be powered by direct current, e.g., a
battery powered portable device or motor vehicle, or by alternating current from a central electrical
distribution grid or inverter. The smallest motors may be found in electric wristwatches. Medium-size
motors of highly standardized dimensions and characteristics provide convenient mechanical power for
industrial uses. The very largest electric motors are used for propulsion of ships, pipeline compressors,
and water pumps with ratings in the millions of watts. Electric motors may be classified by the source of
electric power, by their internal construction, by their application, or by the type of motion they give.
The physical principle behind production of mechanical force by the interactions of an electric current
and a magnetic field, Faraday's law of induction, was discovered by Michael Faraday in 1831. Electric
motors of increasing efficiency were constructed from 1821 through the end of the 19th century, but
commercial exploitation of electric motors on a large scale required efficient electrical generators and
electrical distribution networks. The first commercially successful motors were made around 1873.
Some devices convert electricity into motion but do not generate usable mechanical power as a primary
objective, and so are not generally referred to as electric motors. For example, magnetic solenoids and
loudspeakers are usually described as actuators and transducers, respectively, instead of motors. Some
electric motors are used to produce torque or force.
2.1 DC MOTOR:
There are many different types of DC motor commonly used.
The first type is the Brushed DC electric motor. The brushed DC electric motor generates torque
directly from DC power supplied to the motor by using internal commutation, stationary magnets or
rotating electrical magnets.
There is also a brushless type known as Brushless DC motor which is a synchronous
electric motor that are electric motors powered by direct-current (DC) electricity and having electronic
commutation systems, rather than mechanical brushes and commutators.
A Stepper Motor is also a brushless, electric motor that can divide a full rotation into a large
number of steps. The motor's position can be controlled precisely without any feedback mechanism, as
long as the motor is carefully sized to the application. Signal pulses will drive the motor and the shaft
of the stepper motor moves between discrete positions proportional to the pulses. Steppers are
generally commutated open loop as the driver has no feedback on where the rotor actually is.
Lastly is the Servo motor. The servo motor is driven by a voltage value and the output shaft of
the servo motor is commanded to a particular angular position corresponding to the input voltage.
5
They are commonly used in radio controlled airplanes to control the wing flaps and also in RC radio
cars to control the steering of the car.
2.2 AC MOTOR:
An AC motor is an electric motor driven by an alternating current.
It commonly consists of two basic parts, an outside stationary stator having coils supplied with
alternating current to produce a rotating magnetic field, and an inside rotor attached to the output
shaft that is given a torque by the rotating field.
There are two main types of AC motors, depending on the type of rotor used.
The first type is the induction motor, which runs slightly slower than the supply
frequency. The magnetic field on the rotor of this motor is created by an induced current.
The second type is the synchronous motor, which does not rely on induction and as a result,
can rotate exactly at the supply frequency or a sub-multiple of the supply frequency.
The magnetic field on the rotor is either generated by current delivered through slip rings or by a
permanent magnet. Other types of motors include eddy current motors, and also AC/DC mechanically
commutated machines in which speed is dependent on voltage and winding connection.
Advantages
Brushless DC
Long lifespan
low maintenance
High efficiency
Disadvantages
Rotation slips from
Frequency
Low starting torque
Typical Application
Fans
Appliance
Power Tools
Typical Drive
Uni/Poly-phase
AC
Uni/Poly-phase
AC
Direct DC or
Treadmill exercisers
PWM
Automotive motors
(seats, blowers, windows)
Hard drives
CD/DVD Rom
Electric vehicles
Direct DC or
PWM
BLDC Motor
Brushed DC Motor
Commutation
Electronic commutation
based on Hall position
sensors.
Brushed commutation.
Maintenance
Periodic maintenance is
required.
Life
Long.
Shorter.
Rotor Inertia
Electric Noise
Generation
Cost Of Motor
Control
Control
Requirement
Higher No mechanical
limitation imposed by
brushes/commutator.
Low.
Lower Mechanical
limitations by the brushes.
Arcs in the brushes will
generate noise causing EMI
in the equipment nearby.
Driven by EMF
created when an
alternating current
Less required due to
absence of brushes.
Long.
Output Power/
Frame Size
Speed Range
Induction Motor
Low.
characteristics.
Lower speeds.
High
Complex and
expensive.
A controller is always
No controller is required for No controller is
required to keep the motor fixed speed; a controller is require for fixed speed;
running. The same
required only if variable a controller is required
controller can be used for
speed is desired.
only if variable speed is
variable speed control.
desired.
Comparing brushed DC motors and induction motors to BLDC motors, BLDC motors have
many advantages over disadvantages. Brushless DC motors require less maintenance and
therefore have a longer life span as compared to brushed DC motors. BLDC motors produce
more output power per frame size than brushed DC motors and induction motors. Because the
rotor is made of permanent magnets, the rotor inertia is less, comparing with other types of
motors. This low rotor inertia improves acceleration and deceleration characteristics,
shortening operating cycles. Their linear speed/torque characteristics produce predictable speed
regulation. With brushless motors, brush inspection is eliminated, making them ideal for areas
with limited access and applications where servicing is difficult. BLDC motors operate much
more quietly than brushed DC motors, reducing Electromagnetic interference (EMI). Lowvoltage models are ideal for battery operation, portable equipment or medical applications. It
also reduces the risk of electric shock.
Based on the above findings, although a BLDC motor is more expensive and harder to control,
its overall advantage proves to be worthy of implementation. Therefore a BLDC motor is
selected for this project.
3. HALL SENSORS
A Hall Effect sensor is a transducer that varies its output voltage in response to a magnetic field. Hall
Effect sensors are used for proximity switching, positioning, speed detection, and current sensing
applications.
In its simplest form, the sensor operates as an analogue transducer, directly returning a voltage. With a
known magnetic field, its distance from the Hall plate can be determined. Using groups of sensors, the
relative position of the magnet can be deduced.
Electricity carried through a conductor will produce a magnetic field that varies with current, and a Hall
sensor can be used to measure the current without interrupting the circuit. Typically, the sensor is
9
integrated with a wound core or permanent magnet that surrounds the conductor to be measured.
Frequently, a Hall sensor is combined with circuitry that allows the device to act in a digital (on/off)
mode, and may be called a switch in this configuration. Commonly seen in industrial applications such as
the pictured pneumatic cylinder, they are also used in consumer equipment; for example some computer
printers use them to detect missing paper and open covers. When high reliability is required, they are
used in keyboards.
Hall sensors are commonly used to time the speed of wheels and shafts, such as for internal combustion
engine ignition timing, tachometers and anti-lock braking systems. They are used in brushless DC
electric motors to detect the position of the permanent magnet. In the pictured wheel with two equally
spaced magnets, the voltage from the sensor will peak twice for each revolution. This arrangement is
commonly used to regulate the speed of disc drives
10
From the figure 3.2 notice that sensor are three-wire sensor. This means that two wires, the + V, and the
ground provide dc voltage for the power supply portion of the sensor.
Terminal 0 and ground are used as the output terminals for the sensor. Since this is a three-wire sensor,
the ground terminal is part of the power supply and part of the output circuit. The power supply uses a
voltage regulator to provide the initial current for the Hall-effect element and voltage for the op amp. The
small sensor terminals are connected to the op amp input terminals.
When a magnetic field is sensed, a small voltage is sent to the op amp and the output of the op amp is
sent to a Schmitt trigger and then to the base of an NPN transistor. When the base of the transistor is
biased, it will go into saturation and current will flow through its emitter-collector circuit to provide a
digital (on/off) output signal. In the current-sinking circuit, notice that the transistor provides a path to
ground when the transistor is biased to saturation.
4. MICROCONTOLLER
The Intel MCS-51(Commonly referred to as 8051) is Harvard architecture, single chip microcontroller
Series which was developed by Intel in 1980 for use in embedded systems. Intels original popular in the
1980s and early 1990s.While Intel no longer manufactures the MCS-51, binary compatible derivatives
Remain popular today. In addition to these physical devices, several companies also offer MCS -51
derivatives as IP cores for use in FPGAs or ASICs designs.
4.1 HISTORY:
The first single-chip microprocessor was the 4-bit Intel 4004 released in 1971, with the Intel 8008 and
other more capable microprocessors becoming available over the next several years. However, both
processors required external chips to implement a working system, raising total system cost, and making
it impossible to economically computerize appliances.
The Smithsonian Institution says TI engineers Gary Boone and Michael Cochran succeeded in creating
the first microcontroller in 1971. The result of their work was the TMS 1000, which went commercial in
1974. It combined read-only memory, read/write memory, processor and clock on one chip and was
targeted at embedded systems.
Partly in response to the existence of the single-chip TMS 1000, Intel developed a computer system on a
chip optimized for control applications, the Intel 8048, with commercial parts first shipping in 1977. It
combined RAM and ROM on the same chip. This chip would find its way into over one billion PC
keyboards, and other numerous applications. At that time Intel's President, Luke J. Valenter, stated that
the microcontroller was one of the most successful in the company's history, and expanded the division's
budget over 25%.
Most microcontrollers at this time had two variants. One had an erasable EPROM program memory,
which was significantly more expensive than the PROM variant which was only programmable once.
Erasing the EPROM required exposure to ultraviolet light through a transparent quartz lid. One-time
12
4.1.1 Volumes:
About 55% of all CPUs sold in the world are 8-bit microcontrollers and microprocessors. According to
Semico, over four billion 8-bit microcontrollers were sold in 2006.
A typical home in a developed country is likely to have only four general-purpose microprocessors but around three dozen microcontrollers. A typical mid-range automobile has as many as 30
Or more microcontrollers. They can also be found in many electrical devices such as washing
Machines, microwave ovens, and telephones.
16-bit address bus It can access 216 memory locations 64 KB (65536 locations)
One particularly useful feature of the 8051 core was the inclusion of a Boolean processing engine
Which allows bit-level Boolean logic operations to be carried out directly and efficiently on select
internal registers and select RAM locations. This advantageous feature helped cement the 8051's
popularity in industrial control applications because it reduced code size by as much as 30%. Anot
her valued feature is the including of four bank selectable working register sets which greatly reduce
the amount of time required to complete an interrupt service routine. With a single instruction 8051
can switch register banks as opposed to the time consuming task of transferring the critical registers
to the stack or designated RAM locations. These registers also allowed the 8051 to quickly perform
a context switch which is essential for time sensitive real-time applications
.
The MCS-51 UARTs make it simple to use the chip as a serial communications interface. External pins
can be configured to connect to internal shift registers in a variety of ways, and the internal timers can
also be used, allowing serial communications in a number of modes, both synchronous and
asynchronous. Some modes allow communications with no external components. A mode compatible
with an RS-485 multi-point communications environment is achievable, but the 8051's real strength is
fitting in with existing ad-hoc protocols (e.g., when controlling serial-controlled devices).
Once a UART, and a timer if necessary, have been configured, the programmer needs only to write a
simple interrupt routine to refill the send shift register whenever the last bit is shifted out by the UART
and/or empty the full receive shift register (copy the data somewhere else). The main program then
performs serial reads and writes simply by reading and writing 8-bit data to stacks.
MCS-51 based microcontrollers typically include one or two UARTs, two or three timers, 128 or 256
bytes of internal data RAM (16 bytes of which are bit-addressable), up to 128 bytes of I/O, 512 bytes to
64 kB of internal program memory, and sometimes a quantity of extended data RAM (ERAM) located in
the external data space. The original 8051 core ran at 12 clock cycles per machine cycle, with most
instructions executing in one or two machine cycles. With a 12 MHz clock frequency, the 8051 could
thus execute 1 million one-cycle instructions per second or 500,000 two-cycle instructions per second.
Enhanced 8051 cores are now commonly used which run at six, four, two, or even one clock per machine
cycle, and have clock frequencies of up to 100 MHz, and are thus capable of an even greater number of
instructions per second. All SILabs, some Dallas and a few Atmel devices have single cycle cores.
14
Features of the modern 8051 include built-in reset timers with brown-out detection, on-chip oscillators,
self-programmable Flash ROM program memory, built-in external RAM, extra internal program storage,
bootloader code in ROM, EEPROM non-volatile data storage, IC, SPI, and USB host
interfaces, CAN or LIN bus, PWM generators, analog comparators, A/D and D/A converters, RTCs,
extra counters and timers, in-circuit debugging facilities, more interrupt sources, and extra power
saving modes.
memory is read-only, though somevariants of the 8051 use on-chip flash memory and provide a method
of re-programming the memory in-system or in-application. Aside from storing code, program memory
can also store tables of constants that can be accessed by MOVC A, @DPTR, using the 16-bit special
function register DPTR.
External data memory (XRAM) also starts at address 0. It can also be on- or off-chip; what makes it
"external" is that it must be accessed using the MOVX (Move external) instruction. Many variants of
the 8051 include the standard 256 bytes of IRAM plus a few KB of XRAM on the chip. If more XRAM
is required by an application, the internal XRAM can be disabled, and all MOVX instructions will fetch
from the external bus.
4.4 PROGRAMMING:
There are various high-level programming language compilers for the 8051. Several C compilers are
available for the 8051, most of which feature extensions that allow the programmer to specify where
each variable should be stored in its six types of memory, and provide access to 8051 specific hardware
features such as the multiple register banks and bit manipulation instructions. There are many
commercial compilers. SDCC is a popular open source C compiler. Other high level languages such
as Forth, BASIC, Pascal/Object Pascal, PL/M and Modula-2 are available for the 8051, but they are less
widely used than C and assembly.
Because IRAM, XRAM, and PMEM(read only) all have an address 0, C compilers for the 8051
architecture provide compiler-specific pragmas or other extensions to indicate where a particular piece of
data should be stored (i.e. constants in PMEM or variables needing fast access in IRAM). Since data
could be in one of three memory spaces, a mechanism is usually provided to allow determining to which
memory a pointer refers, either by constraining the pointer type to include the memory space, or by
storing metadata with the pointer.
direct memory, which access the internal RAM or the SFR's, depending on the address
indirect memory, using R0, R1, or DPTR to hold the memory address. The instruction used may
Many of the operations allow any addressing mode for the source or the destination, for example, MOV
020h, 03fh will copy the value in memory location 0x3f in the internal RAM to the memory location
0x20, also in internal RAM.
16
Because the 8051 is an accumulator-based architecture, all arithmetic operations must use the
accumulator, e.g. ADD A, 020h will add the value in memory location 0x20 in the internal RAM to the
accumulator.
One does not need to master these instructions to program the 8051. With the availability of good quality
C compilers, including open source SDCC, virtually all programs can be written with high-level
language.
The 8052 was an enhanced version of the original 8051 that featured 256 bytes of internal RAM instead
of 128 bytes, 8 KB of ROM instead of 4 KB, and a third 16-bit timer. The 8032 had these same features
except for the internal ROM program memory. The 8052 and 8032 are largely considered to be obsolete
because these features and more are included in nearly all modern 8051 based microcontrollers.
17
Intel discontinued its MCS-51 product line in March 2007, however there are plenty of enhanced 8051
products or silicon intellectual property added regularly from other vendors. Current vendors of MCS-51
compatible processors include more than 20 independent manufacturers including Atmel, Infineon
Technologies (formerly Siemens AG), Maxim Integrated Products (via its Dallas
Semiconductor subsidiary), NXP (formerly Philips Semiconductor), Microchip Technology, Nuvoton
(formerly Winbond), ST Microelectronics, Silicon Laboratories (formerly Cygnal), Texas
Instruments, Ramtron International, Silicon Storage Technology, Cypress Semiconductor and Analog
Devices.
The 80C537 and 80C517 are CMOS versions, designed for the automotive industry. Enhancements
mostly new peripheral features and expanded arithmetic instructions. The 80C517 has fail save
mechanisms, analog signal processing facilities and timer capabilities and 8 KB on-chip program
memory. Other features include:
Arithmetic unit can make division, multiplication, shift and normalize operations
Eight data pointers instead of one for indirect addressing of program and external data memory
Nine ports
5. INVERTER
5.1 INTRODUCTION:
The main objective of inverters is to produce an ac output waveform from a dc power supply. These are
the types of waveforms required in adjustable speed drives (ASDs), uninterruptible power supplies
(UPS), static var compensators, active filters, flexible ac transmission systems , and voltage
compensators, which are only a few applications. For sinusoidal ac outputs, the magnitude,
frequency, and phase should be controllable. According to the type of ac output waveform, these
topologies can be considered as voltage source inverters (VSIs), where the independently controlled ac
output is a voltage waveform. These structures are the most widely used because they naturally behave as
voltage sources as required by many industrial applications, such as adjustable speed drives (ASDs),
which are the most popular application of inverters; see Fig.5.1
load should be inductive at the harmonic frequencies in order to produce a smooth current waveform. A
capacitive load in the VSIs will generate large current spikes. If this is the case, an inductive filter
between the VSI ac side and the load should be used. On the other hand, the CSI generates an ac output
current waveform composed of discrete values (highdi = dt ); therefore, the load should be capacitive at
the harmonic frequencies in order to produce a smooth voltage waveform.An inductive load in CSIs will
generate large voltage spikes. If this is the case, a capacitive filter between the CSI ac side and
the load should be used. A three-level voltage waveform is not recommended for
medium voltage ASDs due to the high d v =dt that would apply to the motor terminals. Several negative
side effects of this approach have been reported (bearing and isolation problems). As alternatives to
improve the ac output waveforms in VSIs are the multistage topologies (multilevel and multicell). The
basic principle is to construct the required ac output waveform from various voltage levels, which
achieves medium-voltage waveforms at reduced d v = dt . Although these topologies are well developed
in ASDs, they are also suitable for static var compensators, active filters, and voltage compensators.
Specialized modulating techniques have been developed to switch the higher number of power valves
involved in these topologies. Among others, the carrier-based (SPWM) and SV-based techniques have
been naturally extended to these applications. In many applications, it is required to take energy from the
ac side of the inverter and send it back into the dc side. For instance, whenever ASDs need to either
brake or slow down the motor speed, the kinetic energy is sent into the voltage dc link (Fig. 14.1a). This
is known as the regenerative mode operation and, in contrast to the motoring mode, the dc link current
direction is reversed due to the fact that the dc link voltage is fixed. If a capacitor is used to maintain the
dc link voltage (as in standard ASDs) the energy must either be dissipated or fed back into the
distribution system, otherwise, the dc link voltage gradually increases. The first approach requires the dc
link capacitor be connected in parallel with a resistor, which must be properly switched only when the
energy flows from the motor load into the dc link. A better alternative is to feed back such energy into
the distribution system. However, this alternative requires a reversible-current topology connected
between the distribution system and the dc link capacitor. A modern approach to such a requirement is
to use the active front-end rectifier technologies, where the regeneration mode is a natural operating
mode of the system.
The standard three-phase VSI topology is shown in Fig.14.13 and the eight valid switch states are given
in Table 14.3.
As in single-phase VSIs, the switches of any leg of the inverter ( S1and S4, S3 and S6,or S5 and S2)
cannot be switched on simultaneously because this would result in a short circuit across the dc link
voltage supply. Similarly, in order to avoid undefined states in the VSI, and thus undefined ac output line
voltages, the switches of any leg of the inverter cannot be switched off simultaneously as this will result
in voltages that will depend upon the respective line current polarity. Of the eight valid states, two of
them (7 and 8 in Table 5.1) produce zero ac line voltages. In this case, the ac line currents freewheel
through either the upper or lower components. The remaining states (1 to 6 in Table 5.1) produce
nonzero ac output voltages. In order to generate a given voltage wave-form, the inverter moves from one
state to another. Thus the resulting ac output line voltages consist of discrete values of voltages that are v
i, 0, and v i. The selection of the states in order to generate the given waveform is done by the
modulating technique that should ensure the use of only the valid states.
21
5.3POWER MOSFETS:
In three phase or single inverters Thyristor or Mosfet or IGBTs are used in general ,but due to
commutation circuit present in Thyristors are not used in inverters . So Mosfets are used because of no
commutation circuit is present so power Mosfets are used for high frequency switching applications like
inverters and choppers.
Unlike the bipolar junction transistor (BJT), the MOSFET device belongs to the unipolar device family,
because it uses only the majority carriers in conduction . The development of metal- oxidesemiconductor (MOS) technology for microelectronic circuits opened the way for development of the
power metal oxide semiconductor field effect transistor (MOSFET) device in 1975. Selecting the most
appropriate device for a given application is not an easy task because it requires knowledge about the
device characteristics, their unique features, innovation, and engineering design experience. Unlike lowpower (signal devices), high-power devices are more complicated in structure, driver design, and their
operational i -v characteristics are difficult to understand. This knowledge is very important for power
electronics engineers when designing circuits that will make these devices close to ideal. The device
symbol for a p - and n-channel enhancement and depletion types are shown in Fig. 5.1. Figure 5.2 shows
the i -v characteristics for the n -channel enhancement-type MOSFET. It is the fastest power switching
device, with switching frequency >MHz, and with voltage power ratings up to 600 V and current rating
as high as 40 A. Regions of operations for MOSFET will be studied.
22
Figure 5.4 Device symbols: (a) n-channel enhancement mode; (b) p-channel enhancement mode
(c)n-channel depletion mode;
(d) p-channel depletion mode
23
The total conduction (on-state) power loss for a given MOSFET with forward current I
D and on-resistance R DS on is given by
24
there are three distinct regions of operation labeled as triode region, saturation region, and cut-off region.
When used as a switching device, only triode and cut-off regions are used, whereas, when it is used as an
amplifier, the MOSFET must operate in the saturation region, which corresponds to the active region in
the BJT. The device operates in the cut-off region (off-state) when V GS< v Th, resulting in no induced
channel. In order to operate the MOSFET in either the triode or saturation region, a channel must first be
induced. This can be accomplished by applying gate-to-source voltage that exceeds v Th, that is,.
5.4MOSFET DRIVER:
To turn a power MOSFET on, the gate terminal must be set to a voltage at least 10 volts greater than the
source terminal (about 4 volts for logic level MOSFETs). This is comfortably above the Vgs(th) parameter.
One feature of power MOSFETs is that they have a large stray capacitance between the gate and the
other terminals, Ciss. The effect of this is that when the pulse to the gate terminal arrives, it must first
charge this capacitance up before the gate voltage can reach the 10 volts required. The gate terminal then
effectively does take current. Therefore the circuit that drives the gate terminal should be capable of
supplying a reasonable current so the stray capacitance can be charged up as quickly as possible. The
best way to do this is to use a dedicated MOSFET driver chip.
Some require the MOSFET source terminal to be grounded (for the lower 2 MOSFETs in a full bridge or
just a simple switching circuit). Some can drive a MOSFET with the source at a higher voltage. These
have an on-chip charge pump, which means they can generate the 22 volts required to turn the upper
MOSFET in a full bridge on.
Often you will see a low value resistor between the MOSFET driver and the MOSFET gate terminal.
This is to dampen down any ringing oscillations caused by the lead inductance and gate capacitance
which can otherwise exceed the maximum voltage allowed on the gate terminal. It also slows down the
rate at which the MOSFET turns on and off. This can be useful if the intrinsic diodes in the MOSFET do
not turn on fast enough
26
6. SIMULATION
6.1 SOFTWARE USED:
In the micro controller based equipment, the hardware works only when the relevant software is
written into the ROM area of the micro controller. Whenever the power is switched on to the micro
controller, the CPU runs the specified program and generates the relevant outputs to control the internal
and external peripheral devices to accomplish the required task.
When starting a new project, simply select the microcontroller from the Device Database and
the Vision IDE sets all compiler, assembler, linker, and memory options.
The Keil Vision Debugger accurately simulates on-chip peripherals (IC, CAN, UART, SPI,
Interrupts, I/O Ports, A/D Converter, D/A Converter, and PWM Modules) of 8051 device.
Simulation helps to understand hardware configurations and avoids time wasted on setup
27
problems. Additionally, with simulation, can be written and test applications before target
hardware is available.
6.2.1 Features:
Flexible variable allocation with bit, data, bdata, idata, xdata, and pdata memory types,
Support for dual data pointers on Atmel, AMD, Cypress, Dallas Semiconductor, Infineon,
Philips, and Triscend microcontrollers,
Support for the Philips 8xC750, 8xC751, and 8xC752 limited instruction sets,
sbit P15=P1^5;
sbit P16=P1^6;
void main()
{
P20=P21=P22=1;
P10=1;
P11=0;
P12=0;
P13=1;
P14=0;
P15=0;
while(1)
{
if(P20==0&&P21==0&&P22==0)
{
P10=0;
P11=1;
}
if(P20==0&&P21==0&&P22==1)
{
P13=0;
P15=1;
}
if(P20==0&&P21==1&&P22==0)
{
P11=0;
29
P12=1;
}
if(P20==0&&P21==1&&P22==1)
{
P15=0;
P14=1;
}
if(P20==1&&P21==0&&P22==0)
{
P12=0;
P10=1;
}
if(P20==1&&P21==0&&P22==1)
{
P14=0;
P13=1;
}
}
}
6.4 PROTEUS:
6.4.1 INTRODUCTION:
Proteus for 8051 contains everything you need to develop test and virtually prototype your embedded
System designs based around the popular 8051 series of microcontrollers. The unique nature of
schematic based microcontroller simulation with Proteus facilitates rapid ,flexible and
parallel
development of both the system hardware and the system firmware. This design synergy allows
engineers to evolve their projects more quickly empowering them with the flexibility to make hardware
or firmware changes at will and reducing the time to market.
30
Proteus Virtual System Modeling (VSM) combines mixed mode SPICE circuit simulation, animated
components and microprocessor models to facilitate co-simulation of complete microcontroller based
designs. For the first time ever, it is possible to develop and test such designs before a physical prototype
is constructed.
This is possible because you can interact with the design using on screen indicators such as LED and
LCD displays and actuators such as switches and buttons. The simulation takes place in real time (or near
enough to it): a 1GMHz Pentium III can simulate a basic 8051 system clocking at over 12MHz. Proteus
VSM also provides extensive debugging facilities including breakpoints, single stepping and variable
display for both assembly code and high level language source.
.
PROTEUS Software is used for simulating the microcontroller circuit .In this project supply to the stator
winding depending up on rotor position. The rotor position is sensed by Hall sensors. The hall sensor
output is given as input to microcontroller. For simulation purpose the hall sensors are replaced by
switches. In BLDC motors three phase inverter with six step pulses are used for stator supply. The gate
pulses are taken from micocontroller. Depending upon the output of the hall sensor we generate six
pulses from microcontroller which are observed by placing LEDs as shown in above figure
6.4.4ADVANTAGES OF PROTEUS:
The Proteus Design Suite is wholly unique in offering the ability to co-simulate both high and low-level
micro-controller code in the context of a mixed-mode SPICE circuit simulation. With this Virtual System
Modeling facility, you can transform your product design cycle, reaping huge rewards in terms of
reduced time to market and lower costs of development.
If one person designs both the hardware and the software then that person benefits as the hardware
design may be changed just as easily as the software design. In larger organizations where the two roles
are separated, the software designers can begin work as soon as the schematic is completed; there is no
need for them to wait until a physical prototype exists.
In short, Proteus improves efficiency, quality and flexibility throughout the design process.
6.5 PSIM:
PSIM is a simulation software specifically designed for power electronics and motor control. With fast
simulation and friendly user interface, PSIM provides a powerful simulation environment to address your
simulation needs.
PSIM provides an intuitive and easy-to-use graphic user interface for schematic editing. A circuit can be
easily created and edited. Extensive on-line help is available for each component. To handle large
systems, PSIM provides the sub circuit function which allows part of a circuit to be represented by a sub
circuit block.
PSIM simulator is the engine of the simulation environment. It uses efficient algorithms to overcome the
convergence problem and long simulation time existing in many other simulation software. The fast
simulation allows repetitive simulation runs and significantly shortens the design cycle.
Simulation results are displayed and evaluated in Simview. Various waveform processing functions, such
as multiple screens and line styles, are provided. Post-processing functions such as addition/subtraction
and average/rms value calculation are also provided.
32
33
34
35
7. HARDWARE IMPLEMENTATION
7.1 CIRCUIT SPECIFICATION
This section covers a BLDC motor drive controlled by microcontroller with the following specifications.
Input
: 24 volts to 3 phase inverter
Output
:
Microcontroller:AT89C51
Protection
: None
Voltage Required
+5V
Hall Sensors
+5V
Motor Drive
Function
Used to power up the
device
+15V DC is used for the
control the power supply
Used to power up the
device
36
gives 2 pulses for mosfets so we use three mosfet drivers. The circuit diagram of mosfet driver and
inverter shown in figure. The output of the inverter is a six stepped waveform. In BLDC motor the
supply to the stator is the six stepped waveform ( not sinusoidal ).The wave forms can be observed by
connecting three resistors in star and observed the phase voltages with respect to common point of star
connected resistors.
38
39
40
41
REFERENCES
1. Dr. P.S.Bimbhra, Power Electronics, Khanna publications.
2. Muhammad H.Rashid, Power Electronics: Circuits, Devices and applications
3. Gopal.K.Dubey Fundamentals of Electrical Drives
4. Wikepedia.org, Brushless DC electric motor ,
< http://en.wikipedia.org/wiki/Brushless_DC_electric_motor >
5. www.microchip.com.
< ww1.microchip.com/downloads/en/AppNotes/00857a.pdf >
42
APPENDIX -A
MH281 LOW SENSITIVITY UNIPOLARHALL EFFECT SWITCH
MH 281 is an unipolar Hall effect sensor IC. It incorporates advanced chopper
stabilization technology to provide accurate and stable magnetic switch points. The design,
specifications and performance have been optimized for applications of solid state switches.
The output transistor will be switched on (BOP) in the presence of a sufficiently strong South
pole magnetic field facing the marked side of the package. Similarly, the output will be switched
off (BRP) in the presence of a weaker South field and remain off with 0 field.
The package type is in a Green version was verified by third party organization. Green
package is available by customers option.
Applications
43
Values
Unit
Supply voltage,(VDD)
27
Out Voltage
27
-0.3
Unlimited
Gauss
50
mA
E version
-40 to +85
K version
-40 to +125
-55 to +150
150
(ja) UA / SO
206 / 543
C / W
(jc) UA / SO
148 / 410
C / W
606 / 230
mW
Thermal Resistance
Note: Do not apply reverse voltage to VDD and VOUT Pin, It may be caused for Miss function or damaged device.
44
Electrical Specifications
DC Operating Parameters TA=+25, VDD=12V (Unless otherwise specified)
Parameters
Test Conditions
Min
Type
Max
Supply Voltage
Operating
Supply Current
B<Bop
3.0
Units
24.0
Volts
5.0
mA
500.0
mV
10.0
uA
2.5
uS
uS
0.04
0.18
RL=1k; CL=20pF
D11N4148 or 100
C11000PF
D1
R2
C215PF
C1
Out
MH281 O
R210K
C2
TA=25, VSUPPLY=12V
Parameter
Symbol
Operate Point
Bop
Release Point
Brp
Hysteresis
Bhys
Test condition
Min
Typ
Max
Unit
175
250
Gauss
95
Gauss
45
Gauss
Test condition
OUT(UA)
B>Bop[(250)~(175)]
Low
-Brp ~ +Brp
Open(Pull-up Voltage)
B< -Bop(-250~-175)
Open(Pull-up Voltage)
45
OUT(SO)
Open(Pull-up Voltage)
Open(Pull-up Voltage)
Low
5.0
3.5
4.5
3.0
4.0
3.5
3.0
2.5
2.0
1.5
2.5
2.0
1.5
1.0
1.0
0.5
0.5
0.0
0.0
40
20
25
125
50
75
100
5.0
12
24
15
18.0
20
Supply Voltage(V)
200.0
200.0
180.0
180.0
Temperature()
160.0
140.0
120.0
100.0
80.0
60.0
40.0
20.0
0.0
160.0
140.0
120.0
100.0
80.0
60.0
40.0
20.0
0.0
5.0
12
24
15
18.0
40
20
25
125
50
75
100
Temperature()
Supply Voltage(V)
0.05
800
20
0.04
0.03
0.02
0.01
700
UA Package
600
Rja = 206/w
500
400
300
200
100
SO Package
Rja = 543/w
0.00
3
5.0
12
24
15
18.0
20
-40
40
Temperature()
Supply Voltage(V)
43
80
120
160
44
APPENDIX -B
8-Bit
Microcontroller
with 4K Bytes
Flash
AT89C51
45
APPENDIX -B
PDIP
Pin Configurations
41
39
38
36 34
37 35
33
32
31
30
29
28
27
26
25
24
23
1
2
3
4
5
6
7
8
9
10
11
13 15 17 19 21
12 14 16 18 20 22
P0. 4 (AD4)
P0.5 (AD5)
P0.6 (AD6)
P0. 7 (AD7)
EA/VPP
NC
ALE/PROG
PSEN
P2.7 (A15)
P2.6 (A14)
P2.5 (A13)
(AD0)
(AD1)
(AD2)
(AD3)
(AD4)
(AD5)
(AD6)
(AD7)
EA/VPP
ALE/PROG
PSEN
P2.7 (A15)
P2.6 (A14)
P2.5 (A13)
P2.4 (A12)
P2.3 (A11)
P2.2 (A10)
P2.1 (A9)
P 2.0 (A 8 )
PLCC
(AD0)
(AD1)
(AD2)
(AD3)
43
VCC
P0.0
P0.1
P0.2
P0.3
P0.4
P0.5
P0.6
P0.7
INDEX
CORNER
6
P1.5
P1.6
P1.7
RST
(RXD)
7
8
9
10
P3.0
NC
(TX D) P3.1(INT0) P3.2
(INT1 ) P3.3
(T0) P3.4(T1) P3 .5
4
3
44
1
42 40
4 3 4 13 9
36
35
11
12
34
13
33
14
32
15
31
16
30
1 7 1 9 2 1 2 3 2 5 2 72 9
18 20 22 24 26 28
P3.6
P3.7
X TA L 2
X TA L 1
GND
NC
(A8) P2.0
(A 9) P 2.1
(A10) P2.2
(A11) P2.3
(A12) P2.4
40
(WR )
(RD )
42
P1.5
P1.6
P1.7
RST(RXD) P
3.0
NC(TXD) P3.1
( INT0 ) P 3 .2 (
INT1 ) P 3. 3
(T0) P3.4
(T1) P3.5
(WR) P3.6
(RD) P3.7
X TA L 2
X TA L 1
44
GND
GND
(A8) P2.0
(A 9) P 2 .1
(A10) P2.2
(A11) P2.3
(A12) P2.4
INDEX
CORNER
40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
P1.4
P1.3
P1.2
P1.1
P1.0
NC
VCC
P0.0
P0.1
P0.2
P0.3
P1.4
P1.3
P1.2
P1.1
P1.0
NC
VCC
P0.0 (AD0)
P0.1 (AD1)
P0.2 (AD2)
P0.3 (AD3)
PQFP/TQFP
P1.0
P1.1
P1.2
P1.3
P1.4
P1.5
P1.6
P1.7
RST
(RX D ) P3.0
(TX D ) P3.1
(INT0 ) P 3 . 2
(INT1 ) P 3 . 3
(T0) P3.4
(T1) P3.5
(WR ) P 3.6
(RD ) P 3.7
X TA L 2
X TA L 1
GND
46
P0.4 (AD4)
P0.5 ( A D5)
P0.6 ( A D6)
P0.7 ( A D7)
EA/VPP
NC
ALE/PROG
PSEN
P2.7 (A15)
P2.6 (A14)
P2.5 (A13)
47
when emitting 1s. During accesses to external data memory that use 8-bit addresses (MOVX @ RI), Port 2 emits the
contents of the P2 Special Function Register.
Port 2 also receives the high-order address bits and some
control signals during Flash programming and verification.
Port 3
Port 3 is an 8-bit bidirectional I/O port with internal pullups.
The Port 3 output buffers can sink/source four TTL inputs.
When 1s are written to Port 3 pins they are pulled high by
the internal pullups and can be used as inputs. As inputs,
Port 3 pins that are externally being pulled low will source
current (IIL) because of the pullups.
Port 3 also serves the functions of various special features
of the AT89C51 as listed below:
Pin Description
VCC
Supply voltage.
GND
Ground.
Port 0
Port 0 is an 8-bit open drain bidirectional I/O port. As an
output port each pin can sink eight TTL inputs. When 1s
are written to port 0 pins, the pins can be used as highimpedance inputs.
Port 0 may also be configured to be the multiplexed loworder address/data bus during accesses to external program and data memory. In this mode P0 has internal pullups.
Port 0 also receives the code bytes during Flash programming, and outputs the code bytes during program verification. External pullups are required during program verification.
Port Pin
Alternate Functions
P3.0
P3.1
P3.2
P3.3
P3.4
P3.5
P3.6
P3.7
Port 3 also receives some control signals for Flash programming and verification.
RST
Reset input. A high on this pin for two machine cycles while
the oscillator is running resets the device.
Port 1
Port 1 is an 8-bit bidirectional I/O port with internal pullups.
The Port 1 output buffers can sink/source four TTL inputs.
When 1s are written to Port 1 pins they are pulled high by
the internal pullups and can be used as inputs. As inputs,
Port 1 pins that are externally being pulled low will source
current (IIL) because of the internal pullups.
Port 1 also receives the low-order address bytes during
Flash programming and verification.
ALE/PROG
Address Latch Enable output pulse for latching the low byte
of the address during accesses to external memory. This
pin is also the program pulse input (PROG) during Flash
programming.
In normal operation ALE is emitted at a constant rate of 1/6
the oscillator frequency, and may be used for external timing or clocking purposes. Note, however, that one ALE
pulse is skipped during each access to external Data Memory.
If desired, ALE operation can be disabled by setting bit 0 of
SFR location 8EH. With the bit set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is
weakly pulled high. Setting the ALE-disable bit has no
effect if the microcontroller is in external execution mode.
Port 2
Port 2 is an 8-bit bidirectional I/O port with internal pullups.
The Port 2 output buffers can sink/source four TTL inputs.
When 1s are written to Port 2 pins they are pulled high by
the internal pullups and can be used as inputs. As inputs,
Port 2 pins that are externally being pulled low will source
current (IIL) because of the internal pullups.
Port 2 emits the high-order address byte during fetches
from external program memory and during accesses to
external data memory that use 16-bit addresses (MOVX @
DPTR). In this application it uses strong internal pullups
PSEN
Program Store Enable is the read strobe to external program memory.
48
When the AT89C51 is executing code from external program memory, PSEN is activated twice each machine
cycle, except that two PSEN activations are skipped during
each access to external data memory.
EA/VPP
External Access Enable. EA must be strapped to GND in
order to enable the device to fetch code from external program memory locations starting at 0000H up to FFFFH.
Note, however, that if lock bit 1 is programmed, EA will be
internally latched on reset.
EA should be strapped to VCC for internal program executions.
This pin also receives the 12-volt programming enable voltage (VPP) during Flash programming, for parts that require
12-volt VPP.
XTAL1
Input to the inverting oscillator amplifier and input to the
internal clock operating circuit.
C1
XTAL1
XTAL2
Output from the inverting oscillator amplifier.
GND
Oscillator Characteristics
XTAL1 and XTAL2 are the input and output, respectively,
of an inverting amplifier which can be configured for use as
an on-chip oscillator, as shown in Figure 1. Either a quartz
crystal or ceramic resonator may be used. To drive the
device from an external clock source, XTAL2 should be left
unconnected while XTAL1 is driven as shown in Figure 2.
There are no requirements on the duty cycle of the external
clock signal, since the input to the internal clocking circuitry
is through a divide-by-two flip-flop, but minimum and maximum voltage high and low time specifications must be
observed.
Note:
C1, C2 = 30 pF
= 40 pF
10 pF for Crystals
10 pF for Ceramic Resonators
Idle Mode
In idle mode, the CPU puts itself to sleep while all the onchip peripherals remain active. The mode is invoked by
software. The content of the on-chip RAM and all the special functions registers remain unchanged during this
mode. The idle mode can be terminated by any enabled
interrupt or by a hardware reset.
Program Memory
ALE
Idle
Internal
Idle
External
Power Down
Power Down
PSEN
PORT0
PORT1
Data
Data
Float
Data
Internal
Data
Data
Data
Data
External
Float
Data
Data
Data
49
PORT2
Data
Address
PORT3
Data
Data
On the chip are three lock bits which can be left unprogrammed (U) or can be programmed (P) to obtain the additional features listed in the table below:
When lock bit 1 is programmed, the logic level at the EA pin
is sampled and latched during reset. If the device is powered up without a reset, the latch initializes to a random
value, and holds that value until reset is activated. It is necessary that the latched value of EA be in agreement with
the current logic level at that pin in order for the device to
function properly.
Protection Type
LB1
LB2
LB3
MOVC instructions executed from external program memory are disabled from fetching code
bytes from internal memory, EA is sampled and latched on reset, and further programming of the
Flash is disabled.
VPP = 5V
Top-Side Mark
AT89C51
xxxx yyww
AT89C51
xxxx-5
yyww
Signature
(030H)=1EH
(031H)=51H
(032H)=FFH
(030H)=1EH
(031H)=51H
(032H)=05H
The AT89C51 code memory array is programmed byte-bybyte in either programming mode. To program any nonblank byte in the on-chip Flash Memory, the entire memory
must be erased using the Chip Erase Mode.
50
AT89C51
Program Verify: If lock bits LB1 and LB2 have not been
programmed, the programmed code data can be read back
via the address and data lines for verification. The lock bits
cannot be verified directly. Verification of the lock bits is
achieved by observing that their features are enabled.
Chip Erase: The entire Flash array is erased electrically
by using the proper combination of control signals and by
holding ALE/PROG low for 10 ms. The code array is written
with all 1s. The chip erase operation must be executed
before the code memory can be re-programmed.
Reading the Signature Bytes: The signature bytes are
read by the same procedure as a normal verification of
locations 030H,
031H, and 032H, except that P3.6 and P3.7 must be pulled
to a logic low. The values returned are as follows.
Programming Interface
Every code byte in the Flash array can be written and the
entire array can be erased by using the appropriate combination of control signals. The write operation cycle is selftimed and once initiated, will automatically time itself to
completion.
All major programming vendors offer worldwide support for
the Atmel microcontroller series. Please contact your local
programming vendor for the appropriate software revision.
RST
PSEN
ALE/PROG
EA/VPP
P2.7
P3.6
P3.7
Bit - 1
H/12V
Bit - 2
H/12V
Bit - 3
H/12V
H/12V
Write Lock
Chip Erase
H/12V
P2.6
(1)
51
AT89C51
Absolute Maximum Ratings*
*NOTICE:
DC Characteristics
TA = -40C to 85C, VCC = 5.0V
Symbol
Parameter
Condition
Min
Max
VIL
(Except EA)
-0.5
VIL1
-0.5
VIH
VCC + 0.5
VIH1
(XTAL1, RST)
0.7 VCC
VCC + 0.5
VOL
Output Low
Voltage(1)
(Ports 1,2,3)
Voltage (1)
IOL = 1.6 Ma
0.45
0.45
VOL1
Output Low
(Port 0, ALE, PSEN)
IOL = 3.2 mA
VOH
VOH1
2.4
0.75 VCC
IOH = -10 A
0.9 VCC
2.4
10%
IOH = -300 A
0.75 VCC
IOH = -80 A
0.9 VCC
VIN = 0.45V
ITL
ILI
RRST
CIO
Pin Capacitance
ICC
Power Down
10%
IOH = -25 A
IIL
Mode(2)
Units
10%
50
-50
-650
10
300
10
pF
20
mA
mA
VCC = 6V
100
VCC = 3V
40
Notes: 1. Under steady state (non-transient) conditions, IOL must be externally limited as follows:
Maximum IOL per port pin: 10 mA
Maximum IOL per 8-bit port: Port 0: 26 mA
Ports 1, 2, 3: 15 mA
Maximum total IOL for all output pins: 71 mA
If IOL exceeds the test condition, VOL may exceed the related specification. Pins are not guaranteed to sink current greater
than the listed test conditions.
2. Minimum VCC for Power Down is 2V.
52
AT89C51
AC Characteristics
(Under Operating Conditions; Load Capacitance for Port 0, ALE/PROG, and PSEN = 100 pF; Load Capacitance for all other
outputs = 80 pF)
Parameter
12 MHz Oscillator
Min
Max
16 to 24 MHz Oscillator
Min
Max
24
Units
1/tCLCL
Oscillator Frequency
tLHLL
127
2tCLCL-40
ns
tAVLL
43
tCLCL-13
ns
tLLAX
48
tCLCL-20
ns
tLLIV
tLLPL
43
tCLCL-13
ns
tPLPH
205
3tCLCL-20
ns
tPLIV
tPXIX
tPXIZ
tPXAV
tAVIV
312
5tCLCL-55
ns
tPLAZ
10
10
ns
tRLRH
RD Pulse Width
400
6tCLCL-100
ns
tWLWH
WR Pulse Width
400
6tCLCL-100
ns
tRLDV
tRHDX
tRHDZ
97
2tCLCL-28
ns
tLLDV
517
8tCLCL-150
ns
tAVDV
585
9tCLCL-165
ns
tLLWL
200
3tCLCL+50
ns
tAVWL
Address to RD or WR Low
203
4tCLCL-75
ns
tQVWX
23
tCLCL-20
ns
tQVWH
433
7tCLCL-120
ns
tWHQX
33
tCLCL-20
ns
tRLAZ
tWHLH
4tCLCL-65
233
3tCLCL-45
145
0
0
59
tCLCL-10
252
0
5tCLCL-90
3tCLCL-50
0
43
123
53
tCLCL-20
ns
ns
ns
300
ns
ns
tCLCL-8
75
MHz
ns
ns
ns
tCLCL+25
ns
AT89C51
External Program Memory Read Cycle
tLHLL
ALE PSEN
tAVLL
tLLPL
tPLIV
tPXAV
tPLAZ
tPXIZ
tLLAX
tPXIX
A0 - A7
PORT 0
tPLPH
tLLIV
INSTR IN
A0 - A7
tAVIV
A8 - A15
A8 - A15
PORT 2
tLLDV
tRLRH
tLLWL
RD
tLLAX
RLAZ
PORT 0
tAVLL
tRLDV
tRHDZ
tRHDX
A0 - A7 FROM RI OR DPL
DATA IN
A0 - A7 FROM PCL
INSTR IN
tAVWL
tAVDV
PORT 2
54
AT89C51
External Data Memory Write Cycle
tLHLL
ALE PSEN
tWHLH
WR
tLLWL
tAVLL
tLLAX
tQVWX
A0 - A7 FROM RI OR DPL
PORT 0
tWLWH
tQVWH
DATA OUT
tWHQX
A0 - A7 FROM PCL
INSTR IN
tAVWL
PORT 2
tCHCX
tCLCH
VCC - 0.5V
tCHCL
0.7 VCC
0.2 VCC - 0.1V
0.45V
tCLCX
tCLCL
Parameter
Min
Max
Units
1/tCLCL
Oscillator Frequency
24
MHz
tCLCL
Clock Period
41.6
ns
Tchcx
High Time
15
ns
tCLCX
Low Time
15
ns
Tclch
Rise Time
20
ns
Tchcl
Fall Time
20
ns
55
APPENDIX-C
IR2110
HIGH AND LOW SIDE DRIVER
Product Summary
Floating channel designed for
bootstrap operation
Fully operational to +500V or
+600V Tolerant to negative
transient
voltage
dV/dt
immune
Gate drive supply range from 10 to 20V
Undervoltage lockout for both channels
3.3V logic compatible
Separate logic supply range from
3.3V to 20V Logic and power ground
5V offset
CMOS Schmitt-triggered inputs with
pull-down
Cycle by cycle edge-triggered
shutdown logic
Matched propagation delay for both
channels
Outputs in phase with inputs
VOFFSET (IR2110)
(IR2113)
IO+/-
2A / 2A VOUT
120 &
94 ns
Delay Matching (IR2110)
(IR2113)
Packages
Description
The IR2110/IR2113 are high voltage, high speed
power MOSFET and IGBT drivers with independent
high and low side referenced output channels. .
500V max.
600V max.
LSTTL
output,
down
to
3.3V
logic. The
output
10 ns max.
20ns max.
IR2110(-1-2)(S)PbF/IR2113(-1-2)(S)PbF
driver cross-conduction. Propagation delays are matched to simplify use in high
frequency applications. The floating channel can be used to drive an N-channel
power MOSFET or IGBT in the high side configuration which operates up to 500 or 600
volts.
Definition
High side floating supply voltage
Min.
(IR2110)
-0.3
(IR2113)
-0.3
Max.
525
625
VB - 25
VB + 0.3
VHO
VS - 0.3
VB + 0.3
VCC
-0.3
25
-0.3
VCC + 0.3
VLO
VDD
-0.3
VSS + 25
VSS
VCC - 25
VCC + 0.3
VSS - 0.3
VDD + 0.3
VIN
dVs/dt
PD
50
1.6
1.25
57
Units
V/ns
W
IR2110(-1-2)(S)PbF/IR2113(-1-2)(S)PbF
RTHJA
75
100
TJ
Junction temperature
150
TS
Storage temperature
-55
150
TL
300
C/W
Definition
VB
VS
Min.
Max.
VS + 10
VS + 20
(IR2110)
Note 1
500
(IR2113)
Note 1
600
VHO
VS
VB
VCC
10
20
VCC
VSS + 3
VSS + 20
VSS
-5 (Note 2)
VIN
VLO
VDD
VSS
Units
5
VDD
-40
125
C
Ambient temperature
Note 1: Logic operational for VS of -4 to +500V. Logic state held for VS of -4V to
-VBS. (Please refer to the Design Tip
DT97-3 for more
details).
Note 2: When VDD < 5V, the minimum VSS
offset is limited to -VDD.
TA
58
IR2110(-1-2)(S)PbF/IR2113(-1-2)(S)PbF
Dynamic Electrical Characteristics
VBIAS (VCC, VBS, VDD) = 15V, CL = 1000 pF, TA = 25C and VSS = COM unless otherwise specified. The dynamic
electrical characteristics are measured using the test circuit shown in Figure 3.
Symbol
Definition
ton
120
150
VS = 0V
toff
94
125
VS = 500V/600V
tsd
110
140
tr
10
25
35
tf
11
17
25
MT
(IR2110)
(IR2113)
ns
VS = 500V/600V
10
20
Symbol
Definition
12
9.5
13
6.0
VOH
14
1.2
VOL
15
0.1
IO = 0A
16
50
VB=VS = 500V/600V
IQBS
17
125
230
VIN = 0V or VDD
IQCC
18
180
340
IQDD
19
15
30
VIN = 0V or VDD
IIN+
20
20
40
VIN = VDD
21
22
7.5
8.6
1.0
9.7
VIN = 0V
23
7.0
8.2
9.4
24
7.4
8.5
9.6
VIH
VIL
ILK
IINVBSUV+
IO+
IO-
VBSUVVCCUV+
VCCUV-
IO = 0A
VIN = 0V or VDD
V
25
7.0
8.2
9.4
26
2.0
2.5
27
2.0
2.5
59
IR2110(-1-2)(S)PbF/IR2113(-1-2)(S)PbF
Lead Definitions
Symbo Description
lVDD
Logic supply
HIN
SD
LIN
VSS
VB
HO
VS
VCC
LO
COM
Logic input for high side gate driver output (HO), in phase
Logic input for shutdown
Logic input for low side gate driver output (LO), in phase
Logic ground
High side floating supply
High side gate drive output
High side floating supply return
Low side supply
Low side gate drive output
Low side return
60
IR2110(-1-2)(S)PbF/IR2113(-1-2)(S)PbF
HV = 10 to 500V/600V
Vcc =15V
10KF6
10
F
0.1
F
9
200
H
0.1
F
10KF6
100F
10
11
12
HO
dVS
>50 V/ns
dt
1
10KF6
OUTPUT
MONITOR
13
2
IRF820
Vcc =15V
10
0.1
F
F
9
HIN
LIN
SD
0.1
F
5
10
11
CL
HO
10
F
+
15V
-
V
S
(0 to 500V/600V)
LO
12
VB
""
"
$ #
10
F
$ #
CL
13
%#
%#
'*
%#
$ #
$ #
61
IR2110(-1-2)(S)PbF/IR2113(-1-2)(S)PbF
250
250
200
200
Turn-On Delay Time (ns)
Max.
150
Max.
100
Typ.
50
0
-50
Typ.
150
100
50
-25
25
50
75
100
0
10
125
12
250
200
Turn-Off Delay Time (ns)
20
250
Typ.
150
100
150
Max.
100
Typ.
50
0
-50
10 12 14 16 18 20
-25
250
200
200
Turn-Off Delay Time (ns)
250
Max.
150
Typ.
100
50
14
16
25
50
75
100
125
12
Temperature (C)
18
Max.
0
10
16
200
50
14
Temperature (C)
18
100
Typ
50
0
0
20
Max.
150
10 12 14 16 18 20
62
IR2110(-1-2)(S)PbF/IR2113(-1-2)(S)PbF
250
250
200
200
Shutdown Delay time (ns)
Max.
150
Max.
100
Typ.
50
150
Typ.
100
50
0
-50
-25
25
50
75
100
0
10
125
12
16
18
20
Max .
150
60
100
Typ
40
100
200
50
14
Temperature (C)
M ax.
Typ.
20
0
0
4
6
8 10 12
VDD Supply Voltage (V)
14
16
18
100
25
50
75
100
125
30
Max.
20
Typ.
40
20
0
10
50
80
40
-25
Temperature (C)
60
0
-50
20
Max.
Typ.
10
12
14
16
18
0
-50
20
-25
25
Temperature (C)
63
50
75
100
125
APPENDIX-D
N-channel enhancement mode
TrenchMOSTM transistor
GENERAL DESCRIPTION
N-channel
enhancement
mode
standard level field-effect power
transistor in a plastic envelope using
trench technology. The device
features very low on-state resistance
and has integral zener diodes giving
ESD protection up to 2kV. It is
intended for use in switched mode
power supplies and general purpose
switching applications.
PINNING - TO220AB
PIN
IRFZ44N
PARAMETER
VDS
ID
Ptot
Tj
RDS(ON)
Drain-source voltage
Drain current (DC)
Total power dissipation
Junction temperature
Drain-source on-state
resistance
VGS = 10 V
PIN CONFIGURATION
MAX.
UNIT
55
49
110
175
22
V
A
W
C
m
SYMBOL
DESCRIPTION
tab
gate
drain
source tab
drain
g
s
1 23
LIMITING VALUES
Limiting values in accordance with the Absolute Maximum System (IEC 134)
SYMBOL
PARAMETER
CONDITIONS
VDS
VDGR
VGS
ID
ID
IDM Ptot
Tstg, Tj
Drain-source voltage
Drain-gate voltage
Gate-source voltage
Drain current (DC)
Drain current (DC)
Drain current (pulse peak value)
Total power dissipation
Storage & operating temperature
RGS = 20 k
Tmb = 25 C
Tmb = 100 C
Tmb = 25 C
Tmb = 25 C
-
MIN.
- 55
MAX.
55
55
20
49
35
160
110
175
UNIT
VVV
AAA
W
C
PARAMETER
CONDITIONS
VC
MIN.
-
MAX.
2
UNIT
kV
THERMAL RESISTANCES
SYMBOL
PARAMETER
CONDITIONS
65
TYP.
MAX.
UNIT
Rth j-mb
Rth j-a
1.4
K/W
in free air
60
K/W
66
IRFZ44N
STATIC CHARACTERISTICS
Tj= 25C unless otherwise specified
SYMBOL
V(BR)DSS
voltage
VGS(TO)
Tj = 175C
Tj = -55C
IDSS
Tj = 175C
IGSS
Tj = 175C
V(BR)GSS
RDS(ON)
resistance
PARAMETER
CONDITIONS
Drain-source breakdown
MIN.
TYP.
MAX.
UNIT
2.0
3.0
4.0
0.05
10
55
50
0.04
16
42
15
22
V
m
m
MIN.
TYP.
MAX.
UNIT
S
DYNAMIC CHARACTERISTICS
Tmb = 25C unless otherwise specified
SYMBOL
PARAMETER
CONDITIONS
gfs
Forward transconductance
VDS = 25 V; ID = 25 A
Ciss
Coss
Crss
Input capacitance
Output capacitance
Feedback capacitance
1350
330
155
1800
400
215
pF
pF
pF
Qg
Qgs
Qgd
VDD = 44 V; ID = 50 A; VGS = 10 V
62
15
26
nC
nC
nC
td on
tr
td off
tf
VDD = 30 V; ID = 25 A;
VGS = 10 V; RG = 10
Resistive load
18
50
40
30
26
75
50
40
ns
ns
ns
ns
Ld
3.5
nH
Ld
4.5
nH
Ls
7.5
nH
PARAMETER
IDR
IDRM
VSD
trr
Qrr
CONDITIONS
MIN.
TYP.
MAX.
UNIT
49
IF = 25 A; VGS = 0 V
IF = 40 A; VGS = 0 V
0.95
1.0
160
1.2
-
A
V
IF = 40 A; -dIF/dt = 100 A/ s;
VGS = -10 V; VR = 30 V
47
0.15
ns
C
67
IRFZ44N
PARAMETER
CONDITIONS
WDSS
Drain-source non-repetitive
unclamped inductive turn-off
energy
ID = 45 A; VDD 25 V;
VGS = 10 V; RGS = 50 ; Tmb = 25 C
120
PD%
MIN.
TYP.
MAX.
UNIT
110
mJ
1000
110
ID/A
100
90
tp =
RDS(ON) =VDS/ID
80
1 us
100
10us
70
60
100 us
50
DC
40
10
1 ms
30
20
10ms
100ms
10
0
20
40
60
Tmb / C
80
100
120
140
160
180
ID%
10
100
VDS/V
120
10
Zth/(K/W)
110
100
1
90
0.5
80
0.2
70
60
0.1
50
0.1
0.05
PD
0.02
40
30
0.01 0
tp
D=
T
tp
20
10
0
ID%
0
20
40
60
Tmb / C
80
100
120
140
160
0.001
180
1E-06
t/s
0.0001
0.01
68
100
100
IRFZ44N
30
16
10
8.5
VGS/V =
ID/A
gfs/S
8.0
25
80
7.5
20
60
7.0
15
6.5
40
10
6.0
20
VDS/V
5.5
5.0
4.5
10 4.0
0
0
20
40
60
80
100
RDS(ON)/mOhm
40
VGS/V =
2.5
35
ID/A
BUK959-60
2
30
6.5
7
1.5
25
8
9
20
10
1
15
10
10
20
30
ID/A
40
50
60
70
80
0.5
-100
90
-50
0
Tmb / degC
50
100
150
200
100
BUK759-60
VGS(TO) / V
5
ID/A
max.
80
4
typ.
60
40
min.
20
Tj/C =
0
0
175
25
6
VGS/V
10
-100
12
-50
50
Tj / C
100
150
200
69
IRFZ44N
100
Sub-Threshold Conduction
1E-01
IF/A
80
1E-02
2%
1E-03
60
98%
typ
Tj/C =
175
25
40
1E-04
20
1E-05
0
0
1E-06
0.2
0.4
VSDS/V
0.6
0.8
1.2
1.4
2.5
120
WDSS%
110
100
2
Thousands pF
90
80
1.5
70
Ciss
60
50
40
30
20
.5
0.01
0.1
VDS/V
10
Coss
10
Crss
20
100
40
60
80
Tmb / C
100
120
140
160
180
12
VGS/V
10
VDD
VDS = 14V
8
VDS
VDS = 4 4V
VGS
-ID/100
0
RGS
0
0
T.U.T.
10
20
QG/nC
30
40
R 01
shunt
50
70
IRFZ44N
MECHANICAL DATA
Dimensions mm
Net Mass: 2 g
4,5
max
10,3
max
1,3
3,7
2,8
5,9
min
15,8 max
3,0
13,5
min
1,3 max
1 2 3
(2x)
0,6
2,4
Notes
1. Observe the general handling precautions for electrostatic-discharge sensitive devices (ESDs) to prevent
damage to MOS gate oxide.
2. Refer to mounting instructions for SOT78 (TO220) envelopes.
3. Epoxy meets UL94 V0 at 1/8".
71