Você está na página 1de 5

02/11/2019 bcl_183293279.

htm

Controle de cegos e iluminação para manter o conforto


Intensidade de luz da sala de aula
Microcontrolador ATmega8535
Arthur Silitonga e eu Gusti LW Indrawan
Programa de Estudo da Faculdade de
Engenharia Elétrica da Universidade de
Presidente Bekasi, Indonésia
email: asilitonga@gmail.com

Resumo -Um nível estável de intensidade de luz de uma sala de controlador automático de brilho com sistema de persiana
aula pode ser obtido através da integração do controlador automática. O controlador automático de brilho é construído
automático de brilho da lâmpada ao sistema automático de adotando o princípio do ângulo de disparo de fase, enquanto as
persianas. Um controlador de brilho da lâmpada, cortinas serão acionadas pelo motor de passo. Um sistema
especialmente do tipo incandescente, pode ser desenvolvido cego e de iluminação bem planejado na sala de aula dará um
adotando o princípio do ângulo de disparo da fase. Ele deve efeito significativo ao ambiente de aprendizado e à
ser implementado de forma a que o ângulo de disparo seja concentração dos alunos ou usuários.
definido precisamente para manter a intensidade da luz da
sala de aula em um nível constante. Em seguida, o processo
de abertura e fechamento da cortina também pode ser feito II REVISÃO DA LITERATURA
usando um motor de passo que será controlado
automaticamente por um microcontrolador através de um A. Fase de Disparo
driver de hardware. O objetivo é aproveitar a contribuição da
luz do lado de fora, em vez de ligar ou iluminar diretamente a O ângulo de disparo de fase é um método proporcional ao
lâmpada. tempo para controlar a quantidade de potência que entra em
uma carga (carga resistiva ou carga indutiva) por ciclo. Ao
variar a parte do tempo de atraso de disparo em cada ciclo da
onda de corrente alternada, será determinada a tensão total
Palavras-chave- intensidade da luz, controlador automático de brilho da lâmpada,
sendo entregue à carga. Isso significa que quanto menor o
sistema de persiana automática, ângulo de disparo de fase, motor de passo,
atraso de disparo, mais energia é fornecida à carga e vice-
microcontrolador
versa.
Para obter um tempo de atraso de disparo preciso, é
necessário um ponto de referência fixo. Isso é chamado como
I. INTRODUÇÃO ponto de cruzamento zero. O cruzamento de zero é o ponto
instantâneo quando a onda sinusoidal de corrente alternada
A maioria dos sistemas de iluminação artificial é cruza o zero volt. O cruzamento zero ocorre duas vezes
apresentada e operada com base no dia e na noite apenas
sem levar em consideração a contribuição da luz do lado de em cada ciclo completo, como mostrado na Fig. I [1] [5].
fora da sala, especialmente durante o dia. Essa situação pode
ser inconveniente para o aluno dentro da sala de aula ligar ou
desligar manualmente as lâmpadas várias vezes, de acordo Eu r Zero aos ing
com o nível de intensidade da luz ambiente que pode
aumentar ou diminuir significativamente. Além disso, estudar O 'o O
p
em baixa intensidade de luz afetará os olhos se cansam mais Zero Zeroaossing I
aossing
rapidamente do que estudar sob luz suficienteintensidade. Por
outro lado, se a apresentação for feita em uma sala de aula
.- /
Fig. L. Zero Crossing
muito brilhante, não será uma boa exibição e se estiver muito
escuro, não será bom também para o público que precisa fazer O intervalo de tempo de zero pontos de cruzamento é
anotações. Desse ponto de vista, surge a idéia de desenvolver determinado pela frequência da onda senoidal AC. Na
e implementar esse projeto. O objetivo principal é projetar e Indonésia, a State Electricity Company (PLN) distribui corrente
modelar um controlador automático de intensidade de luz que alternada de 220 volts a uma frequência fundamental de 50 Hz
será usado para manter um sistema de iluminação adequado para cada ciclo completo, o que dá um período de 20 ms.
para a sala de aula equipado com lâmpadas CA Como o ponto de cruzamento zero ocorre duas vezes em cada
incandescentes para proporcionar um ambiente de ciclo completo, ocorrerá a cada 10 ms
aprendizado confortável para o aluno. Uma intensidade de luz
confortável pode ser mantida integrando

978-1-4799-0425-9 / 13 / $ 31,00 © 2013 IEEE

Theoretically, by knowing the firing delay time, then the firing B. Light Sensor
angle can be determined by simply varying it after each zero Light dependent resistor (LOR) is used as the
crossing point between an interval of 0 up to 10 ms. To illumination measurement unit. It is built in combination
convert the firing delay into firing angle, this interval can be
with 10 k!1 resistor in a voltage divider configuration as
divided into 180 time slots and eachextime slot will be equal to shown on the Fig. 3.
I degree. From this information, if is assumed as the firing
angle and td is the firing delay, then the relation of these
variables is simply determined by (1). To MCU

(1)
For alternating current (AC),= the input voltage oscillates in a
sine wave pattern Vi (t) Vp sin mt with Vp as the peak

voltage and the average voltage can be calculated using (2).

V Fig. 3. LDR Configuration


The output of this measurement circuit is an analogue
Vav = --- .Ea +...1) (
cos (2) signal. Since the project utilizes ATmega8535 which is

Jr completed already with analogue to digital converter (AOC),


If a non-RMS Voltmeter is used for the load voltage then external AOC IC is not required. By setting up the
measurement, the result should be equivalent with (3). components into voltage divider configuration, the circuit will
directly obtain a voltage that varies with the measured values
of light intensity, instead of a resistance change. By adapting

https://www.htmlpublish.com/newTestDocStorage/DocStorage/183293279/bcl_183293279.htm 1/5
02/11/2019 bcl_183293279.htm
(3) the concept, then the output voltage of this configuration can
be calculated using (4).

I Oxl 03

A. Block Diagram
III. PROJECT DESIGN
Z
v
out
= 5X l( LD R + (1 0 xl 03 ) J (4)

C. ero Crossing Detector


The zero crossing detector circuit is utilizing a step
down transformer, five diodes IN5392GP, optocoupler
Pulsating
NPN, and two resistors. Practically, this circuit can be
connected directly into the power supply circuit so it
positive DC
utilizes the same transformer and bridge rectifier circuit as
the power supply used. Complete configuration of these
voltage
components is shown on the Fig. 4.

Fig. 2. Organization ofthe System Controller ri-'---ToPIND.:2o 0PTOCOUPlER-oNPN

Complete block diagram showing how hardware aspect


of the system controller is organized depicted in Fig. 2.

There are two power supply units that provide 5 volts


DC with different current ratings. A lower current rating
power supply is used to supply all of the logic circuits
while the higher one is specially used to supply the
Fig. 4. Zero Crossing Detector Circuit
stepper motors only. Next, the mode selection button is
used to choose either normal mode or presentation mode. Firstly, the 12V alternating current is rectified into direct
current by the bridge rectifier circuit. The output of this

rectifier is not pure direct current, but it is a pulsating positive unwanted high voltage or high current occur in the load. By
DC voltage as shown on the waveform in the Fig. 5[3]. using this optocoupler, all of the logic circuit is completely

OCL'J
separated from the AC load (lamp). A complete circuit
ofthe brightness controller is shown on the Fig. 7.
sv

I ms l rn:; I ms

Fig. 5. Pulsating Positive Voltage

This pulsating positive voltage is used to drive the infrared LED


inside the NPN optocoupler and a 1.2 kO resistor is used to limit the
current through it. By doing this, the optocoupler LED will stay ON for Fig. 7. Brightness Controller Circuit
most of the cycle except at the time when the AC sinusoidal wave
crosses 0 V (or about to cross 0 Triac gating through the MOC3020 is done by giving a
V) . When this LED is glowing, it will pull the external interrupt low pulse into optocoupler pin 2. Active low is chosen so
pin of the microcontroller low, in this case external interrupt 0 that the microcontroller does not need to provide voltage
PIND.2 (EXT INTO). In contrary, when the LED is OFF, then for the circuit. This condition is generally known as sinking
the external interrupt PIND.2 will be pulled high. Theoretically, where the digital 110 only provides ground needed in the
based on the working principle above, output of this zero circuit. Sinking is chosen instead of sourcing because of
crossing detector should look like the red waveform the optocoupler current rating consideration. When a low
in the Fig. 6. pulse is given to optocoupler pin 2, then the bilateral
AC Sinusoidal Ware
switch inside MOC3020 will directly ON and triac is
latched until it reaches the zero crossing point.

E. Stepper Motor Driver


Stepper motor driver is used as an interface between
microcontroller with the stepper motor itself. The driver
being used is dual H-bridge, high current, 16-pins L293D.
In this final project, since the motor requires quite high
current to operate than it is better to separate this motor
driver with the other logic circuits. For this purpose
TLP521 optocoupler is used to separate the motor driver
with the microcontroller depicted in Fig. 8. Related with
OU!PU! ot Zuo Cl'ossiDgD�tector
this, the power supply for the motor and the driver are also
separated so that in case the load draws high current,
then the other circuits will not be disturbed.
nnn( powersupply1 powersupply2

lVfrom lVfrom
Fig. 6. Zero Crossing Output Signal (Theoretically)

By the presence of this interrupt signal into PIND.2,


continuously the microcontroller will be interrupted every
10 ms and it will be able to recognize when the wave pass
through the zero line. Next, this point will be used as
reference point to start the triac firing delay precisely.

D. Brightness Controller Circuit

https://www.htmlpublish.com/newTestDocStorage/DocStorage/183293279/bcl_183293279.htm 2/5
02/11/2019 bcl_183293279.htm
Brightness controller circuit has the responsibility to maintain
the brightness of the lamp. This circuit consists of triac BTl39
[2][7], optocoupler MOC3020 as a triac driver, and several
current limiting resistors. Here MOC3020 is used also as a
protection for the whole logic circuits if there is

Fig. 8. Stepper Motor Configuration

The input signal of the driver can be simply set by


following the stepper table[4].

1. Step down transformers


TABLE I 2. High current power supplyfor the three stepper
STEPPER TABLE motors only
3. Power supplyfor all o{the logic circuit
Pin 2 Pin 7 Pin 10 Pin 15
4. Stepper motor drivers configuration
STEP 1 ON OFF ON OFF
5. ATmega8535 minimum system[6]
STEP 2 OFF ON ON OFF
STEP 3 OFF ON OFF ON
6. AC lamps brightness controller
7. Liquid Crystal Display (LCD)
STEP 4 ON OFF OFF ON
8. Light Dependent Resistor (LDR)
In order to change the direction ofthe rotation can be done by 9. Mode selection button
simply reverse the step[4]. It means step 4 become step 1, step 3 10. AC lamps
11. Bipolar stepper motors
become step 2, step 2 become step 3, and step 1 become step 4.
12. Blinds
This reversed step order is shown in the table below.

The device has successfully operated to keep the light


TABLE II intensity in a constant level. In the normal mode, if the
REVERSED STEPPER TABLE
light intensity drops below the predetermined setpoint
Pin 2 Pin 7 Pin 10 Pin 15 then the stepper motor opens the blind while the lamp
STEP 1 ON OFF OFF ON stays OFF. Ifthe blind has already opened and the light
STEP 2 OFF ON OFF ON intensity still below the setpoint, the lamp will ON and get
STEP 3 OFF ON ON OFF
brighter until the setpoint is reached.
STEP 4 ON OFF ON OFF
On the other hand, if light intensity is greater than the
predetermined setpoint, the lamp will be dimmed until the
setpoint is reached (in this case the lamp might be
IV. RESULT completely OFF). Ifthe light intensity is still greater than the
setpoint and the lamp is OFF, then the stepper motor will
A. Hardware Configuration close the blind. Next, in the presentation mode the
operating way is quite similar. The difference is only on the
setpoint for the first lamp (the lamp that will be placed in
front side of the room) while the rest are exactly the same.

B. Zero Crossing Detector


Output signal of the zero crossing detector looks like a
repeated positive pulse with a fix time interval as shown
on the Fig. 10.

Fig. 9. Top View ofSystem's Miniature Fig. 10. Zero Crossing Output Signal (Practically)

Miniaturization of the classroom, and the light Theoretically, zero crossing point must occur every 10 ms
intensity controller ofthe classroom are shown on Fig. 9. as explained in the previous section. However this is not that
Depicting in the Fig. 9, the component of the miniature accurate in practical. The infrared LED of NPN optocoupler will
goes off a moment before and after the AC sinusoidal wave
can be mentioned as follows.
crosses zero because the power is too small at this time
interval. Because ofthis, the NPN optocoupler's output signal

will consume a small amount of time at every zero We described also that period time of one complete
crossing point. Base on estimation, it is around ± 0.5 ms cycle of AC signal generated by the State Electricity
on each edge ofthe zero crossing point. By knowing it, Company is 20 ms. Indeed, the period of a half cycle of
then the firing pulse must not be generated 0.5 ms before the AC signal is 10 ms. When we increased the firing
and after the zero crossing point. delay near to 10 ms, i.e. 7 ms, the conduction time of
phase firing angle became smaller. In Fig. 14, we could
C. Brightness Controller Circuit depict that the total voltage delivered to the lamp was very

https://www.htmlpublish.com/newTestDocStorage/DocStorage/183293279/bcl_183293279.htm 3/5
02/11/2019 bcl_183293279.htm
Brightness level of the lamp can be determined by small. This condition also means the intensity of the light
chopping the AC sinusoidal wave that is fed into it. In emitted by the lamp became very low.
order to know how much voltage is exactly delivered into
3. Firing delay: 5 ms
the lamp, several testing are performed by varying the
firing delay ofthe triac. Some of the results are shown on
the Fig. I I , Fig. 12, Fig. 13, and Fig. 14.

I. Firing delay: 0 ms

Fig. 13. Output of5 ms firing Delay

Fig. I I . Output of0 ms firing Delay

The conduction time of the phase firing angle is much


longer than the firing delay time. Hence, the total voltage
delivered to the lamp is also much high which can be
depicted in Fig. 11 . When we decreased the conduction
time of the phase firing angle which also means that the Fig. 14. Output of 7 ms firing Delay
firing delay was being increased, the total voltage
delivered to the lamp for one complete cycle ofa
sinusoidal wave became smaller shown on Fig. 12.

The comparison between calculated load voltage (at


the lamp) and measured load voltage (at the lamp) are
shown in the table and on the graph below. Note that the
load voltage measurements are done ten times for each
conduction time. Therefore the measured values listed
below are the average of the ten times measurements.

Fig. 12. Output of2 ms firing Delay

Varying the conduction time ofthe phase firing angle


was also possible when we decreased again the
conduction time. Depicted in Fig. 13, firing delay
increased as the conduction time of the phase firing angle
had decreased, and this configuration causes the total
voltage measured at the lamp to become much smaller.

TABLE III Classroom Utilizing Microcontroller ATmega8535 has


CALCULATED VS. MEASURED LOAD VOLTAGE
already successfully done its function as follows.
Calculated Measured
Conduction
Load Voltage Load Voltage Error 1. The light intensity sensing circuits has successfully
Time (ms) (%) detected the light intensity level and the microcontroller
(V) (V)
display it on the LCD in
1 5.38 4.83 10.22
2 21 20. 11 4.24 2. The zero crossing detecto
output signal that indicate
3 45.34 42.63
4 76 73.48 3.73 3. The II
5.98 current sinusoidal wave
5 1 10 106.63
6 143.99 138.62
7 174.66 167.21
8 198.99 189.85
9 214.62 205. 1
10 220 209.47

220
� 200
140
OJ 160180

0()
±l 120
0 100 Vcalc
>
;:; 80 -

8- 60 Vmeasure

0;:l 40 --

20
0
2 3 4 5 6 7 8 9 10

Conduction Time (ms)

Fig. 15. Measured Voltage vs. Calculated Voltage

https://www.htmlpublish.com/newTestDocStorage/DocStorage/183293279/bcl_183293279.htm 4/5
02/11/2019 bcl_183293279.htm

ATmega8535".
Microcontroller
Utilizing
Classroom
The
Intensity
Light
Comfort
Maintain
Control
Lighting
"Blind
designing
i.e.
encountered,
answers
as
the
implement
and
design
able
are
we
summary,
In
applications.
co-design-based
hardware/software
on
based
solutions
appropriate
with
approaching
by
institutions
industrial
occured
life
daily
our
found
problems
practical
several
solve
to
purpose
in
done
been
have
which
microcomputers
or
microcontrollers
using
series
one
is
controller
this
of
development
comfortable
a
maintain
automatically
will
device
this
level.
outside
of
care
to
need
without
conveniently
study
can
user
or
student
addition,
In
mode.
presentation
and
mode
normal
in
both
classroom
the
inside
level
intensity
light Implementing
The

brightness controller circuit has successfully control


6 4 with
the
to
Allopen
ofthe
brightness
the and
other
bipolar
close
3 circuit
level
32
06 stepper
theofthe
microcontro
blind
motors
lamps
and have
they are
operated
erintegrated
smo

https://www.htmlpublish.com/newTestDocStorage/DocStorage/183293279/bcl_183293279.htm 5/5

Você também pode gostar