You are on page 1of 48

MICROCONTROLLER BASED OVER CURRENT RELAY

USING HALL EFFECT CURRENT SENSOR

Synopsis

The FREEDM (Future Renewable Electric Energy Delivery and


Management) system is a smart grid that enables wide integration between the
Distributed Renewable Energy Resources (DRER) and Distributed Energy Storage
Devices (DESD) with the conventional distribution system. This paper presents the
design and implementation of an Arduino Uno microcontroller-based overcurrent
relay with different characteristics (inverse, very inverse and extremely inverse) for
FREEDM systems. An open source model with simple utilization of both hardware
and software is created.

A practical printed circuit board is designed with the required inputs and outputs
to monitor and protect the branch connecting solid state transformer to the closed
loop zones in the FREEDM system. A special program is designed using software
package and easily integrated to the hardware card. To validate the proposed relay,
the inverse, very inverse and extremely inverse overcurrent relay characteristics are
tested using the proposed system simulator and compared with the characteristic
recorded by the wellknown IEC 60255-151standard. In order to guarantee the
effectiveness of the system, a practical circuit including the proposed relay is
formed, connected to a small load and normally inverse relay characteristic is
tested. The proposed protection scheme proves high performance and accurate
results.
CHAPTER – I

INTRODUCTION

Background

Electrical Power System protection is required for protection of both user


and the system equipment itself from fault, hence electrical power system is not
allowed to operate without any protection devices installed. Power System fault is
defined as undesirable condition that occurs in the power system. These
undesirable conditions such as short circuit, current leakage, ground short, over
current and over voltage. With the increasing loads, voltages and short-circuit duty
in distribution system, over current protection has become more important today.
The ability of protection system is demanded not only for economic reason but also
consumers just expect ‘reliable’ service. In a Power System Protection, the system
engineer would need to a device that can monitor current, voltage, frequency and
in some case over power in the system.

Thus a device called Protective Relay is created to serve the purpose. The
protective relay is most often relay coupled with Circuit Breaker such that it can
isolate the abnormal condition in the system. In the interest of reliable and
effective protection, some designers of power distribution/power controllers select
relay as opposed to electro-magnetic circuit breakers as a method of circuit
protection.

Overview of Over Current Relay

Project An "Over Current Relay" is a type of protective relay which


operates when the load current exceeds a preset value. In a typical application the
over current relay is used for over current protection, connected to a current
transformer and calibrated to operate at or above a specific current level. This
project will attempt to design and fabricate over current protection relay using PIC
micro controller. The PIC micro controller will cause the circuit breaker to trip
when the current from load current reaches the setting value in the PIC micro
controller. In order to design it, first the load current need to measure in order to
monitor it using current sensor including testing the fault (over current) and when
such condition arise, it will isolate in the shortest time possible without harming
the any other electrical devices. It will also including in developing the algorithm
for instantaneous over current relay and IDMT (Inverse Definite Minimum Time)
relay for the circuit breaker to trip. In this project, PIC microcontroller will be used
to control and operate the tripping coil in circuit breaker

Objective

In this project an Arduino Uno microcontroller-based overcurrent relay with


different characteristics is designed for Home applications.
CHAPTER – II

PROPOSED SYSTEM

2.1 BLOCK DIAGRAM

2.2 WORKING PRICIPLE

Overcurrent protection scheme is proposed as per the block diagram shown


in Fig. 3 and flow chart in Fig. 4. Hardware Arduino microcontroller is utilized by
downloading software program designed through Proteus package using C
language. A software is created to satisfy different overcurrent relay characteristics
(invers, very inverse and extremely inverse) which are required to protect
FREEDM system.

The value of current flows from supply to the load is sensed by hall effect
current transformer. The current signal is converted to dc voltage using shunt
resistance to suite the microcontroller requirements. The produced voltage signal
which is proportional to this current value is fed to Arduino Uno microcontroller.
The voltage signal is varied based on the actual current value in the main circuit. If
value of current exceeds the pre-set value, an output signal is generated to trip the
solid-state switch to disconnect the load and to display the fault current on the
LCD.
CHAPTER – III

COMPONENT DETAILS

4.1 ARDUINO

Arduino interface boards provide the engineers, artists, designers, hobbyists


and anyone who tinker with technology with a low-cost, easy-to-use technology to
create their creative, interactive objects, useful projects etc., A whole new breed of
projects can now be built that can be controlled from a computer.

WHAT IS ARDUINO?

Figure 1.1 ARDUINO UNO

Arduino is a open source electronics prototyping platform based on


flexible,easy-to-use hardware and software.It’s intended for
artists,designers,hobbyists,and anyone interested in creating interactive objects or
environments.It’s an open-source physical computing platform based on a
microcontroller board,and a development environment for writing software for the
board.
In simple words,Arduino is a small microcontroller board with a USB plug to
connect to your computer and a number of connection sockets that can be wired up
to external electronics,such as motors,relays,light sensors,laser
diodes,loudspeakers,microphones,etc.,They can either be powered through the USB
connection from the computer or from a 9V battery.They can be controlled from
the computer or programmed by the computer and then disconnected and allowed
to work independently.

Anyone can buy this device through online auction site or search engine.Since
the Arduino is an open-source hardware designs and ccreate their own clones of the
Arduino and sell them,so the market for the boards is competitive.An official
Arduino costs about $30,and a clone often less than $20.

The name “Arduino” is reserved by the original makers. However, clone Arduino
designs often

have the letters “duino” on the end of their name, for example, Freeduino or
DFRduino. The software for programming your Arduino is easy to use and also
freely available for Windows, Mac, and LINUX computers at no cost.

Microcontroller

Microcontroller can be described as a computer embedded on a rather small


circuit board.To describe the function of a microcontroller more precisely,it is a
single chip that can perform various calculations and tasks,and send/receive signals
from other devices via the available pins. Precisely what tasks and communication
with the world it does, is what is governed by what instructions we give to the
Microcontroller. It is this job of telling the chip what to do, is what we refer to as
programming on it.

However, the uC by itself, cannot accomplish much; it needs several


external inputs: power, for one; a steady clock signal, for another. Also, the job of
programming it has to be accomplished by an external circuit. So typically, a uC is
used along with a circuit which provides these things to it; this combination is
called a microcontroller board. The Arduino Uno that you have recieved, is one
such microcontroller board. The actual microcontroller at its heart is the chip called
Atmega328. The advantages that Arduino offers over other microcontroller boards
are largely in terms of reliability of the circuit hardware as well as the ease of
programming and using it.

Open-source hardware

Open-source hardware shares much of the principles and approach of free


and open-source software.The founders of Arduino wanted people to study their
hardware,to understand how it works,make changes to it,and share those changes
with the world.To facilitate this,they release all of the original design files(Eagle
CAD)for the Arduino hardware.These files are licensed under a Creative Common
Attribution Share-Alike license,which allows for both personal and commercial
derivative works,as long as they(people) credit Arduino and release their designs
under the same license.

The Arduino software is also oen-source.The source code for the Java
environment is released under the GPL and the C/C++ microcontroller libraries are
under the LGPL
HISTORY OF ARDUINO

While teaching a physical computing class at the Interaction Design Institute


Ivrea in 2005, Massimo Banzi’s students were unwilling to spend the 76 euros for
the BASIC Stamp microcontrollers commonly used in such applications. Banzi and
his collegues looked for alternatives, finally settling on the wiring platform
developed by one of Banzi’s students. In his own words:

“…we started to figure out how could we make the whole platform even simpler,
even cheaper, even easier to

use. And then we started to essentially reimplement the whole thing as an open
source project.”

Once they had a prototype, a student wrote the software that would allow wiring
programs to run on the new platform. Upon seeing the project, visiting professor
Casey Reas suggested that there might be wider applications than just design
schools for the new product. The prototype was redesigned for mass production
and a test run of 200 boards was made. Orders began coming in from other design
schools and the students looking for Arduinos, and the Arduino project was born
and  Massimo Banzi and David Cuartielles became its founders.”ARDUINO” is
an Italian word,meaning “STRONG FRIEND”.The English version of the name is
“Hardwin”. As of May 2011,more than 300,000 Arduino units are “in the wild”.

Design Goals

 Work with a Mac (as most design students use one)


 USB connectivity (MacBooks don’t have serial ports
 Look nice
 Cheap (about 20 euros, the cost of going out for pizza in Europe)
 More powerful than a BASIC stamp
 Something you could build/fix yourself
Simple and easy to use by someone without formal electronics training

Business Models

Since the entire project is open source, anyone can build and sell Arduino-
compatible devices. So in this sense, the Arduino project relies heavily on its
branding for it’s financial success . Other projects manufacture compatible and
cheaper boards, however people are loyal to the Arduino branded boards because
they associate quality and a certain image to the

final product .

By the Numbers

Year Units Sold

2005 200

2006 10 000

2010 120 000

2011 300 000


Competitors

Bef ore Arduino, the


largest players in the
design/hobbyist
market segment were the
PIC microcontroller family (made by Microchip) and the BASIC Stamp (made by
Parallax). Since the introduction of the Arduino, other large companies have tried
to enter the hobbyist market, including Texas Instruments , and even Microsoft .
However, the open-sourced tools

of the Arduino and the size of its community are large barriers for new platforms
to overcome.

Figure 2 GOOGLE trends comparing ARDUINO with its biggest competitors


Community

As the project is aimed at students and hobbyists who may not have any formal
electronics background, there are many excellent guides online covering
everything from making a light blink to creating a laser harp. The official forum
has almost 60 000 registered users, and along with helping users with their
projects, is extremely active in developing new libraries to extend the functionality
of the Arduino . The open-source share and share alike sentiment is very strong,
and the vast majority of users freely publish the code to their projects.

PHYSICAL COMPUTING

Physical Computing is an approach to learn how humans communicate


through computers that starts by considering how humans express themselves
physically.

PLATFORM

HARDWARE

ARDUINO Board Layout


Figure 3 ARDUINO board layout

ARDUINO pin diagram

Figure 4 ARDUINO pin diagram

ATmega8(Microcontroller)

 16 MHz
 8 Kbyte Flash RAM(1K taken by the boot loader)
 1 Kbyte RAM(eg.for auto/local variables and stack)
 14 digital Input/Output Ports

Figure 5 ATmega8
Single chip USB to async. Serial data transfer interface

 USB 2.0 compatible


 Transmit and receive LED frive signals
 256 Byte receive,128 Byte transmit buffer
 Data transfer rate from 300bits/sec to 2 Mb/sec

Fig2.1 Android Software Architecture

The OFF-the shelf adapter

 must be a DC adapter (i.e. it has to put out DC, not AC)


 should be between 9V and 12V DC 
 must be rated for a minimum of 250mA
current output, although you will likely
want something more like 500mA or 1A
output, as it gives you the current necessary to power a servo or
twenty LEDs if you want to.
 must have a 2.1mm power plug on the Arduino end, and
 the plug must be "centre positive", that is, the middle pin of the plug has to
be the + connection.
Current rating: Since you'll probably be connecting other things to the Arduino
(LEDs, LCDs, servos) you should get an adapter that can supply at least 500mA, or
even 1000 mA (1 ampère). That way you can be sure you have enough juice to
make each component of the circuit function reliably.

The Arduino's on-board regulator can actually handle up to 20V or more, so you
can actually use an adapter that puts out 20V DC. The reasons you don't want to do
that are twofold: you'll lose most of that
voltage in heat, which is terribly inefficient.
Secondly, the nice 9V pin on the Arduino
board will actually be putting out 20V or so,
which could lead to potential disaster when you
connect something expensive to what you
thought was the 9V pin. Our advice is to stick
with the 9V or 12V DC adapter.

ARDUINO flavors!!

There have been many revisions of the USB Arduino.some of them are

1. Arduino UNO:
This is the latest revision of the basic Arduino USB board. It connects to the
computer with a standard USB cable and contains everything else you need to
program and use the board. It can be extended
with a variety of shields: custom daughter-
boards with specific features. It is similar to the
Duemilanove, but has a different USB-to-serial
chip the ATMega8U2, and newly designed
labeling to make inputs and outputs easier to
identify.

2. Arduino Mega 2560:


A larger, more powerful Arduino board. Has extra digital pins, PWM pins,
analog inputs, serial ports, etc. The version of the Mega released with the Uno,
this version features the Atmega2560, which has twice the memory, and uses
the ATMega 8U2 for USB-to-serial communication. 

3. Arduino Duemilanove:
The Duemilanove automatically selects the appropriate power supply
(USB or external power), eliminating the need for the power selection
jumper found on previous boards. It also adds an easiest to cut trace for
disabling the auto-reset, along with a solder jumper for re-enabling it.
Note: around March 1st, 2009, the Duemilanove started to ship with
the ATmega328p instead of theATmega168.
4. Arduino Fio:
An Arduino intended for use as a
wireless node. Has a header for
an XBee radio, a connector for
a LiPobattery, and a battery
chargingcircuit.

5. LilyPad Arduino:

A stripped-down, circular Arduino


board designed for stitching into
clothing and other fabric/flexible
applications. Needs an additional
adapter to communicate with a
computer.

6. Arduino Diecimila:

The main change in the Arduino Diecimila


is that it can be reset from the computer,
without the need to physically press the
reset button on the board. The Diecimila
uses a low dropout voltage regulator which lowers the board's power
consumption when powered by an external supply (AC/DC adapter or battery).
A resettable polyfuse protects your computer's USB ports from shorts and
surges. It also provides pin headers for the reset line and for 3.3V. There is a
built-in LED on pin 13. Some blue Diecimila boards say "Prototype - Limited
Edition" but are in fact fully-tested production boards (the actual prototypes are
red).

7. Lilypad Arduino 03

This revision has a 6-pin programming header that's compatible with FTDI
USB cables and the Sparkfun FTDI Basic Breakout. It adds support for
automatic reset, allowing sketches to be
uploaded without pressing the reset
button on the board. The header is
surface mounted, meaning that the board
has no pokey bits sticking out the back.
8. Arduino NG Rev.C

Revision C of the Arduino NG does not have


a built-in LED on pin 13 - instead you'll see
two small unused solder pads near the labels
"GND" and "13". There is, however, about
1000 ohms of resistance on pin 13, so you
can connect an LED without external
resistor. 

9. Arduino Extreme

The Arduino Extreme uses many more surface


mount components than previous USB
Arduino boards and comes with female pin
headers. It also has RX and TX LEDs that
indicate when data is being sent to or from the
board.

10.Arduino Mini 04

On this version of the Arduino Mini, two of


the pins changed. The third pin became
reset (instead of ground) and fourth pin became ground (instead of being
unconnected). These boards are labelled "Mini 04".

Still
there are
,Arduino

Serial,Arduino Serial v2.0,Arduino Nano 3.0,Arduino Nano


2.x,Serverino(S3V3),Arduino Stamp 02,Mini USB adapter 03,Mini USB
Adapter,Arduino Bluetooth.

Figure 6 Different Flavours Of ARDUINO with their Configuration


Basic Terminologies in ARDUINO:

1.Analog to digital converter(ADC)

The process of Analog to digital conversion is shown in figure.

The Arduino has 10 bits of Resolution when reading analog signals.

2 power 10=1024 increments

Influence also by how fast you sample

2.Pulse width modulation (PWM)

The Arduino has 8bit of resolution,when outputting a signal


using PWM.The range of output voltage is from 0 to 5 Volts

2power 8=255 Increments

Average of on/off(digital signals to make an average


voltage),Duty cycle in 100% of 5Volts.

LANGUAGE REFERENCES:

The Microcontroller on the board is programmed using the Arduino


programming language(based on wiring) and the arduino development
environment(based on processing).
Arduino Programming Language(APL)(based on wiring)

The Arduino programming language is an implementation of Wiring, a similar


physical computing platform, which is based on the Processing multimedia
programming environment.

Wiring

Wiring is an open-source programming framework for microcontrollers.


Wiring allows writing cross-platform software to control devices attached to a
wide range of microcontroller boards to create all kinds of creative coding,
interactive objects, spaces or physical experiences. The framework is thoughtfully
created with designers and artists in mind to encourage a community where
beginners through experts from around the world share ideas, knowledge and their
collective experience. There are thousands of students, artists, designers,
researchers, and hobbyists who use Wiring for learning, prototyping, and finished
professional work production.

Arduino development environment(based on processing)

Processing

Processing is an open source programming language and environment for


people who want to create images, animations, and interactions. Initially developed
to serve as a software sketchbook and to teach fundamentals of computer
programming within a visual context, Processing also has evolved into a tool for
generating finished professional work. Today, there are tens of thousands of
students, artists, designers, researchers, and hobbyists who use Processing for
learning, prototyping, and production.
Software

The software used by the arduino is Arduino IDE.

he Arduino IDE is a cross-platform application written in Java, and is derived from


the IDE for the Processing programming language and the Wiringproject. It is
designed to introduce programming to artists and other newcomers unfamiliar with
software development. It includes a code editor with features such as syntax
highlighting, brace matching, and automatic indentation, and is also capable of
compiling and uploading programs to the board with a single click. There is
typically no need to edit makefiles or run programs on acommand-line interface.
Although building on command-line is possible if required with some third-party
tools such as Ino.

The Arduino IDE comes with a C/C++ library called "Wiring" (from the project of
the same name), which makes many common input/output operations much easier.
Arduino programs are written in C/C++, although users only need define two
functions to make a runnable program:

 setup() – a function run once at the start of a program that can initialize
settings
 loop() – a function called repeatedly until the board powers off

4.2 POWER SUPPLY UNIT

All electronic circuits works only in low DC voltage, so we need a power


supply unit to provide the appropriate voltage supply for their proper functioning
.This unit consists of transformer, rectifier, filter & regulator. AC voltage of
typically 230v rms is connected to a transformer voltage down to the level to
the desired ac voltage. A diode rectifier that provides the full wave rectified
voltage that is initially filtered by a simple capacitor filter to produce a dc
voltage. This resulting dc voltage usually has some ripple or ac voltage
variation . A regulator circuit can use this dc input to provide dc voltage that not
only has much less ripple voltage but also remains the same dc value even the dc
voltage varies some what, or the load connected to the output dc voltages
changes.

Fig 24.General Block of Power Supply Unit

DIODE BRIDGE RECTIFIER


Fig25 : Diode Bridge Rectifier

A diode bridge or bridge rectifier is an arrangement of four diodes


connected in a bridge circuit as shown below, that provides the same polarity of
output voltage for any polarity of the input voltage. When used in its most common
application, for conversion of alternating current (AC) input into direct current
(DC) output, it is known as a bridge rectifier. The bridge rectifier provides full
wave rectification from a two wire AC input (saving the cost of a center tapped
transformer) but has two diode drops rather than one reducing efficiency over a
center tap based design for the same output voltage.

Fig 26: Schematic Of A Diode Bridge Rectifier

The essential feature of this arrangement is that for both polarities of the voltage at
the bridge input, the polarity of the output is constant.

BASIC OPERATION OF DIODE BRIDGE RECTIFIER

When the input connected at the left corner of the diamond is positive with
respect to the one connected at the right hand corner, current flows to the right
along the upper colored path to the output, and returns to the input supply via the
lower one.
operation of diode bridge rectifier

When the right hand corner is positive relative to the left hand corner, current
flows along the upper colored path and returns to the supply via the lower colored
path.

AC, half-wave and full wave rectified signals

In each case, the upper right output remains positive with respect to the
lower right one. Since this is true whether the input is AC or DC, this circuit not
only produces DC power when supplied with AC power: it also can provide what
is sometimes called "reverse polarity protection". That is, it permits normal
functioning when batteries are installed backwards or DC input-power supply
wiring "has its wires crossed" (and protects the circuitry it powers against damage
that might occur without this circuit in place).

Prior to availability of integrated electronics, such a bridge rectifier was


always constructed from discrete components. Since about 1950, a single four-
terminal component containing the four diodes connected in the bridge
configuration became a standard commercial component and is now available with
various voltage and current ratings.

TRANSFORMER: A transformer is a static piece of which electric power in one


circuit is transformed into electric power of same frequency in another circuit. It can
raise or lower the voltage in the circuit, but with a corresponding decrease or increase
in current. It works with the principle of mutual induction. In our project we are using
a step down transformer to providing a necessary supply for the electronic circuits.
Here we step down a 230v ac into 12v ac.

RECTIFIER: A dc level obtained from a sinusoidal input can be improved 100%


using a process called full wave rectification. Here in our project for full wave
rectification we use bridge rectifier. From the basic bridge configuration we see that
two diodes(say D2 & D3) are conducting while the other two diodes (D1 & D4) are
in off state during the period t = 0 to T/2.Accordingly for the negative cycle of the
input the conducting diodes are D1 & D4 .Thus the polarity across the load is the
same.

In the bridge rectifier the diodes may be of variable types like 1N4001, 1N4003,
1N4004, 1N4005, IN4007 etc… can be used . But here we use 1N4007, because it can
withstand up to 1000v.
FILTERS: In order to obtain a dc voltage of 0 Hz, we have to use a low pass filter. so
that a capacitive filter circuit is used where a capacitor is connected at the rectifier
output& a dc is obtained across it. The filtered waveform is essentially a dc voltage
with negligible ripples & it is ultimately fed to the load.

REGULATORS: The output voltage from the capacitor is more filtered & finally
regulated. The voltage regulator is a device, which maintains the output voltage
constant irrespective of the change in supply variations, load variations & temperature
changes. Here we use fixed voltage regulator namely LM7805.The IC LM7805 is a
+5v regulator which is used for microcontroller.

Circuit Diagram:

Fig29 power supply unit

FEATURES & DESCRIPTION OF REGULATORS

• Output Current up to 1A
• Output Voltages of 5, 6, 8, 9, 10, 12, 15, 18, 24V

• Thermal Overload Protection

• Short Circuit Protection

• Output Transistor Safe Operating Area Protection

The KA78XX/KA78XXA series of three-terminal positive regulator are


available in the TO-220/D-PAK package and with several fixed output voltages,
making them useful in a wide range of applications. Each type employs internal
current limiting, thermal shut down and safe operating area protection, making it
essentially indestructible. If adequate heat sinking is provided, they can deliver
over 1A output current. Although designed primarily as fixed voltage regulators,
these devices can be used with external components to obtain adjustable voltages
and currents.

CURRENT TRANSFORMER:

In electrical engineering, a current transformer (CT) is used for measurement of electric


currents. Current transformers, together with voltage transformers (VT) (potential
transformers (PT)), are known as instrument transformers. When current in a circuit is too high
to directly apply to measuring instruments, a current transformer produces a reduced current
accurately proportional to the current in the circuit, which can be conveniently connected to
measuring and recording instruments. A current transformer also isolates the measuring
instruments from what may be very high voltage in the monitored circuit. Current transformers
are commonly used in metering
Like any other transformer, a current transformer has a primary winding, a magnetic core, and a
secondary winding. The alternating currentflowing in the primary produces a magnetic field in
the core, which then induces a current in the secondary winding circuit. A primary objective of
current transformer design is to ensure that the primary and secondary circuits are efficiently
coupled, so that the secondary current bears an accurate relationship to the primary current.

The most common design of CT consists of a length of wire wrapped many times around a
silicon steel ring passed over the circuit being measured. The CT's primary circuit therefore
consists of a single 'turn' of conductor, with a secondary of many tens or hundreds of turns. The
primary winding may be a permanent part of the current transformer, with a heavy copper bar to
carry current through the magnetic core. Window-type current transformers are also common,
which can have circuit cables run through the middle of an opening in the core to provide a
single-turn primary winding. When conductors passing through a CT are not centered in the
circular (or oval) opening, slight inaccuracies may occur.

Shapes and sizes can vary depending on the end user or switchgear manufacturer. Typical
examples of low voltage single ratio metering current transformers are either ring type or plastic
moulded case. High-voltage current transformers are mounted on porcelain bushings to insulate
them from ground. Some CT configurations slip around the bushing of a high-voltage
transformer or circuit breaker, which automatically centers the conductor inside the CT window.
The primary circuit is largely unaffected by the insertion of the CT. The rated secondary current
is commonly standardized at 1 or 5 amperes. For example, a 4000:5 CT would provide an output
current of 5 amperes when the primary was passing 4000 amperes. The secondary winding can
be single ratio or multi ratio, with five taps being common for multi ratio CTs. The load, or
burden, of the CT should be of low resistance. If the voltage time integral area is higher than the
core's design rating, the core goes into saturation towards the end of each cycle, distorting the
waveform and affecting accuracy.

USES:

Current transformers are used extensively for measuring current and monitoring the operation of
the power grid. Along with voltage leads, revenue-grade CTs drive the electrical utility's watt-
hour meter on virtually every building with three-phase service and single-phase services greater
than 200 amps.

The CT is typically described by its current ratio from primary to secondary. Often, multiple CTs
are installed as a "stack" for various uses. For example, protection devices and revenue metering
may use separate CTs to provide isolation between metering and protection circuits, and allows
current transformers with different characteristics (accuracy, overload performance) to be used
for the devices

4.3 Liquid Crystal Display

Introduction:

Advances in the features, miniaturization, and cost of LCD (Liquid Crystal


Display) controller chips have made LCDs usable not only in commercial products
but also in hobbyist projects. By themselves, Liquid Crystal Displays can be
difficult to drive because they require multiplexing, AC drive waveforms, and
special voltages. LCD modules make this driving simpler by attaching hardware to
the raw glass LCD to assist in some or all of these rudimentary driving tasks. LCD
modules can be split into two groups: those that have built-in controller and driver
chips, and those that have only driver chips. LCD displays that do not have
controllers are typically used with powerful hardware, such as a laptop computer,
where a video controller is available to generate the complex drive signals
necessary to run the display. Most color and large (greater than 320x240)
monochrome displays are of this type. Other common sizes are 16x1, 20x1, 20x2,
20x4, 40x1, and 40x2 (characters x lines). Fortunately, all HD44780-based
displays (of any size) use the same standard 14-wire interface.

Therefore, code and hardware made for one size/type display can be
painlessly adapted to work for any HD44780 compatible. Information about these
displays can be easily obtained on the web by including “HD44780” in our search
keywords. Because of their widespread use, these displays can be purchased
surplus with typical prices of $3 for small displays to $20 for large ones.

Interfacing our LCD module:

The microcontroller/microprocessor interface to HD44780 LCD modules


(hereafter generically Referred to as character LCD modules) is almost always 14
pins. We May find that some displays have additional pins for backlighting or
other purposes, but the first 14 pins still serve as the interface.

The first three pins provide power to the LCD module. Pin 1 is GND and
should be grounded to the power supply. Pin 2 is VCC and should be connected to
+5V power. Pin 3 is the LCD Display Bias. By adjusting the voltage or duty cycle
of pin 3, the contrast of the display can be adjusted. Most character LCDs can
achieve good display contrast with a voltage between 5V and 0V on pin 3. Note
that greater contrast comes with lower voltage and we should never apply a VLCD
higher than VCC. Some displays, which are specially made to work over a large
temperature range, may require a negative voltage to achieve readable contrast.

Basic 16x 2 Characters LCD - Black on Green 5V:

Description:

This is a basic 16 character by 2-line display. Black text on Green


background. Utilizes the extremely common HD44780 parallel interface chipset.
Interface code is freely available. We will need ~11 general I/O pins to interface to
this LCD screen. Includes LED backlight.

Fig3.4.1 16/2 character LCD display

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

Fig 3.4.2 Pin Description of LCD

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

Pin description of character LCD:

Pin No. Name Description


Pin no. 1 VSS Power supply (GND)
Pin no. 2 VCC Power supply (+5V)
Pin no. 3 VEE Contrast adjust
0 = Instruction input
Pin no. 4 RS
1 = Data input
0 = Write to LCD module
Pin no. 5 R/W
1 = Read from LCD module
Pin no. 6 EN Enable signal
Pin no. 7 D0 Data bus line 0 (LSB)
Pin no. 8 D1 Data bus line 1
Pin no. 9 D2 Data bus line 2
Pin no. 10 D3 Data bus line 3
Pin no. 11 D4 Data bus line 4
Pin no. 12 D5 Data bus line 5
Pin no. 13 D6 Data bus line 6
Pin no. 14 D7 Data bus line 7 (MSB)

Table 3.4.1: Character LCD pins with 1 Controller

Pin No. Name Description


Pin no. 1 D7 Data bus line 7 (MSB)
Pin no. 2 D6 Data bus line 6
Pin no. 3 D5 Data bus line 5
Pin no. 4 D4 Data bus line 4
Pin no. 5 D3 Data bus line 3
Pin no. 6 D2 Data bus line 2
Pin no. 7 D1 Data bus line 1
Pin no. 8 D0 Data bus line 0 (LSB)
Enable signal for row 0 and 1
Pin no. 9 EN1
(1stcontroller)
0 = Write to LCD module
Pin no. 10 R/W
1 = Read from LCD module
0 = Instruction input
Pin no. 11 RS
1 = Data input
Pin no. 12 VEE Contrast adjust
Pin no. 13 VSS Power supply (GND)
Pin no. 14 VCC Power supply (+5V)
Enable signal for row 2 and 3
Pin no. 15 EN2
(2ndcontroller)
Pin no. 16 NC Not Connected

Table 3.4.2: Character LCD pins with 2 Controller


LCD Background:

Frequently, an 8051 program must interact with the outside world using
input and output devices that communicate directly with a human being. One of the
most common devices attached to an 8051 is an LCD display. Some of the most
common LCDs connected to the 8051 are 16x2 and 20x2 displays. This means 16
characters per line by 2 lines and 20 characters per line by 2 lines, respectively.

Interfacing Example - 16 Characters x 2 Lines LCD:

Description: This is the first interfacing example for the Parallel Port. We will
start with something simple. This example doesn't use the Bi-directional feature
found on newer ports, thus it should work with most, if no all Parallel Ports. It
however doesn't show the use of the Status Port as an input. A 16 Character x 2
Line LCD Modules to the Parallel Port. These LCD Modules are very common
these days, and are quite simple to work with, as all the logic required running
them is on board.

Schematic:
Fig 3.4.4 Schematic Diagram of 2 line 16 character LCD display

Circuit Description:

Above is the quite simple schematic. The LCD panel's Enable and Register
Select is connected to the Control Port. The Control Port is an open collector /
open drain output. While most Parallel Ports have internal pull-up resistors, there is
a few which don't. Therefore by incorporating the two 10K external pull up
resistors, the circuit is more portable for a wider range of computers, some of
which may have no internal pull up resistors. We make no effort to place the Data
bus into reverse direction. Therefore we hard wire the R/W line of the LCD panel,
into write mode. This will cause no bus conflicts on the data lines. As a result we
cannot read back the LCD's internal Busy Flag which tells us if the LCD has
accepted and finished processing the last instruction. This problem is overcome by
inserting known delays into our program.

The 10k Potentiometer controls the contrast of the LCD panel. Nothing fancy here.
As with all the examples, I've left the power supply out. We can use a bench power
supply set to 5v or use an onboard +5 regulator. Remember a few de-coupling
capacitors, especially if we have trouble with the circuit working properly.

4.4 LED

A Light Emitting Diode (LED) is a two-lead semiconductor light source that


resembles a basic PN - junction diode, except that an LED also emits light. When
an LED's anode lead has a voltage that is more positive than its cathode lead by at
least the LED's forward voltage drop, current flows. Electrons are able to
recombine with holes within the device, releasing energy in the form of photons.
This effect is called electroluminescence, and the color of the light (corresponding
to the energy of the photon) is determined by the energy band gap of the
semiconductor.

FEATURES

 High reliability

 High radiant intensity

 Peak wavelength λp = 940nm


 2.54mm Lead spacing.

APPLICATIONS

 Visual signals where light goes more or less directly from the source to
the human eye, to convey a message or meaning.
 Illumination where light is reflected from objects to give visual response
of these objects.

Measuring and interacting with processes involving no human VISION

PCB FABRICATION

` The PCB manufacturing process involves use of expensive equipments, but homebrew
PCB fabrication is less expensive .It requires Intel Pentium PC,600-1200dpi laser printer with
premium-quality paper or butter-paper and miscellaneous items like single side copper laminated
board, Lacquer thinner, sand paper and others. The various steps involves in PCB fabrication are

PC BASED ARTWORK

The PC based artwork consists of drawing the conductor pattern. For putting artwork on
the component side of the board, flip the whole image before or while taking the print. When the
pattern has been drawn, take the print out in 600 to 1200 dpi on a translucent or butter paper.
Keep the paper side on which the toner is deposited facing down over the copper laminated
boards copper side and then when the board is turned component side up, the pattern on the
conductor will be found properly aligned with the components. Finally we take the printout of
the PCB.

TAKING THE PCB LAYOUT PRINT USING A LASER PRINTER

Take the printout of the circuit layout from a laser printer. The idea is to use a coated
paper so that the toner comes loose when heated which would transfer a sharp black print on to
copper laminate. Print for each of the required layers should be taken on separate paper.

TRANSFER OF THE CONDUCTOR PATTERN

Scrub The Copper Side Of The Copper Clad Laminated Used For The PCB Board
With A Sponge. The Scrubbing Involves Removes Oxidation, Stains, Etc. And It Also Makes
The Copper Surface Some-What Rough Which Helps The Toner To Adhere To The Copper
Surface. The Next Step Is To Degrease The Board Thoroughly Using A Paper Towel Soaked
With Acetone Solvent. Keep Doing It Until No More Discoloration Is Seen On The Paper
Towel. Rub Hard And Keep Switching To Clean Parts Of Towel. Place And Align The Paper On
The Copper Side, Using An Iron Box To Maximum Setting On The Back Of The Paper For At
Least Half A Minute. If You Don't Apply Enough Heat, The Film Or Toner May No Stick Or Be
Dark Enough. The Removal Of Paper From PCB Is Done By Putting It Into Hot Water For 10 Or
More Minutes. Check Whether It Has Transferred Properly Onto Copper Plate.

Dig The Bristles On The Tip Of A Smooth Tooth Brush Into The Holes, Remove The Paper Part
From The Tight Areas Like Drill-Holes. Now Cut The PCB To Required Size By Using A
Hacksaw.
ETCHING

Etch the unwanted copper from the board using the ferric chloride solution for 20 or
more minutes. One pint can etch at least 3.6 sq. meters of the 28gm board. Heating the etchant
will speeds up the etching process. The PCB is attached to a wooden piece and dip in to the
solution. Lift the PCB up and Check whether all the unwanted copper is removed. Then it is
immersed in to cold water to clean. When etching is complete, board is removed from the
solution and rinse it under running tap water .Acetone or lacquer thinner is used to remove the
toner .Lacquer thinner is used as a solvent in painting industry. Wash the board in lacquer thinner
solvent, rubbing with a paper towel, to remove the toner instantly.

DRILLING AND CLEANING

In this we had used a PCB hand drill .Use 0.8mm PCB drill bit to drill out all of the
component holes. After drilling the holes scrub sponge is used to clean before soldering .After
drilling and cleaning, wash the board in cold water and then dry it.

CAUTION

Lacquer thinner is extremely volatile, inflammable and explosive. Acetone can irritate
eyes and respiratory system .Ferric chloride is corrosive, so avoid skin and eye contact.
PIC16F877A PCB DESIGN

SOLDERING
Soldering is the process of joining metals by using lower melting point metal to wet or
alloy with the joined surfaces. Solder is the joining material. It melts below 427’C. Soldered
joints in electronic circuits will establish strong electrical connections between component leads.
The popularly used solders are alloys of tin and lead that melt below the melting point of tin.

In order to make the surfaces accept the solder readily, the component terminals should
be cleaned chemically or by abrasion using blades or knives. Small amount of lead coating can
be done on the cleaned portion of the leads using soldering iron. This process is called tinning.
Zinc chloride or ammonium chloride separately or in combination are the most commonly used
fluxes. These are available in petroleum jelly as paste flux. A solder joint can at first glance to be
okay, but under close examination it could be a ‘Dry Joint’. A dry joint is when either the circuit
board or the leg of the component has not been properly heated to allow the solder to flow
between the surfaces freely. This creates an intermittent or no electrical connection. This can also
be caused by a lack of flux or if you reuse old solder.

Quite often, reheating a bad join will cure the problem but in a lot of cases, the old solder
will need to be removed and some new solder applied. The residues, which remain after the
soldering, may be washed out with more water, accompanied by brushing.

Soldering iron is the tool used to melt the solder and apply at the joints in the circuit. It operates
in 230V mains supply. The iron bit at the tip of it gets heated up within a few minutes. 50W and
25W soldering irons are commonly used for soldering purposes.

PROCEDURE

Make a layout of the circuit.

Straighten and clean the component leads using blade or knife. Apply a little flux on
the leads. Take a little solder on soldering iron and apply the molten solder on the leads.

Mount the components on the PCB by bending the leads of the components using
nose-pliers.
Apply flux on the joints and solder the joints. Soldering must be done in minimum
time to avoid dry soldering and heating up of components. Wash the residue using water and
brush.

ADVANTAGES

 Reduce the manual power

 Low cost and Reliable


CHAPTER - VI

CONCLUSION

An Overcurrent relay was designed using Arduino Uno microcontroller.


Software program has been created through Protos package using C language. To
ensure the capability of the proposed overcurrent protection relay performance to a
FREEDM system branch, software simulator and hard ware circuit has been
developed. Software simulator has been formed to simulate normally inverse, very
inverse and extremely inverse characteristics. A hardware circuit was fabricated
using Arduino microcontroller board, uploaded with the created program and
furnished with inputs and outputs to monitor and protect a motor load. Three
overcurrent relay types have been applied to the software simulator and compared
with the IEC 60255-151 standard behavior. The proposed relay characteristics
nearly matched the standard ones. The error found between 1 to 4% for normally
inverse, 3% for very inverse and 2 to 5 % for extremely inverse. The normally
inverse characteristics has been tested and verified using a practical circuit and
error found between 3.4 % to -10.5% compared to the IEC 60255- 151 standard

CHAPTER - VII

REFERENCES

[1] A. Huang, "FREEDM System - A Vision for the Future Grid," IEEE Power and
Energy Society General Meeting, Providence, USA, 25-29 July 2010, pp.1-4
[2] N Sharma, "Novel Directional Protection Scheme for the FREEDM Smart Grid
System," M. Sc. Thesis submitted to Arizona State University, August 2015.

[3] https://www.freedm.ncsu.edu/

[4] P. Mandava,"Design and Development of Protection Schemes for FREEDM


Smart Grid Systems," M. Sc. Thesis submitted to Arizona State University,
December 2014.

[5] O. Vodyakho, et.al., "Solid-State Fault Isolation Devices: Application to Future


Power Electronics-Based Distribution Systems," IET Electric Power Application,
Vol. 5, Issue 6, July 2011, pp. 521 – 528.

[6] M.F.Kotb, M. El‐Saadawi, E.H. El‐Desouky, “Protection Coordination


Optimization for Future Renewable Electric Energy Delivery and Management
(FREEDM) System’, Journal of Electrical Engineering JEE, USA, 6(2018), pp.
161 -176

[7] A. Agarwal, "Overcurrent Protection of Transformer by incorporating IDMT


Function with the Help of Arduino Uno Microcontroller," International Research
Journal of Engineering and Technology (IRJET) Vol.: 03, Issue: 05, May-2016,
pp. 1753-1755

You might also like