Sale!

Design And Construction Of A Digital Changeover Switch With Generator Shutdown Feactures

 

The Changeover Switch is a device used to switch off a power supply and subsequently switch on another power supply. Basically it is aimed at switching on a more convenient power supply to the load.

Original price was: ₦ 3,000.00.Current price is: ₦ 2,999.00.

Description

ABSTRACT

The Changeover Switch is a device used to switch off a power supply and subsequently switch on another power supply. Basically it is aimed at switching on a more convenient power supply to the load. The aim of this work is to build a digital Changeover Switch that switches OFF the generator and automatically changes over to mains grid when mains grid power is restored. A digital Changeover Switch will automatically switch OFF your generator and change over to MAIN ( Public power supply/PHCN) on power resumption.

This was achieved  by the use of electrical components such as microcontroller, resistors, capacitors, diodes, transistors, opto-isolators etc., The microcontroller unit circuit is the heart of the project. This is where; the program for the control part of the project is written and burned using assembly language and a universal programmer, respectively.  Due to the looping of the pole of the contactor to give 50A  current each for PHCN and generator, the maximum power the circuit can withstand on an a.c voltage of 240V is 12KVA. This means the circuit can carry a large amount of power in homes and offices.

TABLE OF CONTENTS

COVER PAGE

TITLE PAGE

APPROVAL PAGE

DEDICATION

ACKNOWELDGEMENT

ABSTRACT

CHAPTER ONE

INTRODUCTION

1.1      BACKGROUND OF THE PROJECT

  • PROBLEM STATEMENT
  • AIM OF THE PROJECT
  • PURPOSE OF THE PROJECT
  • SIGNIFICANCE OF THE PROJECT
  • BENEFIT OF THE PROJECT
  • APPLICATION OF THE PROJECT
  • METHODOLOGY
  • DEFINITION OF TERMS
  • PROJECT ORGANISATION

CHAPTER TWO

LITERATURE REVIEW

  • REVIEW OF RELATED LITERATURE
  • MANUALLY CONTROLLED CHANGE-OVER
  • LIMITATIONS OF MANUAL CHANGEOVER SYSTEM
  • SEQUENTIAL LOGIC-CONTROLLED CHANGEOVER (SLC)
  • MICROPROCESSOR-BASED CONTROL
  • DESCRIPTION OF THE NEW SYSTEM
  • RELATED COMPONENTS IN THE SYSTEM DESIGN

CHAPTER THREE

3.0      METHODOLOGY

  • SYSTEM BLOCK DIAGRAM
  • IMPLEMENTATION OF THE MICROCONTROLLER SYSTEM
  • IMPLEMENTATION OF THE MODE SELECT SWITCH
  • IMPLEMENTATION OF FEEDBACK OR VOLTAGE MONITOR CIRCUIT
  • IMPLEMENTATION OF CHANGEOVER SWITCH
  • IMPLEMENTATION OF CONTROL LOGIC
  • THE KICK STARTER FOLLOWS THIS ALGORITHM
  • CHANGEOVER CONTROL ALGORITHM
  • MICROCONTROLLER UNIT
  • DESCRITION OF AN AT85s52 MICROPROCESSOR

CHAPTER FOUR

4.0    IMPLEMENTATION AND TESTING

  • SOFTWARE IMPLEMENTATION
  • BREADBOARDING AND VEROBOARDING ASSEMBLY
  • METHOD OF TESTING
  • CASING AND PACKAGING
  • ACHIEVEMENTS
  • RESULTS AND DISCUSSIONS

CHAPTER FIVE

  • CONCLUSION
  • PROBLEMS ENCOUNTERED
  • RECOMMENDATION
  • REFERENCES

CHAPTER ONE

1.0                                          INTRODUCTION

1.1                            BACKGROUND OF THE STUDY

The need for constant and stable power supply in a country, state or city cannot be overemphasized. In most developing nations, industries, firms and organizations contest for power supply that is unreliable and insecure, thus marring the effect of productivity and development. In these nations, the quest for secure and reliable power supply remains a dream yet to be achieved. This is as a result of increase in population, industrialization, urbanization (Aguinaga, 2008; Fuller, 2007; Kolo, 2007) and lack of proper planning by the government and utility providers. Most manufacturing industries, firms and institutions such as hospitals and healthcare facilities, financial institutions, data centers and airports to mention, but a few require constant power supply throughout the year. Volatility in power generally delays development in public and private section of any economy (Kolo, 2007; Anon, 2010; Chukwubuikem, 2012). For instance, power failure could lead to prohibitive consequences ranging from loss of huge amounts of money to life casualties (Aguinaga, 2008). This instability in power supply has led to the development of switching systems between national grid power system and standby generators used as backup. In the past decade, various equipment and configurations have been put in place in order to manage this problem (Aguinaga, 2008). An automatic changeover switching system makes use of contactors, active and passive components and transducers to realize changeover in a shorter time while excluding human interference and its attendant (Chukwubuikem, 2012). The research project is designed for power supply applications. It involves automatic change over between the mains power supply and a standby generating set. The project implements an automatic switching or starting of the power generator, whenever the main power fails. The circuit of the project consists of logical control units, display units, alarm units and relay switches. The design of the project takes into consideration practical or real life situations and a lot of precautions were put in place to make its performance acceptable, even though it is a prototype design. The basic operation of the project is to switch ON an auxiliary power supply (a generator). This operation connects the power supply from the generator to the load after a predetermined time interval. This is intended to normalize the current from the generator. Switching is possible through the use of the relays. The system was designed to automatically change power supply back to the main supply moments, after the A.C. mains are restored and to switch OFF the generator.

1.2                                   PROBLEM STATEMENT

Power failure or outage in a country, state or city is highly detrimental to development in public and private industries. The insecurity associated with constant or frequent power failure or outage brings about limitation to power  consistent investments, thus hampering the development of industries and multinational ventures. Processes like carrying out surgical operations in hospitals, laboratories which require constant power supply for research, money transactions  between banks and more require constant use of uninterrupted power. In other to solve this problem, an automatic changeover switch was invented. This research covers the design and construction of a single phase digital automatic power changeover. It has the capacity to automatically switch power from  national grid to generator and vice versa, once there is power failure in any of the two power supplies and at the same time has the capacity of shutting down a generator set once the mains grid is been restored.

1.3                                    AIM OF THE PROJECT

The main aim of any electric power supply in the world is to provide uninterrupted power supply at all times to all its consumers. Although, in developing countries such as Nigeria, the electric power generated to meet the demands of the growing consumers of electricity is insufficient, hence power instability and outage becomes the order of the day.

In view of these considerations, this project is aimed at building a workable digital changeover switch which switches ON power from power Holding Company (PHCN) to a generator when power fails and from generator to PHC when power comes back and then shut down the generator automatically.

1.4                               PURPOSE OF THE PROJECT

The main purpose of this work is to provide a means of having uninterruptible power supply in our home, office, workshops or industries.

1.5                          SIGNIFICANCE OF THE PROJECT

The automatic change over switch, the switch aimed at achieving the following automatic actions;

  • To change power over to generator
  • To change back to PHCN
  • To change the generator.
  • Display the status of the device via LCD

The automatic change over switch has the following advantages;

It minimizes damages to lives/equipment since it has its own monitoring system and its switching requires no human contact with the switch, thus eliminating human error.

It reduces its changeover timing to the minimum due to its fast response to power outage.

It maintains high quality of service through its fast and prompt response.

Moreover, the size and captivity of the unit will depend upon the load for which it will be used. The unit is also portable, easy, convenient and safe to install.

1.6                             BENEFIT OF THE PROJECT

In every home, office or industries, automatic power changeover  plays a vital role, that is, It provides a means of switching from utility AC mains to generator in the case of power failure; This project has been improved on the existing types of electromechanical device that has being in use over the years.

1.7                         LIMITATION OF THE PROJECT

This work covers only a one phase automatic changeover which can only be used for providing a means of switching from one phase of AC mains to generator set in the case of failure in public utility.

1.8                           APPLICATION OF THE PROJECT

This device is used in the following places:

  1. home,
  2. office,
  3. worship places
  4. workshops or industries

1.9                                         METHODOLOGY

To achieve the aim and objectives of this work, the following are the steps involved:

  1. Study of the previous work on the project so as to improve it efficiency.
  2. Draw a block diagram.
  • Test for continuity of components and devices,
  1. programming of microcontroller
  2. Design and calculation for the changeover was carried out.
  3. Studying of various component used in circuit.
  • Construct a digital changeover circuit.
  • Finally, the whole device was cased and final test was carried out.

1.10                                           DEFINITION OF TERMS

POWER OUTAGE / POWER FAILURE: A power outage is the loss of the electrical power network supply to an end user.

AUTOMATIC CHANGEOVER is device that automatically transfers power from generator supply to PHCN supply when available and stops the generator without without human intervention

1.11                                           PROJECT ORGANISATION

The work is organized as follows: chapter one discuses the introductory part of the work,   chapter two presents the literature review of the study,  chapter three describes the methods applied,  chapter four discusses the results of the work, chapter five summarizes the research outcomes and the recommendations.

CHAPTER TWO

2.0                               LITERATURE REVIEW

2.1                      REVIEW OF RELATED LITERATURE

Robert Dowuona (2008) found out that emergency power systems were used as early as World War II on naval ships. In combat, a ship may lose the function of its steam engines which powers the steam-driven turbines for the generator. In such a case, one more diesel engines are used to drive backup generators. Early changeover switches relied on manual operation: two switches would be placed horizontally in line and the “ON” position facing each other, a rod placed in between, in order to operate the changeover switch, one source must be turned off, the rod moved to the other side and the other turned on.

With technological advancement globally, maintaining the power quality and a steady energy supply are the major requirements the electricity consumers are demanding for. This is because many electrically powered and voltage-sensitive devices like advanced system control, automation precise manufacturing techniques, continuous data processing require uninterrupted power supply. For some of these devices, a temporary disruption or sudden surge of power can cause scrambled data, a frozen mouse, interrupted communication system crashes and equipment failures. Consequent upon this, there is urgent need to have alternative power supply is expected to come into operation immediately there is power seizure from the mains power supply. An efficient steady supply of power is therefore of tremendous advantage both in terms of cost and efficiency.

With adequate power supply base of the nation at the moment, it is almost impossible to supply electricity to consumers at all times. The unreliable public power supply has led many to the alternative power supply sources. In Nigeria today, the use of generators to power businesses and machines have become the norm. According to the Director-General of Centre for Management Development, Dr. Kabir Usman that Nigeria has the highest number of standby generators in Africa, averaging to every 2.5 people has at least one standby generator. He also pointed out that about 60million Nigerians spend 1.6trillion naira on generators annually. Many generators are in use; while some are manually started others are automatically activated.

To ensure the continuity of power supply, many commercial industrial facilities depend on both utility service and onsite generation (generator set). Because of the growing complexity of electrical systems, it becomes imperative to give attention to power supply reliability and stability. Over the years many approaches have been adopted in configuring changeover systems, some of them are discussed below

  1. Manually Controlled Changeover
  2. Sequential Logic Controlled Changeover
  • Microprocessor-based Controlled Changeover

2.2    MANUALLY CONTROLLED CHANGE-OVER

According to Jonathan (2007), manual changeover switch system still remains the oldest changeover switch box used by majority of the electricity consumers. Manual changeover switch box separates the source between a generator and public supply. Whenever there is power failure, change-over is done manually by an individual and the same happens when the public power is restored. This is usually accompanied by a loud noise and electrical sparks.

2.2.1 LIMITATIONS OF MANUAL CHANGEOVER SYSTEM

  1. Manual changeover is time wasting whenever there is power failure
  2. It is strenuous to operate because a lot of energy is required
  • It causes device process or product damage
  1. It has the potential to cause fire outbreak
  2. It is usually accompanied by a lot of noise which may sometimes be psychologically destabilizing.
  3. Maintenance is more frequent because the changeover action causes tear and wear. (Mbaocha, 2012)

2.3    SEQUENTIAL LOGIC-CONTROLLED CHANGEOVER (SLC)

In sequential logic control of power selection, sequential digital circuits are used to effect the detection and control of the supplied power. Sequential logic control approach involves only an automatic violation of the public power source in the event of power failure, but the generator activation to supply alternative power is done manually. In effect the sequential logic control is more efficient then the manual control (Shanmuhka and Ramesh, 2013).

Katz and Boriello(2005), the main advantage of the sequential logic control power changeover switch is its simplicity.

 

2.3.1 DISADVANTAGES OF SEQUENTIAL LOGIC CONTROL SYSTEM

  1. The main possible clock rate is determined by the slowest logic path in the circuit, otherwise known as the critical path. Every logical calculation, from the simplest to the most complex must be complete in one clock cycle, so logic paths that complete their calculations quickly are idle much of time, waiting for the next clock pulse. (Katz et al (2005).
  2. The clock signal must be distributed to every flip-flop in the circuit. As the clock is usually a high frequency signal, this distribution consumes a relatively large amount of power and dissipates much heat. Even the flip-flop that is doing nothing consumes a small amount of power, thereby generating waste heat in the chip. (Katz and Boriello, 2005).

2.4    MICROPROCESSOR-BASED CONTROL

The microprocessor-based control operates control operates through a central processing unit programmed in a software-implemented format and stored in memory; Random Access Memory (RAM) and/or Read Only Memory (ROM) subsequently used to effect controls in real time.

There are two aspects of microprocessor control namely

  1. Microcontroller-Based Controls and
  2. Computer-Based Controls

2.4.1 MICROCONTROLLER BASED CONTROLS

In microcontroller-based controls, microcomputers are employed with the resulting systems described as embedded. It gets information like data status from sensors and then issues control commands to actuators. One distinguishing feature of the embedded system from other real-time system is that they are only executing task relative to a fixed and well-defined work load. They do not provide any development environment; they are low-level programmed (Mbaocha, 2012).

2.4.2 COMPUTER-BASED CONTROLS

The computer-based control operates through a computer system employed in a multi-machine-distributed computing environment. Other feature known as real-time software, extensions are provided for programming languages and protocols enabling, such systems to be programmed and checked. These systems are programmed to override the operating system mechanism to control directly the hardware. They are high level language programmed.

This project however is designed and implemented as a microprocessor-based controlled system specifically using the microcontroller as its basic component. It is a dedicated embedded system.

2.5    DESCRIPTION OF THE NEW SYSTEM

In view of the limitation of above previous changeover systems, this project proposes and implements a changeover system that drastically reduced the shortcomings, the noise, arching, tear and wear, stress and time wasting associated with manual switch box and sequential logic control are eliminated totally by the introduction of solid state relay. Digital components are used to make the work more reliable, unlike the previously existing ones that make use of circuit breakers. Also PIC16F84 microcontroller was also incorporated to help improve the speed of automation. The system is controlled by a software program embedded in the microcontroller. This work I handy and portable compared to the bulky work previously done, it has also some important features like an indicator light to indicate the presence of public power source and over voltage and under voltage monitoring. Economically, this project is of affordable cost because of the use of integrated circuits (ICs) in place of discrete components.

2.6    RELATED COMPONENTS IN THE SYSTEM DESIGN

There is a great deal in designing a process control voltage changeover system than just selecting the appropriate interconnecting components and developing the software. There is the need therefore for a review of the technical terms, process and related components.

2.6.1 SWITCH

A switch is an electrical component that can break an electrical circuit, interrupting the current or diverting it from one conductor to another. Also can be used to select and ‘ON’ or ‘OFF’ state of a system. In a power system the ‘ON’ state represents power flow while the ‘OFF’ state represents the otherwise situation. Switches are commonly used in power electrical circuitry (Theraja, B.L and Theraja, A.K, 2000).

The various switching systems used in power systems include.

  1. MANUAL SWITCHING

Where a cut-out (an electrical connector device) is used to approximately interconnect and select down the voltage phases by manually plugging in a removable fused connector from one base to the other depending on the one with power. This conventional approach is usually employed in homes often than in industries.

  1. MECHANICAL SWITCHING

Mechanical switching involves using some sort of mechanism for closing and opening a part of current flow. A typical example is the gang switch used in isolating supply lines.

 

  • ELECTROMECHANICAL SWITCHING

Electromechanical switching is a form of switching which integrates electrical and suitable mechanism for power flow. In this case, power is supplied to the mechanism using solenoids to activate the switching mechanism.

  1. AUTOMATIC SWITCHING

Automatic switches are those switches that are activated in response to any change in system characteristics (current or voltage). It usually employs relay for detection of change in system characteristics after which a corresponding switching is activated immediately.

  1. MICRPROCESSOR CONTROLLED SWITCHING

In the case of microprocessor controlled switching a microprocessor chip is software programmed and stored in its memory unit to b interfaced between the available power source and the connected loads.

2.6.2 SWITCH GEAR

A switch gear is the combinations of electrical disconnect switches, fuses or circuit breakers used to control, protect and isolate electrical equipment. Switch gear is used to both de-energise equipment to allow work to be done and to clear faults downstream. The tumbler switch with ordinary fuse is the simplest form of switch gear and is used to control and protect electrical installations and other equipment in homes. This type of component is important because it is directly linked to the reliability of the electric supply (Ahmed, Mohammed and Agusiobi, 2006).

However, such switch gear cannot be used profitably in high voltage systems

2.6.3 RELAYS

A relay is an electrically operated switch that has two major parts – coil unit and the contact unit. Current flowing through the coil of the relay creates a magnetic field which attracts a lever and changes the switch contact positions.

Relays have two switching positions – the normally closed and the normally open. There is no electrical connection between the coil unit and the contact switching position when energized. The link is only magnetic and mechanical. The operational principle of the relay is basically like that of a switch controlled by electromagnetic force. This magnetic force is generated by flow of current through a coil in the relay. The relay opens or closes a circuit when current through the coil is started or stopped. The circuit symbol of a relay is shown in fig: 1.1 below

Fig: 2.1: Circuit symbol of a relay

 

2.6.4 TRANSFORMERS

A transformer consists of a laminated iron core wound with two coils – the primary and the secondary. The primary coil is connected to a source of alternating voltage which builds up a changing magnetic field setting up a similar type of AC voltage at the secondary. This is done through mutual inductance between the coils by magnetic flux linkage. When the number of turns in the primary is more than that of the secondary, it is called a step-down transformer. It is called a step-up transformer when the reverse is the case (Therajah et al, 2000). Step-down transformer was used in this project to transform the high voltage to a low voltage output.

The figure 2.2 below shows schematic diagram of an iron-core step-down transformer

Figure 2.2: schematic diagram of an iron-core transform

CHAPTER THREE

3.0                                      METHODOLOGY

Modular division methodology was adopted in the design and construction of the system. The following modules were implemented:

Figure 1 shows the block diagram of the system. The control logic unit consists of the microcontroller and the control program running in its memory. The mode select switches block represents the switches used for selecting the mode of operation of the system. The changeover actuator block represents the relay that does the switching over between the generator line and the mains line. The main supply monitor block represents the circuit that monitors the presence or absence of power on the main supply line. The feedback block performs the function of monitoring the output to ensure that proper switch over was done. The LCD is a display unit that shows the activities of the user during operation. The kick start actuator switches kick start of the generator to turn it on.

 

Figure 1 System Block Diagram

  1. Microcontroller Unit
  2. Mode Select Switched
  3. Changeover and Kick start Relay circuits
  4. Feedback (voltage sensor circuits)
  5. Control Logic

3.2      IMPLEMENTATION OF THE MICROCONTROLLER SYSTEM

AT89S52 microcontroller was used in this implementation. Before using this chip for any function, some necessary circuitry must be installed. These include the reset circuit and the clock circuit. Fig. 2 shows the microcontroller pin configuration and reset and clock circuits. The reset pin (Pin 9) is connected to Vcc through C1 capacitor. This implements a power up reset of the microcontroller. Pin 31 is connected to Vcc to enable the chip execute program instructions from the internal ROM. Pins 18 and 19 connect 11 MHz crystal through two 30pf capacitors in parallel to provide clocking trigger. The value of the crystal determines the operations cycle of controller (that is time spent in computation of 1 instruction) and is given by 4T [4], where T is the period. Therefore, for 11MHz crystal,

T= 1/f = 1/11 = 0.09 us.                                 (1)

So 1 machine cycle = 4*0.09 = 0.36 us.

The IO pins were also used to interface other component parts, while the hexadecimal form of the control program codes were stored on the Programmable Erasable ROM (Ezeofor. & Okafor, 2014)

3.3                   IMPLEMENTATION OF THE MODE SELECT SWITCH

Figure 3 shows the mode select circuit implementation. The circuit has four push button switches for selecting the various modes and functions. The outputs of the switches were connected to the port P1 of the microcontroller. The pull up resistors enables the pins to toggle their values each time they were pressed. Program delay routine was used to control bouncing effects on the switches.

VCC

5.0V

 

 

C1 1

 

 

P1B0T2

VCC 40

 

2

10µF 3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

P1B1T2EX P1B2 P1B3 P1B4 P1B5MOSI P1B6MISO P1B7SCK RST P3B0RXD P3B1TXD P3B2INT0 P3B3INT1 P3B4T0 P3B5T1 P3B6WR P3B7RD XTAL2 XTAL1 GND

U1

8052

P0B0AD0 39

P0B1AD1 38

P0B2AD2 37

P0B3AD3 36

P0B4AD4 35

P0B5AD5 34

P0B6AD6 33

P0B7AD7 32

EAVPP 31

ALEPROG 30

PSEN 29

P2B7A15 28

P2B6A14 27

P2B5A13 26

P2B4A12 25

P2B3A11 24

P2B2A10 23

P2B1A9 22

P2B0A8 21

C3

30pF

X

30pF

HC-49/U_11MHz   C2

Figure 2 AT89S52 Circuit Implementation

VCC

5.0V

S1                      R1

                                 10kΩ P1.0

 

3

4

Figure 3 Circuit Implementation of Mode Select Switches

3.4     IMPLEMENTATION OF FEEDBACK OR VOLTAGE MONITOR CIRCUIT

The feedback circuit is used to monitor the voltage output at the public supply line and the load. The signal is used by the microcontroller to determine the presence of sufficient voltage at those stages. The circuit is as shown in figure 4 below.

Figure 4 Voltage Detector

The circuit includes a step down transformer that steps voltage down to 12 V from 220 V. The voltage is further conditioned to produce DC voltage within the range of 0 to 5 V. This output varies in response to the fluctuation at the transformer input. 0 V at the output means complete power outage. If the input voltage drops below 180 V, the system detects that as fluctuation and would need to change over to alternative source. The ADC converts these analog processes to digital values that the microcontroller would be able to process.

   3.5        IMPLEMENTATION OF CHANGEOVER SWITCH

The changeover consists of a relay coupled to the collector of transistor in common emitter mode. This configuration switches between the generator and public supply lines, making use if the normally open and normally closed terminals of the relay. The base of the transistor is connected to the microcontroller through a biasing resistor, Rb. A diode is connected across the 12 v line and the collector in reversed biased mode to prevent back EMF that might be generated from the relay coil. The circuit is shown in fig. 5 below. VCE = 0 v when the transistor is saturated. VBE = 0.6v (silicon), Vin = 5 v (voltage from microcontroller), hfe = 100, RC being the relay resistance is 400 Ω, load voltage is 12 v Rb is given by

C

I = VLoad– VCE

RC

ℎfe =  IC

IB

(2)

∴ ℎfe = VLoad– VCE

RCIB

(3)

I =  Vin  −  VBE B  RC

Rb = hfe∗RC (Vin– VBE)

Vload— 7CE

Hence, RB = 100 * 400 (5-0.6)/12-0 = 14666.67 Ω

 

Figure 5 Changeover switch configuration The kick starter uses the same circuit to switch the generator ON or OFF

(4)

3.6                 IMPLEMENTATION OF CONTROL LOGIC

The control logic was implemented in the control program, written in Bascom basic. Major components of the control program were the voltage measurement, changeover control and the kick start control.

  • Voltage measurement

The following algorithm was used to measure and calibrate voltage measurement:

  1. Make CS=0 and send a low to high pulse to WR pin to start the
  2. Now keep checking the INTR pin. INTR will be 1 if conversion is not finished and INTR will be 0 if conversion is
  3. If conversion is not finished (INTR=1) poll until it is
  4. If conversion is finished (INTR=0), go to the next
  5. Make CS=0 and send a high to low pulse to RD pin to read the data from the
  6. Compute voltage value and display on LCD
  7. Go to step
  8. Kick Starter

3.7               THE KICK STARTER FOLLOWS THIS ALGORITHM:

  1. Read the output voltage sensor on the mains
  2. If voltage <= 0 then send logic 1 to kick start port
  3. If kick starter is on read the voltage sensor on the generator output line
  4. If the voltage is present in the output of the generator stop kick starter

3.8                                                              CHANGEOVER CONTROL ALGORITHM

  1. Read the status flag of mode selected by user
  2. If the status flag is auto, turn on the changeover switch
  3. If status flag is timed, measure selected time before switching over
  4. If flag is manual, wait until user turns on changeover switch

 

   3.9                                      MICROCONTROLLER UNIT

A Microcontroller is a computer – on a – chip, some school of thought called it a single – chip computer. Micro suggests that the device is small, and controller tells you that the device might be used to control objects, processes or events. Another term to describe a microcontroller is an embedded controller, because the microcontroller and its support circuits are often built in to, or embedded in the device they control. Microcontrollers can be found in all kinds of devices these days. Any device that measures, stores, controls, calculates or display information in most cases comprises of a microcontroller.

In this design, the ATMEL microcontroller AT85C52 is used. The AT85C52 is a low-power high performance CMOS 8 –bit microcontroller with 4kbytes in system programmable flash memory. The device is manufactured using ATMEL’S high density non-volatile memory technology and is compatible with industry standard MCS – 51 instruction set and pin out. The on chip flash allows the program memory to be reprogrammed in system or by a conventional memory programmer. By combining a versatile 8bit CPU with in-system flash on a monolithic chip, the ATMEL AT85C52 is a powerful microcontroller which provides a highly – flexible and cost effective to many embedded control applications.

The AT85C52 provides the following standard features: 4kbytes of flash, 128 bytes RAM, 32 I/O lines, two 16bit timers/counters, five vector two –level interrupt architecture, a full duplex serial port, on chip oscillator and clock serial port, on chip oscillator and clock circuitry.

In addition, the AT85C52 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. The idle mode stops the CPU while allowing the RAM, timers/counters, serial port and interrupt system continue functioning. The power-down mode save the RAM contents but freezes the oscillator, disabling all other chip functions until the next external interrupt or hardware resets.

3.10      DESCRITION OF AN AT85s52 MICROPROCESSOR

AT89s51 is an 8-bit microcontroller and belongs to Atmel’s 8051 family. ATMEL AT85s52 has 4KB of Flash programmable and erasable read only memory (PEROM) and 128 bytes of RAM. It can be erased and program to a maximum of 1000 times.

In 40 pin AT85s52, there are four ports designated as P1, P2, P3 and P0. All these ports are 8-bit bi-directional ports, i.e., they can be used as both input and output ports. Except P0 which needs external pull-ups, rest of the ports have internal pull-ups. When 1s are written to these port pins, they are pulled high by the internal pull-ups and can be used as inputs. These ports are also bit addressable and so their bits can also be accessed individually.

Port P0 and P2 are also used to provide low byte and high byte addresses, respectively, when connected to an external memory. Port 3 has multiplexed pins for special functions like serial communication, hardware interrupts, timer inputs and read/write operation from external memory. AT85s52 has an inbuilt UART for serial communication. It can be programmed to operate at different baud rates. Including two timers & hardware interrupts, it has a total of six interrupts.

Pin Diagram: 

PIN DESCRIPTION

 Pin No  Function  Name
1 8 bit input/output port (P1) pins P1.0
2 P1.1
3 P1.2
4 P1.3
5 P1.4
6 P1.5
7 P1.6
8 P1.7
9 Reset pin; Active high Reset
10 Input (receiver) for serial communication RxD 8 bit input/output port (P3) pins P3.0
11 Output (transmitter) for serial communication TxD P3.1
12 External interrupt 1 Int0 P3.2
13 External interrupt 2 Int1 P3.3
14 Timer1 external input T0 P3.4
15 Timer2 external input T1 P3.5
16 Write to external data memory Write P3.6
17 Read from external data memory Read P3.7
18 Quartz crystal oscillator (up to 24 MHz) Crystal 2
19 Crystal 1
20 Ground (0V) Ground
21 8 bit input/output port (P2) pins/High-order address bits when interfacing with external memory  P2.0/ A8
22  P2.1/ A9
23  P2.2/ A10
24  P2.3/ A11
25  P2.4/ A12
26  P2.5/ A13
27  P2.6/ A14
28  P2.7/ A15
29 Program store enable; Read from external program memory PSEN
30 Address Latch Enable ALE
Program pulse input during Flash programming Prog
31 External Access Enable;  Vcc for internal program executions EA
Programming enable voltage; 12V (during Flash programming) Vpp
32 8 bit input/output port (P0) pins
Low-order address bits when interfacing with external memory
 P0.7/ AD7
33  P0.6/ AD6
34  P0.5/ AD5
35  P0.4/ AD4
36  P0.3/ AD3
37  P0.2/ AD2
38  P0.1/ AD1
39  P0.0/ AD0
40 Supply voltage; 5V (up to 6.6V) Vcc

 

ADVANTAGES OF USING AT85s52 MICROCONTROLLER

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

Endurance: 1000 Write/Erase Cycles

  • 4.0V to 5.5V Operating Range
  • Fully Static Operation: 0 Hz to 33 MHz
  • Three-level Program Memory Lock
  • 256 x 8-bit Internal RAM
  • 32 Programmable I/O Lines
  • Three 16-bit Timer/Counters
  • Eight Interrupt Sources
  • Full Duplex UART Serial Channel
  • Low-power Idle and Power-down Modes
  • Interrupt Recovery from Power-down Mode
  • Watchdog Timer
  • Dual Data Pointer
  • Power-off Flat

CHAPTER FOUR

  • IMPLEMENTATION AND TESTING

The implementation of this project was carried out in stages, starting from bread-boarding, vero-boarding up to the final stage of arrangement and packaging even the soldering exercise was carefully and skillfully carried out to avoid damage of the components.

Primarily, it was in three parts – the software programming, the hardware assembling and the combination of both parts as one unit on a veroboard.

4.1    SOFTWARE IMPLEMENTATION

The type of programming language used was a low level assembly language due to its machine oriented ability and its electronic circuit friendliness. The peripheral interface microcontroller chosen and used is the AT89S52, the input/output data setting of the microcontroller was software/program instruction based. MPLAB software (a software program that runs on a PC to develop application for microchip microcontrollers and digital signal controllers) was installed in a high definitive dual core HP system unit. This made an easy access and running of a micro plan text assembler – MPASMWIN (an executable file that helps in programming a microcontroller chip with assembly program) that has already been installed in the system. With the flowchart established earlier on during the design process, inputting of data was not as difficult as envisaged.

After the data writing and formatting on the system software, it was run on the MPASMWIN text assembler for error-free confirmatory test. When it was confirmed error-free, the program was now burn into microcontroller integrated circuit (IC) that is used in the project which is AT89S52.

4.2    BREADBOARDING AND VEROBOARDING ASSEMBLY

Breadboarding is simply a stage when all the electronic hardware components including the AT89S52 are carefully assembled on a construction base using the designed circuit diagram as a guide. When this has been carried out, the initial results gotten were not as expected. For instance, the reference voltages were adequately confirmed as inputs to the comparator integrated circuits (ICs), but there was no output coming out from them, even when there was noticeable power presence from the input public supply.

The circuit was powered again. This time there was output voltages as inputs (high and low values) to the comparators and with the presence of the input voltage to the comparator, expected outputs were measured at their outputs. Thus a successful transfer of assembled components from breadboard to veroboard was done with the desired result gotten.

4.3    METHOD OF TESTING

The following stages of testing were carried out in the testing process

STAGE I:

An input supply of 220V was connected to the circuit, the output of the comparator was measured to give zero (0) value, the pin terminal of the AT89S52 was also low. As a result the switching circuit transistor was at cut-off, but the voltage at pin1 of the controller was high, making it produce low output at its pin8 terminal.

STAGE II:

Input voltage was reduced to a lower value by the variation of the potentiometer. The comparator output went high, transistor Q2got biased because the pin9 of the microcontroller went up. This caused relay A to energize, closing up on the generator to come ON.

STAGE III:

When there was no output supply at all from PHCN pin1 and pin8 terminals of IC3 went high and low respectively causing transistor Q1 to be switched into saturation mode. Thus the relay once again got energized as a result the generator is switched ON once again. The implication is that the generator only came ON when either the public supply was very low or not available at all.

4.4    CASING AND PACKAGING

This project is a prototype set target, therefore set of 100 watts bulbs, A.C voltage powered, were connected to the output load.

The veroboard containing the soldered components is housed inside a rectangular shaped box. All the external switches, the A.C bulb, circuit breakers and the cut-out fuses were mounted externally on the box. Care was taken during all connections; the rectangular box was made from a good quality plywood, painted with a high quality colour paint. The dimension and design of the box was arrived at after considering various factors such as the width and length of the vero – board

The dimension for the casing is:

Length  — 31.5 cm  and 26.5cm

Height —   14.cm

The vero board and the transformer are held firmly by bolts and nuts.

4.5                                      ACHIEVEMENTS

A design of this nature is a peculiar one, but effort was put in here to checkmate and mitigate the effect of low voltage supply, since all other changeover devices only switch over to generator when the supply is absent. This design does not only automatically change over to generator as input supply to the load, but through the intelligence of the programmed microcontroller, switch over to the generator at a time the supply is dangerously low. This benefit will be useful in industries whose heavy and expensive A.C machines are in use. After all, low voltage supply affects the machine windings more than high voltages due to internal overheating.

 

4.6                                                              RESULTS AND DISCUSSIONS

Each module of the system was implemented, tested and integrated before testing the entire system. The system was tested with a 60 watts bulb as the load. First, the microcontroller was wired up and tested for continuity. The second module was the voltage sensor circuit, which was implemented and the output voltage measured and controlled until the required range of DC voltage was obtained. This output was interfaced with the ADC0804 for digital signal processing. The 8 bit output pins of the ADC were further interfaced with the IO port of the 8051 microcontroller. The changeover switch circuit was implemented and tested by passing biasing voltage to the base of the transistor to ensure that the relay was switching fine. This was tested Ok and interfaced to the port of the microcontroller. The last stage of the implementation was the programming. During this time, control logics were developed via program codes by implementing the algorithms. Each segment of the code was tested and any bug found during testing was debugged. The routine of testing and debugging continued until the system perfumed as expected. The final test was done by connecting the system to a generator with start switch and a 240 V AC line as mains. Result showed that when a user selects Auto Mode, and the mains turned off, the system started the generator and automatically changed over to the generator line. When a user selected timed mode, and the mains turned off

CHAPTER FIVE

  • CONCLUSION AND RECOMMENDATION
  • CONCLUSION

After a research work and findings on the existing changeover devices through the use of cut-out fuses, a normal switching system and even automatic coil-energized changeovers, a step-further was taken to put in place active component monitors to provide as input data to a microcontroller software programmed chip in controlling the time and method of switching over to a standby generator once there is low or no supply from public power supply. It makes the design highly sensitive to avoid damaging effect of low voltage in particular or instant changeover to the alternative source for a continuous supply to the load uninterrupted.

The design and implementation of a digital power changeover has been implemented in this paper. The technology will upon the automation of the existing change over system, add some intelligence to automatic power changeover by allowing user to choose the mode they want their automatic systems to operate on. The present system has improved the existing automatic and manual power change over.

 

  •                       PROBLEMS ENCOUNTERED
  • There was problem of inconsistent power supply during the design stages. This caused mostly the delays as well as unstable data values, more so when the device was power input based.
  • Cost financing of the project seriously affected the progress of the work.
  • Sourcing for components was also a constraining factor as it led to going to distant cities such as Lagos and Portharcourt in order to purchase some major components of the project.
    •             RECOMMENDATIONS
  • The level of this project achieved is only at a prototype level and is therefore unsafe for installation as a household device except the various power ratings of the components are upgraded.
  • System design of the project can be enhanced for a multi-phase based input instead of the single-phased input.
  • All connections at various stages of the circuit design should be carefully re-examined before the introduction of the high input voltages. This can be disastrous if ignored.

5.4                                            REFERENCES

Ahmed, M.S, Mohammed, A.S and Agusiobo O.B (2006): Development of Single Phased Automatic Changeover Switch: African Union Journal, Vol.10, No.1. pp 68 – 74.

Amos, S.W.; and James, M. 1981. Principles of transistor circuit: Introduction to the design of amplifiers, receivers and digital circuits, 6thed., Hartnolls Ltd., Bodmin, UK.

‘Automatic transfer switch’ retrieved from http//:www.wikipedia.com. July 15, 2011

Katz, R and Boriello, G (2005): Contemporary Logic Design. 2nd edition. Prentice Hall, Italy. Pp 445 – 589.

Kolo, J.G (2007). Design and Construction of an automatic Power Changeover Switch: African Union Journal, Vol.2, No.11, pp113 – 118 (October, 2007).

L.S. Ezema, B.U. Peter, O.O. Harris (2012):Design Of Automatic Change Over Switch With Generator Control Mechanism.Electrical Power and Electronic Development Department, Projects Development Institute (PRODA), Enugu: Natural and Applied Science, Vol.3, No.3. November, 2012. Pp 125 – 130.

Microcontroller features retrieved from http://www.microchip.com/downloads/en/DeviceDoc/39630C.pdf)

Mbaocha C. (2012): Smart Phase Changeover Switch Using AT89C52 Microcontroller: Journal of Electrical and Electronics Engineering Vol.1; Issue 3: pp 31 – 34.

Nwafor, C.M, Mbonu E.S, and Uzedhe G. (2012): Cost Effective Approach to Implementing Changeover Systems: Academic Research International; Vol.2, No.2

Robert Dowuona-Owoo (2008). Design and Construction of Three phase Automatic Transfer Switch: A Thesis presented at Regent University College of Science and Technology Ghana

Shanmukha Nagaraj & Ramesh S. (2013): Programmable Logic Controlled Circuits: International Journal of Research in Engineering & TechnologyVol.1, Issue 2, July, 2013; pp 111 – 116.

Theraja, B.L and Therajah, A.K(2000). Electrical Technology. S.Chand and Company Limited. New Delhi, 1999.

Agbetuyi, A. F., Adewale, A. A., Ogunluyi, J. O., Ogunleye, D. S. (2011). Design and Construction of an Automatic Transfer Switch for a Single Phase Power Generator, International Journal of Engineering Science.

Roy, A. A., Newton, F. G., Solomon, I. A., (2014), Design and Implementation of a 3-Phase Automatic Power Change-over Switch, American Journal of Engineering Research, 07-14.

Ezeofor, J. C. and Okafor, E. C., (2014), Design and Simulation of Microcontroller Based Electronic Calendar Using Multisim Circuit Design Software, International Journal of Engineering Trends and Technology,396 – 400.

Jony, I. H., Rahman, M., (2014), Construction of Microcontroller Based Digital Voltmeter, International Journal of Science and Research, 84 – 87.

Reviews

There are no reviews yet.

Be the first to review “Design And Construction Of A Digital Changeover Switch With Generator Shutdown Feactures”

Your email address will not be published. Required fields are marked *