You are on page 1of 53

Mizan Tepi University

College of Engineering and Technology

Department of Electrical and Computer Engineering

Power stream

Semester Project Title: Protection of Three Phase Induction Motor from

Electrical Faults

Group Member ID No

1. Admasu Yahalework …………………………………. 03143/11

2. Alemnew Sisay …………….….……………… …….….. 03008/11

3. Melese Asnakew………………………………………… 03011/11

4. Solomon Abelneh……………………………………… … 032981/11

5. Yihalem Metadel ……………………………………....….03003/11

Advisor: Mr. Tilahun Koticho

Wednesday, April 19,

2023

Tepi, Ethiopia
DECLARATION
We, the undersigned, declare this project entitled “protection of three phase induction motor
from electrical faults” is our original work, and the Project work has not been presented for a
degree in this or any other universities, and all sources of materials that will be used for the
project work will have been fully acknowledge.
Name ID Signature Date
Admasu Yahalework 03143/11 ___________ _____________
Alemnew Sisay 03008/11 ___________ ____________
Melese Asnakew 03011/11 ___________ ____________
Solomon Abelneh 032981/11 ___________ ____________
Yihalem Metadel 03003/11 ___________ ___________
This Project has been submitted for examination with my approval as a university advisor
Project Advisor Signature Date
Mr. Tilahun Koticho ____________ ___________
Examiners
1.____________________________ ______________ ___________
2. ____________________________ ______________ ___________
3.____________________________ ______________ ___________

i|Page
ACKNOWLEDGEMENT
First and foremost, we would like to give special thanks and glory to the Omnipotent,
Omnipresent,
and the Omniscient Almighty God who is the wonderful source of our strength. He gave us the
grace, wisdom, good health and guided us in all the ways of our life. We are great full for Mizan
Tepi University, Department of Electrical and computer Engineering encouraged us to dig out
more about the project and helped us to attain succession of our project. And we are thanks our
Advisor Mr. Tilahun Koticho for his informative and useful guidance and suggestion throughout
the journey for project design, finally, we would like to thank all our friends (too many to list
here but you know who you are!) whom we respect and love dearly. Thank you for the constant
encouragement during this semester.

ii | P a g e
ABSTRACT
The main aim of this project is to monitor and protect the induction motor with the help of
Arduino micro controller for large scale Industrial Environment. Protection of induction motor
has been done using the microcontroller, current transformer, and voltage transformer. This
protection scheme protects the induction motor from under voltage, over voltage and over
current and overheating conditions. The overall process is monitored by Arduino Uno
microcontroller. Microcontroller sends signal through transistor to relay for operation. The
current transformer is an i-v converter, which gives output in terms of voltage and can be fed to
the microcontroller directly. The output of these transformers will vary proportionately with
respect to its input. The microcontroller senses the voltage, compares with the reference value
and sends control signals to the respective protective relays. The overall system is cheap and
reliable. It has been tested several times and gives the good results. The induction motor can be
started and stopped through the relay developed with this system. It is also possible to protect the
motor against some faults such as over current, higher/lower voltage, over temperature in
windings, overloading of motor through the sensors output. Therefore, protections of the system
are realized in real time.

iii | P a g e
TABLE OF CONTENTS

ACKNOWLEDGEMENT...............................................................................................................ii
ABSTRACT...................................................................................................................................iii
TABLE OF CONTENTS...............................................................................................................iv
LIST OF FIGURE...........................................................................................................................v
LIST OF TABLE............................................................................................................................vi
LIST OF SYMBOLE.....................................................................................................................vii
CHAPTER ONE..............................................................................................................................1
1. INTRODUCTION.......................................................................................................................1
1.1 BACKGROUND OF STUDY.............................................................................................2
1.2 STATEMENT OF THE PROBLEM.................................................................................3
1.3 OBJECTIVES......................................................................................................................4
1.3.1 General Objective.........................................................................................................4
1.3.2 Specific Objective..........................................................................................................4
1.4 SCOPE OF THE PROJECT...............................................................................................4
1.5 METHODOLOGY..............................................................................................................4
1.5.1 System development methodology...............................................................................4
1.5.2 System development tools.............................................................................................5
1.5.3 Hard ware and Software requirement........................................................................5
1.6 SIGNIFICANCE OF THE STUDY...................................................................................6
1.7 LIMATATION.....................................................................................................................6
1.8 THESIS ORGANIZATION................................................................................................6
CHAPTER TWO.............................................................................................................................7
2. LITERATURE REVIEW............................................................................................................7
CHAPTER THREE.........................................................................................................................9
3. SYSTEM DESIGN AND DESCRIPTION.................................................................................9

iv | P a g e
3.1 BLOCK DIAGRAM OF THE PROJECT........................................................................9
3.2 PROTECTION TECHNIQUES.......................................................................................10
3.3 MATERIAL DISCRIPTION............................................................................................10
3.3.1 POWER SUPPLY.......................................................................................................10
3.3.2 Microcontroller.........................................................................................................12
3.3.3 Temperature Sensor...................................................................................................14
3.3.4 Voltage measurement circuit...................................................................................16
3.3.5 Current measurement circuit....................................................................................18
3.3.6 Relay.............................................................................................................................21
3.3.7 Relay deriver (transistor)...........................................................................................21
3.3.8 LCD (liquid crystal display).........................................................................................21
3.3.9 LED..............................................................................................................................22
3.3.10 Motor........................................................................................................................23
3.4. FLOW CHART.................................................................................................................25
3.5 SCHEMATIC DIAGRAM OF THE SYSTEM............................................................27
CHAPTER FOUR..........................................................................................................................29
4. RESULT AND DISCUSSION..................................................................................................29
4.1 PROTEUS VSM.................................................................................................................29
4.2 SIMULATION RESULT OF THE SYSTEM.................................................................30
CHAPTER FIVE...........................................................................................................................31
5. CONCULUSION AND RECUMMENDATION......................................................................31
5.1. CONCULUSION...............................................................................................................31
5.2 RECOMMENDATION...................................................................................................31
REFERENCES..............................................................................................................................33
APPENDIX....................................................................................................................................34

v|Page
LIST OF FIGURE

vi | P a g e
LIST OF TABLE

vii | P a g e
LIST OF SYMBOLE
AC……………………………. Alternative current
ADC………………….…….… Analog to digital converter
CT………………………….… Current Transformer
DC………………………….… Direct current
IC………………………….…. Integrated circuit
ICSP……………….……….… In-circuit system programming
LCD………… …….………… Liquid crystal display
LED………………….…….… Light emitted diode
PLC………… ……….…….… Programming language Control
PPR……… ……………...….... Pulse per Revolution
PWM………………….…….…Pulse Width Modulation
RAM …………………………. Random Access Modulation
ROM………………….…….… Read Only Memory
USART…………………….… Universal Synchronous Asynchronous Receiver transmitter
USB……………………...….... Universal Serial Bus
VT………………….…............. Voltage Transformer

viii | P a g e
ix | P a g e
CHAPTER ONE
1. INTRODUCTION

Induction machines are very popular in industries because of their vast applications. Hence it
becomes necessary to protect them against faults so as to ensure uninterrupted operation and
function. Various parameter protecting and monitoring systems are therefore other types of
machine, but in case of induction machine the controlling and monitoring systems are not
extensively used due to high cost of installation and physical constraints. So as to overcome
the limitations in monitoring and protecting, Ardiuno microcontroller based System is used
which makes it simple and cost-effective. Induction motor is the most widely used motor in
the industry due to its simple and rugged construction. It requires least maintenance as
compare to the other electrical motors. Induction motor speed control is nowadays more easy
and versatile due to the advancement in the field of power electronics and hence is easy to
replace other costly and controllable motors. The protection of induction motor plays an
important role in its long life service. Researchers have done costly and limited protection for
the stator windings protections, broken rotor bars protection, thermal protection etc. Mainly
the induction motor needs protection from the variation of the input supply for small motors
which is in common use not only in big industry but also in small scale industries. The small
scale industries are not able to provide costly protection to the drives in use as it will increase
their capital cost. Hence a cheap and compact design has been done for protection of induction
motor against unbalance voltage, under voltage, over voltage, short circuit and thermal
protection. It has been also designed for critical loads which need to be run even under single
phasing condition. Due to the poor power quality the damage of induction motors in small
scale industries needs to be taken care of. The proposed design can be also used for speed
control, improvement of efficiency under poor power quality service manually by introduction
of a single two-way switch. Many researches have been done in this area but they are costly
and unfeasible in our condition. The overall cost of the protection equipment should not be
more than 15% of the total cost of the actual machine. Keeping this in mind the design has
been proposed using microcontroller, relays, small CTs and PTs, so that the overall cost is
low. But the efficiency of the protection scheme should not be compromised.

1|Page
The motor protection is required as day to day life induction motor usage increases a lot as it
has some specific merits. The circuit was fully controlled by the Ardiuno microcontroller and
the micro controller will continuously monitor the voltage of phase and if the voltage goes
abnormal then it will switch off the motor until they are normal. It is not only protecting motor
from transient voltage, it also switches on the motor automatically when power comes without
manual requirement and off the motor after predetermined time. This motor is manually
monitoring is difficult so automatic protection of induction motor has such an importance.
Induction motors are widely used-as industrial drive motors. In order to reduce the-size and to
minimize the cost, large capacity motors are designed so that, the magnetic and current
densities are close to the limiting levels. Such motors are sensitive to abnormal operating
conditions like overvoltage or over loading etc. and hence require high speed and reliable
protection scheme. The digital relays based on microprocessors or microcontrollers can
provide accurate high speed protection. This study presents a protection scheme for phase
induction motor from incipient faults using Arduino microcontroller. The induction motor
experiences several types of electrical faults like over/under voltage, over load, phase
reversing, unbalanced voltage, single phasing and earth fault. Due to these electrical faults, the
windings of the motor get over heated which lead to insulation failure and thus reduce the life
time of the motor.
1.1 BACKGROUND OF STUDY
Induction motor electrical faults numerous faults can occur in an induction motor during its
course of operation. These faults if left undetected can lead to catastrophic failures. The
following are common electrical faults which can be found in induction motors. Over loading,
under voltage and over voltage. A brief description of these faults and their characteristics is
given below
Overloading: - Overload fault occurs when the mechanical torque exceeds the threshold point
by applying mechanical load to the motor greater than full load rating. Overloading causes
increase in phase currents, over heating the machine. In a traditional relay protection system,
the over current relay trips the motor off-line when the over load encounter over current in the
line.
Under Voltage: -Under voltage fault is reducing the supply voltage on the three phases by
specific Percentage, which makes the motor from attaining rated speed in specified time,

2|Page
increases the Current and overheats the machine. Low voltage protection relays are used in
traditional systems. However, in order to avoid unwanted relay shutdowns due to momentary
voltage drops, the AC contacts need a delay mechanism which delays the under voltage
protection for a time period.
Over Voltage:-Over voltage occur if the three phase voltages are greater than rated voltage.
The effect of this fault is increasing current flow which leads unacceptable stress on the motor
insulation due to high heat dissipation. Conventional protection systems use the over voltage
relays to protection the motor during this condition [1].
The approximate percentages of by these individual faults are:
overload 30%, insulation damage 20%, phase failure 14%, bearing damage 13%, ageing
10%, rotor damage 5%&others 8%Therefore, the following points must be observed to
guarantee fault-free operation of an electrical drive:
Correct design: a suitable motor has to be selected for each application.
Professional operation: professional installation and regular maintenance are preconditions
for fault-free operation.
Good motor protection: this has to cover all possible problem areas.
It must not be tripped before the motor is put at risk.
If the motor is put at risk, the protection device has to operate before any damage occurs.
If damage cannot be prevented, the protection device has to operate quickly in order to
restrict the extent of the damage as much as possible.
1.2 STATEMENT OF THE PROBLEM
Reducing the life time of motors.
Increase the extra financial losses due to maintenance.
Over loading, over voltage, under voltage
The motor heat up quickly and damage
The motor protected manually from unbalance voltage and over load,
This project develops a fault detection method for three-phase induction motors to detect faults
in all over circuit of the induction motor by using Ardiuno microcontroller and overload relay
technique. The thermal protection for induction motors fed by motor control devices is great
importance for the reliable protection of induction Motors, increasing the service time of the
motor, and reducing the extra financial losses due to maintenance. It is also difficult to protect

3|Page
the motor manually from unbalance voltage and over load, but using microcontroller it is
possible to control unbalance voltage and over load by adjust rated operation value voltage
and current of motors. Three phase induction motor can continue to run one phase of the
supply gone out of service. The motor heat up quickly and damage
1.3 OBJECTIVES
1.3.1 General Objective
The general objective of this project is to design Arduino based protection of three phase
induction motor from electrical faults.
1.3.2 Specific Objective
To design temperature, current, and voltage sensing circuit that will be interfaced
to the microcontroller for monitoring
To develop ardiuno microcontroller based protecting system
To identify and prevent faults in induction motor
1.4 SCOPE OF THE PROJECT
The scope of this project is to develop continuous protection for induction motor based on
Arduino. All the sensors are used to acquire data from the induction motor and transfer the
data they acquire to Arduino Uno microcontroller board. Finally, we give highest emphasis to
the software design and implementation in order to develop a suitable algorithm that will
promptly interact with the, microcontroller and the LCD. This contributes to detect and repair
induction motor as soon as fault occur so as to reduce man power required which saves time
and energy.
1.5 METHODOLOGY
1.5.1 System development methodology
The methodology used to address the research problem is described in this section.
Study Restate problem and objectives of the project.
The next section describes the procedures used for this study which includes a
detailed account of microcontroller technique.
The ARDIUNO UNO software used for implementing the techniques
This project gives an artificial intelligence protective methods and their application in fault
identification. For successful completion of this project some steps will be followed to carry
out different tasks. Different literature will be revised relating to this project and data will be
collected about condition and control parameter of induction motor. Based on this parameter

4|Page
system model was designed. Some software's were selected to develop the software
programming. So here a system is designed with an alternative method to prevent the failures
that happen in induction motors using microcontroller and sensors to measure the different
parameters related to induction motors such as current, voltage, and temperature.
Generally, the methodology is concluded by the block diagram given bellow

Figure 1.1 sequence of methodology


1.5.2 System development tools
3 phase induction motor
Transistor
Resistors
Capacitors
Diodes
Ziner diode
Step down transformer
Voltage transformer
Current transformer
Liquid crystal display
LED(RED)
Wire
Voltage regulator
1.5.3 Hard ware and Software requirement
I. Hard ware requirements
Computer
Flash
Paper
II. Software requirements
Protous

5|Page
Ardiuno IDE program
1.6 SIGNIFICANCE OF THE STUDY
To reduce maintenance cost
To increase operational safety
To detect and repair induction motor as soon as fault occur
To reduce unforeseen expenditure due to motor operation interruption.
To save wastage time
increasing the service time of the motor to protect the motor from phase failure
Induction motors are the most common electrical machines, because of their relatively low
manufacturing cost and the easy of control. They represent about 80% of the electro
mechanical energy conversion machines. As indicated before, identifying faults in these
motors and protecting them is an important aspect to reduce loss and cost. Microcontroller
based techniques is used to identify these faults and to take action to correct the faults. It
reduces the manual system of the protection of induction motor from unbalanced voltage
source
1.7 LIMATATION
The main limitations of the projects are we cannot implement the project into practically due
to shortage of time.
1.8 THESIS ORGANIZATION
The thesis is organized into five chapters. The contents of these chapters are summarized as: -
Chapter 1 introduces overall background information of the system. This includes
Background, problem statement, objective, proposed methodology of the work and its scope
and contribution.
Chapter 2 focuses revision of related literatures to this system.
Chapter 3 covers the system design and detail analysis of the system components. This
consists Controlling and monitoring system, type’s faults, and explanation system components
in detail.
Chapter 4 investigates the observed results and discussions.
Chapter 5 summarizes the conclusion and recommendation for future work.

6|Page
CHAPTER TWO

2. LITERATURE REVIEW

A lot of research work has been published in the field of induction motor protection and
various techniques have been proposed.
William H. Kersting [1] .stated that three phase induction motor can continue to run when one
phase of the supply gone out of service. This may be due to any fuse blowing or opening of
protective device of the motor, at step-down transformer or at feeder end. At this condition the
three-phase induction motor continue to run but the motor will heat up quickly and it should
be protected by removing it from the service at the instant of single phasing. When phase
opens at step down transformer or at feeder end, the stator and rotor losses increases. To
protect the motor all the terminal should be open.
Sudha M. and Anbalagan [2]. Proposed a technique to save the three phase induction motor
from single phasing. In this technique, PIC16F877 microcontroller has been used to sample
the values of each phase and converted them to low voltage ac by means of transformer. The
signals are converted to digital value using ADC converter. The controller continuously
compares the digital value with the reference value and when the fault occurs, it opens the
normally close contactor and disconnects it from the power supply. Single phasing, under
voltage and over voltage protection is done practically on a 2kW motor and the motor is
isolated if any of these condition occurs.
PragasenPillayet.al. [3]. Examines the three phase induction motor under the influence of
under voltage and over voltage. The voltage at motor terminals may be higher than the
nominal value in a complex industrial system and can be well below from nominal value in a
heavily loaded industrial system. IEEE, NEMA and other power communities have different
defined the voltage unbalance. The complex algebra is avoided in these definitions. In this
paper calculation of the unbalance of voltage have been done on true basis with complex
algebra and compared with NEMA standards.
Javed A. and Izhar T. [4].have proposed the protection of three phase induction motor based
on voltage measurement and is not enough to protect the motor if the fault occurs at

7|Page
distribution transformer or at substation feeder. If fault occurs at motor terminals, then the
voltage measurement can protect the motor very well. The current measurement device should
be implemented within the protective device. They have also proposed a phase measurement
device which can measure the phase difference of the voltages because when the fault occurs
at any other location rather than the motor terminals, then the faulted phase will draw negative
sequence current and work as a voltage generator. The voltage developed is close to line
voltage but the measurement scheme is not able to detect the fault, however the phase
difference of the faulted phases changes.
Chattopadhyayet.al. [5]. Analyzed the stator current of three phase induction motor by using
different techniques. The single phasing can also be measured by the zero crossing detection
method and has proposed to use 8085 microprocessors for doing this work. The accuracy can
be increased by increasing the sampling time. The phase shift can also be measured by the use
of microprocessor. The phase shift helps to protect the motor from any increased or decreased
phase difference.
Cunkas A. et.al. [6].Described the protection of the induction motor under various conditions
like over voltage, under voltage, voltage unbalance and over current using PIC16C84
microcontroller. Potential transformer and current transformer are used for this process. Later
the values from this transformer are converted into digital values using ADC converter. The
tripping circuit has been given some delay.
Bayindir Ramazan [7].explained the three phase induction motor protection using sensors.
PLC based protection has been employed and compared with PIC based protection. PLC has
proved to be cost efficient. Need of ADC card has been eliminated by using PLC. PLC can be
implemented on different kind of motors by applying small changes.
Ardiuno based protection of induction motor from electrical faults
All the above scholars implemented induction motor control to protect from faults by their
techniques. But our project is provided by using ardiuno Uno microcontroller. Because
ardiuno micro controller is the latest microcontroller with compare to the above techniques.
Therefore, in order to achieve this task, the Arduino mega microcontroller based on
ATmega328 was chosen because of its suitability for this project such as speed, power
consumption, and universal synchronous asynchronous receiver transmitter (USART)
functionality, in built ADC, and amount of RAM and ROM on the chip.

8|Page
CHAPTER THREE

3. SYSTEM DESIGN AND DESCRIPTION

To improve the performance of the induction motor continuous protection of the motor is
essential. The protecting systems are particularly useful because the systems are able to capture
the information from the motor, both real-time and historical, over the motor’s life.
3.1 BLOCK DIAGRAM OF THE PROJECT
AC SUPPLY DC SUPPLY

VOLTAGE LCD
SENSING

CURRENT
SENSING
ARDNO UNO

LED
TEMPRATUR
INDUCTION
E SENSOR
MOTOR
( SQUIRREL
CAGE)

RELAY RELAY DRIVER

Figure 3.2 Block diagram of the system


The design model is based on the analysis and architectural requirements of the system. It
represents the application components and determines their appropriate placement and use

9|Page
within the overall architecture. In the design model, packages contain the design elements of
the system, such as design classes, interfaces, and design subsystems, that evolve from the
analysis classes. The real time monitoring and controlling method is implemented for the
better performance of the motor. The system developed is capable to perform such operations
like measuring, monitoring and controlling the parameters like voltage, current, and
temperature of the induction motor. The monitoring devices can provide additional
information needed to maximize energy savings. Monitoring systems also have the ability to
providing guidance for preventive maintenance, and predictive failure analysis.
3.2 PROTECTION TECHNIQUES
Induction motor should be protected by different types of techniques in the power system.
Some of these are sensed by the protective devices and trip the motor. This protection process
can be done by different ways. Some of the techniques are discussed below:
i)Voltage transformer to detect the phase voltage
ii)Current transformer to detect the current
iii)Thermal sensor to detect the temperature of
winding
This can be done by using ARDIUNO microcontroller. The protection device should be
capable of voltage and current detection. The current measure protection is important because
any phase fault occurrence is detectable by measuring the current but there is a chance when
voltage measurement device will not able to detect the phase failure. So voltage and current
measurement made the protection reliable, if the motor is influenced by the fault, which may
occur at any location. If the fault occurs at motor terminals, then voltage measurement device
may be suitable.
3.3 MATERIAL DISCRIPTION
Based on the various reviews conducted on induction motor protection and the above block
diagram which was conceived out of those literature reviews conducted, numbers of
components are required in developing the protection system.
3.3.1 POWER SUPPLY
Power supply is the circuit from which we get a desired dc voltage to run the other circuits.
The voltage we get from the main line is 230V AC but the other components of our circuit
require 5V DC. Hence a step-down transformer is used to get 12V AC which is later converted
to 12V DC using a rectifier. The output of rectifier still contains some ripples even though it is
10 | P a g e
a DC signal due to which it is called as Pulsating DC. To remove the ripples and obtain
smoothed DC power filter circuits are used.
A 5V regulated supply is taken as followed:

Figure 3.3 Block diagram of regulated power supply system


I. Transformer
Transformer is the electrical device that converts one voltage to another with little loss of power.
Most power supplies use a step-down transformer to reduce the dangerously high mains voltage
to a safer low voltage. Here a step down transformer is used to get 12V AC from the supply i.e.
230V AC.
II. Rectifiers
A rectifier is a circuit that converts AC signals to DC. A rectifier circuit is made using diodes.
There are two types of rectifier circuits as Half-wave rectifier and Full-wave rectifier depending
Upon the DC signal generated. Here Full-wave bridge rectifier is used to generate dc signal.
III. Smoothing
Smoothing is performed by a large value electrolytic capacitor connected across the DC supply
to act as reservoir, supplying current to the output when the varying DC voltage from the
rectifier is decreasing. The diagram shows the unsmoothed varying DC and the smoothed DC.
The capacitor charges quickly to the peak of the varying DC and then discharges as it supplies
current to the output. Here the capacitor of 470uF is used as a smoothing circuit.
IV. Voltage regulation
Fixed voltage regulator78xx, produce fixed DC output voltage from variable DC (a small amount
of AC on it). Fixed output is obtained by connecting the voltage regulator at the output of the
filtered DC. It can also be used in circuits to get low DC voltage from high DC voltage.
V. Diode selection
Ideally, a diode will conduct current in the direction of anode to cathode defined by the arrow in
the symbol and act like an open circuit to any attempt to establish current in the opposite
direction. The characteristics of an ideal diode are those of a switch that can conduct current in
only one direction. In the description of the elements to follow, it is critical that the various letter

11 | P a g e
symbols, voltage polarities, and current directions be defined. If the polarity of the applied
voltage is consistent with that shown in figuer4 a, the portion of the characteristics to be
considered in figure 4 b, is to the right of the vertical axis. If a reverse voltage is applied, the
characteristics to the left are pertinent.

Figure 3.4 characteristics of diode

Figure 3.5 Power supply circuit


3.3.2 Microcontroller
The microcontroller IC which we used is Arduino Uno. The Arduino Uno is a microcontroller
board based on the ATmega328. It has 20 digital input/output pins of which 6 can be used as
PWM outputs and 6 can be used as analog inputs, a 16 MHz resonator, a USB connection, a
power jack, an in-circuit system programming (ICSP) header, and a reset button. It contains
everything needed to support the microcontroller; simply connect it to a computer with a USB
cable or power it with an AC-to-DC adapter or battery to get started. The Uno differs from all
preceding boards in that it does not use the FTDI USB-to-serial driver chip. Instead, it features
the Atmega16U2 programmed as a USB-to-serial converter. This auxiliary microcontroller has

12 | P a g e
its own USB boot loader, which allows advanced users to reprogram it. Therefore, in order to
achieve this task, the Arduino mega microcontroller based on ATmega328 was chosen
because of its suitability for this project such as speed, power consumption, and universal syn
RAM and ROM on the chip synchronous asynchronous receiver transmitter (USART)
functionality, in built
ADC, and amount of RAM and ROM on the chip

Figure 3.6 Arduino-Uno and pin configurations


Power (USB) and pin configuration
Every Arduino board needs a way to be connected to a power source. The Arduino UNO can be
powered from a USB cable coming from your computer or a wall power supplies. It’s not
allowed to use a power supply greater than 20 Volts as you will overpower and thereby destroy
the Arduino. The recommended voltage for most Arduino models is between 6 and 12 Volts.
The pins on your Arduino are the places where it will connect wires to construct a circuit
probably in conjunction with a breadboard and some wire. They usually have black plastic
„headers‟ that allow you to just plug a wire right into the board. The Arduino has several
different kinds of pins, each of which is labeled on the board and used for different functions.
GND (3): Short for “Ground”. There are several GND pins on the Arduino, any of which can be
used to ground your circuit.
5V (4) & 3.3V (5): As we might guess, the 5V pin supplies 5 volts of power, and the 3.3V pin
supplies 3.3 volts of power. Most of the simple components used with the Arduino run happily
off of 5 or 3.3 volts.

13 | P a g e
Analog (6): The area of pins under the “Analog in” label (A0 through A5 on the UNO) is
Analog in pins. These pins can read the signal from an analog sensor (like a temperature sensor)
and convert it into a digital value that we can read.
Digital (7): Across from the analog pins are the digital pins (0 through 13 on the UNO). These
pins can be used for both digital input (like telling if a button is pushed) and digital output (like
powering an LED).
PWM (8): the digital pins (3, 5, 6, 9, 10, and 11 on the UNO). These pins act as normal digital
pins, but it can also be used for something called Pulse-Width Modulation (PWM).
AREF (Stands for Analog Reference) (9): Most of the time you can leave this pin alone. It is
sometimes used to set an external reference voltage (between 0 and 5 Volts) as the upper limit
for the analog input pins.
3.3.3 Temperature Sensor
The most common type of temperature sensors is; thermocouple, thermistor and Temperature
Detectors (RTDs). In this project a thermistor type LM35 temperature sensor is used due to
the following main advantage
Lower cost
Does not require any external calibration
Linear output
Precise and accurate output
LM35 is a basic temperature sensor that can be used for experimental purpose. It gives the
readings in centigrade (degree Celsius) since its output voltage is linearly proportional to
temperature. It uses the fact that as temperature increases, the voltage across diode increases at
known rate (actually the drop across base-emitter junction of transistor). Its disadvantage is its
sluggish response.
LM35 has the following main features;
i.calibrated directly in degree Celsius(centigrade)
ii.Linear +10.0 mV/ degree Celsius
iii.0.5-degree Celsius accuracy guarantee able (at +25degree Celsius)
iv.Rated for full -55 to +150-degree Celsius range
v.Suitable for remote application
vi.Low cost due to wafer-level trimming vii. Operates from 4 to 30 volts

14 | P a g e
vii.Less than 60 Micro ampere current drain

Figure 3.7 LM35 temperature


As shown in the figure above the sensor has three
terminals.
i.Input source; it ranges from 2.7V to 5V
ii.Ground
iii.Output; analogue voltage output ranges from 201mV to 20v The code will be written in c
code. Before we can get a Celsius reading of the temperature, the analog output voltage
must first be read. This will be the raw value divided by 1024 times 5000. It is divided by
1024 because a span of 1024 occupies 5V. We get the ratio of the raw value to the full span
of 1024 and then multiply it by 5000 to get the milli volt value. Since the output pin can
give out a maximum of 5 volts (1024), 1024 represents the possible range it can give out.
The raw voltage over this 1024 (value) therefore represents the ratio of how much power
the output pin is outputting against this full range. Once we have this ratio, we then
multiply it by 5000 to give the millivolt value. This is because there are 5000 millivolts in 5
volts. Once this analog voltage in millivolts is calculated, we then can find the temperature
in Fahrenheit by the equation: ((Celsius * 9)/5 + 32)

15 | P a g e
Figure 3.8 temperature sensing ckt
3.3.4 Voltage measurement circuit
The voltage given to the induction motor is measured using the voltage transformer with the
transformation ratio of 220v.The voltage transformer will pass through rectification process
before fed to the ADC. The over voltage and under voltage protection circuit is capable of
measuring and monitoring voltage from 200 to 230VAC. In this project the voltage can be varied
by using the variable resistor and the output of the voltage monitoring circuit is fed to ADC
converter, whenever the voltage is varied to 200VAC, the microcontroller will detect under
voltage fault and whenever the voltage is varied to 230VAC, the microcontroller detects over
voltage fault, consequently the microcontroller sends a trip signal to the relay, and the relay trips
the motor from the AC mains, thereby protecting it from damage.
I. Voltage transformer
Two types of voltage transformer are used for protective-relaying purposes, as follows: (1) the
"instrument potential transformer," hereafter to be called simply "potential transformer," and (2)
the "capacitance potential device." A potential transformer is a conventional transformer having
primary and secondary windings. The primary winding is connected directly to the power circuit
either between two phases or between one phase and ground, depending on the rating of the
transformer and on the requirements of the application. A capacitance potential device is a
voltage transforming equipment using a capacitance voltage divider connected between phase
and ground of a power circuit.
Connections - Potential Transformers

16 | P a g e
Potential transformers are normally connected across two lines of the circuit in which the voltage
is to be measured. Normally they will be connected L-L (line-to-line) or L-G (line-to-ground). A
typical connection is as follows:

When a phase relationship of “direction of flow” is of no consequence, such as in a voltmeter


which operates only according to the magnitude of the voltage, there is no need to observe the
polarity of the transformer. However, in watt hour meter applications, polarity must always be
observed. Most potential transformers have a single winding secondary as previously shown;
however, they may have tapped secondary windings, or dual secondary windings.
II. Rectification stage
Rectifier is an electrical device that converts alternating current (AC), which periodically
reverses direction, to direct current (DC), which flows in only one direction. The process is
known as rectification and the stage is known as rectification stage. In this stage we use full
wave bridge rectifier. This type of single phase rectifier uses four individual rectifying diodes
connected in a closed loop “bridge” configuration to produce the desired output. Here we are
used 1N4007.
III. Filtering stage
To smooth the output of the rectifier a reservoir capacitor is used - placed across the output of
the resistor and in parallel with the load. This capacitor charges up when the voltage from the
rectifier rises above that of the capacitor and then as the rectifier voltage falls, the capacitor
provides the required current from its stored charge. The output V1 of the transformer is fed to
voltage transformation unit which transforms the input voltage into 5 volts range. The voltage
transformation unit consists of diode, and resistive divider network.

17 | P a g e
Figure 3.9 Voltage sensing circuit
3.3.5 Current measurement circuit
Current measurement is of vital importance in many power and instrumentation systems.
Traditionally, current sensing was primarily for circuit protection and control. However, with
the advancement in technology, current sensing has emerged as a method to monitor and
enhance performance. Knowing the amount of current being delivered to the load can be
useful for wide variety of applications. Current sensing is used in wide range of electronic
systems, viz., Battery life indicators and charger’s over-current protection and supervising
circuits, current and voltage regulators, DC/DC converters, ground fault detectors,
programmable current sources, linear and switch-mode power supplies, communications
devices, automotive power electronics, motor speed controls and overload protection, etc. A
current sensor is a device that detects and converts current to an easily measured output
voltage, which is proportional to the current through the measured path. When a current flow
through a wire or in a circuit, voltage drop occurs. Also, a magnetic field is generated
surrounding the current carrying conductor. Both of these phenomena are made use of in the
design of current sensors. Thus, there are two types of current sensing: direct and indirect.
Direct sensing is based on Ohm’s law, while indirect sensing is based on Faraday’s and
Ampere’s law. Direct Sensing involves measuring the voltage drop associated with the current
passing through passive electrical components. Indirect Sensing involves measurement of the
magnetic field surrounding a conductor through which current passes. Generated magnetic
field is then used to induce proportional voltage or current, which is then transformed to a
form suitable for measurement, and/or control system. The current consumed by the induction
motor is measured using the current transformer.
I. Current transformer

18 | P a g e
The CT is a type of instrument transformer that is designed to produce an alternating current
in its secondary winding which is proportional to the current being measured in its primary.
CT‟s used with Ammeters, Wattmeter’s, Relays, and Watt transducers enable indication and
control demand as well as monitor in all current loads with either an analog or digital
indicator. CT's are also used with Current Transducers to provide an analog process current
transformers (CT's) provide a simple, inexpensive and yet accurate means of sensing current
flow in power conductors. They are available in 3 basic configurations:
1.Ring Core CT's are available for measuring currents from 50 to 5000amps, with windows
(power conductor opening size) from 1" to 8"diameter.
2.Split Core CT's are available for measuring currents from 100 to 5000amps, with windows
in varying sizes from 1" by 2" to 13" by 30". Split core CT's have one end removable so that
the load conductor or bus bar does not have to be disconnected to install the CT.
3.Wound Primary CT's are designed to measure currents from 1 amp to 100 amps. Since the
load current passes through primary windings in the CT, screw terminals are provided for
the load and secondary conductors. Wound primary CT's are available in ratios from 2.5:5 to
100:5 (Models189 and 190 are examples of wound primary CT's). CT’s used with watt
transducers enable the owner to control demand as well as monitor building and/or tenant
power consumption. When CT's are used with Current Transducers, the result is an excellent
method of diagnosing the performance of fans, pumps, chillers, etc. Current Transducers
provide alarms for each motor so the owner is warned immediately of any abnormal
operating condition. Low pump flows will be alarmed if the strainer is dirty or the coupling
is broken. Low fan flows will be alarmed if filters are dirty, belts are slipping, or dampers
(fire, smoke, etc.) are closed. High motor loads will alarm if bearings are dry or worn, or
belts are out of alignment. CT's are designed to handle motor inrush currents, so no extra
precaution is needed to monitor motors. CT reduce high voltage currents to a much lower
value and provide a convenient way of safely monitoring the actual electrical current
flowing in an AC transmission line using a standard ammeter. Current transformer with
primary current 5Amps and rated secondary current of 1Amps is used. The measured
voltage and current are displayed in LCD. If the voltage and current exceeds the rated value,
the buzzer is used to indicate the overload condition of the motor. We have to consider 60W
load for our system so the current passing through the line is about 10A which is 60W 220V

19 | P a g e
ac induction motor. Therefore, I1=10A the output current is required to about 25mA
therefore by using equation 1 the turn ration is calculated.
𝑛 = 𝐼1/ 𝐼2 …………………………………………. (1)
= 10𝐴/25𝑚𝐴=400 𝑡𝑢𝑟𝑛𝑠
Some current transformers have a “split core” which allows it to be opened, installed, and
closed, without disconnecting the circuit to which they are attached. The steroidal current
transformer type which have one turn primary winding (N1=1) and secondary winding
400turns (N = 400).
The burden resister is about 35ohm which if the standard resister for lower current value so the
output voltage calculated using equation 2.
𝑉= I×R………………………………………………… (2)
𝑉2= 𝐼2×R
𝑉2= 25𝑚𝐴×35ohm=0.875v
Connections - Current Transformers
CT‟s with wound primaries always have their primary windings connected in series with the
line and the load and their secondary windings connected to the burden (the watt hour meter
current coil) as show below:

Current transformers having a center tapped secondary are referred to as a dual ratio CT.

20 | P a g e
Figure 3.10 Current sensing circuit
3.3.6 Relay
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. A type of relay that can handle the high power required to directly control an
electric motor or other loads is called a contractor. 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’. (Relay).
3.3.7 Relay deriver (transistor)
A Relay driver IC is an electro-magnetic switch that will be used whenever we want to use a
low voltage circuit to switch a light bulb ON and OFF which is connected to 220V mains
supply. The MOSFET and BJT are used as the driver and the basic function of the driver
circuit is to provide the necessary current to energize the relay coil. The required current to run
the relay coil `is more than can be supplied by various integrated circuits like Op-Amp, etc.
Relays have unique properties and are replaced with solid state switches that are strong than
solid-state devices. The output of most digital circuits and micro-processors is only five volts
at most a few mill-amps. Most electrical and electronic devices require voltages and currents
that will destroy digital circuits, so we must rely on what I'll broadly call driver circuits.
Above illustrates a digital output driving typical low-power fans. On this page we will look at
transistor driver circuits using both bipolar transistors and power MOSFETs and will use them
as electrical switches.

21 | P a g e
3.3.8 LCD (liquid crystal display)
A liquid crystal display (LCD) is a thin, flat panel used for electronically displaying
information such as text, images and moving pictures. Its uses include monitor for computers,
televisions, instrument panels gamin device etc. using polarization of light to display objects.
A typical liquid crystal producing degree shift in the polarization of the light passing through
when there is no electric field present. When a voltage is applied, an electric field is produced
in the liquid, affecting the orientation of the molecules. This causes the polarization shift to be
reduced. Liquid crystal material emits no light of their own. For illumination of light-backlight
and reflective method used. I. LCD pin description for interfacing with Arduino
Pin 1 (VSS): is a ground pin and it is certainly needed that this pin should be grounded for
LCD to work properly.
VEE and VDD: are given +5 volts normally. However, VEE may have a potentiometer
voltage divider network to get the contrast adjusted. But VDD is always at +5V.
RS, R/W and E: These three pins are numbered 4, 5 and 6 as shown above. RS is used to
make the selection between data and command register. For RS=0, command register is
selected and for RS=1 data register is selected. R/W gives us the choice between writing and
reading. If set (R/W=1) reading is enabled. R/W=0 when writing.
D0-D7: The 8-bit data pins, D0-D7, are used to send information to the LCD or read the
contents of LCD's internal register.

Figure 3.11 LCD and pin configuration


3.3.9 LED
A Light-Emitting-Diode (LED) is a P-N junction device (diode) that gives off light radiation
when biased in the forward direction. LED chip materials are combinations of elements from
the III and V columns of the periodic chart. The light emitting phenomenon makes use of the
recombination within the P-N junction instead of thermal radiation, therefore, LED’s is free of

22 | P a g e
waste and wear and can be expected to have a long life time. By controlling the forward
current, the radiant flux of the LED can be easily controlled. The response time of an LED is
very high (a few hundred nanoseconds) and can be pulsed at greater forward currents, to
obtain high intensity radiant peaks. The resin packaging of LED‟s allows for superb
mechanical integrity and can withstand dropping, vibration and shock. These semiconductor
devices can be mounted in any position. Just as it takes energy to generate a hole-electron pair,
energy is released when an electron recombines with a hole. If a forward current is passed
through a semiconductor diode, electrons and holes are injected into the P and N region
respectively. Depending on the magnitude of the current, are combination of charge carriers
(electron and holes) takes place when an electron falls from the conduction into the valence
band. In silicon and germanium when this recombination takes place, the surplus energy goes
into the crystal as heat. In other semiconductors, such as gallium arsenide, the released energy
appears in the form of electromagnetic radiation, ranging from visible to infrared. The
wavelength of this radiation is dependent on energy required to cause electrons to jump from
the conduction band to the valence band. A portion of the light generated within the LED is
unable to emerge due to internal absorption, Fresnel losses and internal reflection. Internal
absorption occurs as a photon is traveling from the junction region through the chip. Limiting
the range of this travel will reduce the internal absorption, thus smaller LED sizes will
manifest increased conversion efficiencies. Fresnel losses and internal reflection are
minimized by covering the LED chip with an optical coating material whose index of
refraction will bridge the indices of refraction between the chip and air. Light is concentrated
near the junction because most of the carriers are to be found within a diffusion length of the
junction. Since this junction extends to and is exposed on all four sides of the die, a
considerable amount of energy is emitted from the sides as well as the top surface. Typically,
the LED chip is mounted in a conical cavity to reflect the side emitting energy forward.
3.3.10 Motor
The three-phase induction motor, also called an asynchronous motor, is the MOs commonly
used type of motor in industrial applications. In particular, the squirrel- cage design is the most
widely used electric motor in industrial applications.
Principles of Operation

23 | P a g e
The electrical section of the three-phase induction motor consists of the fixed stator or frame, a
three-phase winding supplied from the three-phase mains and a turning rotor. There is no
electrical connection between the stator and the rotor. The currents in the rotor are induced via
the air gap from the stator side. Stator and rotor are made of highly magnetaizable core sheet
providing low eddy current and hysteresis losses.
I. Stator
The stator winding consists of three individual windings which overlap one another and are
offset by an electrical angle of 120°. When it is connected to the power supply, the incoming
current will first magnetize the stator. This magnetizing current get for the smallest pole
number of 2p = 2 in a 50 Hz circuit the highest synchronous rates a rotary field which turns
with synchronous speed ns.

II. Rotor
The rotor in induction machines with squirrel-cage rotors consists of a slotted cylindrical rotor
core sheet package with aluminum bars which are joined at the front by rings to form a closed
cage. The rotor of three-phase induction motors sometimes is also referred to as an anchor.
The reason for this name is the anchor shape of the rotors used in very early electrical devices.
In electrical equipment the anchor's winding would be induced by the magnetic field, whereas
the rotor takes this role in three-phase induction motors.
Table 3.1 typical synchronous speeds in a 50 Hz circuit

The stopped induction motor acts like a transformer shorted on the secondary side. The stator
winding thus corresponds to the primary winding, the rotor winding (cage winding) to the
secondary winding. Because it is shorted, its internal rotor current is dependent on the induced
voltage and its resistance. The interaction between the magnetic flux and the current
conductors in the rotor generates a torque that corresponds to the rotation of the rotary field.
The cage bars are arranged in an offset pattern to the axis of rotation in order to prevent torque
fluctuation. This is called "skew". At idle the rotor almost reaches the synchronous speed of

24 | P a g e
the rotary field, since only a small counter-torque (no-load losses) is present. If it were to turn
exactly synchronously, voltage would no longer be induced, current would cease to flow, and
there would no longer be any torque. III. Slip
The difference between the synchronous speed ns and the speed n in rated operation is called
slip s and is generally expressed in percent. Depending on the size of the machine, in rated
operation it is roughly 10 to 3%. Slip is one of the most important characteristics of an
induction machine.

The induced rotor voltage UR is proportional to the slip s. In the stopped position, it peaks at n
= 1 and s = 1, which also results in the strongest current flow. This fact is confirmed in real-
life applications by the high starting current (starting current inrush). The torque also peaks
during the stop period at a certain rotor resistance. This behavior can be modified by design
variation. However, the rotor resistance is not usually used for this purpose. The following
formula applies to the rotor speed:

3.4. FLOW CHART


Ardiuno and overload relay can act as the brain of the induction motor protection system. It
will receive the desired voltage from the regulator (7805). An algorithm has to be developed
to make the microcontroller to read the input and respond accordingly. Therefore, the
algorithm is established and represented by a flow chart in fig12. These flow charts translated
into C language and compiled ARDIUNO, the software development tool. The program in C
language can be referred in appendix A.

25 | P a g e
Figure 3.12 flow chart

26 | P a g e
3.5 SCHEMATIC DIAGRAM OF THE SYSTEM

Figure 3.13 schematic diagram


Working principals of the system
As designed the circuit section consists of Arduino UNO microcontroller, step down
transformer circuit for voltage sensing, current sensing circuit, relay circuits, and a
temperature sensor. The step down transformer output been rectified and filtered to a pure dc
which goes directly to Ardiuno microcontroller analog pin for monitoring the load voltage.
For the purpose of current sensing, a current transformer was used for that purpose. It passes
through rectification and filtering process then directly connected to the microcontroller
analog pin for monitoring the load current. The motor temperature sensor is used to sense the
motor winding temperature and the sensor output pass through the conditional circuit which
goes directly to Ardiuno microcontroller.
The Ardiuno microcontrollers send the monitored parameters to LCD. While monitoring the
parameters, whenever a fault occurs which might be high voltage or over current, the Ardiuno

27 | P a g e
microcontroller sends a trip signal to the relay and thereby protecting the motor from
damaging. The temperature of the induction motor is protection by varying the LM35 applied
to the motor the temperature of the motor is varied. The ON time and OFF time of the
temperature waveform can be varied. If the temperature increases the ON time of the
waveform is increased and OFF time is decreased. LED Shows the overload alert of the
induction motor. If a current exceeds the rated current the overload alert will be displayed in
LCD display. The relay circuit will turn on the LED to indicate the overload condition of the
motor.

28 | P a g e
CHAPTER FOUR

4. RESULT AND DISCUSSION

This chapter discusses about the simulation results of the induction motor monitoring and
protection system. In the Fig below represents the complete view of the Proteus Software
implementation of the induction motor monitoring and protection system. The temperature of the
motor windings is measured using LM35 temperature sensor. The current transformer detects
current rating of induction motor and voltage transformer detects voltage rating of the induction
motor and it can be displayed in LCD display and it is also displayed in virtual terminal.
4.1 PROTEUS VSM
We simulate the prototype in Proteus. Proteus Virtual System Modeling (VSM) combines mixed
mode SPICE circuit simulation, animated components and microprocessor models to facilitate
co-simulation of complete microcontroller based designs. Proteus VSM uses our proven
Schematic Capture software to provide the environment for design entry and development.
Proteus capture is a long established product and combines ease of use with powerful editing
tools. It is capable of supporting schematic capture for simulation. The Proteus schematic capture
module also provides a very high degree of control over the drawing appearance. These
capabilities are used to the full in providing the graphics necessary for circuit animation. The
Proteus design enables us to progress in our project more rapid, giving us the ability to make
hardware or software changes which reduces hardware and software troubleshooting problems.
The project was built and tested in Proteus just by using the software prototype components
without using the physical hardware prototype. [8] Therefore, using Proteus software, the
voltage sensing circuit, current sensing circuit, temperature sensor, relays, LED‟s, LCD display
and serial communication were all developed and tested.

29 | P a g e
4.2 SIMULATION RESULT OF THE SYSTEM

Figure 4.14 circuit diagram

30 | P a g e
CHAPTER FIVE

5. CONCULUSION AND RECUMMENDATION

5.1. CONCULUSION
The utilization of induction motors becomes very popular when compared to other motors for
many of the industries. In this project, induction motor monitor and protection using a Ardiuno
microcontroller is proposed. For motor voltage and current sensing circuits were designed and
the results have been verified with protues simulation. The project we have undertaken has
helped us to gain a better perspective on various aspects related to our course of study as well as
practical knowledge of induction motor. The system developed is capable to perform such
operations as running the motor, stopping it, measuring, monitoring and protection the most
parameters of the motor like phase currents, phase voltages, winding temperature, basic
parameters of the induction motors were examined. The system achieved can be used for
industrial applications. All of these values can be transferred and displayed on the LCD. The
system is very cheap as compared to present protective devices available. The protection system
can protect induction motor from under voltage, over voltage, over current and unbalance
voltages. The Ardiuno microcontroller which are used in protection Systems are easily available
in the market and can be also used to large protection system. This makes it possible for the
operators to take the proper action which leads to proper operation of the induction motor.
Therefore, the aim and objectives of the project were achieved successfully and project is said to
be industrious.
5.2 RECOMMENDATION
Any work and investigation on induction motor protection is very advantageous. At present time,
usage of induction motor is common in industry. Therefore, increasing demand of induction
motor and these will lead to demands of highly sophisticated protection devices, which will be
incorporated in induction motor protection schemes. The practical applications of this project are
immense and can have vast level of implementation. It can be implemented in a large scale to
encompass the entire induction motor in industrial plant by using a data base system. Based on
the work done in this project which protecting induction motor using microcontroller, some
improvements need to be made in the future work.
We are going forward to implement the project in real time applications.

31 | P a g e
The automatic efficiency and power factor of the induction motor should be calculated to
improve the performance of the Induction motor.
Induction motor parameters (values) in the industries should be monitored and updated in
industrial website through personal computer for providing the easy maintenance. So this
is not the end of the project but rather is a step towards exploring other possibilities that it
brings with it. We feel very happy to work in such a challenging project which has
tremendous application and possibilities.

32 | P a g e
REFERENCES

33 | P a g e
APPENDIX
Source code
#include <LiquidCrystal.h>
#include <SoftwareSerial.h>
// initialize the library with the numbers of the interface pins
LiquidCrystallcd(12, 11, 5, 4, 3, 2);
//declare
variables
floatVoltOut;
float SD; float
I;
floatfanspeed;
floattempC;
float volt; float
curt;
intvoltOut;
float speed;
float D; float
current; float
T; float V;
intspeedlPin;
inttempPin=4;
intfanSpeed;
intvoltPin=1;
int temp;
intfanLCD;
int fan = 13;
// the pin
where fan is

34 | P a g e
int led = 8;
// led pin
intcurtPin=0;
int
speed1Pin=2;
intspeedMax
=60;
inttempMin =
20; // the
temperature to
start the fan
inttempMax =
40;// the
maximum
temperature
when fan is at
100%
intvoltMax=23
0;
intvoltMin=20
0;
intcurtMax=16
;
intcurtMin=2;
floattreshold=
5; void setup()
{ // set up the
LCD's number
of columns
and rows:

35 | P a g e
pinMode(fan, OUTPUT);
pinMode(led, OUTPUT);
lcd.begin(16, 4);
lcd.print("T=");
lcd.setCursor(0, 1);
lcd.print("V=");
lcd.setCursor(9, 0);
lcd.print("I=");
lcd.setCursor(9, 1);
lcd.print("S=");
Serial.begin(9600);
}
void loop()
{ intmytemp [5];
floatavrtemp=0; for
(int i=0; i<= 4; i++)
{
mytemp [i]=analogRead(tempPin);
delay(10);
}
avrtemp=(mytemp [0]+mytemp [1]+mytemp [2]+mytemp [3]+mytemp [4])/5;
tempC = (5*avrtemp*100)/1023;
T = analogRead(tempPin); //read the value from the sensor
V =
analogRead(voltPin);
I=
analogRead(curtPin);
intmyVolt [5];
floatavrVolt=0; for
(int i=0; i<= 4; i++)

36 | P a g e
{ myVolt
[i]=analogRead(voltPin);
delay(10);
}
avrVolt=(myVolt [0]+myVolt [1]+myVolt [2]+myVolt [3]+myVolt [4])/5;
SD = analogRead(speedlPin);
VoltOut = (5*avrVolt*46)/1023;
curt= (5*I)/1023;
current=(5*I*4)/1023;
speed=(5*SD*15)/1023;
D=(5*SD)/1023;
// print result to lcd display
lcd.setCursor(2, 0);
lcd.print(tempC,1);
lcd.print("C");
lcd.setCursor(11, 0);
lcd.print(current,1);
lcd.print("A");
lcd.setCursor(2, 1);
lcd.print(VoltOut,1);
lcd.print("V");
lcd.setCursor(11, 1);
lcd.print(speed,1);
lcd.print("rpm");
if(VoltOut>voltMax)
{ delay(5);
lcd.print("OVER VOLTAGE ");
delay(5);
}
if(VoltOut<voltMin)
{ delay(5);

37 | P a g e
lcd.print("UNDER VOLTAGE");
delay(5);
}
if(VoltOut>voltMax) { // if voltOut is higher than
voltMax fanspeed =0; //fan is not running
digitalWrite(fan,HIGH);
}
if(VoltOut<voltMin) { // if voltOut is lower than
VoltMin fanspeed = 0; // fan is not running
digitalWrite(fan,LOW);
}
if(current >curtMax)
{ delay
(5);

lcd.print(" OVER CURRENT ");


delay(5);
}
if(current<curtMin)
{ delay(5);
lcd.print("UNDER CURRENT");
delay(5);
}
if(curt >curtMax) { // if curt is higher than maximum
current fanspeed=255; // fan is not running
digitalWrite(fan,HIGH);
}
if(curt <curtMin) { // if curt is lower than minimum current fanSpeed = 32; // fan is not running
digitalWrite(fan ,LOW);
}
if(tempC>tempMax)

38 | P a g e
{
delay(5);
lcd.print(" HIGH TEMPRATURE ");
delay(5);
}
if(tempC<tempMin)
{ delay(5);
lcd.print("LOW TEMRATURE");
delay(5);
}
if(tempC<tempMin) { // if temp is lower than minimum
temp fanSpeed = 0; // fan is not spinning
digitalWrite(fan, LOW);
}
if((tempC>= tempMin) && (tempC<= tempMax)) { // if temperature is higher than minimum
temp fanSpeed = map(tempC, tempMin, tempMax, 32, 255); // the actual speed of fan
fanLCD = map(tempC, tempMin, tempMax, 0, 100); // speed of fan to display on LCD
analogWrite(fan, fanSpeed); // spin the fan at the fanSpeed speed
}
if(tempC>tempMax) { // if temp is higer than maximum
temp fanSpeed = 0; // fan is not spinning
digitalWrite(fan, LOW);
}
if(tempC>tempMax) { // if temp is higher than tempMax
digitalWrite(led, HIGH); // turn on led
} else { // else turn
of led
digitalWrite(led, LOW);
}
if(curt>curtMax) { // if curt is hiher than curtMax
digitalWrite(led, HIGH); // turn on led

39 | P a g e
} else { // else
turn of led
}
if(VoltOut>voltMax) { // if voltout is higher than voltMax
digitalWrite(led, HIGH); // turn on led
} else { // else
turn of led digitalWrite(led,
LOW);
}
if(speed >60)
{ lcd.print("the speed over");
delay(5);
}
if(speed>speedMax) { // if speed is higher than speedMax
digitalWrite(led,HIGH); //turn onled
} else { //else
turn off
}
}

40 | P a g e
41 | P a g e
42 | P a g e
43 | P a g e

You might also like