Professional Documents
Culture Documents
Prior to the development of Power Electronic devices and the Micro Controller, it was
very difficult to manage the variable speed in any application. However, nowadays,
the long and cumbersome set up required to achieve the control has been transformed
into few power devices and a microcontroller. Reliability and efficiency have also
increased and such a process is aptly suited for the stringent demands of today’s
industries.
DC Motors provide high starting torque and can be used over a wide range of
applications. The speed control methods of DC Motors are much simpler than those of
AC Motors, in addition to this; DC Motors are also less expensive. The conventional
approach for speed control is the phase control method but this method has been
discarded because it generates too many harmonics and has lower power factor at
decreased speeds. Therefore, the microprocessor based IGBT switching technique is
employed. Pulse Width Modulation technique is also employed to control the speed of
the motor through duty cycle variations.
1
Moreover, the system is provided with Soft start facility i.e., starting the
motor without allowing the armature current to exceed the full load current. The
Hardware of this system includes uncontrolled rectifier using diodes, chopper
using IGBT’S, control keys, speed adjust potentiometer and other logical circuits.
2
CHAPTER 2: LITERATURE SURVEY
Basics:
Like any other electric motor, a DC motor converts electrical energy into mechanical
energy. A DC motor works on the simple principle that whenever a current carrying
conductor is placed in a magnetic field, a mechanical force is experienced by the
conductor. [1]
F = B Ic lc (1)
Where B is the magnetic field strength in Teslas (Weber/m2), Ic is the current flowing
through the conductor and lc is the length of the conductor in metres. [1]
The direction of the magnetic field is given by using Fleming’s left hand rule. It states
that if the first finger represents the direction of magnetic field and the second finger
represents the direction of conventional current, then the direction of the thumb
indicates the direction of the resultant motion. [2]
Where Eb is the Back EMF in volts, Φ is the flux per pole in Weber, Z is the number
of armature conductors, N is the speed, P is the number of poles and A is the number
of parallel paths. [1]
The direction of induced EMF is obtained from Lenz’s law, which states that an
induced EMF or current is always in opposition to the cause that produces it. [2]
3
The applied voltage V must be large enough to balance both the voltage drop in the
armature resistance and the Back EMF at all times.
V = Eb + Ia Ra (3)
Where Eb is the induced EMF in the armature by the generator action also known as
the Back EMF, Ia is the armature current and Ra is the armature resistance.
The induced EMF depends upon the armature speed in a DC motor. If the armature
speed is high, the back EMF will be large and hence armature current is small. On the
other hand, if the speed of the armature is low, then back EMF will be less, armature
current will be more which eventually results in the development of a large torque. [1]
Types of DC Motors:
All DC motors have two types of windings namely the field and the shunt windings.
Based on how these two windings are connected motors can be classified as either
series motor, shunt motor or separately excited motor. The series and shunt motors are
not appropriate for speed control because of their limitations and therefore we use
separately excited DC machines. In a separately excited DC motor, armature and field
coils are fed from different supply sources and therefore may have different voltage
ratings. [1]
We use the voltage and flux field control to give increased ability to drive
requirements.
In a general drive system, both active and passive torques are present, therefore the
motor may operate in different regimes. Before we understand the operation of the
motor in two and four quadrants, we need to analyse the active and passive torques.
Active torques are due to either gravitational forces or deformation in elastic bodies
and continues to act in the same direction irrespective of the direction of the
movement of the drive.
Passive torques are due to friction or due to shear and deformation in inelastic bodies
and always opposes the motion retarding the rotation of the driven machine.
4
Two Quadrant Operation of Motor
In the two quadrant operation of an electric motor, the motor operates in forward
motoring mode and in regenerative braking mode.
This is the simple process in which electric motor is switched to electric supply mains
and in this mode mechanical device like line shafts, machine tools, gear systems etc
are operated.
For an electric motor to be stopped, brakes are to be applied. In this mode, the motor
begins to operate as a generator and the kinetic energy of the motor and the load
coupled to it is converted into electrical energy. A part of this electrical energy is
returned to supply and the remaining part is lost as heat in the windings and bearings
of electrical machines. In this mode, the armature current and induced EMF in the
motor is in the same direction but both are in opposition to the supply voltage. The
electromagnetic torque developed is in the direction opposite to that of rotation of
armature. [1]
5
Four Quadrant Operation of Motor
The motor will act as a motor for specific periods and will also act as a generator at
other times. There are also instances in which the motor might act as a brake. There
are several applications in which motor may be required to run in both directions.
Therefore, in sketching the speed torque characteristics of the motor or the load, it is
preferable to make use of all the four quadrants of the speed torque plane for plotting
rather than simply confining into first quadrant operation. [1]
The speed is assumed to have a positive sign, if the direction of rotation is counter
clockwise or is in such a way to cause an upward or forward motion of the drive. In
case of reversible drives, the positive sign for speed may have to be assigned
arbitrarily either to counter clockwise or clockwise for rotation. The motor torque is
taken to be positive when it causes an increase in speed in the positive sense. The load
torque is assigned a positive sign when it acts against the motor torque.
The field polarity is maintained and the armature current is reversed to obtain
negative torque, the same effect is obtained by reversing the field polarity and
maintaining the armature current direction. Field reversal is necessary with some
forms of rectifier control. These four quadrants of operation are feasible for any DC
or AC rotating machine but the DC machine is much freer to transfer its operation
between quadrants and operates satisfactorily at any point within the envelope.
In this mode the motor is made to operate as generator and the kinetic energy of the
motor is converted into electrical energy. This electrical energy is dissipated in
braking resistance connected to the terminals. When the chopper is turned on by a
gate pulse, the kinetic energy is partly dissipated in armature resistance and partly
stored in armature inductance. When chopper is turned off, the energy stored in
inductance is transferred to braking resistance and dissipated as heat.
Reverse generating mode is feasible only if motor generated emf is made to exceed
the dc source voltage.
7
Fig 2.2 Four Quadrant Operation of Motor
8
To switch between different modes of the four quadrant operation, chopper circuit is
employed. Several power devices are available which can be used as a switch in the
chopper circuit.
An ideal power semiconductor switch has zero conduction drops, zero leakage current
at OFF condition, and turns ON and OFF instantaneously. Such a device is lossless
and therefore the chopper efficiency tends to be 100%. However practically, devices
have loses and also several other issues which hinder the working of the project. [5]
The main problem in practical switching is the generation of harmonics on the load
and source lines. The present state of power electronics has evolved technologically
over a considerable period of time. The most obvious is the PNPN triggering
transistor also known as the thyristor. In theory, power electronic apparatus are
basically ON and OFF switches; practical devices are far more complex and fragile.
[4]
There are several options which can be used as a switch in the chopper circuit. Each
of these and their possible reasons to use/omit are discussed hereunder:
i. Thyristor:
The problem with a thyristor circuit is that it needs a Snubber circuit. The
Snubber is used to protect the device from voltage transients; it also limits the
anode di/dt effect and also reduces the off state and reapplied anode dv/dt. For
the device to carry greater currents, it needs to have cooling. [3]
9
Fig 2.3 SCR
This is a slight improvement over the conventional SCR thyristor. It has the
ability to be turned off by using negative current pulse. However the turn off
current gain is low. Minority carrier lifetime control and shorted anode
construction are frequently used to reduce the turn off time. The turns off
characteristics are very similar to that of the thyristor but slightly more
complex. [4]
The main problem with a GTO is that during the steep fall time of the anode
current, even a very small leakage inductance in the Snubber will create an
anode spike voltage that will tend to cause a second breakdown failure. [3] In
addition, there is also excessive power dissipation because of large anode tail
current during device voltage build up. Therefore, GTO circuits need to be
designed with large Snubbers to avoid these problems.
10
Because of high Snubber loss in GTO, the switching frequency is usually
restricted to 1 or 2 KHz.[4]
11
In power transistors, in addition to avalanche breakdown, there is also a
second breakdown effect. The collector current is switched ON. There is
crowding at the base emitter junction periphery, thus constricting the collector
current in a narrow area of reverse biased collector junction. [3]
The main disadvantage is that the rise in junction temperature at the hotspot
accentuates the current concentration due to negative temperature co-efficient
of the drop and this regeneration effect causes collapse of collector voltage
hereby destroying the device. A similar problem arises when an inductor load
is turned OFF.
12
The Power MOSFET is a voltage controlled, zero junction majority carrier
devices. The GATE impedance is extremely high at steady state but the
effective GATE SOURCE capacitance demands a pulse current during fast
TURN ON and TURN OFF. The device is basically linear with asymmetrical
blocking capability and as an integral diode that can carry full current in
reverse direction. [3]
In the above diagram, ’G’ stands for GATE,’D’ for DRAIN and ‘S’ for
SOURCE.
13
Power MOSFETs are extremely popular in low voltage , low power and high
frequency switching circuits such as Brushless DC Motor(BLDC) drives,
solid state DC relay and other automobile applications.
14
Fig 2.7 Structure of an IGBT
Structure:
Operation:
Blocking Operation
The on/off state of the device is controlled, as in a MOSFET, by the gate voltage VG.
If the voltage applied to the gate contact, with respect to the emitter, is less than the
threshold voltage Vth then no MOSFET inversion layer is created and the device is
turned off. When this is the case, any applied forward voltage will fall across the
reversed biased junction J2. The only current to flow will be a small leakage current.
[3]
The n+ buffer layer is often present to prevent the depletion region of junction J2 from
extending right to the p bipolar collector. The inclusion of this layer however
drastically reduces the reverse blocking capability of the device as this is dependent
on the breakdown voltage of junction J3, which is reverse, biased under reverse
15
voltage conditions. The benefit of this buffer layer is that it allows the thickness of the
drift region to be reduced, thus reducing on-state losses.
On-state Operation
The turning on of the device is achieved by increasing the gate voltage V G so that it is
greater than the threshold voltage Vth. This results in an inversion layer forming under
the gate which provides a channel linking the source to the drift region of the device.
Electrons are then injected from the source into the drift region while at the same time
junction J3, which is forward biased, injects holes into the n- doped drift region. [3]
Fig 2.8 Internal hole and electron flow in the IGBT while in on state
16
This injection causes conductivity modulation of the drift region where both the
electron and hole densities are several orders of magnitude higher than the original n-
doping. It is this conductivity modulation which gives the IGBT its low on-state
voltage because of the reduced resistance of the drift region. Some of the injected
holes will recombine in the drift region, while others will cross the region via drift and
diffusion and will reach the junction with the p-type region where they will be
collected. The operation of the IGBT can therefore be considered like a wide-base pnp
transistor whose base drive current is supplied by the MOSFET current through the
channel. If the current flowing through this resistance is high enough it will produce a
voltage drop that will forward bias the junction with the n+ region turning on the
parasitic transistor which forms part of a parasitic thyristor. Once this happens there is
a high injection of electrons from the n+ region into the p region and all gate control is
lost. This is known as latch up and usually leads to device destruction. [3]
17
2.3 Regulated Power Supply
The IGBTs, ICs and the Microcontrollers require DC supply, but commonly available
supply is in AC and therefore, we need to convert the existing AC supply to DC. We
have our usual 220 V single phase supply which needs to be converted to a DC
supply. The components required for the Regulated Power Supply are discussed
hereunder:
Transformer:
The transformer is a device which converts AC electricity from one voltage to another
with little loss of power. Transformers work only with AC and this is one of the
reasons why mains electricity is AC. [1]
There are two types of transformers- step up and step down. Step-up transformers
increase in output voltage, step-down transformers decrease in output voltage. Most
power supplies use a step-down transformer to reduce the dangerously high mains
voltage to a safer low voltage.
The transformer consists of two coils, primary and secondary. The input coil is called
the primary and the output coil is called the secondary. There is no electrical
connection between the two coils; instead they are linked by an alternating magnetic
field created in the soft-iron core of the transformer. The two lines in the middle of
the circuit symbol represent the core. The core is made up of soft iron or silicon steel
18
core and two windings placed on it. This core provides a path of low reluctance to
magnetic flux. The winding connected to the high voltage side is called high voltage
winding. The winding connected to the low voltage side is called low voltage
winding. [1]
The action of a transformer is base don the principle that energy may be efficiently
transferred by induction from one set of coils to another by means of varying
magnetic flux, provided that both the set of coils are on a common magnetic circuit.
In a transformer, the coils and magnetic circuit are all stationary with respect to one
another. The emfs are induced by varying the magnetic flux with time. The current
19
flowing through the primary winding produces an alternating flux in the core. Since
this flux is alternating emf is induced in the secondary winding. Thus, the energy is
transformed from the primary winding to the secondary winding without any change
in frequency. There is also a self induced emf in the primary winding which opposes
the applied voltage and it is known as back emf of the primary.[1]
Transformers waste very little power so the power out is (almost) equal to the power
in. Note that as voltage is stepped down current is stepped up. The ratio of the
number of turns on each coil, called the turn’s ratio, determines the ratio of the
voltages. A step-down transformer has a large number of turns on its primary (input)
coil which is connected to the high voltage mains supply, and a small number of turns
on its secondary (output) coil to give a low output voltage. [1]
The transformer reduces the primary high voltage AC to low voltage AC. After the
reduction of voltage, the AC voltage needs to be converted to DC. For this, we need
to use a rectifier.
20
Turns ratio = Vp/ VS = Np/NS
VS X IS=VP X IP
Vp = primary (input) voltage
Np = number of turns on primary coil
Ip = primary (input) current
Rectifier
In the half wave single phase controlled rectifier, only one SCR is employed in the
circuit .It is included between AC source and load. The performance of controlled
rectifier very depends upon the type and parameters of the output circuit. [4]
21
Fig 2.11 Half Wave controlled rectifier
Many circuits, particularly those which are half or uncontrolled, include a diode
across the load which is described as the freewheeling diode, commutating diode or
the by-pass diode. This diode serves two main functions; firstly it prevents reversal of
load voltage except for small diode voltage drop. Secondly, it transfers the load
current away from the main rectifier thereby allowing all of its thyristors to regain
their blocking states. Freewheeling diodes help in improvement of the input power
factor of the system.
In a single phase full wave controlled rectifier, generally two types of converters are
employed based on the type of SCR configuration. These are mid-point converters
and bridge converters.
Midpoint converters: In a single phase full wave controlled rectifier circuit with
midpoint configuration, two SCRs and a single phase transformer with a centre tapped
secondary winding is employed. These converters are also referred to as two pulse
converters as two triggering pulses are generated during every cycle. These rectifiers
are used for low ratings. Similar to half wave rectifier resistive and inductive are
employed here also. When a purely resistive load is used, the load current is always
discontinuous. However, in case of RL load, the load current may be continuous or
discontinuous. The load current is continuous if the inductance value is greater than
its critical value and discontinuous otherwise. Due to large inductance in the circuit
22
and continuous current conduction, the thyristors continue to conduct even when there
anode voltages are negative with respect to the cathode [4].
The following diagram shows a Full Wave Mid Point Converter with just the resistive
load and at 110 V AC supply. However in, normal circumstances we give 220 V AC
supply and employ both Resistances and Inductances across the load.
23
Fig 2.13 Full Wave Bridge Circuit with Resistive Load
In the bridge circuit, diagonally opposite pair of thyristors are made to conduct and
are commutated simultaneously. As can be observed from the diagram above SCRs
S1 and S2 are forward biased and if they are triggered simultaneously. Hence in
positive half cycle thyristors S1 and S2 are conducting.[4].
During the negative half cycle of the AC input, SCRs S3 and S4 are forward biased
and if they are triggered simultaneously. Thyristors S1,S2 and S3,S4 are triggered at
the same firing angle in each positive and negative half cycles of the supply voltage
respectively.[4].
When the supply voltage falls to zero, the current also goes zero. Thyristors T1, T2 in
positive half cycles and T3, T4 in negative half cycle turn OFF by natural
commutation.
24
Fig 2.14a Voltage Waveform across Load Resistor
25
Fig 2.14c Average Load Current
Fig 2.14 Waveform for Fully Controlled Bridge Rectifier with Resistive Load
Two modes of operation are possible with fully controlled single phase bridge circuit.
These are rectifying mode and inverting mode. In the rectifying mode, power flows
from AC to DC and the converter acts as a rectifier. In the inverting mode, power is
now being delivered from DC side to the AC side and the converter is operating as a
line commutated inverter. [4]
Type of Rectifier
Number of diodes
1 2 4
PIV of diodes
Vm 2Vm Vm
26
Vdc,at 0.318Vm 0.636Vm 0.636Vm
no-load
Ripple
frequency f 2f 2f
Rectification
Transformer
Factor(TUF)
Instead of thyristors, full wave rectifier can be achieved using diodes also. It is
already been established that the bridge rectifier is the most efficient. A bridge
rectifier makes use of four diodes in a bridge arrangement to achieve full-wave
rectification. This is a widely used configuration, both with individual diodes
wired as shown and with single component bridges where the diode bridge is
wired internally.
27
Fig 2.15 Bridge Rectifier
Operation:
During positive half cycle of secondary, the diodes D2 and D3 are in forward biased
while D1 and D4 are in reverse biased as shown in the Fig 2.16. The current flow
direction is shown in the figure with dotted arrows.
Filters:
While the output of a rectifier is a pulsating dc, most electronic circuits require a
substantially pure dc for proper operation. This type of output is provided by single or
multi section filter circuits placed between the output of the rectifier and the load. We
have seen that the ripple content in the rectified output of half wave rectifier is 121%
or that of full-wave or bridge rectifier or bridge rectifier is 48% such high percentages
of ripples is not acceptable for most of the applications. Ripples can be removed by
one of the following methods of filtering.
(a) A capacitor, in parallel to the load, provides an easier by –pass for the ripples
voltage though it due to low impedance. At ripple frequency and leave the D.C. to
appear at the load.
(b) An inductor, in series with the load, prevents the passage of the ripple current (due
to high impedance at ripple frequency) while allowing the d.c (due to low resistance
to d.c)
29
(c) Various combinations of capacitor and inductor, such as L-section filter section
filter, multiple section filter etc. which make use of both the properties mentioned in
(a) and (b) above. Two cases of capacitor filter, one applied on half wave rectifier and
another with full wave rectifier.
Working:
First, a capacitor opposes any change in voltage. The opposition to a change in current
is called capacitive reactance (XC) and is measured in ohms. The capacitive reactance
is determined by the frequency (f) of the applied voltage and the capacitance (C) of
the capacitor.
From the formula, we can see that if frequency or capacitance is increased, the
XC decreases. Since filter capacitors are placed in parallel with the load, a low XC will
provide better filtering than a high XC. For this to be accomplished, a better shunting
effect of the ac around the load is provided, as shown in figures.
30
Fig 2.18 Filer charging and discharging
To obtain a steady dc output, the capacitor must charge almost instantaneously to the
value of applied voltage. Once charged, the capacitor must retain the charge as long as
possible. The capacitor must have a short charge time constant (view A). This can be
accomplished by keeping the internal resistance of the power supply as small as
possible (fast charge time) and the resistance of the load as large as possible (for a
slow discharge time as illustrated in view B).
Voltage Regulators:
Some voltage regulators provide a fixed supply voltage to the processor, but most of
them sense the required supply voltage from the processor. The series of voltage
regulator that we are using is 78XX where 78 is the series and XX is the voltage value
required.
31
Fig 2.19 Internal Block Diagram of 78XX Voltage Regulator
78XX:
The Bay Linear LM78XX is integrated linear positive regulator with three
terminals. The LM78XX offer several fixed output voltages making them useful in
wide range of applications. When used as a zener diode/resistor combination
replacement, the LM78XX usually results in an effective output impedance
improvement of two orders of magnitude, lower quiescent current. The LM78XX is
available in the TO-252, TO-220 & TO-263packages.
VRs are buck converters that convert from +5 V or +12 V to a much smaller voltage
required by the CPU or other devices like microcontrollers.
32
2.4 Optocouplers
Description
There are many situations where signals and data need to be transferred from one
subsystem to another within a piece of electronics equipment, or from one piece of
equipment to another, without making a direct .Ohmic electrical connection. Often
this is because the source and destination are (or may be at times) at very different
voltage levels, like a microprocessor which is operating from 5V DC but being used
33
to control a triac which is switching 240V AC. In such situations the link between the
two must be an isolated one, to protect the microprocessor from overvoltage damage.
Relays can of course provide this kind of isolation, but even small relays tend to be
fairly bulky compared with ICs and many of today’s other miniature circuit
components. Because they are electro-mechanical, relays are also not as reliable and
only capable of relatively low speed operation. Where small size, higher speed and
greater reliability are important, a much better alternative is to use an Optocoupler.
The IC Diagram with the Pins and the Basic Schematic diagram of an Optocoupler is
shown hereunder followed by the explanation.
These use a beam of light to transmit the signals or data across an electrical barrier,
and achieve excellent isolation. Optocouplers typically come in a small 6-pin or 8-pin
IC package, but are essentially a combination of two distinct devices: an optical
transmitter, typically a gallium arsenide LED (light-emitting diode) and an optical
receiver such as a phototransistor or light-triggered diac. The two are separated by a
transparent barrier which blocks any electrical current flow between the two, but does
34
allow the passage of light. The basic idea is shown in Fig along with the usual circuit
symbol for an Optocoupler.
Usually the electrical connections to the LED section are brought out to the pins on
one side of the package and those for the phototransistor or diac to the other side, to
physically separate them as much as possible. This usually allows Optocouplers to
withstand voltages of anywhere between 500V and 7500V between input and output.
Optocouplers are essentially digital or switching devices, so they are best for
transferring either on-off control signals or digital data. Analog signals can be
transferred by means of frequency or pulse-width modulation.
Description
36
The AT89S52 is a low-power, high-performance CMOS 8-bit microcontroller
with 8K bytes of in-system programmable Flash memory. The device is manufactured
using Atmel’s high-density non volatile memory technology and is compatible with
the industry-standard 80C51 instruction set and pin out. The on-chip Flash allows the
program memory to be reprogrammed in-system or by a conventional non volatile
memory programmer. By combining a versatile 8-bit CPU with in-system
programmable Flash on a monolithic chip, the Atmel AT89S52 is a powerful
microcontroller which provides a highly-flexible and cost-effective solution to many
embedded control applications. The AT89S52 provides the following standard
features: 8K bytes of Flash, 256 bytes of RAM, 32 I/O lines, Watchdog timer, two
data pointers, three 16-bit timer/counters, axis-vector two-level interrupt architecture,
a full duplex serial port, on-chip oscillator, and clock circuitry. In addition, the
AT89S52 is designed with static logic for operation down to zero frequency and
supports two software selectable power saving modes. The Idle Mode stops the CPU
while allowing the RAM, timer/counters, serial port, and interrupt system to continue
functioning. The Power-down mode saves the RAM contents but freezes the
oscillator, disabling all other chip functions until the next interrupt or hardware reset.
Pin diagrams:
37
Fig 2.21 PDIP 89S52
38
Fig 2.22 PLCC 89S52
39
Fig 2.23 TQFP 89S52
40
Fig 2.24 Atmel 89S52 Block Diagram
Pin Description
VCC
Supply voltage.
41
GND
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 high
impedance inputs. Port 0 can also be configured to be the multiplexed low order
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 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.
In addition, P1.0 and P1.1 can be configured to be the timer/counter 2 external count
input (P1.0/T2) and the timer/counter 2 trigger input (P1.1/T2EX), respectively, as
shown in the following table. Port 1 also receives the low-order address bytes during
Flash programming and verification.
Table 2.2 Atmel AR89S52 Port 1Pins and their alternate functions
42
P1.0 T2 (external count input to Timer/Counter
2),clock-out
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 uses 16-bit addresses
(MOVX @ DPTR). In this application, Port 2 uses strong internal pull-ups when
emitting 1s. During accesses to external data memory that uses 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
43
externally being pulled low will source current (IIL) because of the pullups. Port 3
also serves the functions of various special features of the AT89S52, as shown in the
following table. Port 3 also receives some control signals for Flash programming and
verification.
Table 2.3 Atmel AR89S52 Port 3 Pins and their alternate functions
RST
Resets input. A high on this pin for two machine cycles while the oscillator is running
resets the device. This pin drives High for 96 oscillator periods after the Watchdog
times out. The DISRTO bit in SFR AUXR (address 8EH) can be used to disable this
feature. In the default state of bit DISRTO, the RESET HIGH out feature is enabled.
ALE/PROG
Address Latch Enable (ALE) is an 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
44
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.
PSEN
Program Store Enable (PSEN) is the read strobe to external program memory. When
the AT89S52 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
XTAL1
Input to the inverting oscillator amplifier and input to the internal clock operating
circuit
XTAL2
A map of the on-chip memory area called the Special Function Register (SFR) space
is shown in Table.
45
Note that not all of the addresses are occupied, and unoccupied addresses may not be
implemented on the chip. Read accesses to these addresses will in general return
random data, and write accesses will have an indeterminate effect. User software
should not write 1s to these unlisted locations, since they may be used in future
products to invoke new features. In that case, the reset or inactive values of the new
bits will always be 0.
Timer 2 Registers: Control and status bits are contained in registers T2CON (shown in
Table 2) and T2MOD (shown in Table 3) for Timer 2. The register pair (RCAP2H,
RCAP2L) is the Capture/Reload registers for Timer 2 in 16-bit capture mode or 16-bit
auto-reload mode.
Interrupt Registers: The individual interrupt enable bits are in the IE register. Two
priorities can be set for each of the six interrupt sources in the IP register.
7 6 5 4 3 2 1 0
Symbol Function
TF2 Timer 2 overflow flag set by a Timer 2 over flow and must be cleared
by software. TF2 will not be set when either RCLK = 1 or TCLK = 1.
46
EXF2 Timer 2 external flag set when either a capture or reload is caused by a
negative transition on T2EX and EXEN2 = 1.When Timer 2 interrupt is
enabled, EXF2 = 1 will cause the CPU to vector to the Timer 2 interrupt
routine. EXF2 must be cleared by software. EXF2 does not cause an
interrupt in up/down counter mode (DCEN = 1).
RCLK Receive clock enable. When set, causes the serial port to use Timer 2
overflow pulses for its receive clock in serial port Modes 1 and 3.
RCLK = 0 causes Timer 1 overflow to be used for the receive clock.
TCLK Transmit clock enable. When set, causes the serial port to use Timer 2
overflow pulses for its transmit clock in serial port Modes 1 and 3.
TCLK = 0 causes Timer1 overflows to be used for the transmit clock.
EXEN2 Timer 2 is external enable. When set, allows a capture or reload to occur
as a result of a negative transition on T2EX if Timer 2 is not being used
to clock the serial port. EXEN2 = 0 causes Timer 2 to ignore events at
T2Ex.
C/T2 Timer or counter select for Timer 2. C/T2 = 0 for timer function. C/T2 =
1 for external event counter (falling edge triggered).
• Address = 8EH
•Reset Value = XXX00XX0B
• Not Bit Addressable
Table 2.6 Auxiliary Register
47
- - - WDIDLE DISTRO - - DISABLE
7 6 5 4 3 2 1 0
SYMBOL FUNCTION
Dual Data Pointer Registers: To facilitate accessing both internal and external data
memory, two banks of 16-bit Data Pointer Registers are provided: DP0 at SFR
address locations 82H-83H and DP1 at 84H-85H. Bit DPS = 0 in SFR AUXR1 selects
DP0 and DPS = 1 selects DP1. The user should always initialize the DPS bit to the
appropriate value before accessing the respective Data Pointer Register.
48
Power Off Flag: The Power Off Flag (POF) is located at bit 4 (PCON.4) in the
PCON SFR. POF is set to “1” during power up. It can be set and rest under software
control and is not affected by reset.
• Address = A2H
• Reset Value = XXX00XX0B
• Not Bit Addressable
- - - - - - - DPS
7 6 5 4 3 2 1 0
SYMBOL FUNCTION
- Reserved for future expansion
49
Timers
At89s52 has got three timers 0, 1 and 2. Their description is given below.
Timer 0 and 1: Timer 0 and Timer 1 in the AT89S52 operate the same way as Timer
0 and Timer 1 in the AT89C51 and AT89C52. For further information on the timers’
operation, refer to the ATMEL Web site (http://www.atmel.com). From the home
page, select ‘Products’, then ‘8051-Architecture Flash Microcontroller’, then ‘Product
Overview’.
0 1 1 16-bit Capture
X X 0 (Off)
50
Capture mode: In the capture mode, two options are selected by bit EXEN2 in
T2CON. If EXEN2 = 0, Timer 2 is a 16-bit timer or counter which upon overflow sets
bit TF2 in T2CON. This bit can then be used to generate an interrupt. If EXEN2 = 1,
Timer 2 performs the same operation, but a 1- to-0 transition at external input T2EX
also causes the current value in TH2 and TL2 to be captured into RCAP2H and
RCAP2L, respectively. In addition, the transition at T2EX causes bit EXF2 in
T2CON to be set. The EXF2 bit, like TF2, can generate an interrupt.
51
Figure 2.25 Timer in Capture Mode
52
bit reload can be triggered either by an overflow or by a 1-to-0 transition at external
input T2EX. This transition also sets the EXF2 bit. Both the TF2 and EXF2 bits can
generate an interrupt if enabled. Setting the DCEN bit enables Timer 2 to count up or
down, as shown in Figure 6. In this mode, the T2EX pin controls the direction of the
count. Logic 1 at T2EX makes Timer 2 count up. The timer will overflow at 0FFFFH
and set the TF2 bit. This overflow also causes the 16-bit value in RCAP2H and
RCAP2L to be reloaded into the timer registers, TH2 and TL2, respectively. Logic 0
at T2EX makes Timer 2 count down. The timer underflows when TH2 and TL2 equal
the values stored in RCAP2H and RCAP2L. The underflow sets the TF2 bit and
causes 0FFFFH to be reloaded into the timer registers. The EXF2 bit toggles
whenever Timer 2 overflows or underflows and can be used as a 17th bit of
resolution. In this operating mode, EXF2 does not flag an interrupt.
53
Baud Rate Generator: Timer 2 is selected as the baud rate generator by setting
TCLK and/or RCLK in T2CON (Table 2). Note that the baud rates for transmit and
receive can be different if Timer 2 is used for the receiver or transmitter and Timer 1
is used for the other function. Setting RCLK and/or TCLK puts Timer 2 into its baud
rate generator mode, as shown in Figure 8. The baud rate generator mode is similar to
the auto-reload mode, in that a rollover in TH2 causes the Timer 2 registers to be
reloaded with the 16-bit value in registers RCAP2H and RCAP2L, which are preset
by software. The baud rates in Modes 1 and 3 are determined by Timer 2’s overflow
rate according to the following equation..
The Timer can be configured for either timer or counter operation. In most
applications, it is configured for timer operation (CP/T2 = 0). The timer operation is
different for Timer 2 when it is used as a baud rate generator. Normally, when
operating as a timer, it increments every machine cycle. (At 1/12 the oscillator
frequency) When operating as a baud rate generator, however, it increments every
state time (at 1/2 the oscillator frequency). The baud rate formula is given below,
where (RCAP2H, RCAP2L) is the content of RCAP2H and RCAP2L taken as a 16-
bit unsigned integer.
54
Figure 2.27 Timer 2 in Baud Generator Mode
• Address = 0C9H
55
• Reset Value = XXX00XX0B
• Not Bit Addressable
Table 2.11 T2MOD
- - - - - - T20E DCEN
7 6 5 4 3 2 1 0
SYMBOLS FUNCTIONS
Interrupts:
The AT89S52 has a total of six interrupt vectors: two external interrupts (INT0 and
INT1), three timer interrupts (Timers 0, 1, and 2), and the serial port interrupt. These
interrupts are all shown in Figure 10. Each of these interrupt sources can be
individually enabled or disabled by setting or clearing a bit in Special Function
Register IE. IE also contains a global disable bit, EA, which disables all interrupts at
once. Note that Table 5 shows that bit position IE.6 is unimplemented. In the
AT89S52, bit position IE.5 is also unimplemented. User software should not write 1s
to these bit positions, since they may be used in future AT89 products. Timer 2
interrupt is generated by the logical OR of bits TF2 and EXF2 in register T2CON.
Neither of these flags is cleared by hardware when the service routine is vectored to.
In fact, the service routine may have to determine whether it was TF2 or EXF2 that
generated the interrupt, and that bit will have to be cleared in software. The Timer 0
and Timer 1 flags, TF0 and TF1, are set at S5P2 of the cycle in which the timers
overflow. The values are then polled by the circuitry in the next cycle. However, the
56
Timer 2 flag, TF2, is set at S2P2 and is polled in the same cycle in which the timer
overflows.
57
2.6 LCD and Keypad
Liquid crystal displays (LCDs) have materials which combine the properties of both
liquids and crystals. Rather than having a melting point, they have a temperature
range within which the molecules are almost as mobile as they would be in a liquid,
but are grouped together in an ordered form similar to a crystal. An LCD consists of
two glass panels, with the liquid crystal material sand witched in between them. The
inner surface of the glass plates are coated with transparent electrodes which define
the character, symbols or patterns to be displayed polymeric layers are present in
between the electrodes and the liquid crystal, which makes the liquid crystal
molecules to maintain a defined orientation angle.
One each polarizer are pasted outside the two glass panels. This polarizer
would rotate the light rays passing through them to a definite angle, in a particular
direction When the LCD is in the off state, light rays are rotated by the two polarizer’s
and the liquid crystal, such that the light rays come out of the LCD without any
orientation, and hence the LCD appears transparent. When sufficient voltage is
applied to the electrodes, the liquid crystal molecules would be aligned in a specific
direction. The light rays passing through the LCD would be rotated by the polarizer,
which would result in activating / highlighting the desired characters.
The LCD’s are lightweight with only a few millimeters thickness. Since the
LCD’s consume less power, they are compatible with low power electronic circuits,
and can be powered for long durations. The LCD s doesn’t generate light and so light
is needed to read the display. By using backlighting, reading is possible in the dark.
The LCD’s have long life and a wide operating temperature range. Changing the
display size or the layout size is relatively simple which makes the LCD’s more
customer friendly. The LCDs used exclusively in watches, calculators and measuring
instruments are the simple seven-segment displays, having a limited amount of
numeric data. The recent advances in technology have resulted in better legibility,
58
more information displaying capability and a wider temperature range. These have
resulted in the LCDs being extensively used in telecommunications and entertainment
electronics. The LCDs have even started replacing the cathode ray tubes (CRTs) used
for the display of text and graphics, and also in small TV applications.
LCD operation:
59
Table 2.13 Pin description for LCD
4 RS I RS=0 to select
command register
RS=1 to select
data register
6 E I/O Enable
60
1. Data corresponds to the ASCII value of the character to be printed. This can
be done by placing the ASCII value on the LCD Data lines and selecting the
Data Register of the LCD by selecting the RS (Register Select) pin.
2. Each and every display location is accessed and controlled by placing
respective command on the data lines and selecting the Command Register of
LCD by selecting the (Register Select) RS pin.
The commonly used commands are shown below with their operations.
2 Return home
4 Decrement cursor
6 Increment cursor
61
38 2 lines and 5x7 matrix
Applications:
The LCDs used exclusively in watches, calculators and measuring instruments are the
simple seven-segment displays, having a limited amount of numeric data. The recent
advances in technology have resulted in better legibility, more information displaying
capability and a wider temperature range. These have resulted in the LCDs being
extensively used in telecommunications and entertainment electronics.
Linear keypad
1. Matrix Keypad.
2. Linear Keypad.
62
Matrix Keypad: This Keypad got keys arranged in the form of Rows and Columns.
That is why the name Matrix Keypad. According to this keypad, In order to find the
key being pressed the keypad need to be scanned by making rows as i/p and columns
as output or vice versa .This Keypad is used in places where one needs to connect
more no. of keys with less no. of data lines.
Linear Keypad: This Keypad got ‘n’ no. of keys connected to ‘n’ data lines of
microcontroller.
This Keypad is used in places where one needs to connect less no. of keys. Generally,
in Linear Keypads one end of the switch is connected to Microcontroller (Configured
as i/p) and other end of the switch is connected to the common ground. So whenever a
key of Linear Keypad is pressed the logic on the microcontroller pin will go LOW.
Here in this project, a linear keypad is used with switches connected in a serial
manner. Linear keypad is used in this project because it takes less no. of port pins.
The Linear Keypad with 4 Keys is shown below.
63
Fig 2.30 Linear Keypad
Aim:
64
The main aim of the project is to develop a speed control system for DC motor using
four-quadrant chopper. Using four-quadrant chopper it is possible to demonstrate
forward and reverse motoring and braking.
Purpose:
The purpose of the project is to implement a simple and cost effective process to
control the speed of DC motors using the most popular technique four-quadrant
chopper method.
Block Diagram:
Fig 3.1 Block Diagram of a Four Quadrant Chopper using Microcontroller and
IGBTs.
65
Fig 3.2 Regulated Power Supply Schematic
Software used:
1. Embedded C
2. Keil IDE
3. Uc-Flash
Hardware used:
1. Micro controller
2. power supply
3. Keypad
4. LCD Display
5. Embedded controller
6. IGBT Driver circuit
7. IGBT Chopper
8. DC Motor
9. Rectifier circuit
Applications:
Advantages:
Result:
Hence, by using this project we can effectively control the speed of DC
motor by using four-quadrant chopper method.
67
CHAPTER 4: HARDWARE DESIGN
The hardware design includes the choice of IBTS, ICs and even the transformers and
capacitors and resistances employed. All these components are suited such that they
are able to run the motor effectively. It is therefore of immense importance to choose
the motor such that it is convenient, practical and feasible to execute the four quadrant
operation.
In our project, the DC Motor is a separately excited DC Motor in which we excite the
Armature and the Field separately. Throughout the experiment, we achieve this by
maintaining field voltage constant and varying the speed by varying the armature
voltage. The armature voltage is varied using the Pulse Width Modulation technique
by using the IGBTs and the Micro Controller.
Current 0.0
H. P. 0.5
Volts 230
Amps 2.1
Winding Shunt
Enclosure SPDP
68
4.2 Hardware Layout:
The hardware of the circuitry consists of two main circuits. The first circuit is
the part comprising of the Microcontroller and other auxiliary circuitry. The
second circuit consists of the four IGBTs which are controlled through driver
ICs and Optocouplers.
Both these circuits have different requirements and therefore both these
circuits need two different transformers for supply of AC current. In both
these circuits, this AC current is eventually converted into DC current using
Bridge Rectifiers and capacitors.
The first half of the circuit which consists of the Microcontroller requires only
5V DC supply for the Microcontroller to work. Therefore, we employ a simple
230 V to 9 V step down transformer to achieve this.
69
Fig 4.1 Step down Transformer for the Microcontroller circuit.
The second half of the circuit i.e. the part containing the IGBTs and the
Optocouplers requires 12 V DC supply throughout the circuit. We therefore
need a slightly higher supply at the secondary end of the transformer if we
intend to achieve this.
70
Fig 4.2 Step down transformer for the Optocoupler Circuit.
In both the cases, the transformer receives 230 V, 50 Hz supply at the primary and
give 9 V and 12 V AC output to the bridge rectifier.
71
Fig 4.3 The Microcontroller Circuitry
In the power supply section of the Microcontroller Circuitry, the most important
component after the transformer is the Bridge Rectifier. Using diode action, we
convert AC to DC. This Bridge Rectifier is achieved using IN4007 diode.
72
IN4007 diodes:
IN 4007 is preferred in our project because it is suitable for general purpose low
power applications. This diode weighs very less (approximately 0.4 gram), is
corrosion resistant and can be easily soldered.
Rating Value
DC Blocking Voltage
73
Non Repetitive Peak Reverse Voltage 1200 Volts
for half wave, single phase
The IN 4007 bridge rectifier generates a DC voltage but it has large ripples in it.
These ripples in the voltage disturb the performance of the circuit and need to be
removed. To remove these ripples, we use a 1000 µF Capacitor.
74
Capacitor
The necessary values which are relevant to the project are tabulated hereunder:
75
Peak Current 2.2 V
Ripple Rejection 73 dB
76
Fig 4.7 7805
After the voltage regulation, we employ yet another capacitor which eventually
provides us with pure DC current.
77
Fig 4.9 Atmel AT 89S52
78
Fig 4.10 Optocoupler-IGBT Circuit
79
Similar to the Microcontroller circuit, we need a regulated DC supply even in this
circuit as well. We employ three transformers (the figure is already displayed in the
previous sections) which each provide 12 V supply.
The main connection between the Microcontroller and the Optocoupler-IGBT circuit
is the Optocoupler.
The Optocoupler used in the circuit is the MCT 2E. Precisely, for our experiment, we
use five Optocoupler ICs. Four of these Optocouplers are connected to the IR 2110 IC
which controls the IGBTs. Precisely, every IR 2110 IC gets supply from two
Optocouplers. The fifth Optocoupler is used to toggle between both the ICs.
The Optocoupler used in our circuit is a Gallium Arsenide Diode Infrared Source
Optically Coupled to a Silicon npn Phototransistor. This Optocoupler has a High
Direct-Current Transfer Ratio and displays high speed switching. Typically, the tr
value is 5 µs and so is the tf value.
81
The connections of the IR 2110 relevant to the circuit are described hereunder:
Pin Description
4 NC
8 Connected to 12 V Vcc
82
9 Connected to 12 V Vcc
13 Ground
14 -
IGBTs:
The IGBTs used in the circuit are shown in the figure. We use four such IGBTs in an
H bridge to achieve the chopper action. Two IGBTs corresponding to a particular are
connected to each other. Both pairs of IGBTs are connected to the Motor at the
Armature. The detailed operation of the four IGBTs is already explained in the
previous sections.
83
Fig 4.13 IGBT along with the IN 5408 diode
The motor is a 220 V DC supply motor. We need to convert the 220 V AC to DC. To
achieve this, we use a readymade powerful Bridge Rectifier and also a 470 µF
Capacitor to remove the ripples. This provides the pure DC supply the motor requires.
84
Fig 4.14 Bridge Rectifier for the Motor
This section gives an overview of the whole circuitry and hardware involved in the
project. The aim of the project is to control the speed of DC motor using four
85
quadrant chopper method, switches are provided at the input section, speed will be
increased for every switch, i.e., speed values are predefined for these switches.
During motoring mode, when the chopper is on, Vo=Vs and current Io flows
and when chopper is off, Vo=0 but Io in the load continues flowing in the
same direction through freewheeling diode, Vo and Io will be positive.
During regenerative braking mode, when the chopper is on Vo=0 but load
voltage E drives current through load and chopper. Load stores energy during
Ton of chopper. When chopper is off, Vo=E+L.di/dt exceeds Vs. As, a result,
diode D2 is forward biased and begins conducting, thus allowing power to
flows through the source, Vo is positive and Io is negative.
During reverse motoring mode, the choppers 1, 4 are kept off, chopper 2 is
kept on whereas chopper 3 is operated. When CH3 and CH2 are on, armature
gets connected to source voltage Vs so that both armature voltage and
armature current are negative. As armature current is reversed, motor torque is
reversed and when CH3 is turned off, negative armature current freewheels
through CH2, D4, Ea, La, Ra, armature current decreases and thus speed
control is obtained in third quadrant.
During reverse generating mode, the choppers 1, 2 and 3 are kept off where as
chopper 4 is operated. When chopper 4 is turned on, positive armature current
rises through CH4, D2, Ra, La, and Ea. When CH4 is turned off, diodes D2,
D3 begin to conduct and motor acting as generator returns energy to the dc
source.
In this project we are giving power supply to all units, it basically consists
of a Transformer to step down the 230V ac to 18V ac followed by diodes. Here diodes
are used to rectify the ac to dc. After rectification the obtained rippled dc is filtered
using a capacitor Filter. A positive voltage regulator is used to regulate the obtained
dc voltage. However, in this project three power supplies are used one is meant to
supply operating voltage for Microcontroller and the other is to supply control voltage
for Motors. The choppers convert dc to dc with variable voltage; the speed can be
86
varied by varying the voltage given to the PWM converter (using keypad). The speed
of DC motor is directly proportional to armature voltage and inversely proportional to
flux. By maintaining the flux constant, the speed can be varied by varying the
armature voltage. The direction of rotation is reversed by reversing either field or
armature voltage and by varying the firing angle the speed of the motor can be
controlled and this values are given to microcontroller, the microcontroller control or
compare this values and this values are displayed in LCD.
87
CHATER 5: SOFTWARE AND CODING
In a Microcontroller based device, the hardware works only when the relevant
software is written into the ROM area of the MC. The processor of the
Microcontroller runs the particular program and generates the outputs to achieve the
specific tasks.
*Express PCB for lay out design: Express PCB is a Circuit Design Software and PCB
manufacturing service
*Express SCH for schematic design: The Express SCH schematic design program is
very easy to use. This software enables the user to draw the Schematics with drag and
drop options.
The program for this project is written in Embedded C. A short description of this is
provided hereunder:
a) Data types
b) Access over the architecture addresses.
88
The Embedded C Programming Language forms the user friendly language with
access over Port addresses, SFR Register addresses etc.
Signed char:
89
Code:
#include<reg52.h>
#include<lcd216.h>
bit mybit;
90
sbit CH1 = P1^0; // CHOPPER - 1 For Forward motoring
sbit SD12 = P1^4; // Shut Down PIN of the IR2110 to which CH1 and CH2 are
Connected
sbit SD34 = P1^5; // Shut Down PIN of the IR2110 to which CH3 and CH4 are
Connected
void main()
bit on_flag=0;
CH1 = 0;
CH2 = 0;
CH3 = 0;
CH4 = 0;
91
pwm_setup();
Delay(200);
pwm_width = 65500;
SD34 = 1;
while(1)
SD12 = 0; // IR2110 ON
SD34 = 0;
92
pwm_width = 65500;
sw_value = 0;
LCD_Cmd(0xCC);
LCD_Data((sw_value/10)+0x30);LCD_Data((sw_value%10)+0x30); LCD_Data('%');
on_flag=1;
while(SW_ON==0);
Delay(30);
//if(pwm_width<64535)
// pwm_width += 1000;
if(sw_value==100)
93
{
LCD_Cmd(0xCC); Disp_Str("100%");
else
LCD_Cmd(0xCC);
LCD_Data((sw_value/10)+0x30);LCD_Data((sw_value%10)+0x30); LCD_Data('%');
while(SW_UP==0);
Delay(30);
//if(pwm_width>1000)
// pwm_width -= 1000;
94
else if(sw_value==75) pwm_width = 20000;
if(sw_value==100)
LCD_Cmd(0xCC); Disp_Str("100%");
else
LCD_Cmd(0xCC);
LCD_Data((sw_value/10)+0x30);LCD_Data((sw_value%10)+0x30); LCD_Data('%');
while(SW_DW==0);
Delay(30);
SD34 = 1;
pwm_width = 65500;
95
LCD_Cmd(0xCC); Disp_Str(" UK ");
sw_value=0;
LCD_Cmd(0xCC);
LCD_Data((sw_value/10)+0x30);LCD_Data((sw_value%10)+0x30); LCD_Data('%');
on_flag=0;
while(SW_OF==0);
Delay(30);
CH4 = 1; // Chopper 4 ON
while(SW_FM==0);
96
}
EA = 0;
CH2 = 1; // Chopper 2 On
Delay(250); Delay(250);
CH2 = 0; // Break
pwm_width = 65500;
on_flag=0;
Mode = 2;
while(SW_FB==0);
97
}
CH2 = 1; // Chopper 2 ON
while(SW_RM==0);
EA=0;
CH1 = 0;
98
CH2 = 0;
CH3 = 0;
CH4 = 1; // Breaking
Delay(250);Delay(250);
CH4 = 0;
Mode = 4;
pwm_width = 65500;
on_flag=0;
while(SW_RB==0);
99
Additional Code:
void lcdinit(void);
sfr ldata=0x80;
sbit rs=P2^7;
sbit rw=P2^6;
sbit en=P2^5;
void lcdint()
lcdcmd (0x38);
delay(10);
lcdcmd(0x0E);
delay(10);
lcdcmd(0x01);
delay(10);
lcdcmd(0x06);
delay(10);
lcdcmd(0x80);
delay(10);
}
100
void lcdcmd(unsigned char a)
ldata=a;
rs=0;
rw=0;
en=1;
delay(1);
en=0;
ldata=b;
rs=1;
rw=0;
en=1;
delay(1);
en=0;
101
while( *p != '\0')
lcddata(*p);
p++;
for(u=0;u<z;u++)
for(v=0;v<1275;v++);
102
CHAPTER 6: LIMITATIONS
The project suffers from a few limitations that can be improved in the future
constructions:
• Wireless control of DC Motor can be very easily programmed and set up.
Such a set up will help distant and multiple control of DC Motors in
industries.
• Safety features like over current protection, over temperature protection of the
motor are missing and this might cause damage to the circuitry or the motor.
• The Four Quadrant chopper control can only be applied to DC motors whereas
most motors in industry are AC motors.
103
CHAPTER 7: CONCLUSIONS
We were successfully able to run the motor in all the four quadrants. In the forward
and reverse motoring modes, we were able to successfully change the duty cycle very
smoothly and achieve speed regulation. The forward and reverse braking was also
working excellently. The Microcontroller was successfully programmed in Embedded
C and the board was soldered with all the components. Eventually, we were able to
express the desired result.
104
List of Figures
105
6 2.6 Power Mosfet 13
10 2.10 Transformer 20
106
18 2.18 Filer charging and discharging 30
107
30 2.30 Linear Keypad 62
38 4.6 78XX 73
39 4.7 7805 73
108
42 4.10 The Optocoupler-IGBT Circuit 75
43 4.11 MCT 2E 77
44 4.12 IR 2110 77
109
List of Tables
1 2.1 Rectifiers 26
110
6 2.6 Auxiliary Register 46
11 2.11 T2MOD 53
111
17 4.3 Electrical Characteristics of 71
IN4007
19 4.5 Optocoupler 78
Specifications
112
References
4. M.D. Singh and K.B. Kanchandani. Power Electronics. Tata McGraw Hill,
2008.
113
11. Fairchild Semiconductor, “3 Terminal 1A Positive Voltage Regulator”
KA78XX/KA78XXA datasheet, 2001.
Cost report
IR2110 2 400
IGBT 4 1400
LCD 1 400
TOTAL 5100
114
Appendix:
115
116
Video:
117
To see the project in operation, please visit
http://4qmjcet.wordpress.com/
118