A Project Report On: A Proto Type of An Arduino-Based Protection System To Overcome Voltage Fluctuations
A Project Report On: A Proto Type of An Arduino-Based Protection System To Overcome Voltage Fluctuations
on
A PROTO TYPE OF AN ARDUINO-BASED
PROTECTION
SYSTEM TO OVERCOME VOLTAGE FLUCTUATIONS
Submitted to
By
Ms.B.POSINA,B.Tech,Lecturer.
DIPLOMAINELECTRICALANDELECTRONICSENGINEERING
SREEVIDYANIKETHANENGINEERINGCOLLEGE
(2NDSHIFTPOLYTECHNIC)
A.RANGAMPET,TIRUPATI–517102
2023-2024
[AUTONOMOUS]
2 ShiftPolytechnic,
nd
CERTIFICATE
This is to certify that project work entitled “A PROTOTYPE OF AN ARDUINO-BASED
PROTECTION SYSTEM TOO VERCOME VOLTAGE FLUCTUATIONS”is the bonafide work
done by the following Students of Diploma in Electrical and Electronics Engineering, Sree Vidyanikethan
Engineering College,2ndShiftPolytechnic,A.Rangampet and is submitted to StateBoard of Technical
Education and Training,Vijayawada,A.P in partial fulfillment of requirement of award of the degree in
DIPLOMA IN ELECTRICAL AND ELECTRONICS ENGINEERING ENGINEERING during
the academic yea r2023-24.
Ms.B.POSINA,B.Tech, Dr.P.UMAPATHIREDDY,M.Tech,Ph.D,MISTE,MISCA,
Lecturer Professor&VICEPRINCIPAL
2ndShift Polytechnic, 2ndShiftPolytechnic,
Sree Vidyanikethan Engineering College, Sree Vidyanikethan Engineering College,
A.Rangampet. A.Rangampet.
Submitted for the Project Viva-Voce held on
(Affiliated to SBTET,Vijayawada,A.P)
A.Rangampet,Tirupati,AndhraPradesh-
517102, 2022-23
DIPLOMA IN E L E C T R I C A L A N D ELECTRONICS
ENGINEERING
DECLARATION
We are hereby declare that the work described in this project entitled “A PROTOTYPE OF AN
ARDUINO-BASED PROTECTION SYSTEM TO OVERCOME VOLTAGE FLUCTUATIONS
“ submitted in partial fulfillment for the award of Diploma in Electrical and Electronics
Engineering, Sree Vidyanikethan Engineering College, 2nd Shift Polytechnic, A.Rangampet, has
not been submitted to anycoursesor university for any degree/diploma/associateship/fellowship
or for any other considerations.
ACKNOWLEDGEMENT
We owe our gratitude to our principal Dr. B.M.SATISH KUMAR for permitting us to
use the facilities available to accomplish the project successfully.
Vice Principal, 2ndShift Polytechnic for his kind attention and valuable guidance to us througt
Course.
We also thank all the teaching and non-teaching staff of 2nd Shift Polytechnic, Sree
Vidyanikethan Engineering College.
A PROTO TYPE OF AN ARDUINO-BASED PROTECTION SYSTEM
TO OVERCOME VOLTAGE FLUCTUATIONS
Abstract:
Poor quality of power supply can often cause power surges, spikes and voltage fluctuations
which causing flickering lights, failure of household electrical devices, interference of TV
reception, etc. This problem needs the protection system immediately. Otherwise, that can break
the function and utility of electronic devices. Therefore, this project presents an Arduino-based
protection system that might be able to protect home devices from voltage fluctuations either
caused by under or over voltage issues. This simple prototype is consisted of two parts: DC
power supply and protection device. AC powersource is downscaledinto DC voltagewhich will
deliver the electricity to the protection device so that the Arduino will be ready to send the signal
to LCD to show the value of load and voltage. This project makes use of DC variable regulatorto
quickly simulate the fluctuation of AC source after it is rectified.
INTRODUCTION
Recent year one major problem in industry as well as house hold is sudden over voltage or under
voltage which results damage the equipment. Electronic based load increases day by day in
household as well as industrial application and they are very sensitive to voltage variation. In this
project, focus the protect the equipment in case of over voltage or under voltage and the study of
over voltage and under voltage, various power quality issues.
User interface
Embeddedsyste
m
Software Hardware
Inputs
Output
Fig:Overviewofembeddedsystem
Embeddedsystem:
Embeddedsystemincludesmainlytwosections,theyare
1. Hardware
2. Software
Inputdevicesinterfacing
and driver circuits
Timers Memory
Power
Applicatio
supplyand
n
specific
Blockdiagramof embeddedsystem
EmbeddedSystemHardware:
Power Supply
Processor
Memory
Timers
Serialcommunication ports
Output/Output circuits
Systemapplicationspecific circuits
Embeddedsystemsusedifferentprocessorsforitsdesiredoperation.Someoftheprocessors used are
1. Microprocessor
2. Microcontroller
3. Digitalsignal processor
Microprocessorvs.Microcontroller Microprocessor
• CPUon achip.
• WecanattachrequiredamountofROM,RAMandI/Oports.
• Expensivedueto external peripherals.
• Largeinsize
• general-purpose
Microcontroller
• Computeronachip
• fixedamountofon-chipROM,RAM,I/Oports
• Lowcost.
• Compactinsize.
• Specific–purpose
EmbeddedSystemSoftware:
Availabilityofsystemmemory
Availabilityofprocessor’sspeed
Whenthesystemrunscontinuously,thereisaneedtolimitpowerdissipationforevents like
stop, run and wake up.
Bringingsoftwareandhardwaretogetherforembedded system:
To make software to work with embedded systems we need to bring software and
hardware together .for this purpose we need to burn our source code into microprocessor or
microcontrollerwhichis ahardwarecomponentandwhichtakescareofalloperationstobedone by
embedded system according to our code.
The result of the final step is a file containing an executable binary image that is ready to run on
the embedded system.
Sourcecode
Assembler
Linker
Locator
Executablefile
Processor
Applications:
Embeddedsystemshavedifferentapplications.Afewselect applicationsofembeddedsystemsare
smart cards, telecommunications, satellites, missiles, digital consumer electronics, computer
networking, etc.
EmbeddedSystemsin Automobiles
EmbeddedsystemsinTelecommunications
Mobile computing
Networking
Wireless Communications
EmbeddedSystemsinSmartCards
Banking
Telephone
Security Systems
Implementationflow:
Stage1:
Consideringtheproblemsofexistingmethodsandgivingsolutiontothatproblembyconsidering the
basic requirements for our proposed system
Stage2:
Consideringthehardwarerequirementfortheproposedsystem For
1. Microcontroller
2. Inputsfortheproposedsystem(ex:sensors,driversetc..,)
3. Outputs(ex:relays,loads)
Stage 3:
After considering hardware requirements, now we need to check out the software requirements.
Based on the microcontroller we select there exists different software for coding, compiling,
debugging.
weneedtowritesourcecodeforthatproposedsystembasedonourrequirementsandcompile,debugthe code in
that software .
After completing all the requirements of software and hardware we need to bring both together
to workoursystem.Forthisweneedtoburnoursourcecodeintomicrocontroller,afterburningoursource code
to microcontroller then connect all input and output modules as per our requirement.
LITERATURE SURVEY
Bayindir R., discussed about fault detection and load protection with sensors which protects
the devices from under voltage and over voltage faults with the use of sensors. The sensors
detectthe faults and cut the supply from the supply mains. According to the authors, the ability
of protection system is demanded not only for economic reason but for expert and reliable
service.
Ponnle A. A, Omojoyegbe M. O., presented a low cost under voltage and over current
protection device with a micro controller. The main purpose of the device is to isolate the load
from over voltage and under voltage conditions by controlling the relay tripping coil using a PIC
micro controller.Themicrocontrollerwillcomparethesupplyvoltagewiththedesiredpre-setvoltage
and will operate the tripping coil in the relay if the input voltage falls below or above the pre-set
range of values. The design and the programming was simulated several times on Proteus
software until the code for the design worked satisfactorily before the final programming of the
microcontroller and assembly of the components. The type of programmer used for the
microcontroller is a USB programmer, and the programming code used is compiler CCS. The
programming of the microcontroller was done by first writing the program code in C#, after
which it was compiled using the CCS compiler; then later the hex file was burned to the PIC
through the USB programmer. The device is well calibrated and manually tested. The preset was
set at the voltage 200-240 volts.
Girish Chandra Thakur, presented a research paper on “Implementation of Single Phasing, Over
Voltage, Under Voltage, and Protection of Three Phase Appliances without Using
Microcontroller”. This paper tends to develop for protection for costly appliances which require
three-phase AC supply for operation. Failure of any of the phases or sudden change in voltage
makes the appliance prone to erratic functioning and may even lead to failure. Hence it is of
paramount importance to monitor the availability of the three-phase supply and proper voltage
supply and switch off the appliance in the event of failure of one or two phases or if required
voltage level is not available. The power to the appliance should resume with the availability of
all phases of the supply with proper voltage level. The main advantage of this protector circuit is
that it protects three-phase appliances from failure of any phase as well as from fluctuation of
voltage. The concept in future can be extended to developing a mechanism to send message tothe
authority via SMS by interfacing GSM modem.
EXISTINGSYSTEM
In the last few decades power quality has become an important issue since many equipment's
are semiconductor based and controlling is done with power electronic equipment's. All the
equipment's were heating, lighting and motors, which were not very sensitive to voltage
variation. In the past the term reliability and quality were same as because there were no power
electronic equipment's and all the equipment's were linear in nature Causes of Power Quality
Problem.
Drawbacks:
• Operationofnon-linear andunbalancedloads
• Lightningandnaturalphenomena,
PROPOSEDSYSTEM
In this project we are showing over and under voltage protection of loads. Here we are
connecting potentiometer to voltage sensor and the sensor is connected to load as well as the
output pin of the sensor is connected to Arduino. Then by using potentiometer we will vary
voltage. Based on the voltage values we will show over voltage and under voltage. The bulb will
turn OFF when the voltage is over or under voltages and also Buzzer will give alerts.
Block Diagram:
PowerSupply
VoltageSensor
Arduino Buzzer
LCD
Potentiometer
Relay Light
HARDWAREREQUIREMENTS
Arduino:
Arduino Uno is a very valuable addition in the electronics that consists of USB interface, 14
digital I/O pins, 6 analog pins, and Atmega328 microcontroller. It also supports serial
communication using Tx and Rx pins.
There are many versions of Arduinoboards introduced in the market like Arduino Uno, Arduino
Due, Arduino Leonardo, Arduino Mega, however, most common versions are Arduino Uno and
Arduino Mega. If you are planning to create a project relating to digital electronics, embedded
system, robotics, or IoT, then using Arduino Uno would be the best, easy and most economical
option.
It is an open-source platform, means the boards and software are readily available and anyone
can modify and optimize the boards for better functionality.
The software used for Arduino devices is called IDE (Integrated Development Environment)
which is free to use and required some basic skills to learn it. It can be programmed using C and
C++ language.
Some people get confused between Microcontroller and Arduino. While former is just an on
system 40 pin chip that comeswith abuilt-in microprocessorand lateris a boardthat comeswith the
microcontroller in the base of the board, bootloader and allows easy access to input-output pins
and makes uploading or burning of the program very easy.
Whilelearningmicrocontrollerrequiressomeexpertiseand skills.
IntroductiontoArduino
FeaturesofArduino
Arduino Uno comes with USB interface i.e. USB port is added on the board to
developserial communication with the computer.
Atmega328microcontroller is placed on the board that comes with a number of features
like timers, counters, interrupts, PWM, CPU, I/O pins and based on a 16MHz clock that
helps in producing more frequency and number of instructions per cycle.
It is an open source platform where anyone can modify and optimize the board based on the
number of instructions and task they want to achieve.
This board comes with a built-in regulation feature which keeps the voltage under control
when the device is connected to the external device.
Reset pin is added in the board that reset the whole board and takes the running program
intheinitialstage.Thispinisusefulwhenboardhangsupinthemiddleoftherunningprogram; pushing
this pin will clear everything up in the program and starts the program right from the
beginning.
There are 14 I/O digital and 6 analog pins incorporated in the board that allows the external
connection with any circuit with the board. These pins provide the flexibility and ease of use
to the external devices that can be connected through these pins. There is no hard and fast
interfacerequiredto connectthedevicesto theboard.Simplyplugtheexternaldeviceintothe pins of
the board that are laid out on the board in the form of the header.
The 6 analog pins are marked as A0 to A5 and come with a resolution of 10bits. These pins
measurefrom0to5V,however,theycanbeconfiguredtothehighrangeusing analogReference()
function and AREF pin.
13KBof flashmemory isusedto storethenumberofinstructions inthe formof code.
Only 5 V is required to turn the board on, which can be achieved directly using USB port or
external adopter, however, it can support external power source up to 12 V which can be
regulated and limit to 5 V or 3.3 V based on the requirement of the project.
ArduinoPinout
Arduino Uno is based on AVR microcontroller called Atmega328. This controller comes
with2KBSRAM,32KBofflashmemory,1KBof EEPROM.ArduinoBoardcomeswith 14
digital pins and 6 analog pins. ON-chip ADC is used to sample these pins. A 16 MHz
frequency crystal oscillator is equipped on the board. Following figure shows the pinout
of the Arduino Uno Board
Pin Description:
There are several I/O digital and analog pins placed on the board which operates at 5V. These
pins come with standard operating ratings ranging between 20mA to 40mA. Internal pull-up
resistors are used in the board that limits the current exceeding from the given operating
conditions.However, toomuchincreasein currentmakesthese resistersuselessanddamagesthe
device.
LED.Arduino Uno comes with built-in LED which is connected through pin 13. Providing
HIGH value to the pin will turn it ON and LOW will turn it OFF.
Vin.It is the input voltage provided to the Arduino Board. It is different than 5 V supplied
through a USB port. This pin is used to supply voltage. If a voltage is provided through power
jack, it can be accessed through this pin.
5V.This board comes with the ability to provide voltage regulation. 5V pin is used to provide
outputregulated voltage. The board is powered up using three ways i.e. USB, Vin pin of the
board or DC power jack.
USB supports voltage around 5V while Vin and Power Jack support a voltage ranges between7V
to 20V. It is recommended to operate the board on 5V. It is important to note that, if avoltage is
supplied through 5V or 3.3V pins, they result in bypassing the voltage regulation that can
damage the board if voltage surpasses from its limit.
GND.Thesearegroundpins.Morethanonegroundpinsareprovidedontheboardwhichcanbe used as
per requirement.
Reset.This pin is incorporated on the board which resets the program running on the board.
Instead of physical reset on the board, IDE comes with a feature of resetting the board through
programming.
IOREF.This pin is very useful for providing voltage reference to the board. A shield is used to
read the voltage across this pin which then select the proper power source.
PWM.PWM is provided by 3, 5, 6,9,10, 11pins. These pins are configured to provide 8-bit
output PWM.
SPI.It is known as Serial Peripheral Interface. Four pins 10(SS), 11(MOSI), 12(MISO), 13(SCK)
provide SPI communication with the help of SPI library.
AREF. It is called Analog Reference. This pin is used for providing a reference voltage to the
analog inputs.
TWI.It is called Two-wire Interface. TWIcommunication is accessed through WireLibrary. A4
and A5 pins are used for this purpose.
Serial Communication.Serial communication is carried out through two pins called Pin 0 (Rx)
and Pin 1 (Tx).
Rxpinis usedto receive data whileTxpin isusedtotransmit data.
External Interrupts.Pin 2 and 3 are used for providing external interrupts. An interrupt iscalled
by providing LOW or changing value.
ArduinoUnoTechnicalSpecifications
OperatingVoltage 5V
RecommendedInputVoltage 7-12V
DCCurrenton I/OPins 40 mA
DCCurrenton3.3V Pin 50 mA
SRAM 2 KB
EEPROM 1 KB
Communicationand Programming:
Arduino Uno comes with an ability of interfacing with other other Arduino boards,
microcontrollers and computer. The Atmega328 placed on the board provides serial
communication using pins like Rx and Tx.
The Atmega16U2 incorporated on the board provides a pathway for serial communication using
USB com drivers. Serial monitor is provided on the IDE software which is used to send or
receive text data from the board. If LEDs placed on the Rx and Tx pins will flash, they indicate
the transmission of data.
Arduino Uno is programmed using Arduino Software which a cross-platform application called
IDE is written in Java. The AVR microcontroller Atmega328 laid out on the base comes with
built-in boot loader that sets you free from using a separate burner to upload the program on the
board.
Applications:
Arduino Uno comes with a wide range of applications. A larger number of people are using
Arduinoboardsfordevelopingsensorsandinstrumentsthatareusedinscientific research. Following
are some main applications of the board.
EmbeddedSystem
SecurityandDefense System
DigitalElectronicsandRobotics
ParkingLot Counter
Weighing Machines
TrafficLight CountDown Timer
MedicalInstrument
EmergencyLightforRailways
HomeAutomation
IndustrialAutomation
There are a lot of other microcontrollers available in the market that are more powerful andcheap
as compared to Arduino board. So, why you prefer Arduino Uno?
Actually, Arduino comes with a big community that is developing and sharing the knowledge
with a wide range of audience. Quick support is available pertaining to technical aspects of any
electronic project. When you decide Arduino board over other controllers, you don’t need to
arrange extra peripherals and devices as most of the functions are readily available on the board
that makes your project economical in nature and free from a lot of technical expertise.
LCD:
LCD (Liquid Crystal Display) is the innovation utilized in scratch pad shows and other littler
PCs. Like innovation for light-producing diode (LED) and gas-plasma, LCDs permit
presentations to be a lot more slender than innovation for cathode beam tube (CRT). LCDs
expend considerably less power than LED shows and gas shows since they work as opposed to
emanating it on the guideline of blocking light.
A LCD is either made with a uninvolved lattice or a showcase network for dynamic framework
show. Likewise alluded to as a meager film transistor (TFT) show is the dynamic framework
LCD. The uninvolved LCD lattice has a matrix of conductors at every crossing point of the
network with pixels. Two conductors on the lattice send a current to control the light for any
pixel. A functioning framework has a transistor situated at every pixel crossing point, requiring
less current to control the luminance of a pixel.
Some aloof network LCD's have double filtering, which implies they examine the matrix twice
withcurrentinthemeantimeasthefirstinnovationtookonesweep.Dynamiclattice,bethatasit may, is as
yet a higher innovation.
A 16x2 LCD show is an essential module that is generally utilized in various gadgets and
circuits. These modules more than seven sections and other multi fragment LEDs are liked. The
reasons being: LCDs are affordable; effectively programmable; have no restriction of showing
exceptional and even custom characters (not at all like in seven fragments), movements, etc.
A 16x2 LCD implies 16 characters can be shown per line and 2 such lines exist. Each characteris
shown in a lattice of 5x7 pixels in this LCD. There are two registers in this LCD, in particular
Command and Data.
The directions given to the LCD are put away by the order register. An order is a direction given
to LCD to play out a predefined assignment, for example, introducing it, clearing its screen,
setting the situation of the cursor, controlling presentation, and so forth. The information register
will store the information that will be shown on the LCD. The information is the character's
ASCII incentive to show on the LCD.
Data/Signals/ExecutionofLCD
Nowthat was all aboutthesignals and thehardware. Let us cometo data,signals and execution.
Two types of signals are accepted by LCD, one is data and one is control. The LCD module
recognizes thesesignals from theRS pinstatus. By pulling theR/ Wpin high, datacan nowalso be
read from the LCD display. Once the E pin has been pulsed, the LCD display reads and executes
data at the falling edge of the pulse, the same for the transmission case.
It takes 39-43μS for the LCD display to place a character or execute a command. It takes 1.53ms
to 1.64ms except for clearing display and searching for cursor to the home position.
Anyattempt to send data beforethis interval may result in failurein some devices to read data or
execute the current data. Some devices compensate for the speed by storing some temporary
registers with incoming data.
There are two RAMs for LCD displays, namely DDRAM and CGRAM. DDRAM registers the
position in which the character would be displayed in the ASCII chart. Each DDRAM byte
represents every single position on the display of the LCD.
The DDRAM information is read by the LCD controller and displayed on the LCD screen.
CGRAM enables users to define their personalized characters. Address space is reserved for
users for the first 16 ASCII characters.
Users can easily display their custom characters on the LCD screen after CGRAM has been set
up to display characters.
ImagesofLCDDisplay:-
LCD–Front View
Pin Diagram:
Pin Description:
Pin No Function Name
1 Ground(0V) Ground
2 Supplyvoltage;5V(4.7V– 5.3V) Vcc
3 Contrastadjustment; throughavariableresistor VEE
RS(Registerselect)
A 16X2 LCD has two order and information registers. The determination of the register is
utilized to change starting with one register then onto the next. RS=0 for the register of
directions, while RS=1 for the register of information.
CommandRegister
The guidelines given to the LCD are put away by the direction register. An order is a direction
given to LCD to play out a predefined assignment, for example, instating it, clearing its screen,
setting the situation of the cursor, controlling showcase, and so on. Order preparing happens in
the direction register.
DataRegister:
The information register will store the information that will be shown on the LCD. The
information is the character's ASCII incentive to show on the LCD. It goes to the information
register and is prepared there when we send information to the LCD. While choosing RS=1, the
information register.
As stated, the LCD itself comprises of an interface IC. This interface IC can be perused or
composed by the MCU. A large portion of the occasions we're simply going to keep in touchwith
the IC since perusing will make it increasingly perplexing and situations like that are
exceptionally uncommon.Information such as cursor position, status completion interrupts, etc.
can be read if necessary.
LCDCommands:
TherearesomepresetcommandsintheLCDthatweneedtosendtotheLCDviasomemicrocontroller. The
following are some important command instructions:
1 01 Cleardisplayscreen
2 02 Returnhome
3 04 Decrementcursor(shiftcursorto left)
4 06 Incrementcursor (shiftcursortoright)
5 05 Shift display right
6 07 Shiftdisplay left
7 08 Displayoff,cursoroff
8 0A Displayoff,cursoron
9 0C Displayon,cursoroff
10 0E Displayon,cursor blinking
11 0F Displayon,cursor blinking
12 10 Shiftcursorposition to left
13 14 Shiftcursorposition to right
14 18 Shifttheentiredisplayto theleft
15 1C Shifttheentiredisplayto theright
16 80 Forcecursortobeginning(1st line)
17 C0 Forcecursortobeginning(2nd line)
18 38 2linesand5×7 matrix
CommandcodesforLCD
The LCD can work in two striking modes, the 4-bit mode and the 8-bit mode. We send the
information snack through snack in 4 bit mode, first upper chomp, by then lower snack.
Forthoseofyou whodon't havethefoggiest ideawhat agoody is: achomp isafour-piecegathering, so
a byte's lower four bits (D0-D3) are the lower snack, while a byte's upper four bits (D4-D7) are
the higher snack. This enables us to send 8 bit data. This connects with us to send 8 bit data.
Whereas in 8 bit mode we can send the 8-bit information truly in one stroke since we utilize all
the 8 information lines. You need to get it now; yes 8-bit mode is quicker and immaculate than4-
bit mode. In any case, the fundamental shortcoming is that it needs 8 microcontroller-related
information lines. This will result in our MCU coming up short on I/O pins, so 4-bit mode is
extensively utilized. To set these modes, no control pins are used.
Relay:
Whatisarelay?
A relayisan electromagnetic switchthat is usedtoturn on and turnoff acircuit by alow power signal, or
where several circuits must be controlled by one signal.
Most of the high end industrial application devices have relays for their effective
working.Relaysaresimpleswitcheswhichareoperatedbothelectricallyandmechanically.Relaysconsi
st of an electromagnet and also a set of contacts. The switching mechanism is carried out with
the help of the electromagnet. There are also other operating principles for its working. But they
differ according to their applications. Most of the devices have the application of relays.
Pin Diagram:
The main operation of a relay comes in places where only a low-power signal can be used to
control a circuit. It is also used in places where only one signal can be used to control a lot of
circuits. The application of relays started during the invention of telephones. They played an
important role in switching calls in telephone exchanges. They were also used in long distance
telegraphy. They were used to switch the signal coming from one source to another destination.
After the invention of computers they were also used to perform Boolean and other logical
operations. The high end applications of relays require high power to be driven by electricmotors
and so on. Such relays are called contactors.
Relay Design
RelayConstruction
It is an electro-magnetic relay with a wire coil, surrounded by an iron core. A path of very low
reluctance for the magnetic flux is provided for the movable armature and also the switch point
contacts.
The movable armature is connected to the yoke which is mechanically connected to the switch
point contacts. These parts are safely held with the help of a spring. The spring is used so as to
produce an air gap in the circuit when the relay becomes de-energized.
Howrelayworks?
The diagram shows an inner section diagram of a relay. An iron core is surrounded by a control
coil. As shown, the power source is given to the electromagnet through a control switch and
through contacts to the load. When current starts flowing through the control coil, the
electromagnet starts energizing and thus intensifies the magnetic field. Thus the upper contact
arm starts to be attracted to the lower fixed arm and thus closes the contacts causing a short
circuit for the power to the load. On the other hand, if the relay was already de-energized when
the contacts were closed, then the contact move oppositely and make an open circuit.
As soon as the coil current is off, the movable armature will be returned by a force back to its
initial position. This force will be almost equal to half the strength of the magnetic force. This
force is mainly provided by two factors. They are the spring and also gravity.
Relays are mainly made for two basic operations. One is low voltage application and the other is
high voltage. For low voltage applications, more preference will be given to reduce the noise of
the whole circuit. For high voltage applications, they are mainly designed to reduce a
phenomenon called arcing.
Relay Basics
The basics for all the relays are the same. Take a look at a 4 pin relay shown below. There are
two colors shown. The green color represents the control circuit and the red color represents the
loadcircuit.Asmallcontrolcoilisconnectedontothecontrolcircuit.Aswitchisconnectedto
the load. This switch is controlled by the coil in the control circuit. Now let us take the different
steps that occur in a relay.
Relayoperation
EnergizedRelay(ON)
As shown in the circuit, the current flowing through the coils represented by pins 1 and 3 causes
a magnetic field to be aroused. This magnetic field causes the closing of the pins 2 and 4. Thus
the switch plays an important role in the relay working. As it is a part of the load circuit, it isused
to control an electrical circuit that is connected to it. Thus, when the electrical relay in energized
the current flow will be through the pins 2 and 4.
EnergizedRelay(ON)
De–EnergizedRelay(OFF)
As soon as the current flow stops through pins 1 and 3, the relay switch opens and thus the open
circuit prevents the current flow through pins 2 and 4. Thus the relay becomes de-energized and
thus in off position.
De-EnergizedRelay(OFF)
In simple, when a voltage is applied to pin 1, the electromagnet activates, causing a
magnetic field to be developed, which goes on to close the pins 2 and 4 causing a closed
circuit. When there is no voltage on pin 1, there will be no electromagnetic force and thus
no magnetic field. Thus the switches remain open.
Poleand Throw
Relays have the exact working of a switch. So, the same concept is also applied. A relay is saidto
switch one or more poles. Each pole has contacts that can be thrown in mainly three ways. They
are
Normally Open Contact (NO):NO contact is also called a make contact. It closes the circuitwhen
the relay is activated. It disconnects the circuit when the relay is inactive.
Normally Closed Contact (NC):NC contact is also known as break contact. This is opposite to the
NO contact. When the relay is activated, the circuit disconnects. When the relay is deactivated,
the circuit connects.
Change-over (CO) / Double-throw (DT) Contacts:This type of contacts are used to control two
types of circuits. They are used to control a NO contact and also a NC contact with a common
terminal. According totheir type they are called by the names breakbeforemake andmake before
break contacts.
Relays can be used to control several circuits by just one signal. A relay switches one or more
poles, each of whose contacts can be thrown by energizing the coil.
Single Pole Single Throw (SPST): The SPST relay has a total of four terminals. Out of these two
terminalscanbeconnectedordisconnected.The
othertwoterminalsareneededforthecoiltobe connected.
Single Pole Double Throw (SPDT): TheSPDTrelayhas a total of five terminals. Out ofthesetwo are
the coil terminals. A common terminal is also included which connects to either of two others.
Double Pole Single Throw (DPST):The DPST relay has a total of six terminals. These terminals
are further divided into two pairs. Thus they can act as two SPST which are actuated by a single
coil. Out of the six terminals two of them are coil terminals.
Double Pole Double Throw (DPDT): The DPDT relay is the biggest of all. It has mainly eight
relay terminals. Out of these two rows are designed to be change over terminals. They are
designed to act as two SPDT relays which are actuated by a single coil.
Relay Applications
ApplicationofOverloadRelay
Overload relay is an electro-mechanical device that is used to safeguard motors from overloads
and power failures. Overload relays are installed in motors to safeguard against sudden current
spikes that may damage the motor. An overload relay switch works in characteristics withcurrent
over time and is different from circuit breakers and fuses, where a sudden trip is made to turn off
the motor. The most widely used overload relay is the thermal overload relay where a bimetallic
strip is used to turn off the motor. This strip is set to make contact with a contactor by bending
itself with rising temperatures due to excess current flow. The contact between the strip and the
contactor causes the contactor to de-energize and restricts the power to the motor, and thus turns
it off.
Another type of overload motor is the electronic type which continuously watches the motor
current, whereas the thermal overload relay shuts off the motor depending on the rise of
temperature/heat of the strip.
Relay Selection
Youmustnotesomefactorswhileselectingaparticularrelay.They are
Protection Different protections like contact protection and coil protection must be noted.Contact
protection helps in reducing arcing in circuits usinginductors. ÂCoil protection helps in reducing
surge voltage produced during switching.
Lookforastandardrelay with allregulatory approvals.
SwitchingtimeAsk forhighspeed switchingrelaysif youwant one.
Ratings Therearecurrent as well as voltageratings. Thecurrent ratings vary from afewamperes to
about 3000 amperes. Â In case of voltage ratings, they vary from 300 Volt AC to 600 Volt AC.
There are also high voltage relays of about 15,000 Volts.
Typeof contactused whetheritis aNC or NOorclosed contact.
SelectMakebeforeBreakorBreakbeforeMake contactswisely.
Isolationbetween coilcircuitandcontacts
Powersupply:
A power supply is a component that provides at least one electrical charge with power. It
typically converts one type of electrical power to another, but it can also convert a different
Energy form in electrical energy, such as solar, mechanical, or chemical.
Somebasiccomponentsusedinthesupplyof power:
Transformer:
A transformer is a static electrical gadget that exchanges control between at least two circuits. A
fluctuating current creates a changing attractive motion in one transformer curl, which thus
actuates a differing electromotive power over a second loop twisted around a similar center.
Without a metallic association between the two circuits, electrical vitality can be exchanged
between the two loops. The enlistment law of Faraday found in 1831 portrayed the impact of
prompted voltage in any curl because of the changing attractive flux surrounded by the coil.
Circuitof transformer
Transformer
Rectifier:
Circuitof rectifier
Rectifier
Capacitors:
Capacitors are used to attain from the connector the immaculate and smoothest DC voltage in
which therectifieris used to obtain throbbing DCvoltagewhich is used as partofthelight ofthe
present identity. Capacitors areused to acquire squareDC from the current AC experience of the
current channels so that they can be used as a touch of parallel yield.
Capacitor
Voltageregulators:
The78XXvoltagecontrollerismainlyusedforvoltage controllersasawhole.TheXXspeaksto the
voltage delivered to the specific gadget by the voltage controller as the yield. 7805 will supply
and control 5v yield voltage and 12v yield voltage will be created by 7812.
The voltage controllers are that their yield voltage as information requires no less than 2 volts.
For example, 7805 as sources of information will require no less than 7V, and 7812, no less than
14 volts. This voltage is called Dropout Voltage, which should be given to voltage controllers.
7805voltageregulatorwith pinout
7812voltageregulatorwith pinout
Buzzer:
2 Negative Identifiedbyshortterminallead.Typically
connected to the ground of the circuit
BuzzerFeaturesandSpecifications
RatedVoltage:6VDC
OperatingVoltage:4-8V DC
Ratedcurrent:<30mA
SoundType:ContinuousBeep
ResonantFrequency:~2300Hz
Smallandneatsealedpackage
BreadboardandPerfboard friendly
There are two types are buzzers that are commonly available. The one shown here is a simple
buzzer which when powered will make a Continuous Beeeeeeppp.... sound, the other type is
called a readymade buzzer which will look bulkier than this and will produce a Beep. Beep.
Beep. Sound due to the internal oscillating circuit present inside it. But, the one shown here is
most widely used because it can be customized with help of other circuits to fit easily in our
application.
This buzzer can beused by simply poweringit using aDC power supply ranging from 4Vto 9V. A
simple 9V battery can also be used, but it is recommended to use a regulated +5V or +6V DC
supply. The buzzer is normally associated with a switching circuit to turn ON or turn OFF the
buzzer at required time and require interval.
Applications of Buzzer
Voltage Sensor:
This sensor is used to monitor, calculate and determine the voltage supply. This sensor can
determine the AC or DC voltage level. The input of this sensor can be the voltage whereas the
output is the switches, analog voltage signal, a current signal, an audible signal, etc. Some
sensors provide sine waveforms or pulse waveforms like output & others can generate outputs
likeAM(AmplitudeModulation),PWM(PulseWidthModulation)orFM(FrequencyModulation).
The measurement of these sensors can depend on the voltage divider.
This sensor includes input and output. The input side mainly includes two pins namely positive
and negativepins. Thetwo pins ofthedevicecan beconnectedto thepositive& negativepins of the
sensor. The device positive & negative pins can be connected to the positive & negative pins of
the sensor. The output of this sensor mainly includes supply voltage (Vcc), ground (GND),
analog o/p data.
VoltageSensorModulePinoutConfiguration
VCC
GND NegativeterminaloftheExternalvoltagesource
+ Not Connected
InputVoltage:0to25V
VoltageDetection Range:0.02445 to 25
AnalogVoltageResolution:0.00489V
Needsnoexternalcomponents
Easyto usewithMicrocontrollers
Small,cheapandeasilyavailable
Dimensions: 4 ×3 ×2 cm
Potentiometer:
HowDoesaPotentiometerWork?
This is different to a rheostat, where here one end is fixed and the sliding terminal is connectedto
the circuit, as shown below.
This is a very basic instrument used for comparing the emf of two cells and for calibrating
ammeter,voltmeter, and watt-meter. The basic working principle of a potentiometer is quite
simple. Suppose we have connected two batteries in parallel through a galvanometer. The
negative battery terminals are connected together and positive battery terminals are also
connected together through a galvanometer as shown in the figure below.
Here, if the electric potential of both battery cells is exactly the same, there is no circulating
current in the circuit and hence the galvanometer shows null deflection. The working principle
of potentiometer depends upon this phenomenon.
PotentiometerTypes
Rotary potentiometer
Linear potentiometer
Although the basic constructional features of these potentiometers vary, the working principle of
both of these types of potentiometers is the same.
Note that these are types of DC potentiometers – the types of AC potentiometers are slightly
different.
RotaryPotentiometers
The rotary type potentiometers are used mainly for obtaining adjustable supply voltage to a part
of electronic circuits and electrical circuits. The volume controller of a radio transistor is a
popular example of a rotary potentiometer where the rotary knob of the potentiometer controls
the supply to the amplifier.
This type of potentiometer has two terminal contacts between which a uniform resistance is
placedinasemi-circular pattern.Thedevicealsohasamiddleterminalwhichisconnectedtothe
resistance through a sliding contact attached with a rotary knob. By rotating the knob one can
movetheslidingcontactonthesemi-circularresistance.Thevoltageistakenbetweena
resistance end contact and the sliding contact. The potentiometer is also named as the POT in
short. POT is also used in substation battery chargers to adjust the charging voltage of a battery.
Therearemanymoreusesof rotary typepotentiometer wheresmooth voltagecontrol is required.
LinearPotentiometers
The linear potentiometer is basically the same but the only difference is that here instead ofrotary
movement the sliding contact gets moved on the resistor linearly. Here two ends of a straight
resistor are connected across the source voltage. A sliding contact can be slide on the resistor
through a track attached along with the resistor. The terminal connected to the sliding is
connected to one end of the output circuit and one of the terminals of the resistor is connected to
the other end of the output circuit.
This type of potentiometer is mainly used to measure the voltage across a branch of a circuit, for
measuring the internal resistance of a battery cell, for comparing a battery cell with a standard
cell and in our daily life, it is commonly used in the equalizer of music and sound mixing
systems.
Digital Potentiometers
Digital potentiometers are three-terminal devices, two fixed end terminals and one wiperterminal
which is used to vary the output voltage.
Digital potentiometers have various applications, including calibrating a system, adjusting offset
voltage, tuning filters, controlling screen brightness, and controlling sound volume.
However mechanical potentiometers suffer from some serious disadvantages which make it
unsuitable for applications where precision is required. Size, wiper contamination, mechanical
wear, resistance drift, sensitivity to vibration, humidity, etc. are some of the main disadvantages
of a mechanical potentiometer. Hence to overcome these drawbacks, digital potentiometers are
more common in applications since it provides higher accuracy.
SOFTWAREREQUIREMENTS
ArduinoIDE:
IntroductiontoArduinoIDE:
Arduino IDE is an open source software that is mainly used for writing and compiling the
code into the Arduino Module.
It is an official Arduino software, making code compilation too easy that even a common
person with no prior technical knowledge can get their feet wet with the learning process.
It is easily available for operating systems like MAC, Windows, and Linux and runs on theJava
Platform that comes with inbuilt functions and commands that play a vital role for
debugging, editing and compiling the code in the environment.
A range of Arduino modules available including Arduino Uno, Arduino Mega, Arduino
Leonardo, Arduino Micro and many more.
Each of them contains a microcontroller on the board that is actually programmed and
accepts the information in the form of code.
The main code, also known as a sketch, created on the IDE platform will ultimately generate
a Hex File which is then transferred and uploaded in the controller on the board.
The IDE environment mainly contains two basic parts: Editor and Compiler where former is
used for writing the required code and later is used for compiling and uploading the code
into the given Arduino Module.
ThisenvironmentsupportsbothC andC++languages.
HowtoinstallArduino IDE:
You can download the Software from Arduino main website. As I said earlier, the software is
available for common operating systems like Linux, Windows, and MAX, so make sure you are
downloading the correct software version that is easily compatible with your operating system.
If youaimtodownloadWindowsappversion, make sureyouhaveWindows8.1or Windows 10, as
app version is not compatible with Windows 7 or older version of this operating system.
TheIDEenvironmentismainlydistributedintothree sections
1.Menu Bar
2.TextEditor
3.OutputPane
AsyoudownloadandopentheIDEsoftware,itwillappearlikeanimage below.
Thebarappearingonthetopiscalled MenuBar thatcomeswithfivedifferentoptionsas follow
File– You can open a new window for writing the code or open an existing one.
Followingtable shows the number of further subdivisions the file option is categorized into.
Asyougotothepreferencesectionandcheckthecompilationsection,theOutputPane will show the
code compilation as you click the upload button.
Andattheendofcompilation,itwillshowyouthehexfileithasgeneratedfortherecent sketch that will
send to the Arduino Board for the specific task you aim to achieve.
Edit–Usedforcopyingandpastingthecodewithfurthermodificationforfont
Sketch–Forcompilingandprogramming
Tools–Mainlyusedfortestingprojects.TheProgrammersectioninthispanelisusedfor burning a
bootloader to the new microcontroller.
Help –Incaseyouarefeelingskepticalaboutsoftware,completehelpisavailablefrom getting
started to troubleshooting.
TheSixButtons appearingundertheMenutabareconnectedwiththerunningprogramas follow.
ThemainscreenbelowtheMenubardisknownasasimpletexteditorusedforwritingthe required
code.
The bottom of the main screen is described as an Output Pane that mainly highlights the
compilation status of the running code: the memory used by the code, and errors occurred in
the program. You need to fix those errors before you intend to upload the hex file into your
Arduino Module.
More or less, Arduino C language works similar to the regular C language used for any
embedded systemmicrocontroller,however,there aresomededicated librariesusedforcalling and
executing specific functions on the board.
Libraries:
Libraries are very useful for adding the extra functionality into the Arduino Module. There is a
list of libraries you can add by clicking the Sketch button in the menu bar and going to Include
Library.
As you click the Include Library and Add the respective library it will on the top of the sketch
with a #include sign. Suppose, I Include the EEPROM library, it will appear on the text editor as
#include<EEPROM.h>.
Most of the libraries are preinstalled and come with the Arduino software. However, you can
also download them from the external sources.
MakingpinsInputand output:
The digitalRead anddigitalWritecommands are used for addressing and making the Arduino pins
as an input and output respectively.
These commands are text sensitive i.e. you need to write them down the exact way they aregiven
like digitalWrite starting with small “d” and write with capital “W”. Writing it down with
Digitalwrite or digitalwrite won’t be calling or addressing any function.
How to selecttheboard:
Just go to the “Board” section and select the board you aim to work on. Similarly, COM1,
COM2, COM4, COM5, COM7 or higher are reserved for the serial and USB board. You can
look for the USB serial device in the ports section of the Windows Device Manager.
Following figure shows the COM4 that I have used for my project, indicating the Arduino Uno
with COM4 port at the right bottom corner of the screen.
After correct selection of both Board and Serial Port, click the verify and then upload button
appearing in the upper left corner of the six button section or you can go to the Sketch
section and press verify/compile and then upload.
Thesketchiswritteninthetexteditorandisthensavedwiththefileextension.ino.
It is important to note that the recent Arduino Modules will reset automatically as you compile
and press the upload button the IDE software, however, older version may require the physical
reset on the board.
Once you upload the code, TX and RX LEDs will blink on the board, indicating the desired
program is running successfully.
Note: The port selection criteria mentioned above is dedicated for Windows operating system
only, you can check this Guide if you are using MAC or Linux.
The amazing thing about this software is that no prior arrangement or bulk of mess is
requiredtoinstall thissoftware, you will be writingyourfirstprogramwithin 2 minutes after the
installation of the IDE environment.
BootLoader:
As you go to the Tools section, you will find a bootloader at the end. It is very helpful to burn
the code directly into the controller, setting you free from buying the external burner to burn
the required code.
When you buy the new Arduino Module, the bootloader is already installed inside the
controller. However, if you intend to buy a controller and put in the Arduino module, you need
to burn the bootloader again inside the controller by going to the Tools section and selecting
the burn bootloader.
APPLICATIONS
Industrialmachinery
Household items like TV, refrigerator
Agriculturemotors
Waterpumps
Microwave oven
ADVANTAGES
More reliable
More compatible
Lowpower consumption
CONCLUSION
From above discussion it has cleared that of under voltage and overvoltage problem are very
common and can create problem for consumer good and industrial application. So, systemshould
be protected by certain protection scheme. So heresystem modeled using comparator and relay to
disconnect supply when any overvoltage and under voltage problem occurs.
REFERENCES
1J.B.GUPTA(2014)ACOURSEINPOWERSYSTEMS(KATSONBOOKS),Part-III:
SwitchgearandProtection,Chapter-9,169-171.
2M.D.SINGH,K.B.KHANCHANDANI(2ndEdition)PowerElectronics[McGrawHill
Education (India) Private Limited], chapter 6: Phase control converters, 329-346.
[3] ROBERT L. BOYLESTAD, LOUIS NASHELSKY (2015) Electronic Devices and Circuit
Theory (English) 11th Edition (PEARSON), Chapter-10: Operational Amplifiers, Chapter-11:Op
- Amp Applications, Chapter-1: Semiconductor Diode (7-16), Chapter3: Bipolar Junction
Transistors (132-164).
4J.B.GUPTA(2014)Theory&PerformanceofELECTRICALMACHINES,PART-III,
Transformers(1-91).
6Bayindir R., Sefa I., Cola I., and Bektas A. “Fault Detection and Load Protection Using
Sensors”, IEEE Transactions on Energy Conversion, Vol. 23, Issue 3, pp. 734– 741, 2008.