You are on page 1of 5

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/284735115

Development of a microcontroller-based AC voltage controller with soft start


capability

Article · January 2015


DOI: 10.1109/ICECE.2014.7026977

CITATIONS READS

3 4,840

5 authors, including:

Naheed Ansari Kazi Mujibur Rahman


New York City Government Bangladesh University of Engineering and Technology
28 PUBLICATIONS   758 CITATIONS    35 PUBLICATIONS   226 CITATIONS   

SEE PROFILE SEE PROFILE

Md Zahurul Islam
Bangladesh University of Engineering and Technology
31 PUBLICATIONS   100 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Label-Free Identification of Biological Cells and Viruses Using Laser Light Scattering View project

All content following this page was uploaded by Md Zahurul Islam on 04 July 2018.

The user has requested enhancement of the downloaded file.


8th International Conference on Electrical and Computer Engineering 611
20-22 December, 2014, Dhaka, Bangladesh

Development of a Microcontroller-Based AC
Voltage Controller with Soft Start Capability
Arifur Rahman*, Nayeem Ansari, Nazneen Ahmed, Kazi Mujibur Rahman and Md. Zahurul Islam
Department of Electrical and Electronic Engineering
Bangladesh University of Engineering and Technology, Dhaka-1205, Bangladesh
*
arifurrahman.mail@gmail.com

Abstract—This paper describes the development of a


prototype of a microcontroller-based phase angle controlled II. OVERVIEW OF THE DESIGN
single-phase AC voltage controller that can efficiently control AC The development of the prototype is mainly composed of
voltage and also accommodates soft start capability for single- several stages of design consideration: 1) anti-parallel SCR-
phase induction motors. The output voltage of the controller is based voltage controller, 2) Gate-drive circuitry for SCRs, 3)
regulated to maintain a desired fixed RMS value and provide PWM generation through microcontroller, 4) Phase and
stabilized output by implementing a feedback control system.
frequency detection, 5) RMS value calculation for feedback
One microcontroller generates PWM signals in synchronism
with the supply voltage to control the firing angle of thyristors
and 6) Input-output Interfacing.
while a second microcontroller remains dedicated for measuring The functional block diagram of the system is shown in Fig.
the RMS value of the output voltage and sending that to the main 1.
microcontroller for the purpose of feedback control. The
provision for soft starting of a load is also incorporated into this
prototype.

Index Terms—AC voltage controller, Automatic voltage


regulation, Soft start

I. INTRODUCTION
PWM-based AC voltage controllers are widely used in UPS
and high power flexible AC transmission systems. This
varying voltage output is used for dimming street lights,
varying heating temperature in homes and industry, speed
control of fans and winding machines and many other
applications. These systems need switching elements which
can bear high voltage.
Frequently, high power MOSFETS are used as the
switching element. Their advantage is that they generate less Fig. 1 Functional block diagram of the voltage controller
lower-order harmonics. They have the physical limitation of
maximum blocking voltage; excessive heating is also an issue III. HARDWARE IMPLEMENTATION
for MOSFET based controllers. Amongst other options, an
A. Voltage Control Mechanism
anti-parallel pair of SCRs has the advantage over a TRIAC in
controlling highly inductive loads. Although TRIACs have the 2
R12 1 1
U4
6 1
R1 2
PWM+
advantage of a comparatively simpler gate circuit, TRIACs 165 660

have lower dv/dt ratings than SCRs and are available in only 2 4
K

MOC3021

small ratings. Moreover, the reliability of a SCR is more than D10


DIODE
SCR+
A

that of a TRIAC [1]. 5P4M


5P4M

SCR is a reliable solution when it comes to AC voltage


1

V1 SCR-
control at high power as they are available in higher ratings.
A

VSINE R2
D9 100

However, SCR based system can only be controlled by phase U6


DIODE
K

R11 R9
LOAD
2

2 1 1 6 1 2
PWM-
angle control method. This method generates more harmonic 165 660
L1
distortions [2]. Moreover synchronization with AC supply is 2
MOC3021
4 50mH

necessary when the control mechanism is provided by


microcontrollers. The gating circuit required is relatively more
complex.
The provision of feedback allows output voltage to be Fig. 2 The main circuit diagram for the prototype
stable and maintain the same RMS value of voltage while A pair of anti-parallel SCRs is used as the switching device
there is change in the supply voltage [3]. The gain of the error for controlling the AC voltage. The circuit diagram of the
signal of the feedback control system can be varied to obtain a SCR based voltage control circuit is shown in Fig. 2. Due to
slower or faster response of the system thus allowing soft start. the nature of the connection the two cathodes of the two SCRs
corresponds to two different nodes. Thus each gate pulse must

978-1-4799-4166-7/14/$31.00 ©2014 IEEE


612

be isolated from each other. This is achievved through optical C. PWM Generation
coupling provided by MOC3021 optoccouplers [4]. The To control the SCRs the PW WM signals must fulfil certain
mechanism is shown in Fig. 3. criteria: 1) The PWM signals mustm be inverted (space comes
gate current
before mark), 2) The frequenncy of the PWM must match
A K
exactly with the supply, 3) The T phase information of the
DIODE D1
supply must be available and 4) 4 The PWM frequencies must
SCR
5P4M
be twice the frequency of the AC C supply.
R1
2
660
1 An AVR microcontroller, ATmega32,
A was used for the
purpose of PWM generation [5]. Even though it is possible to
gate current
drive the two SCRs with thee same PWM signal, a slight
mismatch in timing can result in unwanted triggering in the
Fig. 3 Path of gate current when optocoupleer is turned on next half cycle. Two PWMs woorking in an interleaved manner
eliminates the risk of such trigggering. Thus during the positive
B. Synchronization half cycle the PWM controllingg the reverse SCR is set to be
The PWM signals must match accurately in phase and zero and during the negative haalf cycle the PWM controlling
frequency with the AC supply line. Evven a very small the forward SCR is set to zeroo. Fig. 6 shows the two PWM
deviation in frequency can gradually lead too the PWM signals signal generated and the resultaant output voltage alongside the
becoming out of phase with the supply. A modified zero supply voltage.
crossing detector is used for the purpose of
o synchronization. 400
Resultant Output Voltage

The circuit diagram is shown in Fig. 4. 200


AC supply voltage
Output voltage

-200
7
74HC14
R2 D4 -400
1 2 A K 0 50 100 150 200 250 300 350
1 2
4N35
K

21.5k DIODE PWM for dri ving forward SCR


1

1 6
D3 R3 Synchronization 1

DIODE 5
SUPPLY 10k
KA

0.5
2
Pulse
D2 0
2

4
DIODE
D1
A

-0.5
K A OPTOCOUPLER-NPN 0 50 100 150 200 250 300 350

DIODE PWM for dri ving reverse SCR

0.5

Fig. 4 Synchronization circuit, a modified zero crossing


c detector -0.5
0 50 100 150 200 250 300 350

The final output of this circuit is a PWM signal which


should ideally have a logic level 0 at the positive half cycle Fig. 6 PWM control
c signals
and logic level 1 at the negative half cyclee. However due to
the presence of resistance in the input circuuit the signal mark D. RMS Value Calculation:
(logic level 1) starts a little earlier than thhe start of negative The RMS value of the outtput cannot be determined by
half cycle and ends a little later (by the samme amount of time) simply dividing the peak value byb √2 due to the output voltage
than the end of the negative half cycle. The timing is shown in being a distorted sinusoidal wavve [6]. In order to calculate the
Fig. 5. RMS value of the output vooltage we have used another
microcontroller, AVR ATmegga8 [7]. This is due to the
consideration that the burdenn of the excess calculation
required for this step mightt hamper the time sensitive
operation of the main microconntroller. If the output voltage is
sampled over a full cycle of thee supply voltage and N samples
are obtained, the RMS value is i calculated by the following
equation.

2
However since the analoguue to digital converter of the
Fig. 5 AVR microcontroller only alloows the conversion of positive
Timing diagram of synchronization pulses
p voltages, the symmetric nature of the output is exploited and
The error in time can be calculated byy the equation (1) the output is sampled in one hallf cycle only. The result is then
which is based on the relative positions of the AC supply and fed to the main microcontroller for the purpose of feedback.
the synchronization pulses. E. Input/output Interface
⁄2
1 For the provision of manuual input to set the reference
2
Tmark and Ttotal is calculated using one of the timer voltage value we have used a variable
v resistor. A 16x2 LCD
resources available in the microcontroller annd Terror is obtained module is interfaced for displayying various data related to the
from the above equation. Ttotal is also the period of the AC operation. The reference voltagee value and the resultant output
supply. Thus both frequency and phasse information is voltage are displayed on the LCD
L display. The frequency of
obtained.
613

the supply voltage respective to the clock of the and KI respectively. The total error is also subjected to an
microcontroller is also displayed. overall gain of K. The new target output voltage is thus
determined as,
4
IV. ALGORITHM AND EXECUTION The value of the target firing angle required to achieve the
When the device is started up it automatically measures the particular value of RMS output voltage Vtarget is determined.
value of Ttotal and Terror. From Fig. 5 it is apparent that the For this purpose a look-up table of 64 data point is stored in
rising edge of the synchronization pulse arrives at Terror time the microcontroller. For any point that does not match with
earlier than the end of the positive half cycle. Thus every the desired value linear interpolation is used. The target duty
rising edge means that there Terror time left until the negative cycle D is thus obtained from the target firing angle. Fig. 8
clock cycle begins. If TPWM is the time starting from the shows the flowchart for determining target duty cycle.
beginning of the PWM cycle then on every positive edge TPWM
should be equal to (Ttotal/2-Terror).
The two PWMs necessary are not generated separately.
Rather, the same PWM is fed through two different pins of the
microcontroller to deliver them to the respective SCR drive
circuit at the appropriate time. After the end of each PWM
cycle the pins are swapped. The flow chart of the
synchronization process is shown in the Fig. 7.

Fig. 8 Flow chart of duty cycle updating

V. RESULTS AND DISCUSSIONS


Theprototype was tested with pure resistive loads. Fig. 9
shows an input-output relationship where the input is given as
the firing angle. The expected output is also plotted in the
figure.
In Fig. 10 the output power is plotted with varying duty
cycle. The relationship is non-linear in nature as the
relationship between the voltage and the duty cycle. Due to
Fig. 7 Flow chart of re-synchronization
almost a fixed amount of power loss of the operating circuit
the efficiency of the device is very low when the power output
is comparable to this small loss of power. The efficiency
The target output voltage value is updated continuously. approaches unity as the load is increased and is in the range of
The target output voltage is determined by the manual input any practical load. Fig. 11 shows the change of efficiency with
reference and the value of the output voltage obtained from change of output power.
feedback. A voltage error Ve(or Vep) is calculated as, Fig. 12, 13 and 14 shows the output power spectrum for 90˚,
3 120˚and 150˚ firing angles respectively. The contribution of
The error is not utilized directly rather a PID controller is harmonics towards the total power of the output is visibly high
implemented. The proportional, differential and the integral for the last two firing angles. So the preferred zone of
part of the error is calculated and each assigned a gain KP, KD operation should be firing angles less than or equal 90˚.
614

Power Spectrum for 120 degree firing angle


1
RMS output voltage vs. Firing angle
250 0.9
Expected
0.8
Actual
0.7

Power(% of total power)


200
0.6

0.5
RMS voltage(V)

150
0.4

0.3
100
0.2

0.1
50
0
0 50 100 150 200 250 300 350 400 450 500
Frequency (Hz)

0
0 20 40 60 80 100 120 140 160 180 Fig. 13 Power spectrum for 120˚ firing angle
Firing angle(degree)

Fig. 9 RMS output voltage vs. firing angle Power Spectrum for 150 degree firing angle
1

0.9
Output Power Vs. Duty Cycle
250 0.8

0.7

Power(% of total power)


200 0.6

0.5
Output Power(V)

150 0.4

0.3

100 0.2

0.1

50 0
0 50 100 150 200 250 300 350 400 450 500
Frequency (Hz)

0
0 10 20 30 40 50 60 70 80 90 100 Fig. 14 Power spectrum for 150˚ firing angle
Duty Cycle(%)

Fig. 10 Output power vs. duty cycle CONCLUSIONS


The feasibility and effectiveness of the proposed project is
Efficiency Vs. Ouput Power
evaluated with simulation studies and practical real-time
100
implementation. A microcontroller-based design can play a
90
key role to increase its efficiency. Microcontroller based
intelligent control allows the device to be more adaptive to
80

70

60
different situations and is capable of responding to automation.
Efficiency(%)

50
Moreover, the device can be extended to work in a high power
40
environment by simply replacing the SCR pair with a couple
30 of high power SCRs. Filtering techniques could be applied to
20 improve the design to reduce the harmonic content. However
10 the presence of lower order harmonics makes the filtering
0
0 20 40 60 80 100 120 140 160 180 200 difficult. Alternatively an adaptive range selector could be
Output Power(V)
implemented that forces the firing angle to be less than 900 by
Fig. 11 Efficiency vs. output power reducing the input voltage by selecting from multiple
transformers when necessary.

Power Spectrum for 90 degree firing angle REFERENCES


1
[1] B. Paul, ”Industrial Electronics And Control”, PHI Learning Pvt. Ltd.,
0.9
Second Edition, 2009, pp.277-279.
0.8 [2] M. H. Rashid, "Power Electronics – Circuits, Devices, and
0.7 Applications," Prenctice Hall Englewood Cliffs, Second Edition, 1993,
Power(% of total power)

0.6
pp.317-387.
[3] Nang, K.H. and L.O. Lwin, “Microcontroller based single phase
0.5 automatic voltage regulator”, 3rd IEEE International Conference on
0.4 Computer Science and Information Technology (ICCSIT), Myanmar,
0.3
2010.
[4] MOC3021 Optoisolators, Texus Instruements, datasheet available at:
0.2
http://www.ti.com/product/moc3021
0.1 [5] “Atmega32 Microcontroller data sheet”. Available:
0
http://www.atmel.com/images/doc2503.pdf
0 50 100 150 200 250 300
Frequency (Hz)
350 400 450 500
[6] Guillermo Rico, “Tech Tip: Effective or RMS Voltage of a Sinusoid,”
the Technology Interface, Spring 2006.
Fig. 12 Power spectrum for 90˚ firing angle [7] “Atmega8 Microcontroller data sheet”. Available:
http://www.atmel.com/devices/ATMEGA8.aspx

View publication stats

You might also like