You are on page 1of 45

1.

INTRODUCTION:
Automated monitoring of any machine involves determination of
different performance parameters. Such monitoring helps in
knowing the real time condition of motors.

Most commonly used motor are induction


motors, as they are have low cost, reliable, maintenance free, easy
starting mechanism.

The different performance parameters can be obtained using


microcontroller.

Parameters which will effect or show the real time condition of motor
are

a) Current

b) Voltage across the motor

c) Noise level

d) Core temperature of motor.

Here by using microcontroller these parameters can be


obtained in real time using different sensors and transducers.

In this project an attempt will be made for designing


microcontroller based system consisting of both hardware and
software to determine the parameters mentioned above and
display continuously on LCD screen.
If any parameter exceeds the threshold value then system will
be shut down by tripping the relay connected to the single
phase induction motor.

HISTORY:
With the rapid growth in industrial sector there has been an
increase in the number of induction motors used as industrial drives.
Most of the industrial drive used is induction motors due to certain
attractive features of the machine. Proper maintenance is required
to ensure higher efficiency for which automated monitoring is
necessary. The manual testing, calculation using conventional
methods takes lot of time, and it’s a tedious job and also erroneous.

NEED:

The microcontroller based measurement helps in faster and


accurate analysis of induction motor particularly in industries where
induction motors are manufactured on large scale. The prototype
model developed will save time and money involved in the process
and at the same time it increases accuracy.

OBJECTIVES:

The purpose of this project is to develop a microcontroller


based measuring system for single phase induction motor. The
program would work in conjunction with hardware developed. DAS
fed the desired measurements such as voltage, current, speed,
Noise level and Temperature.
2.PROBLEM FORMULATION:
The automated microcontroller based measuring helps in faster
and accurate analysis if induction motor for particularly in industries
where they manufacture induction motor on large scale. This project
will save time and money involved in the process as increases
accuracy.

Designed with longevity in mind, electric motors are made to


function safely, economically, and perpetually. In theory, proper care
and use of these components will ensure many years of successful
operation. However, the real world is a different story, where motors
are subjected to numerous environmental and operational hazards
that cause thermal stress on the windings. Thermal stresses degrade
the insulation quality of the motor, thereby diminishing its life
expectancy. That's why monitoring the operating condition of motors
has become such an important aspect of predictive maintenance
programs.
For many years, maintenance and reliability engineers were limited
to static or off-line testing of motors — determining a motor's
suitability for continued duty by using a handheld volt/ohm meter,
clamp-on ammeter, or megohmmeter. But quite often these tools
became forensic devices used mainly to diagnose “what happened”
after the motor failed.

Although static testing remains an essential component in


monitoring and trending motor health, the methods are limited and
are mainly intended
to define insulation quality. Modern online test equipment aids the
technician in predicting imminent, insulation-related failures. The
early detection of these potential problems enables him to schedule
“downtime” and make scheduled repairs rather than perform
emergency maintenance. IM monitoring by Voltage, Speed
sensing are already done, but Yoke Temperature , Noise by ball
bearings and brushes ( for DC motor ) was neglected. In this project
temperature & Noise level measurement based monitoring & control
is done to ensures more reliability and high efficiency.
Automatic monitoring and control of single phase induction
motor:
Functional block diagram:

Step down

Micropho

B
Relay
1-PH I.M

240V A.C SUPPLY 240v,3A, {LM 35 temp transducer}

50Hz 1425rpm

C. 16x2 LCD to
T Low DC display
voltage
of lm35 a. Speed
C. Current temp.
T b. Noise
Sensor
level
Lm 324
c. Curren
Current dc
sensor
t
voltage
converts drawn
amplifier
the high
a.c current d. Voltag
to low e
value( ord Converts across
CH2
Precision a.c into
D.C signals CH1
rectifier
ADC
0809

CH3
Amplified AT89S52 µC
dc signal
given to
NE5534
A/D
B op-
amp . CH4

Converts
a.c into If any parameter accedes shut
Precision CH5 down the system by tripping
C D.C signals
rectifier
To
relay
3.Block Diagram Description :

3.1 Single Phase Induction Motor:


An induction motor or asynchronous motor is a type of
alternating where power is supplied to the rotor by means
of electromagnetic induction.
An electric motor turns because of magnetic force exerted
between a stationary electromagnet called the stator and a
rotating electromagnet called the rotor. Different types of
electric motors are distinguished by how electric current is
supplied to the moving rotor. In a DC motor and a slip-ring AC
motor, current is provided to the rotor directly through
sliding electrical contacts called Cummotator and slip rings. In
an induction motor, by contrast, the current is induced in the
rotor without contacts by the magnetic field of the stator,
through electromagnetic induction. An induction motor is
sometimes called a rotating transformer because
the stator (stationary part) is essentially the primary side of
the transformer and the rotor (rotating part) is the secondary
side. Unlike the normal transformer which changes the current
by using time varying flux, induction motors use rotating
magnetic fields to transform the voltage. The current in the
primary side creates an electromagnetic which interacts with
the electromagnetic field of the secondary side to produce a
resultant torque, thereby transforming the electrical energy
into mechanical energy. Induction motors are widely used,
especially polyphase induction motors, which are frequently
used in industrial drives.
Induction motors are now the preferred choice for
industrial motors due to their rugged construction, absence of
brushes (which are required in most DC motors) and—thanks to
modern power electronics—the ability to control the speed of
the motor.
In this project we are using single phase , squirrel
cage Induction motor.
Motor rating : 240V , 3 A, 3000 RPM.
The following measurements are done by using respective devices:
Parameters : Device used :
1.Voltage Step down transformer
2.Current Current transformer
3.Temperature Temperature
transducer
4.Noise level Microphone

1. VOLTAGE MEASUREMENT :

The first digital voltmeter was invented and produced by Andrew Kay of
Non-Linear Systems (and later founder of Kaypro) in 1954. Digital voltmeters
(DVMs) are usually designed around a special type of converter called
an integrating converter. Voltmeter accuracy is affected by many factors,
including temperature and supply voltage variations. To ensure that a digital
voltmeter's reading is within the manufacturer's specified tolerances, they
should be periodically calibrated against a voltage standard such as the Weston.
Digital voltmeters necessarily have input amplifiers, and, like vacuum tube
voltmeters, generally have a constant input resistance of 10 mega ohms
regardless of set measurement range.
The step down transformer (240/5 V, 500mA) is connected across the
single phase induction motor. The output of the transformer is rectified
using precision rectifier circuit. The output of rectifier circuit is not pure DC
hence filter and regulator circuit is used to rectify the ripple contents, Now
the output of this section is pure DC 5V.

The output voltage varies as the input Voltage (i.e. Voltage across the
motor) varies. This pure DC signal is given to input pin of the ADC.
2. CURRENT MEASUREMENT:

The Current through the motor can be sensed using C/T (current
transformer) arraignment. The 1:50 CT is used to reduce the current strength to
50 times that of primary current strength.

The output of CT (i.e. Current) is passed through the load resistor


connected across it. Then current passed through the load resistor and voltage
is developed across the load resistor. This voltage is alternating in nature (AC)
which is converted in to DC using precision rectifier circuit. The output of this
rectifier circuit is having the ripple contents which can be eliminated using filter
and signal conditioning circuit arraignment.

Now, as the current through the motor (a.c current from 0-3.7A) varies the
output of current sensing unit (D.C voltage) is also varies from 0- 5V D.C. The
output of this unit is given as one of the input to the ADC, which convert analog
data n to digital data.
3.Temperature measurement:

The LM35 temperature transducer (passive) is used to measure the Yoke


temperature of the single phase induction motor. This transducer produces the
10mV D.C voltage per 1°C rise in temperature. LM35 transducer is contact type
transducer.

As the output voltage is not sufficient to give to the ADC, it is amplified


using LM 324 operational amplifier IC.

Now the variation in the temperature is proportional to the output voltage


of the amplifier. This voltage is set between the ranges of 0-5V DC as the
temperature varies from 0- 100 °C this can be varied by just varying the pot.

Then the output of the above system is given as input to the ADC which
produces the digital code for analog input.
4.Noise level measurement

Various Cause of the Electrical Noise:

1. When a motor runs, the commutator switches the direction of the


electricity that flows in the windings. Though the system keeps the motor
running, occasional spark occurs between brushes and commutator at the
timing of the commutation. The spark is one of the causes of the electrical
noise.
2. Especially when the motor starts from its stalled position, comparably
higher current, or a stall current, flows into the windings. Higher current
usually causes higher noise.
3. Also the similar noise happens when (1) brushes stays unstable on the
surface of the commutator, (2) the input to the motor is much higher than
expected (3) and so on.
4. Other factor may be an insulation created on the commutator surface,
which results in unstable flow of the electricity.

The microphone is used to measure the noise level, the microphone convert the
noise or sound to variable dc voltage in mV, which is amplified using
transistor amplifier ,
The output of this transistor amplifier is given to the ADC as an input.

5.ADC(ANALOG TO DIGITAL CONVERTER):

An analog-to-digital converter (abbreviated ADC, A/D or A to D) is a


device that converts a continuous quantity to a discrete digital number.
Typically, an ADC is an electronic device that converts an input
analog voltage (or current) to a digital number proportional to the magnitude of
the voltage or current. However, some non-electronic or only partially electronic
devices, such as rotary encoders, can also be considered ADCs.

The ADC(0809 a 8 i/p ADC) receives the input from all five inputs from all
sensing units . the selection is made by the commands given by the
microcontroller . It will select one input at a time and convert it to the digital
code and give as input to microcontroller.
6.MICROCONTROLLER:
A microcontroller (sometimes
abbreviated µC, uC or MCU) is a small computer on a
single integrated circuit containing a processor core, memory,
and programmable input/output peripherals. Program memory
in the form of NOR flash or OTP ROM is also often included on
chip, as well as a typically small amount of RAM.
Microcontrollers are designed for embedded applications, in
contrast to the microprocessors used in personal or other
general purpose applications.
Microcontrollers are used in automatically controlled
products and devices, such as automobile engine control
systems, implantable medical devices, remote controls, office
machines, appliances, power tools, and toys. By reducing the
size and cost compared to a design that uses a separate
microprocessor, memory, and input/output devices,
microcontrollers make it economical to digitally control even
more devices and processes. Mixed signal microcontrollers are
common, integrating analog components needed to control
non-digital electronic systems.

Some microcontrollers may use four-bit words and operate


at clock rate frequencies as low as 4 kHz, for low power
consumption (mill watts or microwatts). They will generally
have the ability to retain functionality while waiting for an
event such as a button press or other interrupt; power
consumption while sleeping (CPU clock and most peripherals
off) may be just nano watts, making many of them well suited
for long lasting battery applications. Other microcontrollers
may serve performance-critical roles, where they may need to
act more like a digital signal processor (DSP), with higher clock
speeds and power consumption.

A microcontroller can be considered a self-contained


system with a processor, memory and peripherals and can be
used as an embedded system. The majority of microcontrollers
in use today are embedded in other machinery, such as
automobiles, telephones, appliances, and peripherals for
computer systems. These are called embedded systems. While
some embedded systems are very sophisticated, many have
minimal requirements for memory and program length, with no
operating system, and low software complexity. Typical input
and output devices include switches, relays, solenoids, LEDs,
small or custom LCD displays, radio frequency devices, and
sensors for data such as temperature, humidity, light level etc.
Embedded systems usually have no keyboard, screen, disks,
printers, or other recognizable I/O devices of a personal
computer, and may lack human interaction devices of any kind.

CRITERIA FOR CHOOSING A


MICROCONTROLLER

The basic criteria for choosing a microcontroller suitable for


the application are:

1) The first and foremost criterion is that it must meet the task at
hand efficiently and cost effectively. In analyzing the needs of a
microcontroller-based project, it is seen whether an 8- bit, 16-bit or
32-bit microcontroller can best handle the computing needs of the
task most effectively. Among the other considerations in this
category are:
(a) Speed: The highest speed that the microcontroller
supports.
(b) Packaging: It may be a 40-pin DIP (dual inline
package) or a QFP (quad flat package), or some other
packaging format. This is important in terms of space,
assembling, and prototyping the end product.
(c) Power consumption: This is especially critical for
battery-powered products. (d) The number of I/O pins and
the timer on the chip.
(f) How easy it is to upgrade to higher –performance or lower
consumption versions. (g) Cost per unit: This is important
in terms of the final cost of the product in which a
microcontroller is used.
2) The second criterion in choosing a microcontroller is how easy it
is to develop products around it. Key considerations include the
availability of an assembler, debugger, compiler, technical
support.
3) The third criterion in choosing a microcontroller is its
ready availability in needed quantities both now and in the
future. Currently of the leading 8-bit microcontrollers, the
8051 family has the largest number of diversified suppliers. By
supplier is meant a producer besides the originator of the
microcontroller. In the case of the 8051, this has originated by
Intel several companies also currently producing the 8051.
Thus the microcontroller AT89S52, satisfying the criterion
necessary for the proposed application is chosen for the task.

DESCRIPTION:
The 8051 family of microcontrollers is based on an
architecture which is highly optimized for embedded control
systems. It is used in a wide variety of applications from
military equipment to automobiles to the keyboard. Second only to
the Motorola 68HC11 in eight bit processors sales, the 8051 family
of microcontrollers is available in a wide array of variations from
manufacturers such as Intel, Philips, and Siemens. These
manufacturers have added numerous features and peripherals to
the 8051 such as I2C interfaces, analog to digital converters,
watchdog timers, and pulse width modulated outputs. Variations of
the 8051 with clock speeds up to 40MHz and voltage
requirements down to 1.5 volts are available. This wide range of
parts based on one core makes the 8051 family an excellent
choice as the base architecture for a company's entire line of
products since it can perform many functions and developers will
only have to learn this one platform.
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 nonvolatile 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
nonvolatile 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. 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 con-tents but freezes the oscillator, disabling all
other chip functions until the next interrupt or hardware reset.

FEATURES:
The basic architecture of AT89C51 consists of the following
features:
• Compatible with MCS-51 Products

• 8K Bytes of In-System Programmable (ISP) Flash Memory

• 4.0V to 5.5V Operating Range

• Fully Static Operation: 0 Hz to 33 MHz


• 256 x 8-bit Internal RAM

• 32 Programmable I/O Lines

• Three 16-bit Timer/Counters

• Eight Interrupt Sources

• Full Duplex UART Serial Channel

• Low-power Idle and Power-down Modes

• Interrupt Recovery from Power-down Mode

• Watchdog Timer

• Fast Programming Time

• Flexible ISP Programming (Byte and Page Mode)

BLOCK DIAGRAM of 89s52


Fig. Block diagram of the microcontroller

7.L.C.D(Liquid Crystal Display )


A liquid crystal display (LCD) is a thin, flat display that uses the
light modulating properties of liquid crystals (LCs). LCs do not emit
light directly.
They are used in a wide range of applications
including: computer monitors, television, instrument
panels, displays, signage, etc. They are common in consumer
devices such as video players, gaming devices, clocks,
watches, calculators, and telephones. LCDs have displaced cathode
ray tube (CRT) displays in most applications. They are usually more
compact, lightweight, portable, less expensive, more reliable, and
easier on the eyes. They are available in a wider range of screen
sizes than CRT and plasma displays, and since they do not use
phosphors, they cannot suffer image burn-in.
LCDs are more energy efficient and offer safer disposal than
CRTs. Its low electrical power consumption enables it to be used
in battery-powered electronic equipment. It is an electronically-
modulated optical device made up of any number of pixels filled
with liquid crystals and arrayed in front of a light source (backlight)
or reflector to produce images in colour or monochrome. The earliest
discovery leading to the development of LCD technology, the
discovery of liquid crystals, dates from 1888. By 2008, worldwide
sales of televisions with LCD screens had surpassed the sale of CRT
units.
7.1 Connection to LCD

The most commonly used Character based LCDs are based on


Hitachi's HD44780 controller or other which are compatible with
HD44580. In this tutorial, we will discuss about character based
LCDs, their interfacing with various microcontrollers, various
interfaces (8-bit/4-bit), programming, special stuff and tricks you can
do with these simple looking LCDs which can give a new look to your
application.

PIN DESCRIPTION

The most commonly used LCDs found in the market today are 1
Line, 2 Line or 4 Line LCDs which have only 1 controller and support
at most of 80 characters, whereas LCDs supporting more than 80
characters make use of 2 HD44780 controllers.

Most LCDs with 1 controller has 14 Pins and LCDs with 2 controller
has 16 Pins (two pins are extra in both for back-light LED
connections). Pin description is shown in the table below.

Fig. Character LCD type HD44780 Pin diagram


Pin
Name Description
Number
1 VSS Power supply (GND)
2 VCC Power supply (+5V)
3 VEE Contrast adjust
4 RS 0 = Instruction input, 1 = Data input
0 = Write to LCD module, 1 = Read
5 R/W
from LCD module
6 EN Enable signal
7 D0 Data bus line 0 (LSB)
8 D1 Data bus line 1
9 D2 Data bus line 2
10 D3 Data bus line 3
11 D4 Data bus line 4
12 D5 Data bus line 5
13 D6 Data bus line 6
14 D7 Data bus line 7 (MSB)
8. Relay(Switch) :
A relay is an electrically operated switch. Many relays use an
electromagnet to operate a switching mechanism mechanically, but
other operating principles are also used. Relays are used where it is
necessary to control a circuit by a low-power signal (with complete
electrical isolation between control and controlled circuits), or where
several circuits must be controlled by one signal. The first relays
were used in long distance telegraph circuits, repeating the signal
coming in from one circuit and re-transmitting it to another. Relays
were used extensively in telephone exchanges and early computers
to perform logical operations.
A type of relay that can handle the high power required to directly
drive an electric motor is called a contactor. Solid-state
relays control power circuits with no moving parts, instead using a
semiconductor device to perform switching. Relays with calibrated
operating characteristics and sometimes multiple operating coils are
used to protect electrical circuits from overload or faults; in modern
electric power systems these functions are performed by digital
instruments still called "protective relays".
Basic design and operation

Simple electromechanical relay

Small relay as used in electronics

A simple electromagnetic relay consists of a coil of wire surrounding


a soft iron core, an iron yoke which provides a low reluctance path
for magnetic flux, a movable iron armature, and one or more sets of
contacts (there are two in the relay pictured). The armature is
hinged to the yoke and mechanically linked to one or more sets of
moving contacts. It is held in place by a spring so that when the
relay is de-energized there is an air gap in the magnetic circuit. In
this condition, one of the two sets of contacts in the relay pictured is
closed, and the other set is open. Other relays may have more or
fewer sets of contacts depending on their function. The relay in the
picture also has a wire connecting the armature to the yoke. This
ensures continuity of the circuit between the moving contacts on the
armature, and the circuit track on the printed circuit board (PCB) via
the yoke, which is soldered to the PCB.
When an electric current is passed through the coil it generates
a magnetic field that attracts the armature and the consequent
movement of the movable contact either makes or breaks
(depending upon construction) a connection with a fixed contact. If
the set of contacts was closed when the relay was de-energized,
then the movement opens the contacts and breaks the connection,
and vice versa if the contacts were open. When the current to the
coil is switched off, the armature is returned by a force,
approximately half as strong as the magnetic force, to its relaxed
position. Usually this force is provided by a spring, but gravity is also
used commonly in industrial motor starters. Most relays are
manufactured to operate quickly. In a low-voltage application this
reduces noise; in a high voltage or current application it
reduces arcing.
When the coil is energized with direct current, a diode is often
placed across the coil to dissipate the energy from the collapsing
magnetic field at deactivation, which would otherwise generate
a voltage spike dangerous to semiconductor circuit components.
Some automotive relays include a diode inside the relay case.
Alternatively, a contact protection network consisting of a capacitor
and resistor in series (snubbed circuit) may absorb the surge. If the
coil is designed to be energized with alternating current (AC), a
small copper "shading ring" can be crimped to the end of the
solenoid, creating a small out-of-phase current which increases the
minimum pull on the armature during the AC cycle.[1]
A solid-state relay uses a thyristor or other solid-state switching
device, activated by the control signal, to switch the controlled load,
instead of a solenoid. An opt coupler (a light-emitting diode (LED)
coupled with a photo transistor) can be used to isolate control and
controlled circuits.
In This Project

*The Relay is driven by transistor.

*Diode act as freewheeling operation.(i.e. stored energy is


decapitated in the coil itself when it’s not operating)

Specifications:
1.Transistor : SL-100

2. Diode- 1N4007

3.Relay : miniature , SPST , 5V

9.Power Supply
Unit

A rectifier is an electrical device that converts alternating


current (AC), which periodically reverses direction, to direct
current (DC), current that flows in only one direction, a process
known as rectification. Rectifiers have many uses including as
components of power supplies and as detectors of radio signals.
Rectifiers may be made of solid state diodes, vacuum
tube diodes, mercury arc valves, and other components.
A device which performs the opposite function (converting DC to AC)
is known as an inverter.
When only one diode is used to rectify AC (by blocking the negative
or positive portion of the waveform), the difference between the
term diode and the term rectifier is merely one of usage, i.e., the
term rectifier describes a diode that is being used to convert AC to
DC. Almost all rectifiers comprise a number of diodes in a specific
arrangement for more efficiently converting AC to DC than is
possible with only one diode. Before the development of silicon
semiconductor rectifiers, vacuum tube diodes and copper(I)
oxide or selenium rectifier stacks were used.
Early radio receivers, called crystal radios, used a "cat's whisker" of
fine wire pressing on a crystal of galena (lead sulfide) to serve as a
point-contact rectifier or "crystal detector". Rectification may
occasionally serve in roles other than to generate D.C. current per
se. For example, in gas heating systems flame rectification is used
to detect presence of flame. Two metal electrodes in the outer layer
of the flame provide a current path, and rectification of an applied
alternating voltage will happen in the plasma, but only while the
flame is present to generate it

The Regulated 5V Power Supply is needed for microcontroller, ADC


, LCD and sensors.

Working of the Block Diagram:


The step down transformer (240/5 V, 500mA) is connected
across the single phase induction motor. The output of the
transformer is rectified using precision rectifier circuit. The output
of rectifier circuit is not pure DC hence filter and regulator circuit
is used to rectify the ripple contents, Now the output of this
section
is pure DC 5V.

The output voltage varies as the input Voltage (i.e. Voltage


across the motor) varies. This pure DC signal is given to input pin
of the ADC.(Input-1)

The Current through the motor can be sensed using C/T


(current transformer) arraignment. The 1:50 CT is used to reduce
the current strength to 50 times that of primary current strength.

The output of CT (i.e. Current) is passed through the load


resistor connected across it. Then current passed through the load
resistor and voltage is developed across the load resistor. This
voltage is alternating in nature (AC) which is converted in to DC
using precision rectifier circuit. The output of this rectifier circuit is
having the ripple contents which can be eliminated using filter and
signal conditioning circuit arraignment.

Now, as the current through the motor (a.c current from 0-


3.7A) varies the output of current sensing unit (D.C voltage) is also
varies from 0- 5V D.C. The output of this unit is given as one of the
input to the ADC, which convert analog data n to digital data.

The LM35 temperature transducer (passive) is used to measure


the Yoke temperature of the single phase induction motor. This
transducer produces the 10mV D.C voltage per 1°C rise in
temperature. LM35 transducer is contact type transducer.

As the output voltage is not sufficient to give to the ADC, it is


amplified using LM 324 operational amplifier IC.

Now the variation in the temperature is proportional to the


output voltage of the amplifier. This voltage is set between the
ranges of 0-5V DC as the temperature varies from 0- 100 °C this can
be varied by just varying the pot.

Then the output of the above system is given as input to the


ADC which produces the digital code for analog input.
When a motor runs, the commutator switches the direction of the
electricity that flows in the windings. Though the system keeps
the motor running, occasional spark occurs between brushes and
commutator at the timing of the commutation. The spark is one of
the causes of the electrical noise.
Especially when the motor starts from its stalled position,
comparably higher current, or a stall current, flows into the
windings. Higher current usually causes higher noise.
Also the similar noise happens when (1) brushes stays unstable
on the surface of the commutator, (2) the input to the motor is
much higher than expected (3) and so on.
Other factor may be an insulation created on the commutator
surface, which results in unstable flow of the electricity.

The microphone is used to measure the noise level, the microphone


convert the noise or sound to variable dc voltage in mV, which
is amplified using transistor amplifier ,The output of this
transistor amplifier is given to the ADC as an input.
Now the output of the Detector is given to the ADC which
convert analog data into digital data.
An analog-to-digital converter (abbreviated ADC, A/D or A to D)
is a device that converts a continuous quantity to
a discrete digital number. Typically, an ADC is an electronic device
that converts an input analog voltage (or current) to
a digital number proportional to the magnitude of the voltage or
current. However, some non-electronic or only partially electronic
devices, such as rotary encoders, can also be considered ADCs.

The ADC(0809 a 8 i/p ADC) receives the input from all five inputs
from all sensing units . the selection is made by the commands
given by the microcontroller . It will select one input at a time and
convert it to the digital code and give as input to microcontroller.

The microcontroller receives the digital data from ADC, process it


and check it for the threshold value.
If any parameter is exceeds from threshold value then it’ll trip the
CB by giving a signal to the transistor which drive the miniature
relay. The relay is connected to the motor as a switch.

The LCD is also connected to the microcontroller. It displays all the


measured value.

10. SOFTWARE

10.1 INTRODUCTION TO KEIL SOFTWARE

Keil MicroVision is an integrated development environment


used to create software to be run on embedded systems (like a
microcontroller). It allows for such software to be written either in
assembly or C programming languages and for that software to be
simulated on a computer before being loaded onto the
microcontroller.

10.1.1 WHAT IS µVision3?


µVision3 is an IDE (Integrated Development Environment)
that helps write, compile, and debug embedded programs. It
encapsulates the following components:

¾ A project manager.
¾ A make facility.
¾ Tool configuration.
¾ Editor.
¾ A powerful debugger.

10.1.2 STEPS FOLLOWED IN CREATING AN APPLICATION IN


uVision3:

To create a new project in uVision3:

1. Select Project - New Project.


2. Select a directory and enter the name of the project file.
3. Select Project –Select Device and select a device from Device
Database.
4. Create source files to add to the project
5. Select Project - Targets, Groups, and Files. Add/Files, select
Source Group1, and add the source files to the project.
6. Select Project - Options and set the tool options. Note that
when the target device is selected from the Device
Database™ all-special options are set automatically. Default
memory model settings are optimal for most applications.
7. Select Project - Rebuild all target files or Build target

To create a new project, simply start MicroVision and


select “Project”=>”New
Project” from the pull–down menus. In the file dialog that appears,
choose a name and base directory for the project. It is
recommended that a new directory be created for each project, as
several files will be generated. Once the project has been named,
the dialog shown in the figure below will appear, prompting the
user to select a target device. In this lab, the chip
being used is the “AT89S52,” which is listed under
the heading “Atmel”.
Fig. Window for choosing the target device

Next, MicroVision must be instructed to generate a HEX file


upon program compilation. A HEX file is a standard file format for
storing executable code that is to be loaded onto the
microcontroller.
In the “Project Workspace” pane at the left, right–click on
“Target 1” and select “Options for ‘Target 1’ ”.Under the
“Output” tab of the resulting options dialog, ensure that both
the “Create Executable” and “Create HEX File” options are
checked. Then click “OK”
as shown in the two figures below.

Fig. Project Workspace Pane

Next, a file must be added to the project that will contain the
project code. To do this, expand the “Target 1” heading, right–click
on the “Source Group 1” folder, and select “Add files…” Create a
new blank file (the file name should end in “.asm”), select it,
and click “Add.” The new file should now appear in the “Project
Workspace” pane under the “Source Group 1” folder. Double-click
on the newly created file to open it in the editor. All code for this
lab will go in this file. To compile the program, first save all
source files by clicking on the “Save All” button, and then click
on the “Rebuild All Target Files” to compile the program as
shown in the figure below. If any errors or warnings occur during
compilation, they will be displayed in the output window at the
bottom of the screen. All errors and warnings will reference the
line and column number in which they occur along with a
description of the problem so that they can be easily located.
Note that only errors indicate that the compilation failed, warnings
do not (though it is generally a good idea to look into them
anyway).

Fig. “Save All” and “Build All Target Files” Buttons

When the program has been successfully compiled, it can be


simulated using the integrated debugger in Keil MicroVision. To
start the debugger, select “Debug”=>”Start/Stop Debug Session”
from the pull–down menus.
At the left side of the debugger window, a table is displayed
containing several key parameters about the simulated
microcontroller, most notably the elapsed time (circled in the
figure below). Just above that, there are several buttons that
control code execution. The “Run” button will cause the
program to run continuously until a breakpoint is reached,
whereas the “Step Into” button will execute the next line of code
and then pause (the current
position in the program is indicated by a yellow arrow to the left of
the code).

Fig. µVision3 Debugger window

Breakpoints can be set by double–clicking on the grey bar


on the left edge of the window containing the program code. A
breakpoint is indicated by a red box next to the line
of code.
Fig. ‘Reset’, ‘Run’ and ‘Step into’ options

The current state of the pins on each I/O port on the


simulated microcontroller can also be displayed. To view the state
of a port, select “Peripherals”=>”I/O Ports”=>”Port n” from the
pull–down menus, where n is the port number. A checked box in
the port window indicates a high (1) pin, and an empty box
indicates a low (0) pin. Both the I/O port data and the data at the
left side of the screen are updated whenever the program is
paused.
The debugger will help eliminate many programming errors,
however the simulation is not perfect and code that executes
properly in simulation may not always work on the
actual microcontroller.
10.1.3 DEVICE DATABASE
A unique feature of the Keil µVision3 IDE is the Device
Database, which contains information about more than 400
supported microcontrollers. When you create a new
µVision3 project and select the target chip from the database,
µVision3 sets all assembler, compiler, linker, and debugger options
for you. The only option you must configure is the memory map.

10.1.4PERIPHERAL
SIMULATION
The µVision3 Debugger provides complete simulation for the
CPU and on-chip peripherals of most embedded devices. To
discover which peripherals of a device are supported, in µVision3
select the Simulated Peripherals item from the Help menu. You
may also use the web-based Device Database. We are
constantly adding new devices and simulation support for on-
chip peripherals so be sure to check Device Database often.

10.2PROGRAMME
R

The programmer used is a powerful programmer for the Atmel


89 series of microcontrollers that includes 89C51/52/55,
89S51/52/55 and many more.

It is simple to use & low cost, yet powerful flash


microcontroller programmer for the Atmel 89 series. It will
Program, Read and Verify Code Data, Write Lock Bits, Erase and
Blank Check. All fuse and lock bits are programmable. This
programmer has intelligent onboard firmware and connects to
the serial port. It can be used with any type of computer and
requires no special hardware. All that is needed is a serial
communication port which all computers have.

All devices also have a number of lock bits to provide various


levels of software and programming protection. These lock bits
are fully programmable using this programmer. Lock bits are
useful to protect the progam to be read back from
microcontroller only allowing erase to reprogram the
microcontroller.

Major parts of this programmer are Serial Port, Power Supply


and Firmware microcontroller. Serial data is sent and received
from 9 pin connector and converted to/from

TTL logic/RS232 signal levels by MAX232 chip. A Male to


Female serial port cable, connects to the 9 pin connector of
hardware and another side connects to back of computer.

All the programming ‘intelligence’ is built into the


programmer so you do not need any special hardware to run it.
Programmer comes with window based software for easy
programming of the devices.

10.3 ProLoad PROGRAMMING SOFTWARE

‘ProLoad’ is a software working as a user friendly interface for


programmer boards from Sunrom Technologies. Proload gets its
name from “Program Loader” term, because that is what it is
supposed to do. It takes in compiled HEX file and loads it to the
hardware. Any compiler can be used with it, Assembly or C, as
all of them generate compiled HEX files. ProLoad accepts the Intel
HEX format file generated from compiler to be sent to target
microcontroller. It auto detects the hardware connected to the
serial port. It also auto detects the chip inserted and bytes
used. The software is developed in Delphi and requires no
overhead of any external DLL.

The programmer connects to the computer’s serial port


(Comm 1, 2, 3 or 4) with a standard DB9 Male to DB9 Female
cable. Baud Rate - 57600, COMx Automatically selected by window
software. No PC Card Required.

After making the necessary selections, the ‘Auto Program’


button is clicked as shown in the figure below which burns the
selected hex file onto the microcontroller.
11. FLOWCHART :

START

INITIALISE THE LCD

DISPLAY INITIALISATION MESSAGE

B
INITIALISE THE ADC

OBTAIN THE SENSOR DATA

OBTAIN DIGITIZED DATA FROM ADC

STORE DIGITAL OUTPUT IN THE BUFFER MEMORY OF


THE MICROCONTROLLER

CLEAR THE LCD

Is clear
YES
Completed

NO

Wait for Completion

DISPLAY THE SENSOR DATA

A
A

YES NO
SENSOR
THRESHOLD
CROSSED?

OFF THE MOTOR ON THE MOTOR

FLOWCHART FOR LCD INITIALIZATION

START

INTILIAZE THE LCD WITH 2LINES, 5X7 MATRIX

CLEAR REGISTER SELECT, READ/WRITE


AND SET THE ENABLE PIN OF THE LCD

CALL SOME DELAY

CLEAR THE ENABLE PIN OF THE LCD

CALL SOME DELAY

C
C

SET THE DISPLAY ON AND THE CURSOR ON

CLEAR REGISTER SELECT, READ/WRITE


AND SET THE ENABLE PIN OF THE LCD

CALL SOME DELAY

CLEAR THE ENABLE PIN OF THE LCD

CALL SOME DELAY

CLEAR THE LCD AND SHIFT THE CURSOR TO RIGHT

CLEAR REGISTER SELECT, READ/WRITE


AND SET THE ENABLE PIN OF THE LCD

CALL SOME DELAY

CLEAR THE ENABLE PIN OF THE LCD

CALL SOME DELAY

SHIFT THE CURSOR AT LINE 1, POSITION 0

CLEAR REGISTER SELECT, READ/WRITE


AND SET THE ENABLE PIN OF THE LCD

D
D

CALL SOME DELAY

CLEAR THE ENABLE PIN OF THE LCD

CALL SOME DELAY

STOP

3 FLOWCHART FOR ADC INITIALIZATION

START

SELECT AN ANALOG CHANNEL BY SETTING


THE ADDRESS LINES A, B AND C

CLEAR THE OUTPUT ENABLE PIN

ACTIVATE THE ALE PIN WITH


A LOW TO HIGH PULSE

ACTIVATE THE START PIN BY A HIGH TO


LOW PULSE TO INITIATE CONVERSION

NO
IS YES

EOC =0? A
A

SET THE OUTPUT ENABLE PIN

CALL SOME DELAY

READ DATA OUT OF THE ADC CHIP

CLEAR THE OUTPUT ENABLE PIN

STOP
12.ADVANTAGES:

1) Real time condition of motors can be determined.

2) Continuous monitoring and control prevent the possible


damage to the motor.
3) Measurement is accurate (only 0.1% error given by the data
sheet of transducers).
4) All the parameter can be measured within no time (it’s about
30mSec. which is given in the ADC datasheet).
5) Reduces the man power for maintenance of the machine.
6) Increases the life span of the machine (compare to manual
operation).

13.Disadvantages:

1) System is quite costlier.


2) It uses extra power for its operation.
3) Require more space due to the use of CT and PT.

You might also like