You are on page 1of 10

International Journal of Electronics and Computer Science Engineering

Engineering 138

Available Online at www.ijecse


ijecse.org ISSN- 2277-1956

Design and Construction of Load Sharing control


system using PIC microcontroller
Nan Ei Ei Naing 1, Zaw Min Min Htun 2

12
Departmentof Electronics and Communication Engineering
Department
1
Email- naneinaing1990@gmail.com

Abstract- In this system, there are four power sources: Solar, Wind, Generator and Grid Line. Among them solar and
wind are mainly used. When any two sources are not available or only one source is available, the grid line will be used.
Whenen the grid line also does not active, the generator will be turned on and can support to only one load. There are three
kind of loads and can be organized as load-1
load (10 lamps and 3 computers), load-2 (4 computers) and load-3load (an air-con) for
power balance. Main aim for this work is to adjust between available power and consuming power automatically.auto To
sense the input available sources power, voltage
voltage sensing circuit is used. The measurement data from the voltage sensing
circuit is sent into the PIC microcontroller in which suitable algorithm will be done connecting with relays via relay
driver
ver circuit. For software implementation, visual basic programming language is used. To demonstrate the hardware
implementation, PIC 18F4550 microcontroller
microcontroller, voltage sensing circuit and relay setting circuit are used.

Keywords – programmable integrated circuit,


circuit, visual basic programming, distributed control system, voltage sensing
circuit,, relay setting circuit

I. INTRODUCTION
In the system, there are two main parts: input sources and distributed control system (DCS). Distributed Control
System (DCS) is demonstrated by Graphical User Interface (GUI) in this paper and the reason of controlling the
distribution is to stabilize power balance between input sources and output loads. Graphical User Interface is
completed with the visual basic programming language.. Load sharing can clearly be seen on the computer with GUI.
The following figure is about the overall block diagram of a smart faculty.

Figure 1: Overall Block Diagram of a Smart Faculty

ISSN 2277-1956/V3-N2-138-147
147
139
Design and Construction of Load Sharing control system using PIC microcontroller

II.DISTRIBUTED CONTROL SYSTEM


The overall block diagram of distributed control system is shown in below. There
here are four main input sources:
EPC, Solar, Wind and Generator, and each source connect with relay. Relay is used to control the ON and OFF of
input sources’ power lines and switchin
switchingg for loads. The power lines from sources are sensed by Voltage Sensing
Circuit to know which power lines are active. In really, Distributed Control System represents a computer GUI in
which user can modify a necessary decision which source will open and which
hich relays will be loaded. Moreover, the
predefined procedure for turning
rning ON/
ON/OFF of the generator is also done according to the requirement of the system.
And the using of Current Sensing Circuit is to know which load is using how much current. The reason of
connecting the DCS with Current Sensing Circuit is to adjust the power for loads.

Figure 2: Block diagram of Distributed Control System (DCS)

III. LOAD SHARING


In load sharing, the conditions are checked as the overall flow chart of the system illu illustrated in the following
figure. When the program is started, will check the condition if the solar only is available or not. If it is active,
condition A will be done. If solar is not active, will check the situation for wind only source. And A condition A will
be done when wind power is available.
available If wind also do not energetic, will check the circumstance for both solar and
wind are obtainable or not. Condition B will be done if they are access and condition C will be done if they are not.
After any condition on is completed, program will be check to be stop. If user desire to stop, the program will go to the
end state. If not, the program will be start from begin.

Figure 3: Overall flow chart of load sharing system

ISSN 2277-1956/V3-N2-138-147
147
IJECSE, Volume3, Number 2 140

Nan Ei Ei Naing and Zaw Min Min Htun

In condition A, power got from only solar or only wind source and load-1 can be used because they can support
power for only one load. For other two loads, EPC source will be check. If power got from EPC, load-1 and load-2
can also be used since EPC can provide for all loads. If not, generator will be turned on and only one load (load 2 as
priority) can be used as it can give power for only one load.

Figure 4: Flow Chart of load sharing when solar or wind only is available

Condition B is for both sources are accessible and load-1 and load-2 can be used. And third load can also be
used whether EPC is active or not because generator will be turned on if EPC is not energetic.

Figure 5: Flow Chart of load sharing when both solar and wind are available

In condition C, all loads can be used when EPC is obtainable and this condition is for both sources are not
active. If EPC cannot support, generator will be turned on and only load-1 can be used as priority in this situation.

Figure 6: Flow chart of load sharing when both two sources are not available

ISSN 2277-1956/V3-N2-138-147
141
Design and Construction of Load Sharing control system using PIC microcontroller

The table for running assign pins of PIC that connect with relay are shown as below. The PIC pins on the right
side of the table will be going on when the sources on the left side of the table are available.

Table1:
1: Table of available loads and input
i sources

IV. HARDWARE IMPLEMENTATION


Hardware implementation consists of Voltage Sensing Circuit, PIC 18F4550 circuit with its USB and I/O ports,
and Relay Setting or Load Control Circuit. Voltage Sensing Circuit is used to detect the power of input sources and
to know which sources are available. In PIC 18F4550 circuit, main circuit in this system, all decision and controlling
for the structure is done. Relay Setting is the driver circuit to drive the relays connected with corresponding loads.

A. Voltage Sensing Circuit (VSC)


6VAC
D3 D1

220 V AC

D4 D2 10KΩ PIC

Step Down 22µF


1N4733 A
Transformer 25V

Figure 7: Voltage sensing circuit diagram for the system

Figure-77 demonstrate the voltage sensing circuit diagram of the system and it is used to sense the power value
of the input sources to decide which sources are active or not. Voltage is reduced by step down transformer from
220V to 5V and then passes through the bridge composed with 4diodes to change AC voltage to DC voltage. In this
circuit, the capacitor (22µF,
F, 25V) is used to reduce the
t ripple, and also used 10KΩ variable resistor to vary the input
voltage to the PIC and 1N4733A zener diode is applied to block the limited voltage into the PIC then connects to the
PIC analog input pins. Then the voltage variation of input sources can be seen in computer via PIC by using visual
basic programming. The circuit construction of voltage sensing circuit is shown below.

Figure 8: Circuit construction of voltage sensing circuit of the system

ISSN 2277-1956/V3-N2-138-147
147
IJECSE, Volume3, Number 2 142

Nan Ei Ei Naing and Zaw Min Min Htun

B. Main PIC Circuit


In this work, 18F4550 series of programmable integrated circuit is used. The main reason for this PIC using is
that it has many analog pins, can get easily in market and contains built-in
built in USB pins. And there are some advantages
of PIC 18F series such as low cost, wide availability, extensive
extensive collection of application notes and can be re
re-
programming with flash memory [4]. [4]. The schematic diagram of PIC 18F4550 with USB and I/O ports for linking
with visual basic is also shown in the following figure.

Figure 9: Schematic diagram of P


PIC 18F4550 with USB and I/O ports [3]

According to the diagram, pin2 to pin8 are used as Analog input pin except pin6, and Port B (pin 33 to pin 40)
and Port D (pin 19 to pin 22 and pin 27 to pin 30) are used as output pins. Pins 24 and 23 are used for USB
U data pins
D+ and D- respectively. For power supply (Vcc), pin 11 is used and pin 12 is used as ground pin (Vss). Pins 9, 10, 16,
17, 25 and 26 are not used and free. The 5V power supply for PIC is now supplied by computer via USB. The circuit
construction of main PIC circuit is also shown below.

Figure 10: Circuit construction of main PIC circuit of the system

C. Load Control or Relay Setting Circuit


In really, PIC decides which load can be used and which cannot. Because it has the design and calculation
between available source power and consuming power loads. According to the available power, PIC makes a
necessary decision and switch on/off of the relay that connect with loads. A relay can be used to switch higher
power devices such as motors and solenoids, and the relay can be powered by a separate power supply. In this
system, relays are used to control the loads as switches [6]. The use of a back-EMF suppression diode across the
relay contacts is used to prevent damage to the transistor because relay creates a back-EMF
EMF when power is switched
off [5].. And the diode type of 1N4148 is used in this circuit. BC 547, is 45V and 100mA NPN transistors, can be
used as switching and amplification for general purpose. And in this case, it is used as switch to control 12V relay
ON/OFF. When the base of transistor receive the signal from the PIC, it is completely on and the relay also ON. If
the signal absence in the base, it is fully off and the relay also off. The circuit diagram of relay setting and circuit
construction of that circuit are shown below.

147
ISSN 2277-1956/V3-N2-138-147
143
Design and Construction of Load Sharing control system using PIC microcontroller

+12V

1N4148 Relay
12V
V


10KΩ
PIC BC 547

Figure 11: Circuit diagram of relay setting Figure 12: Circuit construction of relay setting of the system

D. Overall Circuit Diagram of the system

Figure 13: Circuit construction of Overall Circuit of Load Sharing Control System

Relay Setting for Load 2


+12V
+12V
1N4148 Relay
12V
1 N4148 Relay
+12V 10K Ω
12V
BC 547

10KΩ
1N4148 Relay BC 547 Relay Setting for
12V

Voltage Sensing Circuit for Sources Ω


10KΩ +12V +12V
load 1
BC 547
6VAC
+12V
D3 D1 Relay
1N4148 1N4148
220 AC 12V Relay
V 12V
D4 D2 10KΩ 1N4148 Relay
10K Ω
Step Down 22µF
1N4733 A Ω
10KΩ 12V
BC 547
Transformer 25V BC 547

10KΩ +12V
6VAC BC 547
D3 D1
220 AC
V 1
1N4148 Relay
D4 D2 10K Ω 12V
Step Down 22µF 1N4733 A
Transformer 25V Ω
10KΩ
BC 547
6VAC 10kΩ
RB7
D1 1 40 +12V
D3 AN0 2 39 RB6
220 AC AN1 3 38 RB5
V AN2 4 37 RB4
D4

D2 10KΩ AN3 5 36 RB3
Relay
6 35 RB2 1N4148
Step Down 22µF 1N4733 AN4 7 34 12VV
RB1
Transformer 25V AN5
A 8 33 RB0
9 VCC
6VAC 10 32 +12V

VSS
D1 VCC 10KΩ
D3 11 18F4550 31
VSS
12 BC 547
220 AC 33PF 30 RD7
V 13 29
D4 20MHZ RD6

D2 10KΩ 14 28 RD5 1
1N4148 Relay
33PF
Step Down 22µF 15 27 RD4 12V
1N4733 A LED
Transformer 25V 16 26
17 25 +5V
1
6VAC 0.47µF 2

+
18 24 D 10KΩ
D3 D1 D- USB
RD0 19 23 3
BC 547
220 AC 22 RD3 4
RD1 20 21 RD2
V
D4 D2 10K Ω
Step Down 22µF
1N4733 A
Transformer 25V
+12V +12V +12V

6VAC
D3 D1
1N4148 Relay 1 N4148 Rel Relay
220 AC 1
1N4148
V 12V ay 12V
D4 Ω
D2 10KΩ 12V
22µF
Step Down 1N4733A Ω
10KΩ 10K Ω Ω
10KΩ
Transformer 25V BC 547 BC BC 547
547

Voltage Sensing Circuit for loads


Relay Setting for load 3

Figure 14:
14 Overall Circuit Diagram of Load Sharing Control System

ISSN 2277-1956/V3-N2-138-147
147
IJECSE, Volume3, Number 2 144

Nan Ei Ei Naing and Zaw Min Min Htun

V. SOFTWARE IMPLEMENTATION WITH VISUAL BASIC PROGRAMMING LANGUAGE


Visual Basic is not only a programming language, but also a complete graphical development environment.
Visual Basic Express is a fast and easy way to create programs for Microsoft Windows. "Visual" refers to the
method used to create what the user sees—the
sees the graphical user interface, or GUI. "Basic" refers to the BASIC
(Beginners All-Purpose
Purpose Symbolic Instruction Code) programming language, a language used by more programmers
than any other language in the history of computing. Visual Ba Basic
sic allows the user to create nice looking, graphical
programs with little coding by the programmer and much of the program code is automatically generated. It can be
used serving as the user interface which collects user inpu
inputt and displays formatted output
outpu [7]. In this paper, visual
basic programming is used to show the result of voltage sensing circuit or the variation of voltage changing by the
variable resistor as Graphical User Interface (GUI). There are eight GUI for four conditions.

A. Condition I
In condition I, only load-11 can be used because only one source (solar) is active. But all loads can be used
in this condition when EPC is available as it can support enough power for the other two loads. The GUI for this
condition is as follow.

Figure 15: GUI for Load sharing when Solar only & EPC are active Figure 16: Photo of circuit for solar & EPC are active

When solar only is available and EPC is not available, load-1


load cann be used. As EPC is not active, generator is
turned ON and load-22 can also be used as generator can support power for one load.

Figure 17: GUI for Load sharing when Solar only Figure 18: Photo of circuit for solar & Engine are active
and engine are active

B. Condition II
Similarly, only load-11 can be used in this condition
condition cause of only one source (wind) is available and all
loads can be used when EPC is active.

147
ISSN 2277-1956/V3-N2-138-147
145
Design and Construction of Load Sharing control system using PIC microcontroller

Figure 19: GUI for Load


oad sharing when Wind only & EPC are active Figure 20: Photo of circuit for Wind
Win & EPC are active

In this condition, load-11 is supported by wind and load-2


load 2 is supported by generator as EPC is lack.

Figure 21: GUI for Load sharing when Wind only Figure 22: Photo of circuit for Wind & Engine are active
and engine are active

C. Condition III
When both
oth sources are available, load-1
load and load-22 can be used. And for the third load, EPC is provided as it is
active.

Figure 23: GUI for Load sharing when both sources Figure 24: Photo of circuit for both sources & EPC are active
& EPC are available

When EPC is not got, generator will support the third


third load in this condition as below and all loads can be used.

ISSN 2277-1956/V3-N2-138-147
147
IJECSE, Volume3, Number 2 146

Nan Ei Ei Naing and Zaw Min Min Htun

Figure 25: GUI for Load sharing when both sources Figure 26: Photo of circuit for both sources & Engine are active
& Engine are available

D. Condition IV
For the condition of both sources are not active, all load can be applied if EPC is available.

Figure 27: GUI for Load sharing when EPC only is active Figure 28: Photo of circuit for EPC only is active

If EPC is not supported, only one load can be used in this condition and it is provided by engine generator.

Figure 29: GUI for Load sharing when Engine only is Figure 30: Photo of circuit for Engine only is active
active

VI. DISCUSSION
The voltage of input sources can really be sensed by voltage sensing circuit and the program active as the
voltage variation. According to the variation, the program can make decision which loads to be ON. Then the
program drive the relay for corresponding loads by relay driver circuit or relay setting automatically. The operation
and implementation of the system mentioned above can easily be modified by using visual basic programming. The
program for this system is changeable as user desire such as choosing
choosing the priority of loads and the selecting of input
sources.

147
ISSN 2277-1956/V3-N2-138-147
147
Design and Construction of Load Sharing control system using PIC microcontroller

VII. CONCLUSION
In this paper, load sharing is described as simulation implementation by using Visual Basic. The flow charts for
load sharing design and each condition are also illustrated. The input, output and USB pins of PIC 18F4550 is
shown too. It is right and really get the result as the above circuit diagrams when PIC is constructed as the pin
diagram shown. Similarly the results of visual basic also get as mentioned when the program run. All circuits in this
paper can really be constructed and can give result as presented when the operation of load sharing is loaded.

REFERENCE

[1] http://routing-bits.com/2009/06/03/load-sharing-vs-load-balancing/
[2] http://en.wikipedia.org/wiki/Electric_power_distribution
[3] http://www.instructables.com/id/USB-Project-USB-Interface-Board-Using-PIC18F455/
[4] http://pwc.theclarkwebsite.com/PIC18F4550usb.php
[5] Electus Distribution Reference Data Sheet: RELAYDRV.PDF (1)
[6] http://www.scribd.com/doc/153667186/es-mcinterface-pdf
[7] http://groups.engin.umd.umich.edu/CIS/course.des/cis400/vbasic/vbasic.html

ISSN 2277-1956/V3-N2-138-147

You might also like