Professional Documents
Culture Documents
.Bettybeeba 315536412000
.Bettybeeba 315536412000
BY
19/DCEN/001
ENGINEERING
IGBAJO POLYTECHNIC,
OCTOBER, 2021
i.
v
CERTIFICATION
This is to certify that this project was carried out by ABASS, Basirat Adeola with matric number
19/DCEN/001 and has been approved as meeting the requirement by in partial fulfillment for the award of
Mr Adeniji ---------------------------------
ii.
v
DEDICATION
iii.
v
ACKNOWLEDGEMENT
First of all, my profound appreciation goes to Almighty Allah who by His unflinching grace and
power has granted me the opportunity, the required strength and good health for the successful
completion of this project.
I am also grateful to my wonderful family my beloved parents MR Akeem and MRS Bayonle
Abass. THANK YOU for your prayers, parental advise, moral and financial support all
through this program.
I would like to thank profoundly the DEAN OF THE FACULTY Eng. Jooda for her motherly
advice and support throughout my course of study.
I would also like to thank the Head of Department Mrs. Akinleye for her support throughout my
course of study.
I would like to extend my gratitude to my Supervisor MR. Adeniji, who found time and patiently
go through the manuscripts and offered useful advice, made corrections and assistance despite
his busy schedules.
I am also using this medium to appreciate all my lecturers in the department who in one way or
the other, I have tapped from their reservoir of knowledge.
Although, I would like to mention by name those who have contributed to my achievement, but
it is impossible. Those who readily came to mind include; Erinfolami Iromini and Adewumi
Adeoye.
Finally, to the numerous other people who made it a worth while and memorable experience, I
say a big THANK YOU.
v
iv.
TABLE OF CONTENT
CERTIFICATION ii
DEDICATION iii
ACKNOWLEDGEMENT iv
TABLE
CHAPTER ONE
1.0 Introduction 1
1.2 Problem statement 1
1.3 Aim of this project 1
1.4 Objective of the project 2
1.5 Significance of the project 2
1.6 Limitation of the project 2
CHAPTER TWO
2.0 Literature review 3
2.1 Basic historical back ground of automatic room light controller 3
2.1.1 Historical Background 3
Theories and models relevant to the design 4
2.2 Atmega328 4
2.3 Specifications 4
2.4 Family 5
2.5 Exploring the atmega328Arduino board 5
2.6
CHAPTER THREE
3.0 The system design, analysis and methodology 7
3.1 Methodology 7
v
CHAPTER FOUR
4.0 Introduction 16
4.1 Software development 16
4.2 Testing 16
4.3 Expected test results 16
4.4 Performance evaluation 17
4.5 Problems encountered 17
4.6 Packaging 17-18
CHAPTER FIVE
5.0
5.1
5.2
v
ABSTRACT
In today’s world, there is a continuous need for automated appliances. With the increase in the
living standards, there is an immediate need for developing circuits that would change the
complexity of life to simplicity. This Project title “Automatic Room Light Controller” is
designed and presented in order to automatic on auditorium, hall, offices, malls, sports venue, etc
light. The system on and off every 10seconds there is movement from the sensor at the
auditorium or hall or other place, where it is placed. Depending upon the sensors interruption, the
system identifies the entry and exit of the visitor. On the successful implementation of the
system, it automatically on light in the auditorium or hall. This is an economical cost reducing
system when implemented in places where the visitors doesn’t have to look for switches to
switch on the light. Auto room lighing can be time consuming so it helps to maximize the
efficiency and effectiveness of employees, time saving and sales potential of an organization, etc.
vii
v
CHAPTER ONE
1.0 INTRODUCTION
Scientific discoveries delivered us luxury and comforts. Technology has become vital and essential part of
our lives. Tremendous advancement in technology is succeeded in last few years. Electrical energy has
become an crucial part of human life. In recent years the people are looking forward for the automation in
their day to day life, and even now the people are excited to save energy consumed to reduce the
expenditures. People are becoming lazy to switch off the lights while leaving the room, so the large amount
of energy is wasted if the light remains ON in the absence of human being. Generally, in public and private
sector companies, offices, school and colleges most of the people are not interested in switching OFF the
electronic machines like fan, light, etc. while going out of the room [1].
As more and more consumer electronic and home appliances are used, the size of them is becoming large;
power consumption in home area tends to grow. Moreover, unusable power consumption occurs in the
Using the automation in switching the home or office lighting system, the consumption of electricity can be
comprehensively reduce which will in turn save the money of the owner. Now the people are looking
forward for automation in their daily life. The people are trying to reduce human efforts.
By using this suggested system wastage of electricity can be reduced as electrical appliance will be
automatically turned ON or OFF based on the presence of the human being with the help of PIR sensor [2].
1.2 PROBLEM STATEMENT This device came to solve the problem associated with manual
control of a room light which involves labor, time wasting and waste of electrical energy.
To design and construct a microcontroller based Automatic Room lightening control system.
v
1
The objective of this project is to make a microcontroller based Automatic Room lightening system which
can sense if anybody enters the room and it lights up the room automatically and when motion stops the
light goes off. It is made to prevent electric power waste in schools, colleges, offices and houses. This
This project can also be used in our homes because many times we come out of our bedroom or any other
This system cannot distinguish between human and other obstacles such as animals.
2
v
CHAPTER TWO
LIGHT CONTROLLER
As a result of the fast growing trend in instrumentation engineering, a good number of electronic
instruments that exists in advanced countries should also exist in our country Nigeria.
Industrial electronics is a holistic aspect of modern world technology; as such, most of the
electronically advanced countries like USA, Japan, Russia, etc cannot sustain their technological
The advent of microelectronics in 1959 by jack kilo byte gave rise to the birth of both linear and
digital circuits like Operational Amplifiers, Voltage Regulators, IC Timers, Combinational Logic,
Structural and Sequential Logic ICs among a host of other digital system components.
The control and automation of human counters for hotel room processes can be realized using a
microcontroller integrated with an infrared sensor which senses the passage of human beings and
The discovery of the microcontroller in 1972 marked the beginning of micro program control in
electronics. Microprocessors like 8080, 8086, 8088; Pentium, etc were employed for micro
program control of batch counters in the 20 th century but micro controllers became more preferable
for such embedded applications for control systems in contrast to the microprocessors which are
better for general purpose applications. Other devices which maybe similarly used for such control
operations are programmable logic devices (PLDs) such as Complex Programmable Logic
Devices (CPLDs), Field Programmable Gate Array (FPGA) among a host of other devices. This
3
controller contains a Infrared Sensor formed. The control mechanism of this automatic room light
controller is realized through a micro program control. The micro program which is the driving
software is written in C language and flashed into the Atmega328 microcontroller. By using this
sensor and its related circuit diagram can put ON/OFF lights automatically, during this project
research.
The system designed was based on fundamental and principles of electromagnetism, electronic
2.2 ATMEGA328
The ATmega328 is a single-chip microcontroller created by Atmel in the mega AVR family
(later Microchip Technology acquired Atmel in 2016). It has a modified Harvard architecture 8-
bit RISC processor core. Atmega328 microcontroller issued in basic Arduino boards i.e Arduino
2.3 SPECIFICATIONS
The Atmel 8-bit AVR RISC-based microcontroller combines 32 KB ISP flash memory with read
while- write capabilities, 1 KB EEPROM, 2 KB SRAM, 23 general purpose I/O lines, 32 general
purpose working registers, three flexible timer/counters with compare modes, internal and
external interrupts, serial programmable USART, a byte-oriented 2-wire serial interface, SPI
serial port, 6-channel 10-bit A/D converter (8-channels in TQFP and QFN/MLF packages),
programmable watchdog timer with internal oscillator, and five software selectable power saving
modes. The device operates between 1.8-5.5 volts. The device achieves through put
4
2.4 FAMILY
comprehensive list of all other members of the mega AVR series can be found on the Atmel
meant to support this microcontroller. This is where you store your programs to tell the Arduino
what to do.
Digital pins: Arduino has14digital pins, labeled from 0to13 that can act as inputs or outputs.
When set as inputs, these pins can read voltage. They can only read two states: HIGH
or LOW.
When set as outputs, these pins can apply voltage. They can only apply 5V(HIGH)or
0V(LOW).
PWM pins: These are digital pins marked with a ~ (pins 11,10, 9,6, 5and 3).
PWM stands for “pulse width modulation” and allows the digital pins output “fake” varying
TX and RX pins: digital pins 0and 1.The T stands for “transmit” and the R for “receive”. The Arduino
uses these pins to communicate with other electronics via Serial. Arduino also uses these pins to
communicate with your computer when uploading new code. Avoid using these pins for other tasks other
than serial communication, unless you’re running out of pins
LED attached to digital pin 13: This is useful for an easy debugging of the
Arduino sketches.
TX and RX LEDs: these leds blink when there are information being sent between the
5
Analog pins: the analog pins are labeled from A0 to A5 and are often used to read analog
sensors. They can read different amounts of voltage between 0 and5V. Additionally, they can
Power pins: the Arduino provides 3.3V or 5V through these pins. This is really useful since
most components require 3.3V or 5V to operate. The pins labelled as “GND” are the ground
pins.
Reset button: when you press that button, the program that is currently being run in your
Arduino restarts. You also have a Reset pin next to the power pins that acts as reset button. When
you apply a small voltage to that pin, it will reset the Arduino.
USB jack: you need a male USB A to male USB B cable (shown in figure below) to up load programs from your
computer to your Arduino board. This cable also powers your Arduino.owerjack: you can power the Arduino
through the power jack. There commended input voltage is 7V to 12V. There are several ways to power up
your Arduino: rechargeable batteries, disposable batteries, wall-warts and solar panel.
simple, low powered, low-cost micro-controller is needed. Perhaps the most common
6
CHAPTER THREE
3.1 METHODOLOGY
Systems Analysis is the process of investigation of a system’s operation with a view to changing
A block diagram of the envisaged circuit was achieved by the use of a methodological approach
systems. This phase constitutes an essential step of the development process and one of the
critical issues that determines the quality of the final product. The analysis phase sets the stage
for the whole project. The necessary groundwork for understanding what the project is all about
is completed in this phase. We take the strong position that the more effort you put into planning,
the smoother the rest of the project will go and the better the quality will be of your final product.
The total design and development of any microcontroller based system typically involves three
The existing system makes use of manual controllers, like switches, manual changeovers and
7
3.2.1 Information Gathering
A lot of research work consultations were carried out before and during this project. The research
work includes past projects of higher institution of learning in the country, journals, textbooks
on electronics and telecommunication and research papers gathered from the libraries and
The microcontroller based automatic room lightening control system is designed with the aid of
a block diagram which serves as a guideline for the development of system’s circuit schematic
diagram.
PIR Sensor
Relay
PIR Sensor
Bulb
8
3.4 Procedure Followed While Designing:
The system circuit was designed with PROTEUSE software. Proteuse is a circuit
designing software. After completion of the designing the circuit layer was prepared.
The microcontroller was programmed using “ARDUINO IDE” software using hex file.
Then soldering process was done. After completion of the soldering process the circuit was
tested.
9
3.4.1 List of Components:
Following is the list of components that are necessary to build the assembly the project.
Microcontroller – Atmega328-pu
5v Relay
Diode
Transistor – BC 547
10
characteristics of its surroundings by either emitting and/or detecting infrared radiation. PIR
sensors are also capable of measuring the heat being emitted by an object and detecting motion.
Features
Size: Rectangular
Output: Digital pulse high (3V) when triggered (motion detected) digital low when idle (no
motion detected). Pulse lengths are determined by resistors and capacitors on the PCB and differ
Power supply: 5V-12V input voltage for most modules (they have a 3.3V regulator), but 5V is
11
Description:
The KA78XX/KA78XXA series of three-terminal positive regulator are available in the TO-
220/D-PAK package and with several fixed output voltages, making them useful in a wide range
of applications. Each type employs internal current limiting, thermal shut down and safe
provided, they can deliver over 1A output current. Although designed primarily as fixed voltage
regulators, these devices can be used with external components to obtain adjustable voltages and
currents.
Features:
Output Current up to 1A
12
RELAY:
Fig 19: Relay Circuit
A single pole double throw (SPDT) relay is connected to digital pin2 of the microcontroller
transistor. The relay requires 5volts at a current of around 100ma, which cannot provide by the
microcontroller. So the driver transistor is added. The relay is used to operate the external
solenoid forming part of a locking device or for operating any other electrical devices. Normally
the relay remains off. As soon as pin of the microcontroller goes high, the relay operates. When
the relay operates and releases. Diode D2 is the standard diode on a mechanical relay to prevent
back EMF from damaging the transistor when the relay is back to low.
13
Start
Object detection
Through PIR
Relay Switches On
Is the sensor
interrupted again?
YES NO
14
3.7 Principle of operation
If the sensor is interrupted the relay goes HIGH and the microcontroller starts counting
from 10 downward.
If sensor is interrupted during the count, count start again from 10 downward.
The microcontroller then checks if count less than or equal to 0, if the condition is true
then relay goes LOW and the light is off otherwise if the condition is false the light
remains on.
15
CHAPTER FOUR
4.0 INTRODUCTION
This chapter discusses the design implementation of the system which is the hardware structure
which comprises the infrared receiver, microcontroller and the electromechanical relay circuit.
4.2 TESTING
Testing is a vital process in the development and realization of any design, be it hardware based,
software based or both. The various components and their circuitry have to be tested to ensure
that all the components on board are certified okay and in good working condition. The
components that did not give the required output specification where isolated and troubleshoot to
determine the nature and cause of the component failure through careful analysis, that is
The design of the microcontroller based automatic room light controller is meant to be a system
that so that when there is no one in the room the lights, fans and gadgets are turned off
automatically. With this system the user do not need to press any button, once he/she enters the
room, the room the light turns on. To effectively carry out an intensive test, it is a good practice
to run or retest the project as many times as possible to make sure that the desired design
specification is met. The result that is expected is for the system, when the infrared rays are
blocked, the infrared sensor sends signals which will activate the relay and power the lights. The
expected test results were obtained as the infrared transmitter (entrance) communicated
successfully with the receiver on the receiver (exit) section of the control system.
The signal received was then able to activate the relay and control the lighting point successfully.
16
4.4 PERFORMANCE EVALUATION
The performance of the automatic room light control system with proved satisfactory and is
In the course of the design and implementation of this project, some problems were encountered.
They are -
Component Failures
Short Circuitry
I also had some soldering issues which were resolved using continuity checks performed
on the hardware.
Construction of the circuit like this needs patient and diligence. The act of soldering must
could jeopardize the operation of the circuit. And it is usually difficult when one does not
interwoven to each other sometimes can cause discouragement, to say the least.
4.6 PACKAGING
During the packaging of the system, the size of the case was determined after the consideration
The space for envisaging modification and easy accessibility to the circuit board or
Consequently, the following materials were considered for packaging of the system which
includes:
Plastic packaging
For this project, the packaging was done using plastic packaging because of its durability,
CHAPTER FIVE
5.0 SUMMARY
For a project to be executed, one has to reason out what the design is and how the design
can be carried out and also be able to implement the design in order to achieve the aims and
programmed to coordinate the whole function of the design from when the sensor is been
interrupted to processing and sending appropriately to the relay which are connected to outputs
of our domestic appliances, lighting points, etc. This project is designed primary to automatically
switch on/off lights once there is interruption to the sensor, it can also be tailored so as to be
5.1 CONCLUSION
The automated state of the system gives the product certain flexibility and the potential to be
integrated with some of the other household systems into a universal household and industrial
appliance. Eventually, one simple system like this has the capability to control air conditioners,
televisions, CCTV, lighten system, sockets, washing machine, and other home appliances. This
design began the framework for a more complex and more functional product. The concept of an
automatic room light controller and bidirectional counter can be built upon not just for household
usage but for such settings as hotels, schools, hospitals, industrial purpose or businesses.
Eventually this designed product can be built using less expensive components thus making it an
affordable alternative for consumers. It is a simple upgrade to an existing standard product and it
19
5.2 RECOMMENDATION
Use of imaging systems such faces recognition that recognizes the identities of the target
individual. This would differentiate between an animal and humans obstructing the sensors ray.
20
5.3 REFERENCE
1. Y.C. Chang, T.Y. Chen, D. J. Wang, People Counting System for Getting
vol. 3,pp.565-569
56
www.satistronics.com