In the first tutorial of this series, it was mentioned that an Uninterruptible Power Supply (UPS) has the following basic building blocks –

1) Charger Circuit – to charge the battery system

2) Inverter – to convert DC supply from battery to AC signal

3) Switching mechanism – electronic mechanism to detect power failure and switch supply input from mains to inverter and on resumption of mains supply switch back to mains.

In the previous tutorials, the making of charger circuit for lead acid battery was discussed. The charger circuit was designed using linear regulators. In fact, the charger circuit can also be designed using switching regulators. Now when the charger circuit has been designed, it’s time to design inverter.

The inverter is an electronic device which converts DC (Direct current) power into AC (Alternating Current) power. There can be two types of inverters depending upon the shape of the output waveform –

1) Square Wave Inverter

2) Modified Sine Wave Inverter

The square wave inverter is easy to design and suitable for less sensitive electronic devices. For more sensitive electronics, the supply from square wave inverter can result into noise. In this tutorial, a square wave inverter is designed which will input power from a battery and output a square AC waveform. An Inverter should generate an AC signal at the output but that signal is not necessarily an exact sine wave. A square wave can also be considered as an AC signal which can be used to drive less sensitive AC devices.

The output voltage, frequency, and waveform of the inverter depends on the design of the inverter. The inverter itself does not generate any power. It only converts power from DC to AC. The power is actually drawn from the battery.

First of all, it is important to understand that the AC appliances are meant to be run on AC supply with certain specifications. Every country maintains its own standards for main supplies. But most of the countries have power supply having frequency from 50 Hz to 60 Hz. The supply usually has symmetric waveform and the voltage level ranges from 120 V to 220 or 230 V. This is the general standard in most of the countries. According to the Indian standards for driving AC loads, the AC supply must be of the frequency 50Hz with the symmetrical AC waveform and the voltage of the AC should be in between 220 V to 240 V. The European Union has similar standards. In United States and Canada, the mains voltage should be 120 V with 5 percent tolerance at 60 Hz frequency.

As according to the Indian standards, the AC appliances are meant to work efficiently at a frequency of 50Hz and voltage between 220V to 240V AC, in this tutorial, a symmetrical square wave generator having 50 Hz frequency will be designed. The acceptable deviation in the frequency can be +/- 0.5 Hz.

A symmetrical waveform has the same time period for both the halves of the cycle whereas in an asymmetric waveform, the time period of positive and negative cycle are different. If an unsymmetric AC wave is applied to an AC appliance which converts the electrical energy into mechanical energy like motor then it will experience jerks during its rotary motion. So it is necessary that the AC waveform should be symmetric in nature. So, the Square wave generator will be designed to produce an AC waveform having peak voltage of 220 V and 50 Hz symmetric waveform.

There are many ways in which a square wave can be generated. Like a square wave can be generated using a circuit based on operational amplifier, 4047 IC, transistors or 555 IC. In this tutorial, the square wave will be generated using 555 IC as astable multivibrator. The design of the circuit will be divided into two parts –

1) designing a square wave inverter having 12 V peak to peak voltage having 50 Hz symmetric square waveform

2) stepping up voltage from 12V AC to 220 V AC and designing switching mechanism.

The designing of squre wave inverter having 12 V peak to peak voltage having 50 Hz symmetric square waveform will be discussed in this tutorial and then the circuit will be completed in the next tutorial in which the stepping up and switching mechanism circuits are added.

*Fig. 1: List of components required for Square Wave Inverter*

**Block Diagram –**

*Fig. 2: Block Diagram of Square Wave Inverter*

**Circuit Diagram –**

*Fig. 3: Circuit Diagram of 555 IC based Square Wave Generator*

**Circuit Connections –**

As seen from the block diagram, the square wave inverter has the following building blocks –

1) DC Source – A battery of 12 V is used as the primary source of power.

2) Square Wave Generator – This is a 555 IC based astable multivibrator configured to have an output having 50% duty cycle or same period for both positive and negative cycles.

3) Switching Mechanism

4) Step Up transformer

The DC source in the circuit is a 12 V battery. The Square wave generator converts the 12 V DC to 12 V AC. The square wave generator has been designed using 555 IC as astable multivibrator.

555 is a standard IC used for pulse generation and timer applications. The IC can be used in the form of a timer to generate pulses after set time intervals as well as it can be used to produce waveforms with adjustable duty cycle between 50% and 100%. The internal circuitry of the IC consist of a flip flop, two comparators and a high current output stage. The IC got its name due to use of three resistors of 5K ohm when used as comparator. The IC comes in 8-pin DIP (Dual in Line) package with following pin configuration –

*Fig. 4: Table listing pin configuration of 555 IC*

The 555 IC has the following pin diagram –

*Fig. 5: Typical Image of 555 IC*

*Fig. 6: Pin Diagram of 555 IC*

The 555 IC can operate in three modes –

1) Astable – In this mode, the IC works as an oscillator or pulse generator

2) Monostable – In this mode, the IC works as one-shot pulse generator

3) Bi-stable – In this mode, the IC works as a flip flop

So for generating a square waveform, the IC is used as Astable multivibrator. The 555 IC uses RC timing circuit to generate a waveform at the output. In this circuit, the RC circuit is designed to produce a waveform of 50 Hz frequency. Since the supply voltage to the IC is 12 V from a battery, the peak to peak voltage at the output is also 12 V. At 50 Hz frequency there are 50 cycles in each second. The output waveform must be symmetric. For generating a symmetric square wave the time for which the waveform is positive should be equal to the time for which it is negative. The negative and positive time of the square wave can be calculated in percentage by the following formulae –

Time for positive half cycle, Tp% =(Tpositive/(Tpositive+Tnegative))*100

Time for negative half cycle, TN % = (Tnegative/(Tpositive+Tnegative))*100

So, the IC is configured to produce a duty cycle of 50 percent in Astable mode. In this configuration, the 555 IC can generate a symmetrical waveform at its output by just selecting right values of resistor and capacitor for RC timing circuit. But in this mode, the 555 timer output frequency and the duty cycle depends on two resistors. This makes the calculation of frequency and duty cycle quite complex. So a modified version of the Astable circuit will be used in which the value of output frequency and voltage remain dependent only on the value of a single resistor and a capacitor.

For learning how 555 IC works as astable multivibrator, refer to the following article – “555-timer as an astable multivibrator”. The circuit of a normal astable multivibrator and circuit of its modified version are given below –

*Fig. 7: Circuit Diagram of Normal 555 IC Astable Multivibrator*

*Fig. 8: Circuit Diagram of Modified 555 IC Astable Multivibrator for Square Wave Generation*

On comparing the above circuits and analyzing the changes that have been made in the modified circuit of Astable configuration, it can be seen that in the basic mode the capacitor C2 charges through resistor R2 and discharges through resistor R1. So, in the basic configuration the frequency and duty cycle depends on resistors R1, R2 and capacitor C2. But in modified circuit, the resistor R1 is connected to output pin (pin 3) instead of discharge pin (pin 7) and resistor R2 is connected between pins 8 and 2 of the IC.

On taking a high value for resistor R2, its effect can be neglected in the equations for calculation of frequency and duty cycle. Now the frequency and duty cycle of the modified circuit are dependent only on resistor R1 and capacitor C2. This makes the calculation of the frequency and duty cycle much simpler and allows configuring the circuit for symmetric 50 Hz frequency output with ease.

It is important that while assembling this circuit, following precautions must be taken care of –

Do not exceed the input voltage of 555. Check out the datasheet of the 555 IC and learn about its technical specifications.

The value of resistor R2 should be high enough so that it will never interfere with the charging of the capacitor C2 and so, a symmetrical square wave is always obtained.

Use the appropriate value of capacitor and resistor for generating 50 Hz frequency and 50% duty cycle as calculated and practically tested above.

The capacitor used in the circuit must be of higher voltage rating than the input supply voltage. Otherwise, the capacitor will start leaking the current due to the excess voltage at its plates and will burst out.

Always use a pulled down capacitor at the control pin of the 555 for avoiding unwanted noise from the surroundings.

Make sure all the filter capacitors should be discharged before working on a DC power supply. For this short the capacitor with a screw driver wearing insulated gloves.

**How the circuit works –**

In this design of modified Astable configuration of 555-timer, the frequency and other equations of the basic astable configuration are a bit changed. This modified version of 555 IC in astable mode has a square wave at the output. However, frequency and duty cycle of the circuit need to be set by selecting correct values of resistor and capacitor for the RC timing circuit. For this design, the value of resistor R2 should be high enough so that the capacitor charges and discharges through the resistor R1 only. This will nullify the effect of resistor R2 in finding the frequency and duty cycle and makes the calculations simple. As now the capacitor charges and discharges through the same resistor R1 so a symmetrical square wave is obtained at the output.

There is no equation for finding the value of resistor R2 for which its effect is nullified. So, such value for the resistor R2 needs to be found by hit and trial and practical testing. It can be observed that if a resistance of 100 KΩ is used for resistor R2, the desired frequency and duty cycle are obtained.

The circuit is powered by a DC source of 12 V. This 12 V DC source is a battery in the UPS design. For testing, any DC source of 12 V can be taken. When this 12 V DC is applied to the circuit, then the capacitor C2 starts charging and discharging from the same resistor R1. So, resistor R1 and capacitor C2 decides the frequency as well as the positive time (Tp) and negative time (TN) of the output waveform. That is why, in this RC timing circuit, the capacitor C2 is also known as timing capacitor. When the output from the 555 IC is High (drawn from pin 3 of the IC) then the capacitor C2 charges through resistor R1 and when the output is Low, it again discharges through resistor R1.

The resistor R2 in this circuit makes sure that the capacitor C2 charges up fully with its terminal voltage reaching to a value equal to the applied voltage. The capacitor C1 is just used to pull down the control pin of the 555 IC for avoiding any extra noise at the output.

The general equation of output frequency of basic Astable 555 oscillators is given as follow –

Output frequency, F(Normal equation)= 1.44 / (R2+2R1)*C 2 ……….…….(Eq. 1)

As the capacitor C2 is charging and discharging through the same resistor R1 so the effect of resistor R2 is nullified. So the resistor R2 can be eliminated from the above equation. The modified equation for calculation of frequency for the symmetric square wave on removing the resistor R2 in the general equation is then as follow –

Output frequency, F(Modified equation)= 1.44 / (2R1*C 2) …………….….(Eq. 2)

Assuming the value of capacitor to be 1 uF and the desired value of frequency 50 Hz, the value of the resistor R1 can now be calculated as follow –

Desired frequency, F = 50 Hz

Capacitor, C 2 = 1uF

Putting all values in eq. 2,

Resistor R1 = 1.44/(2*50*0.000001)

So theoretically, resistor R1 = 14 KΩ (approx.)

Now, let us calculate the positive time (Tp) and negative time (TN) of the output waveform which should be equal for a symmetric waveform. The positive time (Tp) and negative time (TN) can be related with the duty cycle. Practically any AC supply is symmetric and does not involve such terms like the duty cycle. The duty cycle in here reference indicates the positive time of the waveform in percentage. In this case, the positive time period of the waveform should be 50%. So by using duty cycle equation, a symmetrical square wave can be generated. The general equation of the duty cycle for 555 IC as Astable oscillator is given by the following equation –

Duty cycle %, D %(Normal equation)= ((R1+ R2) / (2*R1+ R2))*100 ………(Eq. 3)

In the above equation also, the effect of resistor R2 should be neglected so on eliminating the resistor R2 in the above equation, the modified equation for duty cycle is as follows –

Duty cycle, D %(Modified equation)= (R1 / 2R1)*100

Duty cycle, D % = 50% …….……(Eq. 4)

So, by just eliminating the effect of resistor R2 in the basic astable mode, the duty cycle is permanently set to 50% and a symmetric waveform is obtained always. This is the theoretical derivation of resistor R2 and R1 for obtaining a symmetrical waveform of 50 Hz frequency. Practically, the value of resistors R1 and R2 differs from their theoretical derivation.

Practically, it was observed that for resistor R2 equal to 14 KΩ, a symmetric square wave was obtained at the output but the output frequency is was 44 Hz. So the value of resistor R2 must be decreased as resistor R2 is inversely proportional to the frequency. On taking the value of resistor R2 equal to 12.5 KΩ the frequency obtained is around 50 Hz. So the resistor R2(Practical value) is taken 12.5 KΩ.

After assembling the circuit when the output of the 555 IC was observed on a Cathode Ray Oscilloscope (CRO) the following waveform was observed –

*Fig. 9: Graph showing Output Waveform of 555 Square Wave Generator observed on CRO*

It can be seen that the output frequency is approximately 50 Hz and the duty cycle of the waveform is around 50%. The peak to peak voltage of the square wave is 12 V. The acceptable error in AC frequency is around +/- 0.5 Hz (as discussed above) so it is fine that if a frequency of 49.78 Hz is output by the circuit.

Now when a square wave has been obtained, in the tutorial learn how it can be stepped up to 220 V and how a switching mechanism can be added to complete the circuit of square wave inverter.

## Questions related to this article?

👉Ask and discuss on EDAboard.com and Electro-Tech-Online.com forums.

Tell Us What You Think!!

You must be logged in to post a comment.