Automatic Light Controller System
TECHNICAL REPORT
SUBMITTED BY
Muhammad Zain Shakeel
2016-AG-7927
Muhammad Bilal
2016-AG-7972
Muhammad Raza Liaquat
2016-AG-7901
ADVISED BY
Madam Wajeeha
A TECHNICAL REPORT SUBMITTED IN PARTIAL FULFILLMENT OF
REQUIREMENT FOR THE DEGREE OF
BACHELOR OF SCIENCE
IN
SOFTWARE ENGINEERING
DEPARTMENT OF COMPUTER SCIENCE
FACULTY OF SCIENCES
UNIVERSITY OF AGRICULTURE FAISALABAD
DECLARATION
I hereby declare that the contents of the report Automatic Light Controller System
are project of my own research and no part has been copied from any published source (except the
references). I further declare that this work has not been submitted for award of any other
diploma/degree. The university may take action if the information provided is found false at any
stage. In case of any default the scholar will be proceeded against as per UAF policy.
_________________
Muhammad Zain Shakeel
2016-AG-7927
Muhammad Bilal
2016-AG-7972
Muhammad Raza Liaquat
2016-AG-7901
CERTIFICATE
To,
The Controller of Examinations,
University of Agriculture,
Faisalabad.
The supervisory committee certify that Muhammad Zain Shakeel 2016-AG-7927 and
Muhammad Bilal 2016-AG-7972 and Muhammad Raza Liaquat 2016-AG-7901
has successfully completed his project in partial fulfillment of requirement for the degree of BS
SOFTWARE ENGINEERING under our guidance and supervision.
_____________________________________
Wajeeha Azmat
Supervisor
_____________________________________
[Member Name]
Member
_______________________________________
Dr. Muhammad Sulman
Incharge,
Department of Computer Science
ACKNOWLEDGEMENT
I thank all who in one way or another contributed in the completion of this report. First, I thank to
ALLAH ALMIGHTY, most magnificent and most merciful, for all his blessings. Then I am so
grateful to the Department of Computer Science for making it possible for me to study here. My
special and heartily thanks to my supervisor, Wajeeha Azmat who encouraged and directed me.
His/her challenges brought this work towards a completion. It is with his/her supervision that this
work came into existence. For any faults I take full responsibility. I am also deeply thankful to my
informants. I want to acknowledge and appreciate their help and transparency during my research.
I am also so thankful to my fellow students whose challenges and productive critics have provided
new ideas to the work. Furthermore, I also thank my family who encouraged me and prayed for
me throughout the time of my research. May the Almighty God richly bless all of you
ABSTRACT
The objective of the report is to reduce the high and ever increasing demand of electricity. As the
technology advancements predominate in today’s digital world we prefer classier and smarter
advancements in simple and basic needs of the human lives, so this report gives us a solution to
make the surroundings smarter and economic. To achieve the objective we can install Automatic
light controller in every offices or seminar halls and so on. It uses microwave motion sensor to
detect the persons entering and leaving and the room and monitors the room appliances like light,
fan and air conditioners. Technology from the purpose of simplicity has turned into technology for
necessity. Developing and generating the electricity at small scale is a cumbersome process instead
we consume less electricity and conserve it for a sustainable development of energy resources. The
proposed model from the paper is able to monitor and control the room appliances respective of
the people in the room additionally it can also instantaneously count the number of persons in a
room. It has various applications in the field of consuming energy resource and also as a bi –
directional visitor counter Keywords: Arduino UNO, relay, sensor.
i
Table of Contents
Chapter 1 - INTRODUCTION ....................................................................................................... 1
1.1 Background:.......................................................................................................................... 1
1.2 Description:........................................................................................................................... 1
1.3 Problem Statement:............................................................................................................... 1
1.4 Scope:.................................................................................................................................... 1
1.5 Objectives: ............................................................................................................................ 2
1.6 Feasibility:............................................................................Error! Bookmark not defined.
1.7 Requirements: ....................................................................................................................... 3
1.7.1 Functional Requirements ............................................................................................... 3
1.7.2 Non- Functional Requirements...................................................................................... 3
1.7.3 Hardware Requirements................................................................................................. 3
1.7.4 Software Requirements.................................................................................................. 3
1.8 Stakeholders:......................................................................................................................... 6
Chapter 2 – MATERIALS & METHODS...................................................................................... 5
2.1 Process Model:...................................................................................................................... 5
2.2 Tools & Technologies........................................................................................................... 5
2.3 Design:.................................................................................................................................. 5
2.3.1 Use Case Diagrams:....................................................................................................... 5
2.3.3 Sequence Diagram: ........................................................................................................ 6
2.3.4 Class Diagram:............................................................................................................... 6
2.3.5 Data Flow Diagram:....................................................................................................... 6
2.3.6 ER Diagram: .................................................................................................................. 6
2.3.7 Database Model: ............................................................................................................ 6
2.3.8 Architecture: .................................................................Error! Bookmark not defined.
Chapter 3 - RESULTS & DISCUSSION...................................................................................... 23
3.1 Testing: ............................................................................................................................... 23
3.2 Test Cases: .......................................................................................................................... 23
3.3 Conclusion: ......................................................................................................................... 24
Chapter 4 - USER MANUAL....................................................................................................... 27
References......................................................................................Error! Bookmark not defined.
ii
List of Figures
Figure 1.1 Stakeholders .................................................................Error! Bookmark not defined.
Figure 2.1 Agile Activities.............................................................................................................. 5
Figure 2.2 Use Case Diagram ........................................................Error! Bookmark not defined.
Figure 2.3 Sequence Diagram........................................................Error! Bookmark not defined.
Figure 2.4 Class Diagram ..............................................................Error! Bookmark not defined.
Figure 2.5 Context Diagram ..........................................................Error! Bookmark not defined.
Figure 2.6 Level 0 DFD.................................................................Error! Bookmark not defined.
Figure 2.7 Level 1 DFD.................................................................Error! Bookmark not defined.
Figure 2.8 Entity Relationship Diagram ........................................Error! Bookmark not defined.
Figure 2.9 Database Model............................................................Error! Bookmark not defined.
Figure 2.10 Applications's Architecture ........................................Error! Bookmark not defined.
Figure 4.1 Signing in......................................................................Error! Bookmark not defined.
iii
List of Tables
Table 2. 1: Add User......................................................................Error! Bookmark not defined.
Table 3. 1: User login Test Case................................................................................................... 23
University of Agriculture Faisalabad. Chapter 1- Introduction
[Project Title] 1
Chapter 1 - INTRODUCTION
1.1 Background:
The demand for the electronic device which can control the room appliances has a great surge such
that it can be implemented in many real time applications like in hotels, living room, garage and
so on. The model can track the number of persons entering and leaving the room and also switches
the lights and if the room is engaged or vacant respectively. By employing this device in the room
reduces the laborious works to search for the switch to light the room at once you entered. The
persons entering the room through the entrance will be sensed by the Microwave Motion Sensor
and the signal sensed is sent to the Arduino Mini Pro for processing and controlling the count in
the room and also explicitly monitors the lights and fan in the room.
1.2 Description:
The main consideration in the power present field technology are automation, power consumption
and cost effectiveness automation may intended to reduce the man power with help of intelligent
system. The demand for the electronic device which can control the room appliances has a great
surge such that it can be implemented in many real time applications like in hotels, living room,
garage and so on. The model can track the number of persons entering and leaving the room and
also switches the lights and if the room is engaged or vacant respectively By using this model in
offices will reduced the laborious works to search for the switch to light the room at once you
entered The persons entering the room through the entrance will be sensed by the Infrared Sensors
and the signal sensed is sent to the Arduino Mini Pro for processing and controlling the count in
the room and also explicitly monitors the lights whenever the room was empty or the last person
who leaving the office light the counter will decreased to zero and the light will turn off. Our model
mainly used in offices, seminars halls, labs etc.
1.3 Problem Statement:
Energy resources like petroleum, coal, natural gas, uranium and propane are called non -renewable
resources, because their supplies are limited. Many environmental effects and day-by-day
depleting energy resources warn us to save energy by using automatic room controller an Energy
efficient lighting systems. Nowadays the wastage of electricity has become a routine thing for us,
and the problem has become frequent at homes, schools, and colleges and even in industries.
Sometimes we notice fans and lights keep on working even in the absence of people. This often
happens in homes, offices and public places due to utter negligence of the inmates.
University of Agriculture Faisalabad. Chapter 1- Introduction
[Project Title] 2
1.4 Scope:
The Scope of this project is to make a controller-based model to count number of persons visiting
room and accordingly light up the room. Here we can use the sensor and can know present number
of persons. In today’s world, there is a continuous need for automatic appliances with the increase
in standard of living, there is a sense of urgency for developing circuits that would ease the
complexity of life. Also, if at all one wants to know the number of people in the room so as not to
have congestion. This circuit proves to be helpful. This project “AUTOMATIC LIGHT
CONTROLLER SYSTEM” using Arduino Mini Pro is a reliable circuit that takes over the task
of controlling the room lights as well as counting the number of persons /visitors in the room very
accurately. When somebody enters the room then the counter is incremented by one and the light
in the room will be switched ON and when anyone leaves the room then the counter is decremented
by one. The light will be only switched OFF until all the persons in the room go out. The total
number of persons inside the room is also displayed on the seven segment displays. The Arduino
Mini Pro does the above job. It receives the signals from the sensors. And this signal is operated
under the control of software which is stored in ROM. When any object passes through the motion
sensor Receiver’s then the Rays falling on the receiver are obstructed, this obstruction is sensed
by the Arduino Mini Pro
1.5 Objectives:
Main Goal of our project is to count the person entering and leaving the room and light turn on
when first person enter in the room and light turned off when the last person leaves the room. For
this purpose we implement our project in our supervisor office and test the results
1.6 Feasibility:
1.6.1 Technical Feasibility –The team has all the technological resources to undertake the
project because it is not a complex project; we simply use a Arduino Mini Pro , Microwave Motion
Sensor, USB port, Relay , Bread Board, Blub , Wires etc
1.6.2 Schedule Feasibility –team currently have the time resources to undertake the
project. The project can be completed within the time. As the schedule time is 3 months to
complete the project so it can be easily done within the time .
1.6.3 Economic Feasibility –the economic cost of the project is very low because only 3
developers can develop the project.
1.6.4 Cultural Feasibility – It is very cost effective and save our electricity resources
1.6.5 Resource Feasibility – we have enough resources to complete the project.
University of Agriculture Faisalabad. Chapter 1- Introduction
[Project Title] 3
1.7Requirements:
1.7.1 Functional Requirements
FR01: When the First Person Enter in the room Light will turn On.
FR01-01 Person will enter in the room
FR01-02 Sensor Should detect that person
FR01-03 Sensor pass message to Arduino and light turn on
FR01-04 Counter increased by one whenever person enter in the room
FR02: When the Last Person leaving the room Light will turn Off.
FR02-01 Person will leaving the room
FR02-02 Sensor should Detect That Person
FR02-03 Counter Decreased by one whenever person enter in the room
FR02-04 Light should turn off when counter decreased to zero
1.7.2 Non- Functional Requirements
NFR01: Sensor shall remain active 24/7.
1.7.3 Hardware Requirements
• Arduino Mini Pro
• Microwave Motion Sensors
• Jumper Wire
• Power Supply
• Light bulb
• Bread Board
• Relay (Low Level Trigger)
Arduino Pro Mini
• Arduino Pro Mini is a microcontroller board developed by Arduino.cc and comes
with Atmega328 microcontroller incorporated inside the board.
• This board comes with 14 digital I/O out of which 6 pins are used for providing PWM output.
There are 8 analog pins available on the board.
• It is very small as compared to Arduino Uno i.e. 1/6 of the total size of the Arduino Uno.
University of Agriculture Faisalabad. Chapter 1- Introduction
[Project Title] 4
• There is only one voltage regulator incorporated on the board i.e 3.3V or 5V based on the version
of the board.
• The Pro Mini runs at 8 MHz for the 3.3V version which is half than Arduino Uno board that runs
at 16MHz.
• There is no USB port available on the board and it also lacks built-in programmer.
Arduino Pro Mini
Microwave Motion Sensor
The sensor is an active motion detector; it emits a high-frequency electromagnetic wave 5.8GHz
and receives its echo. The sensor detects the change in echo from movement in its detection
zone. A microprocessor then triggers the switch light ON command. Detection is possible
through doors, glass panels and thin walls. NOTE: the high-frequency output of this sensor is
Specifications
Specifications
University of Agriculture Faisalabad. Chapter 1- Introduction
[Project Title] 5
Operating voltage 120-277Vac, 50/60Hz
Rated load 120V @ 400W; 220-240V @ 800W; 277V @ 1000W
HF System 5.8GHz ± 7.5MHz, ISM wave band
Transmitting power <0.5mW
Power consumption ≤0.5W (standby)
Detection zone Max.(D x H): 16m x 15m
Detection sensitivity 10% / 50% / 75% / 100%
Hold time 5s / 30s / 90s / 3min / 20min / 30min
Daylight sensor 2 Lux / 5 Lux / 10 Lux / 25 Lux / 50 Lux /100 Lux / Disable
Mounting height 15m Max.
Motion detection 0.5-3m/s
Detection Angle 150º(wall installation) 360º(ceiling installation)
Operating temperature -20ºC - 60ºC
IP rating IP20
Microwave Motion Sensor
1.7.4 Software Requirements
• Arduino Mini Pro Development Environment
Development Environment
The Arduino Integrated Development Environment - or Arduino Software (IDE) - contains
a text editor for writing code, a message area, a text console, a toolbar with buttons for common
functions and a series of menus. It connects to the Arduino and Genuino hardware to upload
programs and communicate with them.
Code:
University of Agriculture Faisalabad. Chapter 1- Introduction
[Project Title] 6
1.8 Stakeholders:
Our main stakeholder are offices , seminar halls, Labs and all those non living areas.
University of Agriculture Faisalabad. Chapter 2- Materials & Methods
[Project Title] 5
Chapter 2 – MATERIALS & METHODS
2.1 Process Model:
Figure 2.1 Agile Activities
2.2 Tools & Technologies
Arduino Mini Pro Development Environment
The Arduino Integrated Development Environment - or Arduino Software (IDE) - contains
a text editor for writing code, a message area, a text console, a toolbar with buttons for common
functions and a series of menus. It connects to the Arduino and Genuino hardware to upload
programs and communicate with them.
2.3 Design:
2.3.1 Use Case Diagrams:
Null
Requirements
Design
Implementation
Testing
Evolution
University of Agriculture Faisalabad. Chapter 2- Materials & Methods
[Project Title] 6
2.3.2 Usage Scenario
Null
2.3.3 Sequence Diagram:
Null
2.3.4 Class Diagram:
Null
2.3.5 Data Flow Diagram:
Null
2.3.6 ER Diagram:
Null
2.3.7 Database Model:
Null
University of Agriculture Faisalabad. Chapter 2- Materials & Methods
[Project Title] 7
Circuit Diagram:
Circuit Diagram
University of Agriculture Faisalabad. Chapter 3- Results & Discussion
[Project Title] 23
Chapter 3 - RESULTS & DISCUSSION
3.1 Testing:
My Team member and I implemented out model in our supervisor office and we test our model by
passing three students one by one and we noted that light was be successfully on when first person
entered and light was successfully of when last person leaving the room we project testing
successfully done under the supervision of our supervisor.
3.2 Test Cases:
Test Case: Person Enter in the room:
Table 3. 1: User Person enter in the room Test Case
Test Case ID: TC-1
Test Case Title: To verify that light turn on when first person enter in the room
Test Case Priority: High
Requirement: First Person enter in the room
Test Description: Sensor detect that first person enter in the room and counter increased by 1.
Test Date: 07/11/2020
Pre-Conditions: 1. Activate sensor
Dependencies: Voltage
Test Steps: 1. First Person enter in the room
2. Sensor detect
3. Pass message to Arduino
4. Counter increased by 1 whenever person enter in the room
5. Light turn on when first person enter in the room
Test Data Tester
1. Light turn on
Actual Results: As above
Post Conditions: Light turn On
Status: (Pass/Fail) Pass
Other Comments: None
University of Agriculture Faisalabad. Chapter 3- Results & Discussion
[Project Title] 24
Test Case: Person Leaving the room:
Table 3. 2: User Person leaving the room Test Case
Test Case ID: TC-2
Test Case Title: To verify that light turn off when last person leaving the room
Test Case Priority: High
Requirement: Last Person leaving the room
Test Description: Sensor detect that last person leaving the room and counter decreased by 1.
Test Date: 07/11/2020
Pre-Conditions: 1. Activate sensor
Dependencies: Voltage
Test Steps: 1. Person leaving the room
2. Sensor detect
3. Pass message to Arduino
4. Counter decreased by 1 whenever counter will be zero
5. Light turn off when lass person leave the room or counter will be zero
Test Data Tester
1. Light turn off
Actual Results: As above
Post Conditions: Light turn off
Status: (Pass/Fail) Pass
Other Comments: None
3.3 Conclusion:
My Team member and I implemented our model in our supervisor office and we test our
model by passing three students one by one and we noted that light was successfully on when first
person entered and counter increased by 1 and counter decreased by 1 and when counter was on
zero or last person leaving the room, light was successfully off. Our project testing successfully
done under the supervision of our supervisor.
[Project Title] 27
Chapter 4 - USER MANUAL

Light Control System to Save Electricity

  • 1.
    Automatic Light ControllerSystem TECHNICAL REPORT SUBMITTED BY Muhammad Zain Shakeel 2016-AG-7927 Muhammad Bilal 2016-AG-7972 Muhammad Raza Liaquat 2016-AG-7901 ADVISED BY Madam Wajeeha
  • 2.
    A TECHNICAL REPORTSUBMITTED IN PARTIAL FULFILLMENT OF REQUIREMENT FOR THE DEGREE OF BACHELOR OF SCIENCE IN SOFTWARE ENGINEERING DEPARTMENT OF COMPUTER SCIENCE FACULTY OF SCIENCES UNIVERSITY OF AGRICULTURE FAISALABAD DECLARATION I hereby declare that the contents of the report Automatic Light Controller System are project of my own research and no part has been copied from any published source (except the references). I further declare that this work has not been submitted for award of any other diploma/degree. The university may take action if the information provided is found false at any stage. In case of any default the scholar will be proceeded against as per UAF policy. _________________ Muhammad Zain Shakeel 2016-AG-7927 Muhammad Bilal 2016-AG-7972 Muhammad Raza Liaquat 2016-AG-7901
  • 3.
    CERTIFICATE To, The Controller ofExaminations, University of Agriculture, Faisalabad. The supervisory committee certify that Muhammad Zain Shakeel 2016-AG-7927 and Muhammad Bilal 2016-AG-7972 and Muhammad Raza Liaquat 2016-AG-7901 has successfully completed his project in partial fulfillment of requirement for the degree of BS SOFTWARE ENGINEERING under our guidance and supervision. _____________________________________ Wajeeha Azmat Supervisor _____________________________________ [Member Name] Member _______________________________________ Dr. Muhammad Sulman Incharge, Department of Computer Science
  • 5.
    ACKNOWLEDGEMENT I thank allwho in one way or another contributed in the completion of this report. First, I thank to ALLAH ALMIGHTY, most magnificent and most merciful, for all his blessings. Then I am so grateful to the Department of Computer Science for making it possible for me to study here. My special and heartily thanks to my supervisor, Wajeeha Azmat who encouraged and directed me. His/her challenges brought this work towards a completion. It is with his/her supervision that this work came into existence. For any faults I take full responsibility. I am also deeply thankful to my informants. I want to acknowledge and appreciate their help and transparency during my research. I am also so thankful to my fellow students whose challenges and productive critics have provided new ideas to the work. Furthermore, I also thank my family who encouraged me and prayed for me throughout the time of my research. May the Almighty God richly bless all of you
  • 6.
    ABSTRACT The objective ofthe report is to reduce the high and ever increasing demand of electricity. As the technology advancements predominate in today’s digital world we prefer classier and smarter advancements in simple and basic needs of the human lives, so this report gives us a solution to make the surroundings smarter and economic. To achieve the objective we can install Automatic light controller in every offices or seminar halls and so on. It uses microwave motion sensor to detect the persons entering and leaving and the room and monitors the room appliances like light, fan and air conditioners. Technology from the purpose of simplicity has turned into technology for necessity. Developing and generating the electricity at small scale is a cumbersome process instead we consume less electricity and conserve it for a sustainable development of energy resources. The proposed model from the paper is able to monitor and control the room appliances respective of the people in the room additionally it can also instantaneously count the number of persons in a room. It has various applications in the field of consuming energy resource and also as a bi – directional visitor counter Keywords: Arduino UNO, relay, sensor.
  • 7.
    i Table of Contents Chapter1 - INTRODUCTION ....................................................................................................... 1 1.1 Background:.......................................................................................................................... 1 1.2 Description:........................................................................................................................... 1 1.3 Problem Statement:............................................................................................................... 1 1.4 Scope:.................................................................................................................................... 1 1.5 Objectives: ............................................................................................................................ 2 1.6 Feasibility:............................................................................Error! Bookmark not defined. 1.7 Requirements: ....................................................................................................................... 3 1.7.1 Functional Requirements ............................................................................................... 3 1.7.2 Non- Functional Requirements...................................................................................... 3 1.7.3 Hardware Requirements................................................................................................. 3 1.7.4 Software Requirements.................................................................................................. 3 1.8 Stakeholders:......................................................................................................................... 6 Chapter 2 – MATERIALS & METHODS...................................................................................... 5 2.1 Process Model:...................................................................................................................... 5 2.2 Tools & Technologies........................................................................................................... 5 2.3 Design:.................................................................................................................................. 5 2.3.1 Use Case Diagrams:....................................................................................................... 5 2.3.3 Sequence Diagram: ........................................................................................................ 6 2.3.4 Class Diagram:............................................................................................................... 6 2.3.5 Data Flow Diagram:....................................................................................................... 6 2.3.6 ER Diagram: .................................................................................................................. 6 2.3.7 Database Model: ............................................................................................................ 6 2.3.8 Architecture: .................................................................Error! Bookmark not defined. Chapter 3 - RESULTS & DISCUSSION...................................................................................... 23 3.1 Testing: ............................................................................................................................... 23 3.2 Test Cases: .......................................................................................................................... 23 3.3 Conclusion: ......................................................................................................................... 24 Chapter 4 - USER MANUAL....................................................................................................... 27 References......................................................................................Error! Bookmark not defined.
  • 8.
    ii List of Figures Figure1.1 Stakeholders .................................................................Error! Bookmark not defined. Figure 2.1 Agile Activities.............................................................................................................. 5 Figure 2.2 Use Case Diagram ........................................................Error! Bookmark not defined. Figure 2.3 Sequence Diagram........................................................Error! Bookmark not defined. Figure 2.4 Class Diagram ..............................................................Error! Bookmark not defined. Figure 2.5 Context Diagram ..........................................................Error! Bookmark not defined. Figure 2.6 Level 0 DFD.................................................................Error! Bookmark not defined. Figure 2.7 Level 1 DFD.................................................................Error! Bookmark not defined. Figure 2.8 Entity Relationship Diagram ........................................Error! Bookmark not defined. Figure 2.9 Database Model............................................................Error! Bookmark not defined. Figure 2.10 Applications's Architecture ........................................Error! Bookmark not defined. Figure 4.1 Signing in......................................................................Error! Bookmark not defined.
  • 9.
    iii List of Tables Table2. 1: Add User......................................................................Error! Bookmark not defined. Table 3. 1: User login Test Case................................................................................................... 23
  • 10.
    University of AgricultureFaisalabad. Chapter 1- Introduction [Project Title] 1 Chapter 1 - INTRODUCTION 1.1 Background: The demand for the electronic device which can control the room appliances has a great surge such that it can be implemented in many real time applications like in hotels, living room, garage and so on. The model can track the number of persons entering and leaving the room and also switches the lights and if the room is engaged or vacant respectively. By employing this device in the room reduces the laborious works to search for the switch to light the room at once you entered. The persons entering the room through the entrance will be sensed by the Microwave Motion Sensor and the signal sensed is sent to the Arduino Mini Pro for processing and controlling the count in the room and also explicitly monitors the lights and fan in the room. 1.2 Description: The main consideration in the power present field technology are automation, power consumption and cost effectiveness automation may intended to reduce the man power with help of intelligent system. The demand for the electronic device which can control the room appliances has a great surge such that it can be implemented in many real time applications like in hotels, living room, garage and so on. The model can track the number of persons entering and leaving the room and also switches the lights and if the room is engaged or vacant respectively By using this model in offices will reduced the laborious works to search for the switch to light the room at once you entered The persons entering the room through the entrance will be sensed by the Infrared Sensors and the signal sensed is sent to the Arduino Mini Pro for processing and controlling the count in the room and also explicitly monitors the lights whenever the room was empty or the last person who leaving the office light the counter will decreased to zero and the light will turn off. Our model mainly used in offices, seminars halls, labs etc. 1.3 Problem Statement: Energy resources like petroleum, coal, natural gas, uranium and propane are called non -renewable resources, because their supplies are limited. Many environmental effects and day-by-day depleting energy resources warn us to save energy by using automatic room controller an Energy efficient lighting systems. Nowadays the wastage of electricity has become a routine thing for us, and the problem has become frequent at homes, schools, and colleges and even in industries. Sometimes we notice fans and lights keep on working even in the absence of people. This often happens in homes, offices and public places due to utter negligence of the inmates.
  • 11.
    University of AgricultureFaisalabad. Chapter 1- Introduction [Project Title] 2 1.4 Scope: The Scope of this project is to make a controller-based model to count number of persons visiting room and accordingly light up the room. Here we can use the sensor and can know present number of persons. In today’s world, there is a continuous need for automatic appliances with the increase in standard of living, there is a sense of urgency for developing circuits that would ease the complexity of life. Also, if at all one wants to know the number of people in the room so as not to have congestion. This circuit proves to be helpful. This project “AUTOMATIC LIGHT CONTROLLER SYSTEM” using Arduino Mini Pro is a reliable circuit that takes over the task of controlling the room lights as well as counting the number of persons /visitors in the room very accurately. When somebody enters the room then the counter is incremented by one and the light in the room will be switched ON and when anyone leaves the room then the counter is decremented by one. The light will be only switched OFF until all the persons in the room go out. The total number of persons inside the room is also displayed on the seven segment displays. The Arduino Mini Pro does the above job. It receives the signals from the sensors. And this signal is operated under the control of software which is stored in ROM. When any object passes through the motion sensor Receiver’s then the Rays falling on the receiver are obstructed, this obstruction is sensed by the Arduino Mini Pro 1.5 Objectives: Main Goal of our project is to count the person entering and leaving the room and light turn on when first person enter in the room and light turned off when the last person leaves the room. For this purpose we implement our project in our supervisor office and test the results 1.6 Feasibility: 1.6.1 Technical Feasibility –The team has all the technological resources to undertake the project because it is not a complex project; we simply use a Arduino Mini Pro , Microwave Motion Sensor, USB port, Relay , Bread Board, Blub , Wires etc 1.6.2 Schedule Feasibility –team currently have the time resources to undertake the project. The project can be completed within the time. As the schedule time is 3 months to complete the project so it can be easily done within the time . 1.6.3 Economic Feasibility –the economic cost of the project is very low because only 3 developers can develop the project. 1.6.4 Cultural Feasibility – It is very cost effective and save our electricity resources 1.6.5 Resource Feasibility – we have enough resources to complete the project.
  • 12.
    University of AgricultureFaisalabad. Chapter 1- Introduction [Project Title] 3 1.7Requirements: 1.7.1 Functional Requirements FR01: When the First Person Enter in the room Light will turn On. FR01-01 Person will enter in the room FR01-02 Sensor Should detect that person FR01-03 Sensor pass message to Arduino and light turn on FR01-04 Counter increased by one whenever person enter in the room FR02: When the Last Person leaving the room Light will turn Off. FR02-01 Person will leaving the room FR02-02 Sensor should Detect That Person FR02-03 Counter Decreased by one whenever person enter in the room FR02-04 Light should turn off when counter decreased to zero 1.7.2 Non- Functional Requirements NFR01: Sensor shall remain active 24/7. 1.7.3 Hardware Requirements • Arduino Mini Pro • Microwave Motion Sensors • Jumper Wire • Power Supply • Light bulb • Bread Board • Relay (Low Level Trigger) Arduino Pro Mini • Arduino Pro Mini is a microcontroller board developed by Arduino.cc and comes with Atmega328 microcontroller incorporated inside the board. • This board comes with 14 digital I/O out of which 6 pins are used for providing PWM output. There are 8 analog pins available on the board. • It is very small as compared to Arduino Uno i.e. 1/6 of the total size of the Arduino Uno.
  • 13.
    University of AgricultureFaisalabad. Chapter 1- Introduction [Project Title] 4 • There is only one voltage regulator incorporated on the board i.e 3.3V or 5V based on the version of the board. • The Pro Mini runs at 8 MHz for the 3.3V version which is half than Arduino Uno board that runs at 16MHz. • There is no USB port available on the board and it also lacks built-in programmer. Arduino Pro Mini Microwave Motion Sensor The sensor is an active motion detector; it emits a high-frequency electromagnetic wave 5.8GHz and receives its echo. The sensor detects the change in echo from movement in its detection zone. A microprocessor then triggers the switch light ON command. Detection is possible through doors, glass panels and thin walls. NOTE: the high-frequency output of this sensor is Specifications Specifications
  • 14.
    University of AgricultureFaisalabad. Chapter 1- Introduction [Project Title] 5 Operating voltage 120-277Vac, 50/60Hz Rated load 120V @ 400W; 220-240V @ 800W; 277V @ 1000W HF System 5.8GHz ± 7.5MHz, ISM wave band Transmitting power <0.5mW Power consumption ≤0.5W (standby) Detection zone Max.(D x H): 16m x 15m Detection sensitivity 10% / 50% / 75% / 100% Hold time 5s / 30s / 90s / 3min / 20min / 30min Daylight sensor 2 Lux / 5 Lux / 10 Lux / 25 Lux / 50 Lux /100 Lux / Disable Mounting height 15m Max. Motion detection 0.5-3m/s Detection Angle 150º(wall installation) 360º(ceiling installation) Operating temperature -20ºC - 60ºC IP rating IP20 Microwave Motion Sensor 1.7.4 Software Requirements • Arduino Mini Pro Development Environment Development Environment The Arduino Integrated Development Environment - or Arduino Software (IDE) - contains a text editor for writing code, a message area, a text console, a toolbar with buttons for common functions and a series of menus. It connects to the Arduino and Genuino hardware to upload programs and communicate with them. Code:
  • 15.
    University of AgricultureFaisalabad. Chapter 1- Introduction [Project Title] 6 1.8 Stakeholders: Our main stakeholder are offices , seminar halls, Labs and all those non living areas.
  • 16.
    University of AgricultureFaisalabad. Chapter 2- Materials & Methods [Project Title] 5 Chapter 2 – MATERIALS & METHODS 2.1 Process Model: Figure 2.1 Agile Activities 2.2 Tools & Technologies Arduino Mini Pro Development Environment The Arduino Integrated Development Environment - or Arduino Software (IDE) - contains a text editor for writing code, a message area, a text console, a toolbar with buttons for common functions and a series of menus. It connects to the Arduino and Genuino hardware to upload programs and communicate with them. 2.3 Design: 2.3.1 Use Case Diagrams: Null Requirements Design Implementation Testing Evolution
  • 17.
    University of AgricultureFaisalabad. Chapter 2- Materials & Methods [Project Title] 6 2.3.2 Usage Scenario Null 2.3.3 Sequence Diagram: Null 2.3.4 Class Diagram: Null 2.3.5 Data Flow Diagram: Null 2.3.6 ER Diagram: Null 2.3.7 Database Model: Null
  • 18.
    University of AgricultureFaisalabad. Chapter 2- Materials & Methods [Project Title] 7 Circuit Diagram: Circuit Diagram
  • 19.
    University of AgricultureFaisalabad. Chapter 3- Results & Discussion [Project Title] 23 Chapter 3 - RESULTS & DISCUSSION 3.1 Testing: My Team member and I implemented out model in our supervisor office and we test our model by passing three students one by one and we noted that light was be successfully on when first person entered and light was successfully of when last person leaving the room we project testing successfully done under the supervision of our supervisor. 3.2 Test Cases: Test Case: Person Enter in the room: Table 3. 1: User Person enter in the room Test Case Test Case ID: TC-1 Test Case Title: To verify that light turn on when first person enter in the room Test Case Priority: High Requirement: First Person enter in the room Test Description: Sensor detect that first person enter in the room and counter increased by 1. Test Date: 07/11/2020 Pre-Conditions: 1. Activate sensor Dependencies: Voltage Test Steps: 1. First Person enter in the room 2. Sensor detect 3. Pass message to Arduino 4. Counter increased by 1 whenever person enter in the room 5. Light turn on when first person enter in the room Test Data Tester 1. Light turn on Actual Results: As above Post Conditions: Light turn On Status: (Pass/Fail) Pass Other Comments: None
  • 20.
    University of AgricultureFaisalabad. Chapter 3- Results & Discussion [Project Title] 24 Test Case: Person Leaving the room: Table 3. 2: User Person leaving the room Test Case Test Case ID: TC-2 Test Case Title: To verify that light turn off when last person leaving the room Test Case Priority: High Requirement: Last Person leaving the room Test Description: Sensor detect that last person leaving the room and counter decreased by 1. Test Date: 07/11/2020 Pre-Conditions: 1. Activate sensor Dependencies: Voltage Test Steps: 1. Person leaving the room 2. Sensor detect 3. Pass message to Arduino 4. Counter decreased by 1 whenever counter will be zero 5. Light turn off when lass person leave the room or counter will be zero Test Data Tester 1. Light turn off Actual Results: As above Post Conditions: Light turn off Status: (Pass/Fail) Pass Other Comments: None 3.3 Conclusion: My Team member and I implemented our model in our supervisor office and we test our model by passing three students one by one and we noted that light was successfully on when first person entered and counter increased by 1 and counter decreased by 1 and when counter was on zero or last person leaving the room, light was successfully off. Our project testing successfully done under the supervision of our supervisor.
  • 21.