You are on page 1of 4

Y.-W. Bai and Y.-T.

Ku: Automatic Room Light Intensity Detection and Control Using a Microprocessor and Light Sensors 1173

Automatic Room Light Intensity Detection and Control


Using a Microprocessor and Light Sensors
Ying-Wen Bai and Yi-Te Ku

Abstract — In this paper we propose a design using both a power HLCM in every lamp in a typical home. The design
microprocessor and light sensors for automatic room light detects whether someone is passing through the detection area
detection and control. Our design, the HLCM (Home Light not only by means of the PIR sensor in the HLCM but also by
Control Module) which will be installed in every light fixture detecting the change of light intensity in a room by means of
of a family, is made up of four blocks: the pyroelectric the light sensor in the HLCM. We also use the RF module to
infrared (PIR) sensor circuit, the light sensor circuit, the communicate among the HLCMs to pre-control the lights. For
microprocessor and the RF module. By using the PIR sensor example, when the room light intensity is insufficient, all
circuit, the HLCM detects if a human body enters the lights controlled by HLCM A are turned on. HLCM A will
detection area or not. If there is no human body present, all then send a signal to the nearby HLCM B to turn on a light
controlled lights are turned off. If there is, the HLCM detects controlled by HLCM B to increase the light intensity.
the light intensity under the environment and maintains Moreover, if someone goes from the kitchen to the living
sufficient light by controlling the number of lights. We have
room, the HLCM in the kitchen notifies the HLCM in the
also integrated an RF module to transmit and receive the data
living room to turn on the light in advance. By using our
from each HLCM so we can control different lights in
design one can achieve high efficiency in home power
different regions. The result of using the HLCM shows that the
total power consumption can be reduced1. management.
This paper is organized as follows. Section 2 introduces the
Index Terms — Light Control, Microcontroller, Pyroelectric HLCM. Section 3 presents the light control in our design.
Detectors, Illumination Measurement Section 4 summarizes the implementation results and Section
5 draws our conclusion.
I. INTRODUCTION
RF RF RF
HLCM HLCM HLCM HLCM
In recent years the energy crisis has become one problem
which the whole world must confront. Home power RF

consumption makes up the largest part of energy consumption


in the world. In particular, the power consumption of lamps in RF
a typical home is a factor which can’t be ignored. The typical
user needs different light intensities in different places. HLCM RF HLCM RF HLCM
Sometimes the light intensity from outside is sufficient, and
thus we don’t need to turn on any light. But sometimes the
user leaves but forgets to turn off the light. These factors
cause energy waste. Therefore some power management of
light control in a home is necessary in order to save energy. Fig. 1. Room light intensity detection and control architecture.
Lights are usually controlled by on/off switches. Of course,
the user can switch a light on or off remotely by connecting a II. DESIGN OF THE HLCM
specific device to a PC, but there has to be at least a PC, The HLCM shown in Fig. 2 is made up of the PIR sensor
consuming a rather large amount of power 24 hours a day, for circuit, the light sensor circuit, the RF module and the low-
the control mechanism [1-4]. Moreover, this inconvenient power MCU. We also provide a DC power supply from AC
practice comes at a high cost for the user. In some designs one power to every component.
must install specific hardware and software to control the We use the PIR sensor circuit to detect whether someone is
lights, resulting in unacceptable costs. Furthermore this type passing through the detection area or not. If a human body
of system cannot detect either the temperature of the human enters the detection area, the PIR sensor receives the
body or the room light intensity [5-8]. variations of the temperature made by the infrared energy
In this paper we propose a design for automatic room light emitted to the surroundings, and if necessary produces the
detection and control. As shown in Fig. 1, we install a low- variations of electric changes by means of a pyroelectric effect.
Because the electric charges are very few and not easily
sensed by the sensor, we adopt the high-impedance FET to
1
Ying-Wen Bai is with the Department of Electronic Engineering, Fu-Jen pick up the signal. Since the output amplitude of the sensors
Catholic University, Taipei, Taiwan, 242, R.O.C. (e-mail: bai@ee.fju.edu.tw)
Yi-Te Ku is a graduate student of Fu-Jen Catholic University, Taipei, we measure, about the level of mV, is not large enough for an
Taiwan, 242, R.O.C. (e-mail: 495506100@mail.fju.edu.tw) MCU, we have to amplify the output signal from the sensor
Contributed Paper
Manuscript received July 7, 2008 0098 3063/08/$20.00 © 2008 IEEE

Authorized licensed use limited to: Gheorghe Asachi Technical University of Ia¿i. Downloaded on February 08,2023 at 11:54:53 UTC from IEEE Xplore. Restrictions apply.
1174 IEEE Transactions on Consumer Electronics, Vol. 54, No. 3, AUGUST 2008

with a sufficient quantity of two-stage high-gain amplifiers. III. DESIGN OF THE LIGHT CONTROL BY HLCMS
Nevertheless, if the gain is very high, most tiny noises are
amplified simultaneously and interfere seriously with the A. Light controlled by an HLCM
output signal. Therefore, in our design we have adjusted the As shown in Fig. 4, we install an HLCM at each light. The
value of both the resistance and the capacitance so as not only HLCM detects if a human body is present or not and it detects
to amplify the sensed signal and but also to restrain any noise the light intensity; it switches each light on/off by controlling
resulting from the temperature variations. the SSR on/off to support sufficient light intensity.
AC power
VCC R VCC MCU
R SSR
R C
C
R C R SSR

……
C RVDD AVDD

……
C R MCLR B0
A0 B1
C 1M A1 RF module
PIR R C OSC1 TX VCC
C OSC2 RX
sensor PIR sensor circuit TX VDD
VSS AVSS
RX VSS
VCC R
R AC power
RR L T Power supply circuit
C VCC
RR D D
R R R R 7805
R
R D D C C C
L
CR
Light
sensor Light sensor circuit
Fig. 2. The circuit diagram of the HLCM.

Fig. 4. Light controlled by an HLCM.


The RF module is specifically designed to connect to the
MCU, thus allowing communication to be made among the In our design setting the HLCM measures the average light
HLCMs. The modulation of the RF communication is FSK, intensity supported by a light, which is 170 Lux, and the
and the FM modulator works at 2.4 GHz frequency and 2 power consumption of a light, which is 80 Watts. When a user
MKbps speed. The advantages of RF communication are the turns on all lights, the power consumption increases to 400
absence of extra connection wires and its low cost. Watts. Because there are different levels of sufficient light
We have used an SSR to switch each light. SSRs have been intensity in different places, the number of lights switched on
utilized to replace mechanical relays because of their many is different. In Table I we give examples from three different
advantages, like miniaturized configuration, little or no places.
contact bounce, low energy consumption, decreased electrical
noise, compatibility with digital circuitry and high-speed TABLE I
switching performance. These SSR also provide isolation POWER SAVING IN DIFFERENT PLACES
between a control circuit and a switched circuit. Room Living room Bathroom Study room
The MCU in the HLCM has three functions, as shown in Sufficient light
150 Lux 200 Lux 500 Lux
Fig. 3: to support sufficient light intensity by ascertaining in intensity
which room the user is located, detecting the human body, and Number of lights
switched on by 1 2 3
switching lights on/off by controlling the solid state relays HLCM
(SSR) on/off. Power consumption 80 Watts 160 Watts 240 Watts
Power saving 320 Watts, 240 Watts, 160 Watts,
(Watt, %) 80% 60% 40%

B. The Communication among HLCMs


As shown in Fig. 5, we use the RF module to transmit and
receive the data from each HLCM in order to pre-control the
lights and support sufficient light intensity. If the light
intensity is still insufficient for the user when all the lights
controlled by HLCM A are turned on, HLCM A will ask the
nearest HLCM B to turn on a light controlled by HLCM B to
increase the light intensity. Pre-control means that if someone
goes from the kitchen to the living room, the HLCM in the
kitchen notifies the HLCM in the living room to turn on the
light in advance. The communication format has four parts:
the address of the HLCM (24 bits), the address of the light
devices (5 bits), the status of light (3 bits) and the CRC
Fig. 3. The control flowchart of the microprocessor.
(Cyclic Redundancy Check, 8 bits).

Authorized licensed use limited to: Gheorghe Asachi Technical University of Ia¿i. Downloaded on February 08,2023 at 11:54:53 UTC from IEEE Xplore. Restrictions apply.
Y.-W. Bai and Y.-T. Ku: Automatic Room Light Intensity Detection and Control Using a Microprocessor and Light Sensors 1175

Preamble Address Data CRC Value measured by our design Value measured by digital light meter

3000

D D D D D S S S 2500

Illumination (Lux)
2000
00001 Light_1 001 Switch on
D Address of lights 00010 Light_2 010 Switch off 1500
S Status of lights 00011 Light_3 1000

500

0
Fig. 5. The message format for light control.
0 120 240 360 480 600 720
Time (Minutes)

IV. RESULTS OF THE EXPERIMENT Fig. 7. Comparison of the light intensity measured by our design and that
Fig. 6 shows the implementation of the HLCM. The measured by a digital light meter.
hardware prototype circuit of the HLCM is now
implemented on an 8 cm × 6 cm printed circuit board As shown in Fig. 8, we measure the variations of light
(excluding the SSR). intensity of three modes for a long time under the same
The power consumed by the HLCM can be measured environment. The three modes are the change of light intensity
and calculated as shown in Table II. in nature, the change of light intensity when we switch the
We compare the change of the value of light intensity light on/off by ourselves and the change of light intensity
under the same environment between that measured by when we install the HLCM at the light. In our experiment we
our design and that of the traditional design measured by observe the light intensity when in user time; we do not
a digital light meter. We place a digital light meter 200 observe the light intensity when in non-user time. Under
cm below a light. Because the HLCM is adjacent to the natural conditions the room light intensity changes along with
light, and the light intensity measured by an HLCM is the outside environment. When we do the switching by
higher than that measured by a digital meter, we have to ourselves there is one condition: When we switch all lights on
adjust the value measured by the HLCM to make it because the environment is too dark or when we do not switch
similar to that measured by the digital light meter, as the lights off when just leaving for a short time, we maintain
shown in Fig. 7. enough light intensity. When we switch the lights on/off by
using the HLCM, the light intensity is the same as under
natural conditions and it is maintained at over 500 Lux if there
is a user. When the user leaves the room or the light intensity
PIR Light is more than 1000 Lux, the light is turned off.
sensor sensor

The change of light intensity in nature


The change of light intensity when we switch the lights on/off by ourselves
The change of light intensity when we install the HLCM at the light

2500
Sunny Cloudy Partly cloudy

2000
Illumination (Lux)

RF module 1500

Fig. 6. Picture of an HLCM.


1000

TABLE II
AVERAGE POWER CONSUMPTION OF THE HLCM MODULE 500
Operation Average Power User Non-user User Non-user User Non-user
Average
Item Voltage Consumption 0 time time time time time time
Current (mA)
(V) (W) 0 720 1440 2160 2880 3600 4320
RF 33 3 0.099 Time (Minutes)
MCU 36 5 0.18 Fig. 8 The change of room light intensity under three modes.
Relay 68 5 0.34
Body
35 5 0.175 In Fig. 9 we have compared the power consumption
Detection
Light
38 5 0.19
between switching the lights on/off by ourselves and using the
Detection HLCM. Our measurement confirms that energy is saved by
Total 210 5 or 3 0.984
using the HLCM.

Authorized licensed use limited to: Gheorghe Asachi Technical University of Ia¿i. Downloaded on February 08,2023 at 11:54:53 UTC from IEEE Xplore. Restrictions apply.
1176 IEEE Transactions on Consumer Electronics, Vol. 54, No. 3, AUGUST 2008

REFERENCES
Switching the lights on/off by ourselves [1] Changseok Bae, Jinho Yoo, Kyuchang Kang, Yoonsik Choe, and
Power consumption (Watts)

Switching the lights on/off by using the HLCM Jeunwoo Lee, “Home server for home digital service environments”,
300 Sunny Cloudy Partly cloudy IEEE International Conference on Consumer Electronics, 2003, vol 49,
250 pp. 1129-1135, Nov. 2003.
200
[2] A. Z. Alkar, and U. Buhur, “An Internet Based Wireless Home
150
Automation System for Multifunctional Devices,” IEEE Transactions on
100
Consumer Electronics, vol. 51, no. 4, pp. 1169-1174, Nov. 2005.
50
[3] Yu-Ping Tsou, Jun-Wei Hsieh, Cheng-Ting Lin, and Chun-Yu Chen,
0
“Building a Remote Supervisory Control Network System for Smart
0 720 1440 2160 2880 3600 4320
Home Applications,” IEEE International Conference on Systems, Man
Time (Minutes)
and Cybernetics, 2006, ICSMC '06, vol. 3, pp. 1826-1830, Oct. 2006.
Fig. 9. Comparison of the power consumption of our design with that of [4] A. R. Al-Ali and M. Al-Rousan, “Java-based home automation system,”
other designs. IEEE Transactions on Consumer Electronics, vol. 50, no. 2, pp.498-504,
May 2004.
[5] Chia-Hung Lien, Chi-Hsiung Lin, Ying-Wen Bai, Ming-Fong Liu, and
V. CONCLUSION Ming-Bo Lin, “Remotely Controllable Outlet System for Home Power
In this paper we have proposed a design for automatic room Management,” IEEE Tenth International Symposium on Consumer
Electronics, 2006, ISCE/ 2006, pp. 7-12, June 28-July 1, 2006.
light detection and control. We install an HLCM at every light [6] A. Alheraish, “Design and implementation of home automation system,”
of a family for home power management. The HLCM detects IEEE Transactions on Consumer Electronics, vol. 50, no. 4, pp.1087-
if a human body is present or not by using the PIR sensor 1092, Nov. 2004.
circuit. If there is no human body present, all lights are turned [7] http://www.iaez.com
[8] http://www.homeseer.com
off. If there is, the HLCM then detects the light intensity
under the environment by using the light sensor circuit and the Ying-Wen Bai is a professor in the Department of
system maintains sufficient room light by switching lights Electronic Engineering at Fu-Jen Catholic
on/off. To realize light intensity support and light pre-control, University. His research focuses on mobile
computing and microcomputer system design. He
the RF technology for light power management has been obtained his M.S. and Ph.D. degrees in electrical
integrated. Consequently, the potential of the features of low engineering from Columbia University, New York,
cost, small size, low power consumption and power saving in 1991 and 1993, respectively. Between 1993 and
1995, he worked at the Institute for Information
has been shown. Industry, Taiwan.
Table III, a comparison of designs, shows that our design
consumes less power, and at a low cost. As a result, our
design, which has more integrated functions, is better than Yi-Te Ku is currently working toward the M.S.
degree in Electronic Engineering at Fu-Jen Catholic
others. University, Taiwan. He received his B.S. degree in
electronic engineering from Fu-Jen Catholic
TABLE III University in 2006. His major research is focus on
COMPARISON OF OUR DESIGN WITH OTHERS consumer electronics products and microcomputer
Light Control Design Design 1 Design 2 Our Design system integration design.
Home Server Needed Needed Not Needed
Power Consumption 120 Watts 25 Watts ≤ 0.984 Watts
Body Temperature
No No Yes
Detection
Light Control No No Yes
Cost High High Low
Setup Complicated Easy Easy
Pre-control No No Yes
Light Intensity Setting No No Yes
Support

Authorized licensed use limited to: Gheorghe Asachi Technical University of Ia¿i. Downloaded on February 08,2023 at 11:54:53 UTC from IEEE Xplore. Restrictions apply.

You might also like