You are on page 1of 4

Microcontroller Based Sinusoidal PWM Inverter for

Photovoltaic Application
S. M. Mohaiminul Islam, Gazi Mohammad Sharif
School of Engineering and Computer Science, Independent University, Bangladesh.
e-mail: safimohammadm@gmail.com

Abstract: This paper represents the microcontroller based given only on Sinusoidal PWM generation.
sinusoidal PWM inverter for photovoltaic application. The
advantage of this inverter is the use of a low cost
microcontroller that has built in PWM modules.
Microcontroller PIC 18F4431 is able to store the required
commands to generate the necessary PWM waveforms. The
required dead time has been implemented low cost. The
application of this inverter is to be either for stand-alone or
for grid connected from a direct supply of photovoltaic (PV)
Cells. In this paper how SPWM signal is generated by
microcontroller and what are the features of described
microcontroller is reviewed. Subsequently hardware
configuration of the microcontroller, algorithm, flowchart,
gate driver and isolation system are discussed. Finally the
experimental results are shown in this paper.

1. Introduction Fig. 1 Block diagram of the inverter [5]

Sinusoidal pulse width modulation (SPWM) is widely The single phase full bridge inverter circuit is shown in
used in power electronics to digitize the power so that a Fig. 2.
sequence of voltage pulses can be generated by the on and
off of the power switches. The pulse width modulation
inverter has been the main choice in power electronic for
decades, because of its circuit simplicity and rugged
control scheme. SPWM switching technique is commonly
used in industrial applications or solar electric vehicle
applications [1]. SPWM techniques are characterized by
constant amplitude pulses with different duty cycle for
each period. The width of this pulses are modulated to
obtain inverter output voltage control and to reduce its
harmonic content. Sinusoidal pulse width modulation is
the mostly used method in motor control and inverter
application [1, 2, 4]. To generate this signal, triangular
wave is used as a carrier signal is compared with
sinusoidal wave, whose frequency is the desired Fig. 2 Single phase full bridge inverter circuit [5]
frequency. The heart of the system is a PIC Microcontroller. This
The proposed alternative approach is to replace the microcontroller is specially developed for the generation
conventional method with the use of microcontroller. The of Sinusoidal PWM (SPWM) with dead time controller.
use of PIC18F4431 microcontroller brings the flexibility The dead time controller circuit is useful to make the
to change the real-time control algorithms without further design simpler, more reliable and the most important thing
changes in hardware. It is also low cost and has a small is to reduce the cost and components. The Microcontroller:
size of control circuit for the single phase full bridge PIC18F4431generates four Sinusoidal PWM signals. Fig.
inverter. The microcontroller has the built in dead time 3 shows the pin diagram of PIC18F4431 connected with
control circuit [3]. external oscillator. RB0 to RB3 pins are output for
2. System overview Sinusoidal PWM signals. RB0 and RB2 pins are
independent which go to gate driver ICs. The name of the
The basic schematic diagram of the photovoltaic inverter IC is IR2110. RB1 and RB3 pins are complementary
is shown in Fig. 1. It consists of many blocks, emphasis is which go to another same gate driver IC. The output
voltage of the gate driver IC is 10V - 20V. The output
voltage may be used for gate of the IGBT or MOSFET. register and comparator. PDC (PWM duty cycle) register
For operating the microcontroller we used 20MHz is defined by PDCx (PDCxL and PDCxH). There are a
oscillator and two 15pF capacitor. Also for operate Gate total of 4 PWM Duty Cycle registers for 4 pairs of PWM
drive circuit IC needs some capacitors. channels but only 2 PWM Duty Cycle registers are used
for this project. The Duty Cycle registers have 14-bit
resolution by combining 6 LSbs of PDCxH with the 8 bits
of PDCxL. PDCx is a double-buffered register used to set
the counting period for the PWM time base. The
comparator compares with PDC register and PTMR
register. PTMER register has 12-bit and PDC has 14-bit
register. So, extra 2-bits are using for Q-Clocks. Then
output will go in Dead Time generator and override
Logic. Dead Time generator register generates the
specific time delay for the switching components. And
Override control register (OVDCOND) can override the
output but that was not needed in this project. Special
Event register (SEVTCMP) is used for any interrupt but
in this work was not use. Only dead time generator
Fig. 3 PIC18F4431 for the generation of the SPWM single module is needed. Then the output will come in PWM0,
phase inverter PWM1, PWM2, PWM3, PWM4, PWM5, PWM6, PWM7
3. Hardware Configuration but PWM0, PWM1, PWM2, PWM3 are utilized. PWM0,
PWM2 are in independent mode and PWM1, PWM3 are
Fig. 4 presents Power Control PWM Modules Block in complementary mode for single phase that means the
Diagram. pin numbers are from 33 to 36 (RB0 to RB3) of
microcontroller.
4. Algorithm

Fig. 4 Power Control PWM Module Block Diagram [2]

Here PTMR Register is PWM Time base register. It can


be controlled by PTCON0 (PWM Timer Control register
0) and PTCON1(PWM Timer Control Register 1). And it Fig. 5 Flow chart for Single phase Sinusoidal PWM Signal
[3]
is 12 bit timer. The highest of the PTMR Register is
implemented by using of PTPER register. PTPER register
Fig. 5 shows the flow chart of single phase sinusoidal
has 12-bit register by combining 4 LSBs of PTPERH and
PWM signal. In this flow chart “initialize variables”
8-bits of PTPERL. PTMR register and PTPER register are
means initialize the user defined memory cell, “initialize
compared by comparator and this output signal will go in
port” initializes the ports in software by which the ports
PWM Generator 0, PWM Generator 1, PWM Generator 2
work as output ports. After that “Initialize PCPWM”
and PWM Generator 3. But PWM Generator 0 and PWM
initializes the modules which are used to generate PWM.
Generator1 are used here. PWM Generator has PDC
Then “set all interrupts” initializes all interrupts which are result. Fig. 9 shows PWM signal with dead time in single
associated with all kinds of desired interrupts. Then microcontroller. In Fig. 10 shows two signals of PWM in
“Initialize Sine Look up Table” stores the sampling value different phase.
of sine wave. Those sampling value will go in PDC
register. And the PTMR register will generate the
Triangular wave. Then the signal becomes Sinusoidal
PWM signal with dead time. The microcontroller checks
whether the generation is completed or not, if yes, take
another sampling of the sine wave table, if not, it waits
until completion.
5. Gate Driver
Basically, there are two fundamentals categories for gate
drivers. These are high side and low side drivers. High
side means the source of MOSFET of the power element
can float between ground and high voltage power rail.
Low side means the source of the MOSFET is always
connected to ground. The Gate driver circuit is shown in Fig. 7 Sinusoidal PWM Signals are shown in Digital
Oscilloscope
fig. 6. For the gate drivers, to operate as a bootstrap
circuit, the Vbs voltage is used to provide the supply to the
high side driver circuitry of the gate driver. Vbs is the
voltage difference between the Vb and VS pins on the
gate driver IC.

Fig. 6 Gate driver circuit

This voltage supply is needed to be in the range of 10V to


20V to ensure that the gate of the MOSFET gets Fig. 8 The output is PWM0 - PWM2
sufficient power so that the gate driver will be fully
enhanced. The Vbs supply is the floating supply that sits
on the top of the VS Voltage. There are various methods
to generate Vbs supply [1, 6].

6. Isolation Circuit
The isolation circuit is used to isolate signals for
protection and safety between a safe and a potentially
circuit between digital signals needs to designed correctly
for proper protection. The maximum applied voltage for
single phase inverter is 380V, since the microcontroller
operates at 5V level it is desired to isolate the control
board from higher voltage of the inverter circuit. This can
be done by using transformer.
7. Experimental Results
Fig. 7 shows our experimental board where we have
tested. Fig. 8 shows PWM0 – PWM2 is output from
Fig. 9 PWM signal with dead time
accordingly port RB0 - RB2 microcontroller. And PWM1
and PWM3 is in complementary mode. Ez Digital
Oscilloscope DS-1100 100MHz, two channel digital
storage oscilloscope was used to measure the experimental
Fig. 10 Two signals of PWM in different phase

8. Conclusions
In this work, a single phase PWM signal has been
implemented in PIC18F4431 microcontroller and gate
driver’s IC IR2110 was used. Several outstanding features
of the developed Sinusoidal PWM signal are highlighted
as follows: By generating the Sinusoidal single phase
PWM signal have less harmonic; both PWM signal and
Dead time control circuits can be implemented in a single
board microcontroller, which makes the system reliable,
compact and low cost; IR2110 IC can take two signals;
one is used for independent signal and another is used for
inverting signal. That means IC can also reduce the cost,
compact and system reliable.
References
[1] B. Ismail, S. T. (November 28-29, 2006). Development of a
Single Phase SPWM Microcontroller-Based Inverter. First
International Power and Energy Conference PEC (p. 437).
Putrajaya, Malaysia: IEEE.
[2] MICROCHIP. (2003). PIC18F2331/2431/4331/4431 Data
Sheet. Michrochip Techonology Inc.
[3] Mohaiminul Islam, S. M. (2009). Generation of 3 Phase
Sinusoidal PWM Signal with Variable Frequency By using
Low Cost Microcontroller. Senior Project Report Published
by Independent University, Bangladesh.
[4] (n.d.). Retrieved from http://www.tech-faq.com/pulse-width-
modulation.shtml
[5] Salim, K. M. (June, 1999). Development of Power Conditioner
Unit (PCU) For Fuel Cell. Master's Thesis.
[6] Rectifier, I. IR2110(-1-2)(S)PbF/IR2113(-1-2)(S)PbF HIGH
AND LOW SIDE DRIVER Data Sheet. Data Sheet No.
PD60147 rev.U.

You might also like