Analog SPWM Card for Inverters
Introduction: Analog SPWM Card for Inverters
Hello everyone and welcome to this amazing article on how I made a SPWM driver card that is capable of generating precisely controlled signals which can be used as input to drive an H-bridge to produce a pure sine wave at the output. This SPWM card purely analog in nature and uses no ASIC ( Application Specific Integrated Circuit ) or microcontrollers. It is completely based out of discrete analog and digital ICs which are either comparators, counters or other ICs. All this is precisely controlled by a crystal to give us accurate frequency output which is 50Hz in this case. Accurate frequency is important here and since we are not using RC based timing components, frequency drift is also minimal.
This project has been a great learning experience for me as an electronics hobbyist. So without further adieu, let's get started!
Step 1: Introduction to the Types of Inverters
Pulse transformer-based
inverter can be widely categorized into two main types depending upon the type of waveform they produce at the output. They are:
* Modified Square wave inverter
* Pure sine wave inverter
Modified Square Wave or Quasi Square wave inverters are the ones where the output waveform is not the traditional sine wave but instead it is a modified version of a pure square wave output with a significant amount of dead-time between the two pulses as seen in the figure above. The output is more like a square wave with an additional step. These inverters are better than pure square wave inverters in terms of reducing harmonics but are not that efficient compared to pure sine inverters.
Modified square wave inverters can actually work reasonably well when driving pure resistive loads but suffer greatly in efficiency and performance when used with inductive and capacitive loads due to the steep rising and falling edge causing a lot of harmonics and heating loss. Most cheap inverters are of Modified Square Wave type.
Pure Sine Wave inverters on the other hand are the more efficient type of inverters because their output is same or nearly as same as that of our mains supply. Since all appliances are designed to run properly with sine wave AC, these inverters are more efficient with least amount of harmonic and heat loss. These inverters are expensive because the involve a lot of complicated switching control, feedback and filtering to produce the desired sine wave output which ideally should not distort with different load types. 552
Sine wave inverters should be a preference while trying to design a renewable energy system.
Step 2: Introduction to SPWM Wave
SPWM stands for Sinusoidal Pulse Width Modulation. It is a type of signal which is essentially square in nature but the duty cycle of the square wave varies in proportion to the amplitude of the square wave. The entirety of the SPWM signal will correspond to the sine wave in terms of time period. So essentially for SPWM, the change in duty cycle is corresponding to the change in amplitude over a given fixed period of time.
A question now naturally arises, how do we generate SPWM signals?
Well to do this we would firstly require the original sine wave signal and then a carrier signal. The idea here is to compare the sine wave signal to a high frequency carrier signal in an almost point to point manner to generate the square wave representation of the given sine wave. The diagram describes the theory
Step 3: Introduction to H Bridge Topoplogy
The figure explains how the basic H bridge works. Here it is seen that a given load is controlled by a total of 4 switches (MOSFETs or BJTs as applicable). At a time two switches have to be activated to either allow current to pass through one direction or the opposite direction. It is also worthy to note that a few combinations are never allowed to happen as they will cause a direct short between the power supply.
Step 4: Using SPWM Signal to Control H Bridge
Having the basic understanding of how SPWM signals look like, how they are generated and how H-bridge works, these concepts can now be integrated together, where SPWM signals can drive the H bridge.
As seen earlier, only a selected combination of MOSFETs are allowed to operate to either allow current flow in one direction or the other direction. For properly activating the H-bridge, we need a total of 4 signals, each of which controls one MOSFET. A pair of MOSFETs are activated every half cycle of the entire wave. The waveforms required are colour coded into blue and red in the attached diagram for a better understanding. 552