Académique Documents
Professionnel Documents
Culture Documents
BASED TO CONTROL
APPLIANCES
07-May-15
BEE-FA13-027
M. Umar Azmat
BEE-FA13-020
M. Kashif Azeem
BEE-FA13-043
Arbab Aslam
BEE-FA12-001
M. Usman Haider
BEE-FA13-112
M. Hamza Kaleem
BEE.FA13-046
BEE-FA13-064
M. Tayyab Shafiq
BEE-FA13-105
M. Abuzar Anwar
BEE-FA13-025
Ali Hassan
BEE-FA13-021
Amanullah Cheema
BEE-FA12-096
Page 2
ACKNOWLEDGEMENTS
We bow our head before Allah Almighty, the Omnipotent, the Merciful, the most
Beneficent, the Answerer to the prayers and the sovereign whose blessings and
exaltations flourished our thoughts, enlightened our heart, thrived our ambitions and
enabled us to contribute sincerely to the sacred wealth of knowledge. Our all praise for
the greatest reformer of the world, Hazrat Muhammad (PBUH), whose name enlightens
our heart and who is forever a tower of knowledge and guidance of humanity.
We feel honored to express our profound sense of gratitude to our supervisor Engr.
Awais Ahmed Cheema (Assistant Professor, School of Electrical Engineering,
University of Faisalabad) for his kind supervision, affectionate behavior and marvelous
guidance throughout the research work. His invaluable help of constructive comments
and suggestions throughout the proteus work have contributed to the success of this
research. We owe our deepest gratitude to him for his much concern, sincere advice,
unforgettable guidance, and kind behavior. We are very grateful to him for his moral
support, nice cooperation, encouragement and technical knowledge regarding this topic
which helped us a lot in this research work.
No acknowledgement would ever adequately express our obligation to our Parents for
their indispensable and indivisible love that remained assisted and encouraged us. Their
affection, motivation, sacrifices and endless prayers serve as a tonic for us. Thanks to
Allah for bestowing us with true and loving Friends who encouraged and pacified us
during tough hours of research.
Arbab Aslam.
Page 3
TABLE OF CONTENTS
CHAPTERS
PAGE
ACKNOWLEDGEMENTS ...
TABLE OF CONTENTS ..
ABSTRACT ......
INTRODUCTION ............
METHODOLOGY .......
EXPERIMENTAL WORK ..
11
11
Complition .
12
Software...
12
13
19
22
Temperature Sensor ..
24
IC (pic16F877A)
24
25
CONNCLUSION ..
29
REFERENCES ..
30
Page 4
ABSTRACTS:
We proposed to design an Auto-motion temperature varying Sensor. This Auto-motion
Sensor is the interconnection of electrical devices in a household together to perform a
function without human intervention. Auto-motion is a device that detects moving
objects, particularly people. A motion detector is often integrated as a component of a
system that automatically performs a task or alerts a user of motion in an area. Motion
detectors form a vital component of security, automated lighting control, home control,
energy efficiency, and other useful systems. In this work, we design and implement a
device that would detect the presences movement. If the person entered the room and
switch on or off the Fan and other equipment like heater, and check the temperature
condition is true or false in a certain temperature which we desire in the room, if a
presences movement is detected.
Page 5
Infrared waves are not visible to the human eye. In the electromagnetic spectrum,
infrared radiation can be found between the visible and microwave regions and the
Human motion detection, in which we are interested in recognizing humans based solely
on the characteristic patterns of motion that they exhibit.
This approach gives a direct way for human detection, such as those that recognize
humans based on shape, color, texture, or surface features [3].
Page 6
II. METHODOLOGY:
In simplest term, the control is defined as the starting, stopping or regulation of heating,
ventilating, and air conditioning system. Controlling an HVAC system involves three
distinct steps:
1) Measure a variable and collect data
2) Process the data with other information
3) Cause a control action
The above three functions are met through sensor, controller and the controlled device.
HVAC control system, from the simplest room thermostat to the most complicated
computerized control, has four basic elements: sensor, controller, controlled device and
source of energy.
1) Sensor measures actual value of controlled variable such as temperature, humidity
or flow and provides information to the controller.
2) Controller receives input from sensor, processes the input and then produces
intelligent output signal for controlled device.
3) Controlled device acts to modify controlled variable as directed by controller.
4) Source of energy is needed to power the control system. Control systems use
either a pneumatic or electric power supply. [5]
In this paper, the design of an automatic control of AC and Electric Heater using motion
sensor and temperature sensor as the automatic control branches of this project.
First of all, when motion sensor sense the motion of any presence then it will deliver the
current to the temperature sensor. The temperature sensor then sense the temperature of
Page 7
the room in which it is installed and then turn on or off the AC and Electric heater
according to the present temperature sensed.
The method at which our required output is on or off is controlled by the IC
(pic16F877A).
The circuit strategy for this system is shown in figure1.
Motion sensor:
Nowadays, house security system becomes the best solution to overcome
house intrusion problem when user is not in house. As we know, there are
Page 8
many types of house security system which is too expensive and difficult to use. For that
reason, an effective house security system at low cost is built where user can also
program the security system by their own. This project is focusing on developing a house
security system with an active infrared motion detector which is controlled by
microcontroller Intel 8051. The overall project is divided into two parts. The
first part
is
concern
on
the
hardware
electronics
component are connected via the circuit design using wrapping technique. An
active
infrared,
the magnetic sensor, and keypad are the input components while
buzzer, indicator, and LCD display are the output components where its all controlled
by controller circuit.
The second part is based on software programming to operate the hardware structure.
Program for security system based on microcontroller Intel 8051 assembly language is
assemble using ASM51 assembler to get the binary file thus, to load into external
memory of the hardware
Sensors measure the controlled medium and provide a controller with information
concerning changing conditions in an accurate and repeatable manner. The common
HVAC variables are temperature, pressure, flow rate and relative humidity. The siting of
sensors is critical to achieve good control. In sensing space conditions, the sensing device
must not be in the path of direct solar radiation or be located on a surface which would
give a false reading such as a poorly insulated external wall. In pipe-work or ductwork,
sensors must be arranged so that the active part of the device is immersed fully in the
fluid and that the position senses the average condition. Sometimes averaging devices are
used to give an average reading of measured variable for example in large spaces having
number of sensors, an averaging signal is important for the controller.
The PIR sensor itself has two slots in it, each slot is made of a special material that is
sensitive to IR. The lens used here is not really doing much and so we see that the two
slots can 'see' out past some distance (basically the sensitivity of the sensor). When the
sensor is idle, both slots detect the same amount of IR, the ambient amount radiated from
the room or walls or outdoors, when a warm body like a human or animal passes by, it
first intercepts one half of the PIR sensor, which causes a positive differential change
between the two halves. When the warm body leaves the sensing area, the reverse
School of Electrical Engineering, University of Faisalabad.
Page 9
happens, whereby the sensor generates a negative differential change. These change
pulses are what is detected.
The motion sensor in this circuitry is used to sense the presence of any living body in its
bound ranged. This motion sensor is also known as the PIR (passive infrared rays)
sensor.
Now install the PIR module hanging from a 3 meter height mast (to cover 10 meter
radius area) and connect its supply and relay terminals to our finished and enclosed
circuit, and output side of relay light indicated the Microcontroller and Temperature
Sensor.
Circuit Diagram:
Page 10
without
Page 11
Compilation:
When we have created the project and written the code then following work I
have been done.
Figure 3: Compilation.
Software:
In this project a microcontroller is used named as PIC16F877A
which is programmable and is the main part of our project. This microcontroller cannot
be used without programming, so for this purpose we used MikroC Pro software which is
capable of embedding our desired programming in microcontroller. And the other
Software used in our project is Labscenter Proteus Demonstration 8.0.
Page 12
simulation. With this Virtual System Modeling facility, you can transform your product
design cycle, reaping huge rewards in terms of reduced time to market and lower costs of
development.
If one person designs both the hardware and the software then that person benefits as the
hardware design may be changed just as easily as the software design. In larger
organizations where the two roles are separated, the software designers can begin work as
soon as the schematic is completed; there is no need for them to wait until a physical
prototype exists.
Proteus Virtual System Modeling (VSM) combines mixed mode SPICE circuit simulation,
animated components and microprocessor models to facilitate co-simulation of complete
microcontroller based designs. For the first time ever, it is possible to develop and test such
designs before a physical prototype is constructed. This is possible because you can interact
with the design using on screen indicators such as LED and LCD displays and actuators
such as switches and buttons. Proteus VSM also provides extensive debugging facilities
including breakpoints, single stepping and variable display for both assembly code and
high level language source.
Page 13
Figure 1: Proteus.
1.Overview:
Start the program by click the ISIS Professional icon in Start Menu.
Page 14
Figure 2: Overview.
Page 15
Page 16
Page 17
2. Simulation:
After defining all the various parameters in the PIC and the other components and also
loading the hex file in the controller, we can start the simulation by clicking the PLAY
button on the bottom panel of the Proteus VSM.
Figure 9: simulation.
Page 18
// rs connection at rb0
// en connection at rb1
// d4 connection at rb2
// d5 connection at rb3
// d6 connection at rb4
// d7 connection at rb5
Page 19
lcd_out(1,1,"temperature");
lcd_out(1,13,"o");
lcd_out(2,14,"C");
while(1)
{
volt=adc_read(6);
// floattostr(volt,volt_char);
// lcd_out(2,1,volt_char);
// temp=volt/2;
// floattostr(temp,volt_char);
volt=volt/1024;
volt=volt*5000;
temp=volt/10;
inttostr(temp,volt_char);
lcd_out(2,1,volt_char);
delay_ms(500);
if(temp>=15)
{
PORTD = 0x00;
// Toggle OFF
Delay_ms(50);
TRISC = 0x00;
PORTC = 0xFF;
// Toggle ON
// Delay_ms(50);
}
else if(temp<10)
{
portc=0x00;
// Toggle OFF
Delay_ms(50);
TRISD = 0x00;
PORTD = 0xFF;
// Toggle ON
Page 20
}
else
{
portc=0x00;
portd=0x00;
}
delay_ms(500);
}}
Page 21
1.
On condition:
When motion detect we assume the Input Supply (V1) is 12v then relay Normally
Closed and output terminal turn on the supply this is behave like a on switch and turn
on lamp this is indicate the supply voltage 5v go to the Micro-controller side or
temperature sensor side when 5v input side the temperature sensor terminal and
microcontroller Vcc terminal then both temperature and microcontroller are on see
fig12.
Page 22
2.
Off condition:
When motion didnt detect we assume the Input Supply (V1) is 0v then normally
opened relay and behave like a off switch and supply turn off condition the lamp is in
off state condition this is indicate the supply voltage 0v go to the Micro-controller
side or temperature sensor side when 0v input side the temperature sensor terminal
and microcontroller Vcc terminal then both temperature and microcontroller are turn
off see fig13.
Page 23
Temperature Sensor:
The temperature sensor is used in this circuit to give a complete information of the
temperature to the IC so that the IC then showing direction to current.
In this paper we use motion sensor equivalent AND gate and 5v Vcc supply. When
motion deduct then output high and turn on micro-controller and temperature sensor and
0v volt indicate the motion didnt deduct and circuit behave the off condition.
After motion deduction output voltage goes the temperature sensor (LM35) where LM35
sense the temperature therefore 10 C=1mV.
IC (pic16F877A):
The IC (pic16F877A) is used to control the circuit automatically using IC programming.
When the IC reads temperature above than or equal to 15 degree Celsius then the IC at
once decided that this time the current will have to go towards the AC or fan. But if the
Page 24
temperature is less than 10 degree Celsius the IC turn the path on for current towards the
Electric heater.
The data goes to micro-controller pin num A6 where micro-controller read data analog
signal 10 bit then data goes to comparison and displaying side where comparison
compare and control A.c or Heater and display unit side display the temperature shown in
the fig.
Different parameters are taken into account when it is required to analyze such system
design. In this research, different key parameters including temperature difference
between room and selected temperature are set in the microcontroller. When temp>17
then turn on fan shown as the equivalent of A.c shown in Fig 5.
Page 25
When temp in-between 17 and 10 thus turn off AC equivalent and heater equivalent
shown in the fig 15.
When temp>10 then turn on matrix LED shown as the equivalent of Heater shown in Fig
16.
Page 26
Page 27
Page 28
V. CONCLUSION:
The application of Heating, Ventilating, and Air-Conditioning (HVAC) controls starts
with an understanding of the building and the use of the spaces to be conditioned and
controlled.
This automatic control of AC and Electric heater allows the users to get a complete
relaxation from turning on or off the AC or fan and heater. In this system, Different
battery banks are introduced in this simulation and out of them a suitable choice can be
made depending upon the lifetime, efficiency, capital, replacement and maintenance costs
etc. Different hydropower turbines can be selected according to the requirement of the
users. All kinds of comparisons, loads, production and monthly average spreadsheets are
originated and a sustainable power system is designed for the provided values of loads in
accordance. Even if load demands or specifications including head length and water flow
rate is changed, the system can be redesigned using this simulation package.
Page 29
VI. REFERENCES:
1.
2.
(http://www.analog.com/media/en/training-seminars/designhandbooks/781977449sscsect7.PDF)
3.
David Moore, A real-world system for human motion detection and tracking
(http://www.vision.caltech.edu/~dmoore/dmoore-final-thesis.pdf)
4.
5.
http://www.electroschematics.com/5982/motion-sensor-switch-for-alarm-light-or-
water-sprinkler/
Authors Profile:
1.
Technology in 2012 from USW, England. He has attained a 5 years research experience
and working as a lecturer in school of electrical engineering, The University of
Faisalabad, Pakistan.
Page 30