See discussions, stats, and author profiles for this publication at: https://www.researchgate.
net/publication/324018381
Development of Microcontroller Based Temperature and Lighting Control
System in Smart Home
Article · July 2014
CITATION READS
1 16,789
2 authors, including:
Aung Ze Ya
University of Technology Yatanarpon Cyber City
90 PUBLICATIONS 154 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
Renewable Energy-based Off-Grid Rural Electrification Project in Myanmar View project
Renewable Energy Development and Microgrid Deployment for Decarbonising towards Sustainable Future and Climate Change Mitigation View project
All content following this page was uploaded by Aung Ze Ya on 03 March 2020.
The user has requested enhancement of the downloaded file.
ISSN 2319-8885
Vol.03,Issue.16
July-2014,
Pages:3322-3327
www.semargroup.org,
www.ijsetr.com
Development of Microcontroller Based Temperature and Lighting Control
System in Smart Home
JUNE THARAPHE LWIN1, AUNG ZE YA2
1
Dept of Electrical Power Engineering, Mandalay Technological University, Mandalay, Myanmar, Email:
[email protected].
2
Dept of Mechanical Engineering, Mandalay Technological University, Mandalay, Myanmar, Email:
[email protected].
Abstract: Recently, smart home has achieved evident interest due to consideration of an ideal living home with advanced
technologies. Smart home technology is a good choice for people not only care about security but energy saving as well.
Besides, energy saving is considered as one of the most important issue affects the consumers, power system quality and
the global environment. The obvious point of smart home is that it is automatically adjusted to the desired state through
interactions between the physical condition and electronic devices. This study is mainly mentioned the microcontroller based
temperature and lighting control system for energy saving in one-story building with six room’s smart home. The
microcontroller is the brain of the system for interfacing and controlling the system. Therefore, in this paper, 40-Pin
PIC18F4550 High-Performance, Enhanced Flash USB Microcontroller is applied to maintain the room temperature range of
smart home as 25 ° C ± 5 ° C. Then, the temperature and lighting sensors are used to sense the real condition of the room of
smart home. This research is a platform to be continued for the future smart control applications.
Keywords: Future Smart Control Applications, PIC18F4550 Microcontroller Based, Smart Home,Temperature And Lighting
Control System.
I. INTRODUCTION protection system also, so when any fault occurs inside home
Home Energy Management System (HEMS) and residential the protection system immediately traps the main power
energy storage system play vital roles in a Smart House. source. With its numerous features, the PIC18F4550 can
HEMS automatically collect precise real-time data on power create a multitude of useful applications, such as smart home.
usage by room and presents it visually, and the system can Among them, there are many I/O ports, serial and parallel
help households limit energy consumption while providing a ports, timers, RAM ROM, EEPROM modules and A/D
comfortable living environment. Smart home system uses converter. There are two main parts in temperature control
advanced computer technology, network communication systems which are measurement and control. Measurement
technology and automatic control technology, which
combines the subsystem into a control system including
temperature control and alarm control, main house power
supply switching system. The smart house has two interfaces
Computer interfacing
Remote control unit interfacing
The home automation system is a key for energy
conservation that can be equipped in normal buildings. As
there are many benefits of wireless technology over wired,
most of the home automation systems are based on the WSN
technology. But now this paper study about internal
temperature controlling system based on microcontroller to
save power and reduce the costs for optimization of smart
home system.
II. METHODOLOGY Fig.1. 3D View of Selected Smart Home.
Microcontroller takes various inputs from connected
sensors and processes it according to defined program and system includes sensing circuit. Temperature cannot be
then it provides logical output to whole house’s power measured directly but must be measured by observing the
system. Its additional features is that it is having power effect that the temperature variation causes in the measuring
Copyright @ 2014 SEMAR GROUPS TECHNICAL SOCIETY. All rights reserved.
JUNE THARAPHE LWIN, AUNG ZE YA
device. A control system is a combination subsystem to B. Lighting System
maintain output suitably related to input. Temperature control Smart home lighting system has many advantages:
system is essential and practical guide for all engineers Lights in the house turn on automatically with one
involved in the use of microcontroller in measurement and touch control.
control system as shown in Fig.1. Turn off all the lights with a single touch.
This paper describes the use of microcontroller in Free from shock hazards.
temperature control application. In order to reduce costs and Brightness can be controlled according to surrounding
optimize production, in many applications it is necessary to conditions.
control the change. In this paper, integrated-circuit
C. Temperature System
temperature sensors is used as the input sensor, analog signal
The main object in temperature system is the reading of
is used as the type of output, ON/OFF control as the control
temperature value from LM35 temperature sensor. The main
algorithm and heating and cooling system as two outputs are
use of LM35 temperature sensor is that it is the easiest of all
selected to control the temperature condition.
the temperature sensors because it is an integrated circuit that
outputs a voltage proportional to the temperature in degree
Celsius and the sensor itself takes care of non-linear effects.
LM35 sensor is connected directly with microcontroller.
PIC18F4550 reads the signal from LM35 sensor as variable
analog value. After processing, microcontroller will send a
cooling or heating signal to the system.
D. Alarm System
The Proteus software based home alarm system which act
as a security guard of the home. The basic purpose of a home
alarm system is to keep us and our family safe, and keep our
home safe from crime. When the alarm is triggered, it emits a
loud sound design to frighten away intruders. To protect
home from unauthorized entities, consider an entry from
front door only where keypad is connected. The home alarm
system is created in this program by setting a suitable code
for alarm to work. The code for actual alarm is fixed.
Fig.2. Top View of Locations of Sensors in Selected Smart
Home. III. MAIN FEATURES OF PIC 18F4550
Microcontroller is a computer on a chip that is programmed
Temperature control system (Fig.2) relies upon a
to perform almost any control, sequencing, monitoring and
controller, which sends many signals from the temperature
display function. The Peripheral Interface Controller (PIC)
sensor such as a thermocouple or Resistive Temperature
microcontroller solution features a powerful architecture,
Detector (RTD), thermistor and integrated circuit sensor for
flexible memory technologies, comprehensive easy-to-use
precisely control the process temperature without extensive
development tools, complete of technical documentation and
operator involvement [1]. It compares the actual temperature
post design-in support through a worldwide sales and
with the desired control temperature, or set point, and
distribution network
provides the output to a control element. As the heart of the
system, PIC microcontroller is used to control the A. Nano-Watt Technology
environment in which the heating and cooling system operate PIC18F4550 can significantly reduce power consumption
and to monitor the temperature data inside and outside a during operation. Pin diagram of PIC18F4550 is shown in
building and to drive the external (heating and cooling Fig.3. Key items include [1]:
system). Alternate Run Modes: By clocking the controller from the
Timer1 source or the internal oscillator block, power
A. Household consumption during code execution can be reduced by as
The material properties of buildings influence the thermal much as 90%.
performance and their energy consumption patterns. The
Multiple Idle Modes: The controller can also run with its
walls, floor, roof and windows have central thermal
CPU core disabled but the peripherals still active. In these
conductivity, and allow circulation of warm/cold air in the
states, power consumption can be reduced even further, to
house. The energy consumption depends on the house
as little as 4% of normal operation requirements.
characteristics, specifically on its geometry. Therefore, the
On-the-Fly Mode Switching: The power-managed modes
house geometry is defined by the size and the numbers of
are invoked by user code during operation, allowing the
rooms, which are assumed to be from 1 to 4, modelled using
user to incorporate power-saving ideas into their
the average of length, width and height of walls and
applications software design.
windows. The sensors are assumed to be placed in master bed
room, secondary bed room, living room and kitchen room.
International Journal of Scientific Engineering and Technology Research
Volume.03, IssueNo.16, July-2014, Pages: 3322-3327
Development of Microcontroller Based Temperature and Lighting Control System in Smart Home
Low Consumption in Key Modules: The power D. Memory Endurance
requirements for both Timer1 and the Watchdog Timer The Enhanced Flash cells for both program memory and
are minimized. data EEPROM are rated to last for many thousands of
erase/write cycles – up to 100,000 for program memory and
1,000,000 for EEPROM. Data retention with outré fresh is
conservatively estimated to be greater than 40 years.
E. Self-Programmability
These devices can write to their own program memory
spaces under internal software control. By using a boot
loader routine, located in the protected Boot Block at the top
of program memory, it becomes possible to create an
application that can update itself in the field.
F. Extended Instruction Set
The PIC18F4550 family introduces an optional extension
to the PIC18 instruction set, which adds 8 new instructions
and an Indexed Literal Offset Addressing mode. This
extension, enabled as a device configuration option, has been
specifically designed to optimize re-entrant application code
originally developed in high-level languages such as C [1].
G. Enhanced PPC Module
In PWM mode, this module provides 1, 2 or 4 modulated
Fig.3. Pin Diagram of PIC 18F4550 [1].
outputs for controlling half-bridge and full-bridge drivers.
B. Universal Serial Bus(USB) Other features include auto-shutdown for disabling PWM
PIC18F4550 has fully featured Universal Serial Bus outputs on interrupt or other select conditions and auto-restart
communications module that is compliant with the USB to reactivate outputs once the condition has cleared [1].
Specification. The module supports both low-speed and full- H.10-Bit A/D Converter
speed communication for all supported data transfer types. It This module incorporates programmable acquisition time,
also incorporates its own on-chip transceiver and 3.3V allowing for a channel to be selected and a conversion to be
regulator and supports the use of external transceivers and initiated, without waiting for a sampling period and thus,
voltage regulators [1]. reducing code overhead. Proposed a system is for advanced
C. Multiple Oscillator Options and Features temperature control and monitor system, which is
PIC18F4550 offers twelve different oscillator options, implemented on software using PIC18F4550. Firmware is
allowing users a wide range of choices in developing designed to adjust and monitor each room of a smart home
application hardware. These include [1]: and management the power energy. This temperature
Four Crystal modes using crystals or ceramic management system is about a new smart home control
resonators. system based on intelligent sensor network to make home
Four External Clock modes, offering the option of network more intelligent and automatic. The system contains
using two pins (oscillator input and a divide-by-4 multiple smart sensors which sense the presence of
consumer, sense the body temperature and humidity. Proteus
clock output) or one pin (oscillator input, with the
simulation are used to implement a novel real-time, error
second pin reassigned as general I/O).
control, low energy utilization scheme in selected smart
An internal oscillator block which provides an 8 MHz
home.
clock (±2% accuracy) and an INTRC source
IV. COMPONENTS OF THE SYSTEM
(approximately 31 kHz, stable over temperature and
Smart energy controlling system is intended for saving the
VDD), as well as a range of 6 user-selectable clock
energy systematically. This system is needed to sense the
frequencies, between 125 kHz to 4 MHz, for a total of
light conditions, temperature and motion. In this system,
8 clock frequencies. This option frees an oscillator pin
many sensors are used to operate the whole system. There are
for use as an additional general purpose I/O.
four components in the smart energy storing system.
A Phase Lock Loop (PLL) frequency multiplier,
Temperature sensor (LM35DZ)
available to both the High-Speed Crystal and External
Light dependent resistor (LDR)
Oscillator modes, which allows a wide range of clock
speeds from 4 MHz to 48 MHz. Smoke sensor
Asynchronous dual clock operation, allowing the USB PIC microcontroller
module to run from a high-frequency oscillator while
1. Light dependent resistor (LDR): LDR is made from a
the rest of the microcontroller is clocked from an
chemical compound called cadmium sulfide (CdS).This
internal low-power oscillator.
International Journal of Scientific Engineering and Technology Research
Volume.03, IssueNo.16, July-2014, Pages: 3322-3327
JUNE THARAPHE LWIN, AUNG ZE YA
compound changes resistance depending on how bright the (Fig.5). When the consumer is sensed, the operation will start
light is that shines on its collecting surface. Bright light to turn ON detecting process according to the consumer’s
causes low resistance values between the two leads while dim body temperature with the help of humidity sensor, and the
light causes higher resistance values. The sensitivity of a whole program would be ready to read the temperature from
photo detector is the relationship between the light falling on the sensor immediately. After the microcontroller senses the
the device and the resulting output signal. In the case of a analog signal, the internal ADC of microcontroller is used to
photocell, one is dealing with the relationship between the convert the analog signal into digital output. For the first
incident light and the corresponding resistance at the cell. stage, if the temperature is between 20 degree Celsius and 30
The sensor is jointed with the PIC pin RB1-7. degree Celsius, the microcontroller will remain at normal
Microcontroller is sensed the LDR resistance value to know operation and the system will keep getting the temperature
the light intensity. reading constantly. When the temperature is less than 20
degree Celsius, the heating system will be turned ON.
2. Temperature sensor (LM35DZ): LM35DZ is a precision
IC temperature sensor with its output proportional to the
temperature (in °C). It can be measured more accurately than
with a thermistor. It also possesses low self heating and does
not cause more than 0.1°C temperature rise in still air. The
operating temperature range is from -55°C to 150°C. The
output voltage varies by 10mV in response to every °C rise
and fall in ambient temperature. Its scale factor is 0.01V/°C.
The output pin of the sensor is jointed to the PIC16F887 pin
(RA0-7). Microcontroller is sensed its analog output voltage
and then changed to digital output.
3. Smoke sensor: There are two main types of smoke
sensors: ionization detectors and photoelectric detectors. A
smoke alarm uses one or both methods, sometimes plus a
heat detector, to warn of a fire. The devices may be powered
by a 9-V battery, lithium battery, or 120-V house wiring.
Fig.4. Pin Diagram of PIC 18F4550.
PIC Microcontroller: Microcontroller is a computer on a
chip that is programmed to perform almost any control,
sequencing, monitoring and display the function. In this
paper PIC18F4550 is used to transmit and receive the serial
data. The transmitter circuit and receiver circuit is controlled
by two PIC18F4550. Pin diagram is shown in Fig.4.
Fig.5. System Flow Chart for Temperature control system
V. SYSTEM FLOWCHART FOR PROPOSED for smart home.
CONTROL SYSTEM
The flow for controlling system will begin read temperature Same goes if the temperature is more than 30 degree
and LDR sensor. After implementing the program, the Celsius, the microcontroller will advance to the cooling
operation of the overall system can be seen in this flow chart system ON and the heating system OFF automatically.
International Journal of Scientific Engineering and Technology Research
Volume.03, IssueNo.16, July-2014, Pages: 3322-3327
Development of Microcontroller Based Temperature and Lighting Control System in Smart Home
temperature controlled sensors in each of four rooms based
on information adjusted by comparing sensor values. In this
project, the critical temperature is selected as 60°C; the
desired room temperature is assumed 25°C±5°C. When
consumer comes into one of each of four rooms, sensors will
detect or sense the body temperature of consumers. If the
detected room temperature is less than or equal to the limited
temperature of the system, the sensor will activated to turn
ON heating system. At the reversely condition, the room
temperature is more than the desired temperature, the air-
conditioning system will automatically start to ON state in
which the limited temperature can tolerate ±5 °C.
A. Operating Condition for the Normal Room
Temperature (Under 60° C)
Fig.6. Block Diagram of Temperature Control System for
Smart Home.
In this paper, the control circuit and software packages are
proposed for monitoring and control functions in temperature
control system as shown in Fig.6. This combination of
hardware and software serves as the temperature control
system that has the ability to perform full responsibilities. To
get the performance, the software set up for PIC is coded in
microcontroller assembly language.
Fig.8. Screenshot of Simulated circuit for Smart home
temperature control (Normal condition).
Fig.7. System Flow Chart for Lighting control system for Fig.9 .Screenshot of Graphical interface of Smart home
smart home. temperature control (Normal State).
Fig.7 shows system flowchart describing how the Above figs. 8 and 9 states the implemented results of all
temperature control system of smart home is monitored. In four rooms which are at normal conditions. In this state
this process, PIC 18F4550 decides to turn ON/OFF the sensors are regularly operated according the detected
International Journal of Scientific Engineering and Technology Research
Volume.03, IssueNo.16, July-2014, Pages: 3322-3327
JUNE THARAPHE LWIN, AUNG ZE YA
information. And then, it can also less energy consumptions even though it
is at peak-hours. The real time monitoring of power
B. Operating Condition for the Abnormal Room consumption is important for future intelligent home where
Temperature (Over 60° C) intelligent home is dedicated to the seamless infusion of
In some cases, such as extremely power usage (warming technology with day to day living to create a lifestyle unique
or smoking) conditions, both of humidity and smoke sensors for each individual.
will activate to turn ON alert, alarm system and turn OFF VI. CONCLUSION
main power supply intelligently. So, it can reduce the The main objective of this paper is to control the lighting
dangerous and unsecure situations for consumers and also system, temperature system and security system. Smart home
can manage energy efficiency of smart living home. In this provides fully automatic, secured and energy efficient
process way, the system operates automatically with the help system. The smart home technology provides totally different
of microcontroller in designed smart home. Figs. 10 and 11 flexibility and functionality than the conventional
describes abnormal operating situation such as the room installations and environmental control systems. Also, the
temperature of kitchen room is exceeded to the limited smart house system can be supported by remote control
temperature. At this time, alert and alarm system activate and system as a sub controlling system. The system can also be
main power consumption is automatically turn OFF for connected to the internet to monitor and control the house
safety .So, cooling and heating system from each room will equipment’s from anywhere in the world using Proteus
stop their sensing functions respectively. software. The main purpose of this study is to develop the
room temperature controller with PIC. This equipment uses
four temperature sensors, drives external equipment, and
keeps the temperature of the room at preset temperature.
Electric cost will become high if an air-conditioner is always
operated. Therefore, heating system is used to adjust the
temperature of the room automatically. The result indicates
this control development can provide energy saving for home
appliances in the smart home environment. It works
effectively in term of energy saving compared to the existing
ordinary home system. Energy saving is an important issue
nowadays. The microcontroller program determines the lights
to switch on/off and the cooling/heating setting. The
prototype with the simple automation can save the energy
cost in all most cases.
VII. REFERENCES
[1] “PIC 18F4550 data sheet,” Microchip Technology Inc,
USA, 2007.
Fig.10. Screenshot of Simulated circuit for Smart home [2] Temperature Control Using a Microcontroller, http://
temperature control (Abnormal State). www.elecfree,com/electronic/room-temperature controller.
[3] LM35DZ Precision Centigrade Temperature Sensor,
1995,http://www.com/pf/LM/LM35.htm 1.
[4] J. Basic. Appl. Sci. Res., 3(5)880-891, 2013© 2013,
TextRoad Publication.
[5] “Control4 Smart Home System” International Journal of
Engineering Science and Innovative Technology (IJESIT)
Volume 2, Issue 3, May 2013.
[6]“Stability Analysis for Smart Homes Energy Management
System with Delay Consideration “Journal of Clean Energy
Technologies, Vol. 2, No. 4, October 2014.
[7] Sundstrom, O., & Guzzella, L. (2009, July). A generic
dynamic programming Matlab function. In Control
Applications,(CCA) & Intelligent Control,(ISIC), 2009 IEEE
(pp. 1625-1630). IEEE.
[8] Sou, K. C., Weimer, J., Sandberg, H., & Johansson, K. H.
(2011, December). Scheduling smart home appliances using
Fig.11. Screenshot of Graphical interface of Smart home mixed integer linear programming. In Decision and Control
temperature control (Abnormal State). and European Control Conference (CDC-ECC), 2011 50th
IEEE Conference on (pp. 5144-5149). IEEE.
Therefore, it can reduce hazard and save undesired power [9] PIC 18F4550 Datasheet-All DataSheet.com www. alldata
usage from every room in which consumers are in or out. sheet.com/PIC18F4550.
International Journal of Scientific Engineering and Technology Research
Volume.03, IssueNo.16, July-2014, Pages: 3322-3327
View publication stats