You are on page 1of 55

FINAL YEAR PROJECT REPORT

Design and Implementation of Intelligent uninterruptible power supply (i-ups)

Project Advisor (Asst. Prof Mr. Farhan Iqbal)

Submitted by (Majid Ali 091320-079) (Hafiz Zahid Rasool 091320-007) (Majid Rehan Khan - 0913200043)

Department of Electrical Engineering School of Science and Technology University of Management and Technology

Design and Implementation of Intelligent uninterruptible power supply (i-ups)

Project Report submitted to the Department of Electrical Engineering, University of Management and Technology in partial fulfillment of the requirements for the degree of Bachelor of Science in Electrical Engineering

(Majid Ali 091320-079) (Hafiz Zahid Rasool 091320-007) (Majid Rehan Khan 091320-043)

(Date)

Abstract
UPS stands for Uninterruptible Power Supply. It is an instrument connected between the electric grid and the consumer, comprising of electric hardware and rechargeable batteries. The aim of the instrument is to supply continuous undisturbed and conditioned power to the critical load. The energy for powering the load comes from the utility, or from the battery upon mains outage. Uninterruptible Power Supply (UPS) are widely used to provide emergency power to critical loads in case of utility mains failure, and as such constitutes an essential element in providing back-up power for computer networks, communication links, biomedical equipment, and industrial processes, among others. In market local ups designed for just power production using batteries or such types of power sources. They do work but not for all environment. We implement intelligent uninterrupted power supply (i-UPS) for multipurpose. It consists of microcontroller based circuit. Mainly four feature of our i-UPS. First, it is safe and Improves battery life by using temperature sensor. When battery is fully charged and comparator do not trip battery charging then microcontroller will come into work trip the battery charging by temperature sensing because heating hardens the battery and it loses its efficiency and life. Second, we provide two outputs from i-UPS, Load-1 and Load-2, Load-1 controls lights, chargers and low power electronics appliances. On the other hand, Load-2 controls the fans and inductor type loads. Third is Energy saving works in the form of battery status. When battery is at its critical situation it switches off Load-2 and lets the Load1 on. So we can get lights at low battery status. When main supply is on, automatically Load-1 and Load-2 are connected to main supply. Fourth, we have provided two main energy sources Line-1 and Line-2 from different feeders. Microcontroller automatically checks and selects the active Line. If both lines are active then microcontroller will select Line-1 by default setting. This Intelligent Uninterruptible Power Supply (i-UPS) will enable the users to monitor different status of i-UPS on LCD. One of the advantage applying microcontroller for the Intelligent Uninterruptible Power Supply (i-UPS) is that the system is more reliable and user friendly in functions as compare to the conventional Uninterruptible Power Supply available in the market. At the competition of our project we will be hopefully able to save energy and utilization of energy due to intelligent uninterruptible power supply because of our country facing a large amount of electricity crises so people wants such type of ups like i-UPS.

Dedicated to Our Beloved Parents

Acknowledgements

We would like to thank Allah, the Almighty at the first place for giving us much courage and strength during the completion of this project and thesis, without the help of whom all His creatures are worthless. Several people should also be mentioned for their contributions to accomplish our task. We are greatful to our project advisor Asst. Prof Mr. Farhan Iqbal and project co-advisor Lecturer Mr. JAWAD ULLAH for their kind supervision, help and support. We are also thankful to the lab staff in the Project Lab for their cooperation during this work.

ii

Table of Contents
Chapter 1. ......................................................................................................................................................................1 Introduction ...................................................................................................................................................................1 1. Introduction: ..............................................................................................................................................................1 1.1 Classification:...............................................................................................................................................3 1.2. Basic steps in simple UPS: .................................................................................................................................3 1.2.1. On-Line UPS: ..................................................................................................................................................4 1.3 1.4 Design Background: .....................................................................................................................................5 Application Markets for UPS Systems:........................................................................................................5

1.5. Components of UPS: ..........................................................................................................................................6 1.5.1. DC/DC Converters: .....................................................................................................................................6 1.5.2. Voltage Source Inverter (VSI): ...................................................................................................................6 1.5.3. Battery Charger: ..........................................................................................................................................7 1.6. Introduction of i-UPS: ........................................................................................................................................7 1.6.1. Objective or Features of our Project: ..........................................................................................................7 1.6.2. Project Applications: ...................................................................................................................................8 1.7. i-UPS Block Diagram: .......................................................................................................................................8 1.8. Methodology: .....................................................................................................................................................9 1.8.1. Project implementation Steps: ....................................................................................................................9 1.8.2. Implementation Tools: ................................................................................................................................9 2.1. Principles and configurations: .......................................................................................................................... 10 2.2. Dc-Ac Conversion: ........................................................................................................................................... 10 2.2.1. Inverter: ......................................................................................................................................................... 10 2.2.2. Problems in Typical Inverter: ........................................................................................................................ 11 2.2.3. Modified sine wave: ...................................................................................................................................... 12 2.2.4. Sinusoidal PWM Generation: ........................................................................................................................ 13 2.2.5. Inverter Module: ............................................................................................................................................ 15 2.2.6. Inverter Schematic: ....................................................................................................................................... 15 2.2.7. Sinusoidal PWM Generation: ........................................................................................................................ 15 2.2.8. Power Amplification: .................................................................................................................................... 16 2.2.8.1. Introduction: ........................................................................................................................................... 16 2.2.8.2. Components: .......................................................................................................................................... 16 2.2.8.3. Method:.................................................................................................................................................... 16 2.2.8.4. Working: ................................................................................................................................................ 18 2.2.8.5. Power Inverter Wattage Chart: ............................................................................................................... 18 2.2.8.5. i-UPS Power Amplification: .................................................................................................................. 19 2.2.8.6. i-UPS Power control Circuit: ................................................................................................................. 19 2.3. AC to DC Conversion: ..................................................................................................................................... 20 2.3.1. Centre-Tap Full-Wave Rectifier: .............................................................................................................. 20

iii

2.3.2. Basic Operation:........................................................................................................................................ 20 2.4. Microcontroller: ............................................................................................................................................... 21 2.4.1. PIC16F877A: ............................................................................................................................................ 22 2.4.2. Pin Configuration: ..................................................................................................................................... 23 2.4.3. I/O Ports of PIC16F877A: ........................................................................................................................ 24 2.4.4. PIC16F628: ................................................................................................................................................... 27 2.4.4.1. High-Performance RISC CPU: .............................................................................................................. 27 2.4.4.2. Special Microcontroller Features: .......................................................................................................... 27 2.4.4.4. Peripheral Features: ............................................................................................................................... 28 2.4.5. Pin Configuration: ......................................................................................................................................... 29 2.5. Microprocessor Oscillator: ............................................................................................................................... 29 2.6. Software: .......................................................................................................................................................... 30 2.6.1. Proton Basic: ............................................................................................................................................. 30 2.6.2. BASIC Language: ..................................................................................................................................... 30 2.6.3. Proteous: ................................................................................................................................................... 31 2.7. Transformer: ..................................................................................................................................................... 31 2.7.1. Basic Principle: ......................................................................................................................................... 32 2.8. i-UPS Transformer: .......................................................................................................................................... 33 2.9. Intelligent circuitry & LCD interfacing: ........................................................................................................... 34 2.9.1. First: .......................................................................................................................................................... 34 2.9.2. Second:...................................................................................................................................................... 34 2.9.3. Third: ........................................................................................................................................................ 34 2.9.4. Fourth: ....................................................................................................................................................... 34 2.9.5. Intelligent circuitry & LCD interfacing Schematic: .................................................................................. 35 2.9.6. Intelligent circuitry & LCD interfacing: ................................................................................................... 35 2.10. Final Hardware Implementation: .................................................................................................................... 36 Chapter 3. .................................................................................................................................................................... 37 Summary and conclusion ............................................................................................................................................. 37 3.1. Summary and Conclusion: ............................................................................................................................... 37 3.2. Comparison with simple UPS: ......................................................................................................................... 37 3.3. Conclusion with Future Work: ......................................................................................................................... 38 Chapter 4. .................................................................................................................................................................... 39 References ................................................................................................................................................................... 39 4.1. References: ....................................................................................................................................................... 39 4.1.1. Book: ......................................................................................................................................................... 39 4.1.2. Journal Articles: ........................................................................................................................................ 39 4.1.3. Web Pages: ............................................................................................................................................... 40

iv

List of Figures Sr. No 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Figure 1.1 1.2 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 2.10 2.11 2.12 2.13 2.14 2.15 2.16 2.17 2.18 Page 04 08 12 14 14 15 17 18 19 19 20 23 29 29 30 32 33 35 35 36

Chapter 1. Introduction

1. Introduction:
UPS stands for Uninterruptible Power Supply. It is an instrument connected between the electric grid and the consumer, comprising of electric hardware and rechargeable batteries. The aim of the instrument is to supply continuous undisturbed and conditioned power to the critical load. The energy for powering the load comes from the utility, or from the battery upon mains outage. At times, power from a wall socket is neither clean nor uninterruptible. Many abnormalities such as blackouts, brownouts, spikes, surges, and noise can occur. Under the best conditions, power interruptions can be an inconvenience. At their worst, they can cause loss of data in computer systems or damage to electronic equipment. It is the function of an Uninterruptible Power Supply (UPS) to act as a buffer and provide clean, reliable power to vulnerable electronic equipment. The basic concept of a UPS is to store energy during normal operation (through battery charging) and release energy (through DC to AC conversion) during a power failure. UPS systems are traditionally designed using analog components. Today these systems can integrate a microcontroller with AC sine wave generation, offering the many benefits. As the general population continues to grow, there is an ever-increasing demand for electricity placed on the worlds power-generation and distribution facilities. Although significant measures are taken to ensure a reliable supply of electric power, the significant demand for power increases the likelihood that power outages and other electrical disruptions such as brownouts will occur. UPS that currently existed offer users extended periods of backup power during which they can continue to use electronic equipment such as a personal computer. However, this UPS only provide a minimal voltage regulation and filtering for disturbance occurred. Further, most UPS equipped with microcontroller for monitoring and display are much expensive than the standard available UPS in the market as the application of microcontroller will provide a wide range of application in term of programming and hardware controls. The purpose of this project is to design a UPS that manages to act as an emergency power supply to critical load and also equipped with microcontroller programming for UPS monitoring system. Mobility and versatility have become a must for the fast-paced society today. People can no longer afford to be tied down to a fixed power source location when using their equipments.
1

Overcoming the obstacle of fixed power has led to the invention of DC/AC power inverters. While the position of power inverter in the market is relatively well established, there are several features that can be improved upon. A comparison analysis of the different power inverter has been compiled. Aside from the differences in power wattage, cost per wattage, efficiency and harmonic contend, power inverters can be categorized into three groups: square wave, modified sine wave, and pure sine wave. A cost analysis of the different types of inverter shows that sine wave power inverter, though has the best power quality performance, and has a big spike in cost per unit power. Another feature which can be improved is the efficiency of the inverter. The standard sine wave in the market has an average efficiency of 85-90%. Power dissipated due to efficiency flaws will be dissipated as heat and the 10-15% power lost in the will shorten operational life span of inverters. The quality of the output power could also be improved. It is imperative that the output signal be as clean as possible. Distortion in the output signal leads to a less efficient output and in the case of a square wave, which has a lot of unwanted harmonics; it will damage some sensitive equipments. In designing any type of power supply, it is important to examine the intended market and place the product in a particular market. Our market will be to design a 300 watts power inverter that will provide optimum pure sine wave performance with minimal cost. In meeting the design requirements, there are several technical challenges that must be overcome. Our single, most difficult constraint will be to produce power at a lower power per unit cost than exists in the market. Our efficiency will be greater than 90 percent. This insures that, with a maximum load, less than 10% of power will be dissipated as heat. The total harmonic distortion will be less than 5 percent. Generally, an ideal UPS should be able to deliver uninterrupted power while simultaneously providing the necessary power conditioning for the particular power application. Therefore, an ideal UPS should have the following features: Regulated sinusoidal output voltage with low total harmonic distortion (THD) independent of the changes in the input voltage or in the load, linear or nonlinear, balanced or unbalanced. On-line operation, which means zero switching time from normal to backup mode and vice versa. Low THD sinusoidal input current and unity power factor. High reliability. Bypass as a redundant source of power in the case of internal failure. High efficiency. Low electromagnetic interference (EMI) and acoustic noise. Electric isolation of the battery, output, and input. Low maintenance. Low cost, weight, and size.
2

The Need for Standby Generation:


The need for standby generation arises if the consequences of a failure or disruption of the normal supply are not acceptable. The types of installation in which the need arises seem to be limitless. There are basically four reasons for installing standby generation: safety, security, financial loss and data loss. Safety Where there is a risk to life or health such as in air traffic control, aviation ground lighting, medical equipment in hospitals, nuclear installations, oil refineries. Security against vandalism, espionage, or attack Area lighting, communication systems, military installations, etc. Data loss Situations in which the loss of data may be catastrophic and irretrievable such as data processing and long-term laboratory type of testing or experiment. Financial loss Critical industrial processes, large financial institutions, etc.

The advances in power electronics during the past three decades have resulted in a great variety of new topologies and control strategies for UPS systems. The research has been focused mainly on improving performance and expanding application areas of UPS systems. The issue of reducing the cost of converters has recently attracted the attention of researcher. Reducing the number of switches provides the most significant cost reduction. Another form of cost reduction is to replace active switches such as IGBTs, MOSFETs, and thyristors with diodes. Not only are diodes more reasonable than the controlled switches, but there is also a cost reduction from eliminating gate drivers for active switches and power supplies for gate drivers. Another way of reducing cost is to develop topologies that employ switches with lower reverse voltage stresses and lower current ratings, which means less silicon and smaller switching losses resulting in lower cost and higher efficiency.

1.1

Classification:

UPS systems are classified into three general types: static, rotary, and hybrid static/rotary. In this section, we explain these three categories of the UPS systems.

1.2. Basic steps in simple UPS:


Dc to Ac converter Ac to Dc converter

1.2.1. On-Line UPS:


On-line UPS systems appeared during the 1970s. They consist of a rectifier/ charger, a battery set, an inverter, and a static switch (bypass). Other names for this configuration are inverterpreferred UPS and double-conversion UPS Figure 1.1 shows the block diagram of a typical online UPS. The rectifier/charger continuously supplies the DC bus with power. Its power rating is required to meet 100% of the power demanded by the load as well as the power demanded for charging the battery bank. The batteries are usually sealed leadacid type. They are rated in order to supply power during the backup time, when the AC line is not available. The duration of this time varies in different applications. The inverter is rated at 100% of the load power since it must supply the load during the normal mode of operation as well as during the backup time. It is always on; hence, there is no transfer time associated with the transition from normal mode to stored energy mode. This is the main advantage of the on-line UPS systems. The static switch provides redundancy of the power source in the case of UPS malfunction or overloading. The AC line and load voltage must be in phase in order to use the static switch. This can be achieved easily by locked-phase control loop.

Fig # 1.1 The main important component is inverter, which converts the Dc stored in Battery back into Ac. So by improving the inverter we can improve the efficiency of UPS. There are few problems in inverters available in market, so we will try to overcome these problems, to increase the efficiency of ups.

1.3

Design Background:

When designing a UPS system, there are three items that must be considered: cost vs. performance, output waveform and topology.

Cost vs. Performance:


A UPS system has to be reliable. Money saved on features or performance can be overshadowed by the cost associated with data loss or component failure. So it is important to develop a cost effective solution which satisfies both end user price sensitivity and design robustness.

Output Waveform:
Some UPS designs use a square wave output instead of a sine wave. This makes the system cheaper to produce. But is this type of waveform really acceptable? Electrical equipment uses power delivered in the form of a sine wave from local utility companies. When considering alternative waveforms, how differing loads rely on different parts of the standard power company waveform must be examined. Electrical equipment uses power delivered in the form of a sine wave from local utility companies. When considering alternative waveforms, how differing loads rely on different parts of the standard power company waveform must be examined. For instance, most appliances are always on, thus the power used by the appliance is the RMS value of the sine wave, which is approximately 120 volts. However, equipment such as computers use peak voltage values, which are approximately 170 volts. When a square wave output is used to supply power to computer equipment, the RMS and peak values are equivalent, thus stressing some loads and under-supplying others. So the best output to provide electrical equipment is the output that they are designed to operate with - a sine wave.

1.4

Application Markets for UPS Systems:

UPS systems provide for a large number of applications in a variety of industries. Their common applications range from small power rating for personal computer systems to medium power rating for medical facilities, life-support systems, data storage, and emergency equipment, and high power rating for telecommunications, industrial processing, and online management systems. Different considerations should be taken into account for these applications. As an example, a UPS for emergency systems and lighting may support the system for 90-120 minutes. For other applications like computer backup power, a UPS may typically support the system for 15-20 minutes. If power is not restored during that time, the system will be gracefully shut down.
5

If a longer backup period is considered, a larger battery is required. For process equipment and high power applications, some UPS systems are designed to provide enough time for the secondary power sources, such as diesel generators, to start up.

1.5. Components of UPS: Mainly UPS consists of:


DC/DC CONVERTER VOLTAGE SOURCE INVERTER (VSI) BATTERY CHARGER

1.5.1. DC/DC Converters:


Most UPS designs contain a transformer-type DC/DC converter. The transformer provides electrical isolation between the input and output of the converter. The transformer also provides the option to produce multiple voltage levels by changing the turns ratio, or provide multiple voltages by using multiple secondary windings. Transformer-type DC/DC converters are divided into five basic topologies: Forward Converter Push-Pull Converter Half-Bridge Converter Full-Bridge Converter Flyback Converter

1.5.2. Voltage Source Inverter (VSI):


A single-phase Voltage Source Inverter (VSI) can be defined as a half-bridge and a full-bridge topology. Both topologies are widely used in power supplies and single-phase UPS systems.

Half-Bridge VSI Full-Bridge VSI

1.5.3. Battery Charger:


When the AC mains voltage is present, the Offline UPS charges the batteries, and therefore, a battery charger circuit is implemented. Most battery chargers can be divided into four basic design types, or topologies: Linear Chargers Switch Mode Chargers Ferroresonant Chargers SCR Chargers

1.6. Introduction of i-UPS:


We implement intelligent uninterrupted power supply (i-UPS) for multipurpose. It consists of microcontroller based circuit. Mainly four feature of our i-UPS. First, it is safe and Improves battery life by using temperature sensor. When battery is fully charged and comparator do not trip battery charging then microcontroller will come into work trip the battery charging by temperature sensing because heating hardens the battery and it loses its efficiency and life. Second, we provide two outputs from i-UPS, Load-1 and Load-2, Load-1 controls lights, chargers and low power electronics appliances. On the other hand, Load-2 controls the fans and inductor type loads. Third is Energy saving works in the form of battery status. When battery is at its critical situation it switches off Load-2 and lets the Load-1 on. So we can get lights at low battery status. When main supply is on, automatically Load-1 and Load-2 are connected to main supply. Fourth, we have provided two main energy sources Line-1 and Line-2 from different feeders. Microcontroller automatically checks and selects the active Line. If both lines are active then microcontroller will select Line-1 by default setting. This Intelligent Uninterruptible Power Supply (i-UPS) will enable the users to monitor different status of i-UPS on LCD. One of the advantage applying microcontroller for the Intelligent Uninterruptible Power Supply (i-UPS) is that the system is more reliable and user friendly in functions as compare to the conventional Uninterruptible Power Supply available in the market. At the competition of our project we will be hopefully able to save energy and utilization of energy due to intelligent uninterruptible power supply because of our country facing a large amount of electricity crises so people wants such type of ups like i-UPS.

1.6.1. Objective or Features of our Project:


The main objective of our project is handling and utilization of power with Intelligence. Features and Applications of our work include: Improvement of battery life. Automatic load control using relays.
7

Energy saving in critical battery status. Multi input ports for different sources. Over Voltage Protection.

1.6.2. Project Applications:


Auto selection of sources Auto stop of battery charging Continuous Temperature sensing of battery Level(status) of Battery Automatic load control Display different status by LCD Continuity of backup in critical battery

1.7. i-UPS Block Diagram:

Fig # 1.2
8

1.8. Methodology: 1.8.1. Project implementation Steps:


AC/DC conversion DC/AC Inversion Intelligent circuitry LCD interfacing

1.8.2. Implementation Tools:


Pic-16F877A microcontroller for Intelligent circuitry Pic-16F628A microcontroller for inversion Proton Basic for coding Simulation Tool used is Proteous LCD 4*20 for i-UPS status LM-35

Chapter 2. Results and discussion

2.1. Principles and configurations:


An UPS system is an alternate or backup source of power with the electric utility company being the primary source. The UPS provides protection of load against line frequency variations, elimination of power line noise and voltage transients, voltage regulation, and uninterruptible power for critical loads during failures of normal utility source. An UPS can be considered a source of standby power or emergency power depending on the nature of the critical loads. The amount of power that the UPS must supply also depends on these specific needs. These needs can include emergency lighting for evacuation, emergency perimeter lighting for security, orderly shutdown of manufacturing or computer operations, continued operation of life support or critical medical equipment, safe operation of equipment during sags and brownouts, and a combination of the preceding needs.

2.2. Dc-Ac Conversion:


After converting 12VDC-220VDC, now we have to convert it into 220VAC at 50Hz for deriving home appliances.

2.2.1. Inverter:
The method, in which the low voltage DC power is inverted, is completed in two steps. The first being the conversion of the low voltage DC power to a high voltage DC source, and the second step being the conversion of the high DC source to an AC waveform using pulse width modulation. Another method to complete the desired outcome would be to first convert the low voltage DC power to AC, and then use a transformer to boost the voltage to 120 volts. This project focused on the first method described and specifically the transformation of a high voltage DC source into an AC output. Of the different DCAC inverters on the market today there are essentially two different forms of AC output generated: modified sine wave, and pure sine wave. Power inverters were first invented using a square wave as the output form. This led to many different problems involving the functionality of devices that were being powered because they were designed to work with a sine wave instead of a square wave. There were some changes made to the hardware to eliminate the harsh corners from the square wave to transform it to a modified sine wave. It was mainly marketers who coined the term modified sine wave which
10

in all reality is nothing more than a modified square wave. Power inverters that used a modified sine wave eliminate the problems associated with square wave inverters. Although most people without a background in electronics do not know the difference, a modified square wave can have detrimental effects on electrical loads. In square wave inverters abnormal heat will be produced, causing a reduction in product reliability, efficiency, and useful life. Another disadvantage of a square wave inverter is that its choppy waveform can confuse the operation of some digital timing devices. Undesirable or abnormal functions this can cause a device to perform. A modified sine wave can be seen as more of a square wave than a sine wave; it passes the high DC voltage for specified amounts of time so that the average power and RMS voltage are the same as if it were a sine wave. These types of inverters are much cheaper than pure sine wave inverters and therefore are attractive alternatives. Pure sine wave inverters, on the other hand, produce a sine wave output identical to the power coming out of an electrical outlet. These devices are able to run more sensitive devices that a modified sine wave may cause damage to such as: laser printers, laptop computers, power tools, digital clocks and medical equipment. This form of AC power also reduces audible noise in devices such as fluorescent lights and runs inductive loads, like motors, faster and quieter due to the low harmonic distortion.

2.2.2. Problems in Typical Inverter:


Mobility and versatility have become a must for the fast-paced society today. People can no longer afford to be tied down to a fixed power source location when using their equipments. Overcoming the obstacle of fixed power has led to the invention of DC/AC power inverters. While the position of power inverter in the market is relatively well established, there are several features that can be improved upon. A comparison analysis of the different power inverter has been compiled. Aside from the differences in power wattage, cost per wattage, efficiency and harmonic contend, power inverters can be categorized into three groups: square wave, modified sine wave, and pure sine wave. A cost analysis of the different types of inverter shows that sine wave power inverter, though has the best power quality performance, and has a big spike in cost per unit power. Another feature which can be improved is the efficiency of the inverter. The standard sine wave in the market has an average efficiency of 85-90%. Power dissipated due to efficiency flaws will be dissipated as heat and the 10-15% power lost in the will shorten operational life span of inverters. The quality of the output power could also be improved. It is imperative that the output signal be as clean as possible. Distortion in the output signal leads to a less efficient output and in the case of a square wave, which has a lot of unwanted harmonics; it will damage some sensitive equipment.

In designing any type of power supply, it is important to examine the intended market and place the product in a particular market. Our market will be to design a power inverter that will provide optimum pure sine wave performance with minimal cost. In meeting the design requirements, there are several technical challenges that must be overcome. Our single, most difficult constraint will be to produce power at a lower power per unit cost than exists in the market. Our
11

efficiency will be greater than 90 percent. This insures that, with a maximum load, less than 10% of power will be dissipated as heat. The total harmonic distortion will be less than 5 percent. With a total harmonic distortion this low and a pure sine wave output, we will be able to power even the most sensitive loads. . The DC/AC inverter circuit will use a microprocessor to digitally pulse the transistors. This will allow us to produce a pure sine wave output. This feature will also allow us to enter other markets more easily. For instance, in Pakistan the fundamental frequency is 50 Hz. The feedback control system will be used to regulate the output voltage of the DC/DC converter. This is necessary since the current will vary will the load. The feedback control system will be accomplished using by sampling the output with an integrated circuit.

2.2.3. Modified sine wave:

Fig # 2.1 A modified sine wave is similar to a square wave but instead has a stepping look to it that relates more in shape to a sine wave. This can be seen in Figure 2.1, which displays how a modified sine wave tries to emulate the sine wave itself. The waveform is easy to produce because it is just the product of switching between 3 values at set frequencies, thereby leaving out the more complicated circuitry needed for a pure sine wave. The modified sine wave inverter provides a cheap and easy solution to powering devices that need AC power. It does have some drawbacks as not all devices work properly on a modified sine wave, products such as computers and medical equipment are not resistant to the distortion of the signal and must be run off of a pure sine wave power source.

12

2.2.4. Sinusoidal PWM Generation:


In electronic power converters and motors, PWM is used extensively as a means of powering alternating current (AC) devices with an available direct current (DC) source or for advanced DC/AC conversion. Variation of duty cycle in the PWM signal to provide a DC voltage across the load in a specific pattern will appear to the load as an AC signal, or can control the speed of motors that would otherwise run only at full speed or off. This is further explained in this section. The pattern at which the duty cycle of a PWM signal varies can be created through simple analog components, a digital microcontroller, or specific PWM integrated circuits. Analog PWM control requires the generation of both reference and carrier signals that feed into a comparator which creates output signals based on the difference between the signals10. The reference signal is sinusoidal and at the frequency of the desired output signal, while the carrier signal is often either a saw tooth or triangular wave at a frequency significantly greater than the reference. When the carrier signal exceeds the reference, the comparator output signal is at one state, and when the reference is at a higher voltage, the output is at its second state. This process is shown in Figure 3 with the triangular carrier wave in red, sinusoidal reference wave in blue, and modulated and unmodulated sine pulses. The average value of voltage (and current) fed to the load is controlled by turning the switch between supply and load on and off at a fast pace. The longer the switch is on compared to the off periods, the higher the power supplied to the load is. The PWM switching frequency has to be much faster than what would affect the load, which is to say the device that uses the power. Typically switchings have to be done several times a minute in an electric stove, 120 Hz in a lamp dimmer, from few kilohertz (kHz) to tens of kHz for a motor drive and well into the tens or hundreds of kHz in audio amplifiers and computer power supplies. The term duty cycle describes the proportion of 'on' time to the regular interval or 'period' of time; a low duty cycle corresponds to low power, because the power is off for most of the time. Duty cycle is expressed in percent, 100% being fully on. The main advantage of PWM is that power loss in the switching devices is very low. When a switch is off there is practically no current, and when it is on, there is almost no voltage drop across the switch. Power loss, being the product of voltage and current, is thus in both cases close to zero. PWM also works well with digital controls, which, because of their on/off nature, can easily set the needed duty cycle. Various PWM techniques have been used to create transistor drive circuits. Before microcontrollers became popular, varying PWM circuits usually consisted of analogue-to-digital comparator circuits. These circuits compared a small voltage sinusoidal wave (reference signal) to a small voltage saw-tooth wave (control frequency signal). At each point where the sinusoidal and saw-tooth signals intersect, the output of the comparator toggles from a high state to a low state. Today the sinusoidal PWM is generated using Microcontrollers. It is the most economical solution to get pure sinusoidal output up to tens of kilowatts power rating inverters. The pulses
13

are not clear due to the high modulation ratio (requirement for pure sinusoidal output). For small filet at the output, modulation ratio should be greater than 200.

Fig # 2.2 In order to source an output with a PWM signal, transistor or other switching technologies are used to connect the source to the load when the signal is high or low. Full or half bridge configurations are common switching schemes used in power electronics. Full bridge configurations require the use of four switching devices and are often referred to as HBridges due to their orientation with respect to a load.

Fig # 2.3

14

2.2.5. Inverter Module:


DC/AC conversion is done by inverter module An inverter converts direct current (DC) to alternating current (AC). The basic components of Inverter module are Pic16F628 microcontroller Centre-taped Transformer D1047 Transistors TIP 31 Transistors

2.2.6. Inverter Schematic:

Fig # 2.4

2.2.7. Sinusoidal PWM Generation:


Various PWM techniques have been used to create transistor drive circuits, Before microcontrollers became popular. Today the sinusoidal PWM is generated using Microcontrollers.
15

It is the most economical solution to get pure sinusoidal output up to tens of kilowatts power rating inverters.

2.2.8. Power Amplification: 2.2.8.1. Introduction:


Power inverter is a device which converts 12 volts to 150 volts of D.C into 220 volt to 110 volt. Power inverter is commonly known as UPS. UPS stands for uninterruptible power supply which is the modified form of inverter. Due to the lack of electricity the importance of inverter increases day by day. The substitute of load shedding is generator or UPS.

Few advantages and disadvantages of generator are as follows:


Its first advantage is, it can run many electronic devices and it can supply electricity for the long duration of load shedding. The disadvantages are noise pollution, usage of fossil fuel cost it too high. The alternate of generator is UPS, it has also some advantages and disadvantages. The supply of electricity goes uninterrupted, it do not require much effort. Its backup depends on battery, as many amperes of the battery it has, that much it backup it would provide. Its disadvantages are, recharging takes a lot of time and in the long duration of load shedding battery cannot be recharged so that it stops working. By putting excessive load the duration of backup reduces. Its performance is about 60% to 90%.

2.2.8.2. Components:
Transformer 40 amps (500 W), 220 V, 12X12 V Transistor (10) 1047 Resistor (1) 500 ohms Battery 40 Ampere Capacitor 250 V, 0.5 uf

2.2.8.3. Method:
First of all you have to make some changes in transformer. If u are using 500 V transformer then take 18 to 22 gauge copper wire and on the one side of transformers core make five turn and put a point on it, and turn this point, and again turn the wire five times on the same direction. In this way u get three terminals. If u r connect the transformer to 220 V power supply then it gives 1.5 V on both terminals. Now put transformer D1047 on the palm of your hand and turn it such a way that number appears your way. Now you will see three points. The point on your left side is

16

known as (B) Base, middle one is collector(C) and the right one is (E) emitter . (These are the information only for D1047

Fig # 2.5

Now first of all tight the 5 transistor in heat sink in series with the help of nut bolt. Connect the base of all five transistors altogether and then join the points of collector together. In the same way arrange the other five transistors individually and connect the collector(C) of both sides of transistors with the outer terminal of secondary coil, after that connect the both outer terminals of the third coil with the base of the both heat sinks of transistor. then connect the (E) emitter of both side by wires n then connect the 500 ohm resistor on emitter and resistor on either side. Now connect the middle terminal of primary coil by one to two ft long wire and clip (crocodile) it and attach this terminal always by the positive terminal, and with the negative terminal of battery connect the both (E) emitter of transistor. After that the central point of the third coil and a wire attach it with emitter to connect using a heavy ampere switch between both terminals of the Inverter primary coil to apply a capacitor

17

which will prevent the current from the sparking. inverter will switch on as soon as starting to work.

2.2.8.4. Working:
With both the terminals of battery connect the positive and negative wires to its terminals positive to positive and negative to negative and then open the switch, slightly vibration starts in the inverter as switch is open. Now you can run it into 1 to 500 watt load.

2.2.8.5. Power Inverter Wattage Chart:


voltages (Input) 12 V Transformer Amps 4A Transformer watt 50 W No of Transistors D1047 2

inverters

50 watt inverter 100 watt inverter 300 watt inverter 500 watt inverter 1000 watt inverter 3000 watt inverter 5000 watt inverter

12 V

10 A

100 W

4 to 6

12 V

25 A

300 W

6 to 8

12 V

40 A

500 W

8 to 10

24 V

45 A

1000 W

20 to 26

24 V

125 A

3000 W

40 to 50

48 V

105 A

5000 W

60 to 70

Fig # 2.6

18

2.2.8.5. i-UPS Power Amplification:

Fig # 2.7

2.2.8.6. i-UPS Power control Circuit:

Fig # 2.8
19

2.3. AC to DC Conversion:
A rectifier is an electrical device that converts alternating current (AC), which periodically reverses direction, to direct current (DC), which flows in only one direction. The process is known as rectification. Physically, rectifiers take a number of forms, including vacuum tube diodes, mercury-arc valves, solid-state diodes, silicon-controlled rectifiers and other siliconbased semiconductor switches. Historically, even synchronous electromechanical switches and motors have been used. Early radio receivers, called crystal radios, used a "cat's whisker" of fine wire pressing on a crystal of galena (lead sulfide) to serve as a point-contact rectifier or "crystal detector". Rectifiers have many uses, but are often found serving as components of DC power supplies and high-voltage direct current power transmission systems. Rectification may serve in roles other than to generate direct current for use as a source of power. As noted, detectors of radio signals serve as rectifiers. In gas heating systems flame rectification is used to detect presence of flame. The simple process of rectification produces a type of DC characterized by pulsating voltages and currents (although still unidirectional). Depending upon the type of end-use, this type of DC current may then be further modified into the type of relatively constant voltage DC characteristically produced by such sources as batteries and solar cells.

2.3.1. Centre-Tap Full-Wave Rectifier: 2.3.2. Basic Operation:


In such a rectifier, the ac input is applied through a transformer, the anodes of the two diodes D1 and D2 (having similar characteristics) are connected to the opposite ends of the centre tapped secondary winding and two cathodes are connected to each other and are connected also through the load resistance RL and back to the centre of the transformer, as shown in Fig # 2.4

Fig # 2.9

20

When the top of the transformer secondary winding is positive, say during the first half-cycle of the supply, the anode of diode D1 is positive w.r.t. cathode, and anode of diode D2 is negative w.r.t. cathode. Thus only diode D1 conducts, being forward biased and current flows from cathode to anode of diode D1 through load resistance RL and top half the transformer secondary making cathode end of load resistance RL positive. During the second half-cycle of the input voltage the polarity is reversed, making the bottom of the secondary winding positive w.r.t. centre tap and thus diode D2 is forward biased and diode D1 is reverse biased. Consequently during this half-cycle of the input only the diode D2 conducts and current flows through the load resistance RL and bottom of the transformer secondary make the cathode end of the load resistance RL positive. Thus the direction of flow of current through the load resistance RL remains the same during both halves of the input/supply voltage. Thus the circuit showed acts as a full-wave rectifier.

2.4. Microcontroller:
A microcontroller is a small computer on a single circuit containing a processor core, memory, and programmable input/output peripherals. Neither program memory in the form of NOR flash or OTP ROM is also often included on chip, as well as a typically small amount of RAM. Microcontrollers are designed for embedded applications, in contrast to the microprocessors used in personal computers or other general purpose applications. Microcontrollers are used in automatically controlled products and devices, such as automobile engine control systems, implantable medical devices, remote controls, office machines, appliances, power tools, toys and other embedded systems. By reducing the size and cost compared to a design that uses a separate microprocessor, memory, and input/output devices, microcontrollers make it economical to digitally control even more devices and processes. Mixed signal microcontrollers are common, integrating analog components needed to control nondigital electronic systems. Some microcontrollers may use four-bit words and operate at clock rate frequencies as low as 4 kHz, for low power consumption (mill watts or microwatts). They will generally have the ability to retain functionality while waiting for an event such as a button press or other interrupt; power consumption while sleeping (CPU clock and most peripherals off) may be just nano watts, making many of them well suited for long lasting battery applications. Other microcontrollers may serve performance-critical roles, where they may need to act more like a digital signal processor (DSP), with higher clock speeds and power consumption. Microcontrollers and microprocessors are integrated circuits, but they differ fundamentally from other ICs. They are a class in themselves, that the designers have not made them to do a particular job. As such when you buy them from the market, you can not specify what function it will do. In order to get some useful function, these ICs have to be configured. Thus a microprocessor or microcontroller can be configured to check the status of a button, and then turn a motor ON or OFF. While the same IC can be configured later, to read the status of an infra-red sensor, decode the signal and turn another device ON or OFF.
21

If these two types of circuitries were to be made using conventional digital ICs, it would have required a large number of components. Moreover any change in the specification, like change of Infra-Red codes would result in total change in design! Using a configurable IC is a great idea. Not only the same IC, can be configured to do different tasks, but a change in specifications can easily be implemented by just changing the device configuration.

2.4.1. PIC16F877A:
In our project we are using the PIC16F877A microcontroller for intelligent circuitry. We have chosen this controller due to its: Cost effectiveness. High-performance Built-in clock low-voltage Flexibility

Peripheral Features:
Timer0: 8-bit timer/counter Timer1: 16-bit timer/counter Timer2: 8-bit timer/counter Operating speed: DC 20 MHz clock input Up to 8K x 14 words of Flash Program Memory Up to 368 x 8 bytes of Data Memory (RAM), Up to 256 x 8 bytes of EEPROM Data Memory Universal Synchronous Asynchronous Receiver Transmitter (USART/SCI) Parallel Slave Port (PSP) 8 bits wide with external RD, WR and CS controls

Analog Features:
10-bit, up to 8-channel Analog-to-Digital Converter (A/D)

Special Microcontroller Features:


Self-reprogrammable under software control In-Circuit Serial Programming (ICSP) via two pins Single-supply 5V In-Circuit Serial Programming Watchdog Timer (WDT) with its own on-chip RC oscillator for reliable operation Programmable code protection Power saving Sleep mode
22

Selectable oscillator options In-Circuit Debug (ICD) via two pins Enables you to view variable values, Special Function Register and EEPORM while the program is running.

2.4.2. Pin Configuration:

Fig # 2.10

23

2.4.3. I/O Ports of PIC16F877A:


Some pins for these I/O ports are multiplexed with an alternate function for the peripheral features on the device. I/ O pins There are 40 pins on PIC16F877A. Most of them can be used as an IO pin. Others are already for specific functions. These are the pin functions. 1. MCLR to reset the PIC 2. RA0 -port A pin 0 3. RA1 -port A pin 1 4. RA2 -port A pin 2 5. RA3 -port A pin 3 6. RA4 -port A pin 4 7. RA5 -port A pin 5 8. RE0 -port E pin 0 9. RE1 -port E pin 1 10. RE2-port E pin 2 11. VDD- power supply 12. VSS- ground 13. OSC1- connect to oscillator 14. OSC2- connect to oscillator 15. RC0 - port C pin 0 16. RC1 - port C pin 0 17. RC2 - port C pin 0 18. RC3 - port C pin 0 19. RD0 - port D pin 0 20. RD1 - port D pin 1 21. RD2 - port D pin 2 22. RD3 - port D pin 3 23. RC4 - port C pin 4 24. RC5 - port C pin 5 25. RC6 - port C pin 6 26. RC7 - port C pin 7 27. RD4 - port D pin 4 28. RD5 - port D pin 5 29. RD6 - port D pin 6 30. RD7 - port D pin 7 31. VSS - ground 32. VDD- power supply 33. RB0 - port B pin 0 34. RB1 - port B pin 1 35. RB2 - port B pin 2 36. RB3 - port B pin 3 37. RB4 - port B pin 4 38. RB5 - port B pin 5 39. RB6 - port B pin 6 40. RB7 - port B pin 7
24

There are five ports on PIC16F877A:


Port A Port B Port C Port D Port E

PORT A: 6-bit wide, bidirectional port. Data direction register is TRISA. If TRISA=1 then PORTA input port vice versa. Pin PA4 is multiplexed with Timer0 module clock input to become the PA4/TOCK1 pin. Other PORTA pins are multiplexed with Analog input. On power reset these pins are analog input.

PORTB: 8-bit wide, bidirectional port. Data direction register is TRISB. If TRISB=1, then PORTB is input else output. Three pins RB3/PGM, RB6/PGC and RB7/PGD are multiplexed with in circuit debugging and low voltage programming function. RB0/INT is an external interrupt pin and is configured using then INTEDG bit OPTION_REG<6>.

PORTC: PORTC is 8-bit wide, bidirectional port. Data direction register is TRISC. RC0/T1OSO/T1CKI Input/output port pin Timer1 oscillator output Timer1 clock input. RC1/T1OSI/CCP2 Input/output port pin Timer1 oscillator input PWM2 output. RC2/CCP1 Input/output port pin PWM1 output.
25

RC3/SCK/SCL RC3 can also be the synchronous serial clock for SPI mode. RC4/SDI RC4 can also be the SPI data in (SPI mode) RC5/SDO Input/output port pin Synchronous Serial Port data output. RC6/TX/CK Input/output port pin USART asynchronous transmit Synchronous clock. RC7/RX/DT Input/output port pin USART asynchronous receive Synchronous data.

PORTD: 8-bit wide port. This port can be I/O or Parallel Slave Port.

PORTE: Three pins port. The PORTE pins become the I/O control inputs for the microprocessor port when bit PSPMODE (TRISE<4>) is set. RE0/RD/AN5 I/O port pin read control input in Parallel Slave Port mode analog input

RE1/WR/AN6 I/O port pin write control input in Parallel Slave Port mode analog input

RE2/CS/AN7 I/O port pin chip select control input in Parallel Slave Port mode
26

analog input

PORTE pins are multiplexed with analog inputs.

2.4.4. PIC16F628: 2.4.4.1. High-Performance RISC CPU:


Operating speeds from DC 20 MHz Interrupt capability 8-level deep hardware stack Direct, Indirect and Relative Addressing modes 35 single-word instructions: - All instructions single cycle except branches

2.4.4.2. Special Microcontroller Features:


Internal and external oscillator options: Precision internal 4 MHz oscillator factory calibrated to 1% - Low-power internal 48 kHz oscillator - External Oscillator support for crystals and resonators Power-saving Sleep mode Programmable weak pull-ups on PORTB Multiplexed Master Clear/Input-pin Watchdog Timer with independent oscillator for reliable operation Low-voltage programming In-Circuit Serial Programming (via two pins) Programmable code protection Brown-out Reset Power-on Reset Power-up Timer and Oscillator Start-up Timer Wide operating voltage range (2.0-5.5V) Industrial and extended temperature range High-Endurance Flash/EEPROM cell: o 100,000 write Flash endurance o 1,000,000 write EEPROM endurance o 40 year data retention+

27

2.4.4.3. Low-Power Features:


Standby Current: - 100 nA @ 2.0V, typical Operating Current: o 12A @ 32 kHz, 2.0V, typical o 120A @ 1 MHz, 2.0V, typical Watchdog Timer Current: o 1A @ 2.0V, typical Timer1 Oscillator Current: o 1.2A @ 32 kHz, 2.0V, typical Dual-speed Internal Oscillator: Run-time selectable between 4 MHz and 48 kHz 4s wake-up from Sleep, 3.0V, typical

2.4.4.4. Peripheral Features:


16 I/O pins with individual direction control High current sink/source for direct LED drive Analog comparator module with: o Two analog comparators o Programmable on-chip voltage reference (VREF) module o Selectable internal or external reference o Comparator outputs are externally accessible Timer0: 8-bit timer/counter with 8-bit programmable prescaler Timer1: 16-bit timer/counter with external crystal/ clock capability Timer2: 8-bit timer/counter with 8-bit period register, prescaler and postscaler Capture, Compare, PWM module: o 16-bit Capture/Compare o 10-bit PWM Addressable Universal Synchronous/Asynchronous Receiver/Transmitter USART/SCI

28

2.4.5. Pin Configuration:

Fig # 2.11

2.5. Microprocessor Oscillator:


Most microprocessors, micro-controllers and PICs have two oscillator pins labeled OSC1 and OSC2 to connect to an external quartz crystal, RC network or even a ceramic resonator. In this application the Quartz Crystal Oscillator produces a train of continuous square wave pulses whose frequency is controlled by the crystal which intern regulates the instructions that controls the device.

Fig # 2.12
29

Fig # 2.13

2.6. Software:
Proton Basic Proteous

2.6.1. Proton Basic:


For coding we have used proton Basic. Compiler based on BASIC Language Designed for PIC microcontrollers ONLY

2.6.2. BASIC Language:


Very easy to learn and use. A BASIC compiler will produce code that runs fast as a C compiler. Many in built functions (depending on compiler). Very popular, large user base with many example programs.

Major advantages and why Basic is popular for hardware & Software designing 100 % High-level programming languages Easy for beginners to use Allow advanced features to be added for experts Provide clear and friendly error messages and correction

30

Todays market is demanding to solve their hardware & software problems, which is easil y done through Proton Basic Plus (PIC Microcontroller) Microsoft Visual Basic (PC to Hardware Communication, Database, etc ) Visual Basic .NET (.NET Framework) & many more

2.6.3. Proteous:
The Proteus Design Suite is wholly unique in offering the ability to co-simulate both high and low-level micro-controller code in the context of a mixed-mode SPICE circuit simulation. With this Virtual System Modeling facility, you can transform your product design cycle, reaping huge rewards in terms of reduced time to market and lower costs of development. If one person designs both the hardware and the software then that person benefits as the hardware design may be changed just as easily as the software design. In larger organizations where the two roles are separated, the software designers can begin work as soon as the schematic is completed; there is no need for them to wait until a physical prototype exists. In short, Proteus VSM improves efficiency, quality and flexibility throughout the design process.

2.7. Transformer:
A transformer is a power converter that transfers electrical energy from one circuit to another through inductively coupled conductorsthe transformer's coils. A varying current in the first or primary winding creates a varying magnetic flux in the transformer's core and thus a varying magnetic field through the secondary winding. This varying magnetic field induces a varying electromotive force (EMF), or "voltage", in the secondary winding. This effect is calledinductive coupling. If a load is connected to the secondary winding, current will flow in this winding, and electrical energy will be transferred from the primary circuit through the transformer to the load. In an ideal transformer, the induced voltage in the secondary winding (Vs) is in proportion to the primary voltage (Vp) and is given by the ratio of the number of turns in the secondary (Ns) to the number of turns in the primary (Np) as follows:

31

2.7.1. Basic Principle:


The transformer is based on two principles: first, that an electric current can produce a magnetic field (electromagnetism) and second that a changing magnetic field within a coil of wire induces a voltage across the ends of the coil (electromagnetic induction). Changing the current in the primary coil changes the magnetic flux that is developed. The changing magnetic flux induces a voltage in the secondary coil.

Fig # 2.14 An ideal transformer is shown in the adjacent figure. Current passing through the primary coil creates a magnetic field. The primary and secondary coils are wrapped around a core of very high magnetic permeability, such as iron, so that most of the magnetic flux passes through both the primary and secondary coils.

32

2.8. i-UPS Transformer:

Fig # 2.15

33

2.9. Intelligent circuitry & LCD interfacing:


We implement intelligent uninterrupted power supply (i-UPS) for multipurpose. It consists of microcontroller based circuit. Mainly four feature of our i-UPS.

2.9.1. First:
It is safe and Improves battery life by using temperature sensor. When battery is fully charged and comparator do not trip battery charging then microcontroller will come into work trip the battery charging by temperature sensing because heating hardens the battery and it loses its efficiency and life.

2.9.2. Second:
We provide two outputs from i-UPS, Load-1 and Load-2, Load-1 controls lights, chargers and low power electronics appliances. On the other hand, Load-2 controls the fans and inductor type loads.

2.9.3. Third:
Is Energy saving works in the form of battery status. When battery is at its critical situation it switches off Load-2 and lets the Load-1 on. So we can get lights at low battery status. When main supply is on, automatically Load-1 and Load-2 are connected to main supply.

2.9.4. Fourth:
We have provided two main energy sources Line-1 and Line-2 from different feeders. Microcontroller automatically checks and selects the active Line. If both lines are active then microcontroller will select Line-1 by default setting.

34

2.9.5. Intelligent circuitry & LCD interfacing Schematic:

Fig # 2.16

2.9.6. Intelligent circuitry & LCD interfacing:

Fig # 2.17
35

2.10. Final Hardware Implementation:

Fig # 2.18

36

Chapter 3. Summary and conclusion

3.1. Summary and Conclusion:


During the last decades UPS system had undergone several major changes due to benefits from the developments in power semiconductor devices, microprocessors, maintenance free sealed lead acid, and improvements in control techniques. Thus, it has become one of the fastest growing fields of power electronics. UPS provides emergency power to critical loads in case of utility mains failure, and as such constitutes an essential element in providing back-up power [1] for computer networks, communication links, biomedical equipment, and industrial processes, among others. Full hardware-based UPS are gradually being replaced by microprocessor or microcontroller-based counterparts, with significant improvement in ease of design, flexibility of the control software and overall reduction in development cost. Since a UPS incorporates a relatively large number of detection, protection and control functions, [2] it is important to develop an organized approach to the identification and implementation of these requirements.

3.2. Comparison with simple UPS:


In simple ups the output waveform is rectangular. Distortion in the output signal leads to a less efficient output and in the case of a square wave, which has a lot of unwanted harmonics; it will damage some sensitive equipment. The quality of the output power could also be improved. It is imperative that the output signal be as clean as possible. About 20 -30 % power is being dissipated as heat. A cost analysis of the different types of inverter shows that sine wave power inverter, though has the best power quality performance, and has a big spike in cost per unit power. Another feature which can be improved is the efficiency of the inverter. The standard sine wave in the market has an average efficiency of 85-90%. Power dissipated due to efficiency flaws will be dissipated as heat and the 10-15% power lost in the will shorten operational life span of inverters. The quality of the output power could also be improved. It is imperative that the output signal be as clean as possible.
37

3.3. Conclusion with Future Work:


This Intelligent Uninterruptible Power Supply (i-UPS) will enable the users to monitor different status of i-UPS on LCD. One of the advantage applying microcontroller for the Intelligent Uninterruptible Power Supply (i-UPS) is that the system is more reliable and user friendly in functions as compare to the conventional Uninterruptible Power Supply available in the market. At the competition of our project we will be hopefully able to save energy and utilization of energy due to intelligent uninterruptible power supply because of our country facing a large amount of electricity crises so people wants such type of ups like i-UPS. We are also plane to launch i-UPS in market and plane to make a transformer lees i-UPS in Future work.

38

Chapter 4. References

4.1. References: 4.1.1. Book:


UNINTERRUPTIBLE POWER SUPPLIES AND ACTIVE FILTERS By Ali Emadi, Abdolhosein Nasiri Uninterruptible power supplies By WilliamKnight Uninterruptible power systems (UPS) By IEC IEEE 446 Orange Book, Emergency and Standby Power Systems for Industrial and Commercial Applications, (1996) (cited in paragraph 2-3, Table 3-1) IEEE 450 Recommended Practice for Maintenance, Testing, and Replacement of Vented Lead-Acid Batteries for Stationary Applications, (1995) [cited in paragraphs 3-2b (2), 5-2c, and 5-2c 5- 2c (2) (k), 5-2f (4), 5-2f (5) (6)] ANSI/IEEE 519 Recommended Practices and Requirements for Harmonic Control in Electrical Power Systems, (1992) (cited in table 2-2)

4.1.2. Journal Articles:


Farrukh, K. and T.G. Habetler, 1998. A novel online UPS with universal filtering capabilities. IEEE Trans. on Power Electronics, 13: 3. Matthew, S.R., J.D. Parham and M.H. Rashid, An Overview of Uninterruptible Power Supplies. IEEE Proc., pp: 159-164. S.A.Z. Murad "Monitoring system for uninterruptible power supply". American Journal of Applied Sciences. FindArticles.com. 09 Aug, 2011. Tanvir Singh Mundra "Microcontroller based power supply". Journal of Computer Science. FindArticles.com. 09 Aug, 2011.

39

4.1.3. Web Pages:


www.avrprojects.net/ http://findarticles.com/p/articles/mi_m0VVT/is_8_2/ai_n24997972/ http://www.falconups.com/tech-articles.htm http://www.falconups.com/ http://www.8051projects.info/ http://indianengineer.wordpress.com http://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/ www.avrprojects.net/ http://ieeeprojects.218070.free-press-release.com/

40

Appendices
Inverter:
Device 16F628 Config INTRC_OSC_NOCLKOUT , WDT_OFF ,MCLRE_OFF, PWRTE_ON , BODEN, CPD_OFF, CP_OFF XTAL 4 ANSEL=%00000000 OSCCAL=%11111111 ALL_DIGITAL=true Dim wave1 As PORTA.0 Dim wave2 As PORTA.1 Output wave1 Output wave2 High wave1 High wave2 inv: High wave2 DelayUS 1250 Low wave2 DelayUS 1250 High wave2 DelayMS 5 Low wave2 DelayUS 1250 High wave2 DelayUS 1250 Low wave2 High wave1 DelayUS 1250 Low wave1 DelayUS 1250 High wave1 DelayMS 5 Low wave1 DelayUS 1250 High wave1 DelayUS 1250 Low wave1 GoTo inv

41

Intelligent circuitry & LCD interfacing:


'**************************************************************** '* Name : i-UPS UMT_500W.BAS * '* Author : Hafiz Zahi Rasool * '* Notice : Copyright (c) 2013 [select VIEW...EDITOR OPTIONS] * '* : All Rights Reserved * '* Date : 3/14/2013 * '* Version : 1.0 * '* Notes : * '* : * '**************************************************************** Device 16F877A XTAL 20 Declare LCD_TYPE ALPHA Declare LCD_RSPIN = PORTB.2 Declare LCD_ENPIN = PORTB.3 Declare LCD_DTPIN = PORTB.4 Declare ADIN_RES 10 Declare ADIN_TAD 2_FOSC Declare ADIN_STIME 100 'Variables Dim TEMP As DWord Dim BAT As Float Dim PHASE As DWord Dim BATREF As Float 'Initialization TRISA = %11111111 'TRISA = 0xFF TRISC = 0x00 TRISD = 0x0F ADCON1 = %10000000 Symbol LINE_1= PORTD.1 Symbol LINE_2= PORTD.2 Symbol UPS = PORTD.0 Low PORTC Low PORTD.6 Low PORTD.7 Print At 1,1," WELCOME " Print At 2,1," TO " Print At 3,1," i-UPS UMT_500W " DelayMS 2000 Cls Print At 1,1,"H.ZAHID RASOOL" Print At 2,1," ID: " Print At 3,1,"091320-007" DelayMS 2000 Cls Print At 1,1,"MAJID ALI"

' Lcd Reset Pin ' Lcd Enable Pin ' Lcd Data Pin '10-Bit Result Required 'RC OSC Chosen 'Allow 50us Sample Time

'Configure PORTA As An Input

'Set Analogue Input On PortA

42

Print At 2,1," ID: " Print At 3,1,"091320-079" DelayMS 2000 Cls Print At 1,1,"MAJID REHAN" Print At 2,1," ID: " Print At 3,1,"091320-043" DelayMS 2000 Cls Print At 1,1,"** i-UPS_UMT 500W **" DelayMS 500 Main: TEMP = ADIn 0 BAT = ADIn 1 PHASE = ADIn 2 BATREF = ADIn 3 BATREF = BATREF *7.4969 *.0032 PHASE = PHASE * 6.51915 *.21425 BAT = BAT * (5/1023) BAT = BAT * 50 TEMP = TEMP * 200 * 0.0024351

If PHASE=0 Or PHASE>=250 Then GoTo ups_mood EndIf If PHASE=0 Or PHASE<=180 Then GoTo ups_mood EndIf If LINE_1=1 And LINE_2=0 Then High PORTD.6 High PORTD.7 Low PORTC.1 High PORTC.4 Low PORTC.6 Low PORTC.7 High PORTC.5 If LINE_1=0 And LINE_2=0 Then Low PORTC GoTo ups_mood EndIf If BAT<=100 Then Low PORTC.2 If LINE_1=0 And LINE_2=0 Then Low PORTC GoTo ups_mood

43

EndIf If TEMP<=100 Then If LINE_1=0 And LINE_2=0 Then Low PORTC GoTo ups_mood EndIf DelayMS 2000 High PORTC.3 Low PORTC.0 If LINE_1=0 And LINE_2=0 Then Low PORTC GoTo ups_mood EndIf Print At 1,1,"i-UPS_UMT 500W ",DEC1 BATREF,"" Print At 2,1,"O/P ", Dec PHASE,""," V"," LINE_1" Print At 3,1,"BAT-CHARGING ", DEC1 BAT,"" Print At 4,1,"TEMPERATURE ", Dec TEMP," " If LINE_1=0 And LINE_2=0 Then Low PORTC GoTo ups_mood EndIf Else High PORTC.0 Low PORTC.3 Print At 1,1,"i-UPS_UMT 500W ",DEC1 BATREF,"" Print At 2,1,"O/P ", Dec PHASE,""," V"," LINE_1" Print At 3,1,"BAT-CHARGING ", DEC1 BAT,"" Print At 4,1,"TEMPERATURE OVER" If LINE_1=0 And LINE_2=0 Then Low PORTC GoTo ups_mood EndIf EndIf Else Low PORTC.3 High PORTC.2 Print At 1,1,"i-UPS_UMT 500W ",DEC1 BATREF,"" Print At 2,1,"O/P ", Dec PHASE,""," V"," LINE_1" Print At 3,1,"BATTERY FULL" Print At 4,1,"TEMPERATURE ", Dec TEMP,"" If LINE_1=0 And LINE_2=0 Then Low PORTC GoTo ups_mood EndIf EndIf ElseIf LINE_1=0 And LINE_2=1 Then High PORTD.6 High PORTD.7 Low PORTC.1 High PORTC.4 Low PORTC.5 High PORTC.6 Low PORTC.7 If LINE_1=0 And LINE_2=0 Then Low PORTC GoTo ups_mood EndIf

44

If BAT<100 Then Low PORTC.2 If TEMP<=100 Then DelayMS 2000 If LINE_1=0 And LINE_2=0 Then Low PORTC GoTo ups_mood EndIf High PORTC.3 Low PORTC.0 Print At 1,1,"i-UPS_UMT 500W ",DEC1 BATREF,"" Print At 2,1,"O/P ", Dec PHASE,""," V"," LINE_2" Print At 3,1,"BAT-CHARGING ", DEC1 BAT,"" Print At 4,1,"TEMPERATURE ", Dec TEMP," " If LINE_1=0 And LINE_2=0 Then Low PORTC GoTo ups_mood EndIf Else High PORTC.0 Low PORTC.3 Print At 1,1,"i-UPS_UMT 500W ",DEC1 BATREF,"" Print At 2,1,"O/P ", Dec PHASE,""," V"," LINE_2" Print At 3,1,"BAT-STATUS % ", DEC1 BAT,"" Print At 4,1,"TEMPERATURE OVER" If LINE_1=0 And LINE_2=0 Then Low PORTC GoTo ups_mood EndIf EndIf Else Low PORTC.3 High PORTC.2 Print At 1,1,"i-UPS_UMT 500W ",DEC1 BATREF,"" Print At 2,1,"O/P ", Dec PHASE,""," V"," LINE_2" Print At 3,1,"BATTERY FULL" Print At 4,1,"TEMPERATURE ", DEC1 TEMP," " If LINE_1=0 And LINE_2=0 Then Low PORTC GoTo ups_mood EndIf EndIf Else If LINE_1=1 And LINE_2=1 Then High PORTD.6 High PORTD.7 Low PORTC.1 High PORTC.4 High PORTC.5 Low PORTC.6 Low PORTC.7 If BAT<=100 Then If LINE_1=0 And LINE_2=0 Then Low PORTC GoTo ups_mood EndIf

45

Low PORTC.2 If TEMP<=100 Then If LINE_1=0 And LINE_2=0 Then Low PORTC GoTo ups_mood EndIf DelayMS 2000 If LINE_1=0 And LINE_2=0 Then Low PORTC GoTo ups_mood EndIf High PORTC.3 Low PORTC.0 Print At 1,1,"i-UPS_UMT 500W ",DEC1 BATREF,"" Print At 2,1,"O/P ", Dec PHASE,""," V"," LINE_1" Print At 3,1,"BAT-CHARGING ", DEC1 BAT,"" Print At 4,1,"TEMPERATURE ", Dec TEMP," " If LINE_1=0 And LINE_2=0 Then Low PORTC GoTo ups_mood EndIf Else High PORTC.0 Low PORTC.3 Print At 1,1,"i-UPS_UMT 500W ",DEC1 BATREF,"" Print At 2,1,"O/P ", Dec PHASE,""," V"," LINE_1" Print At 3,1,"BAT-STATUS % ", DEC1 BAT,"" Print At 4,1,"TEMPERATURE OVER" If LINE_1=0 And LINE_2=0 Then Low PORTC GoTo ups_mood EndIf EndIf Else Low PORTC.3 High PORTC.2 Print At 1,1,"i-UPS_UMT 500W ",DEC1 BATREF,"" Print At 2,1,"O/P ", Dec PHASE,""," V"," LINE_1" Print At 3,1,"BATTERY FULL" Print At 4,1,"TEMPERATURE ", Dec TEMP," " If LINE_1=0 And LINE_2=0 Then Low PORTC GoTo ups_mood EndIf EndIf Else ups_mood: If UPS=1 And BAT>=10 Then If BAT>=30 Then Low PORTC Toggle PORTC.1 High PORTD.6 High PORTD.7 Print At 1,1,"i-UPS_UMT 500W ",DEC1 BATREF,"" Print At 2,1,"O/P ", Dec PHASE,""," V"," UPS" Print At 4,1,"TEMPERATURE ", Dec TEMP," " If BAT>=100 Then

46

Print At 3,1,"BATTERY Else Print At 3,1,"BAT-STATUS % EndIf Else

FULL"' ", DEC1 BAT,""

Low PORTC High PORTC.1 High PORTD.6 Low PORTD.7 Print At 1,1,"i-UPS_UMT 500W ",DEC1 BATREF,"" Print At 2,1,"O/P ", Dec PHASE,""," V"," UPS" Print At 3,1,"BAT-STATUS % ", DEC1 BAT,"" Print At 4,1,"TEMPERATURE ", Dec TEMP," " EndIf Else Low PORTC Low PORTD.6 Low PORTD.7 Print At 1,1,"i-UPS_UMT 500W ",DEC1 BATREF,"" If BAT<=100 Then If BAT<=10 Then Print At 2,1," LIGHT OFF " Print At 3,1," PLZ RECHARGE " Print At 4,1," BATTERY EMPTY" Else Print At 2,1," LIGHT OFF " Print At 3,1," PUSH TO BACKUP " Print At 4,1," BAT-STATUS% ", DEC1 BAT,"" EndIf Else Print At 1,1,"i-UPS_UMT 500W ",DEC1 BATREF,"" Print At 2,1," LIGHT OFF " Print At 3,1," PUSH TO BACKUP " Print At 4,1," BATTERY FULL" EndIf EndIf EndIf End If DelayMS 1000 GoTo Main

47

You might also like