You are on page 1of 6

FINAL PROJECT INDUSTRIAL ELECTRONICS

POWER CONTROL BASED ON PWM USING


ARDUINO PLATFORM
Jessie Aguirre DCosta - 42072011

ABSTRACT: This proyect shows the


function of the PWM in order to control
the temperature for an incubator. The
pulse modulation is worked by the
Arduino microcontroller, using the
microcontroller, we be able to vary the
duty time and death time to increase and
decrease the power value that a bulb
takes on.
OBJECTIVES:
Control the power supply for a bulb.
Take knowledge about Arduinos
system and the program language.
Verify the control times.
See the change produced on the bulb
by the modulation time (PWM).
THEORETICAL FRAMEWORK
PWM: Pulse Width Modulation (PWM)
is a basic technique to create repeated
square waves (digital high/low voltage
transitions) of user defined length and
duty cycle. It can be used as a way to
encode an analog signal on a single
digital (high/low) line using the time
between transitions (pulse width) as
the variable; this technique is
commonly used to send servo position
and motor speed commands. Another
use is to use to the ratio of high and
low time to approximate a voltage
output; this technique can be used to

dim an LED or even (with careful


filtering) generate audio waveforms.
In its simplest form, the device is a
single counter with two variables. The
counter starts at zero, and the output
starts at high. The counter increments
every clock cycle until it reaches the
first variable number, at which point the
output goes low. The counter
continues incrementing until it reaches
the second variable at which point the
output goes high again and the
counter resets to zero. The time spent
with output high is called the pulse
duration or duty; the total time before
repeat is the period.
This simple functionality could be
approximated in software by setting a
high or low pulse, but the beauty of
PWM is that user code simply has to
configure the device and set the two
variables and the device will function
on its own; no further microprocessor
cycles will be consumed, and a repeated
high/low waveform will spew out.
The Maple has 16-bit PWM resolution,
which means that the counter and
variables can be as large as 65535, as
opposed to 255 with 8-bit resolution.
With a 16 MHz clock rate, a PWM
output could have maximum period of
about one millisecond; using a prescaler
(clock divider) in front of the counter

can increase this maximum period.


Setting the period to something other
than the maximum value gives further
control over the total length of the
waveform. However, this effectively
limits the resolution with which the duty
can be modified: the duty must be less
than or equal to the period.

d=analogRead(3);

PRACTICE DEVELOPMENT

The first part of the project consists in


creating a synchronism pulse signal. For
that, we have to take a rectified signal
of the feeding grid from 120 V, 60 Hz
to 12 V, 120 Hz.

digitalWrite(5,HIGH);

Then, using the 2N3904 transistor, we


get a tripping time in order to
synchronize the zero-cross time. That
signal must be read by a digital input
pin in the microcontroller (Arduino).

d=(d*4);
while(d!=0){
delayMicroseconds(1.5);
d=d-1;
}

}
Fig. 1: Arduino language code

Using a resistance value variation, we


take an analogic signal; we can control
the power supply that the bulb is going
to take. The result is an increase and
decrease light blinking in the charge.

After that, the microcontroller process


this information to start the PWM
program itself. This program consists
in:
iint a;
float b;
float c;
int d;
void setup() {
pinMode(5,OUTPUT);
pinMode(2,INPUT);
}
void loop() {
a=digitalRead(2);
if (a==1){
digitalWrite(5,LOW);

Fig. 2: Width pulse modulation.

Therefore, the power circuit (charge)


and the control circuit (tripping), must
be separate, the way they are joined is
through an optical coupler (MOC).
When Arduino sends a digital signal,
the MOC closes its terminals to
complete the power circuit to feed the
bulb.

ITEMS

simulation.

The following images show the power


circuit and its own simulation:

Protoboard.
DC power supply.
Transformer 120/12 V.
2N3904 Transistor.
MOC 3021.
Rectifier Bridge.
Arduino Microcontroller.
BT136 Tiristor.
1N4148 Diode.
1 M and 1k, Resistors.
60 W, 120 V, Bulb.
100 k, resistance value variation.
Floating oscilloscope.

Fig.5: Power bulb feeding circuit.

SIMULATIONS
The software design for this project was
Proteus. The simulations are shown
following:

Fig.6: Power bulb feeding oscilloscope simulation.

Fig.3: Tripping time circuit.

Fig. 4: Tripping time zero crossing oscilloscope

Fig. 7: PWM overall system.

RESULTS

Fig. 10: Half power wave form on the


charge.

After finish our test, simulations and


measures the results were the following:

Fig. 8: Full power wave form on the


charge.

Fig. 11: Half power wave form on the


charge.

Fig. 12: Minimum power wave form on


the charge.

Fig. 9: Full power light intensity on the


bulb.

Fig.13: Arduino Microcontroller.

this frequency is necessary for the zero


cross.
The zero cross is very important for the
angle control, cause from this cross is
where we can control the power supply
for the charge.
Fig. 14: Tripping time signal.

CONCLUSIONS
The PWM applications engineering will
reduce the power that the charges can
take while the starting pulse.
The tripping time that comes from the
2N3904 has the same frequency of the
rectifier because both work that 120 Hz

The ground reference may changes the


impedance of all components; this will
affect our wave adding harmonics that
could break the tripping time.
More bits on the microcontroller will
give more resolution on the angle of
power, because this parameter can link
more
spaces
on
the
system.

ANEXX 1: MOUNTED CIRCUIT

Circuit on Proteus editor.

You might also like