0% found this document useful (0 votes)
830 views15 pages

Group 7 Final Project Report - Automatic Night Light

The document describes a final report for an automatic night light project created using an Arduino Uno board. The project aims to create a prototype night light that turns on when it cannot detect enough light using a light sensor. The report provides an abstract, introduction, literature review on related automatic light control systems, theoretical background, solution description using an Arduino and light sensor, discussion, conclusion, and recommendations. It also includes appendices with project specifications, components list, fabrication process, and work distribution.

Uploaded by

Ben Riley
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
830 views15 pages

Group 7 Final Project Report - Automatic Night Light

The document describes a final report for an automatic night light project created using an Arduino Uno board. The project aims to create a prototype night light that turns on when it cannot detect enough light using a light sensor. The report provides an abstract, introduction, literature review on related automatic light control systems, theoretical background, solution description using an Arduino and light sensor, discussion, conclusion, and recommendations. It also includes appendices with project specifications, components list, fabrication process, and work distribution.

Uploaded by

Ben Riley
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

MAPUA UNIVERSITY

SCHOOL OF MECHANICAL AND MANUFACTURING ENGINEERING

ME153P/E01
CONTROL SYSTEMS ENGINEERING

FINAL REPORT

AUTOMATIC NIGHT LIGHT

SUBMITTED BY:
BERNAL, CHRIS DANE B.
2013103212
JAVIER, LAWRENCE
2013105533
LIBAO, CLARENCE V.
201304630
PAPIO, ROBERTO
2013150730

SUBMITTED TO:
ENGR. PAULO RAFAEL MERIS

January 30, 2019

1
ABSTRACT

This project is all about creating an automatic control system that senses the light intensity
of its surroundings, and will turn its own light on or off depending on the status of the area, whether
it is dark or bright. The system is programmed using Arduino UNO board and Arduino software
and other supporting materials that helps the whole system work.

2
TABLE OF CONTENTS

ABSTRACT .................................................................................................................................... 2
I. OVERVIEW ............................................................................................................................ 4
II. STATEMENT OF THE PROBLEM ................................................................................... 4
III. OBJECTIVE ........................................................................................................................ 4
IV. RELATED LITERATURE .................................................................................................. 4
a. AUTOMATIC ROOM LIGHT INTENSITY DETECTION AND CONTROL USING A
MICROPROCESSOR AND LIGHT SENSORS (Ying-Wen Bai, 2008) .................................. 4
b. LIGHT SENSORS FOR OBJECTIVE LIGHT MEASUREMENT IN AMBULATORY
POLYSOMNOGRAPHY (Rachel Schmebri, 2017) .................................................................. 4
c. INTEGRATED HIGH RESOLUTION DIGITAL COLOR LIGHT SENSOR IN 130 nm
CMOS TECHNOLOGY (Vincent Chi Zhang, 2015)................................................................. 5
d. THE WORKING PRINCIPLE OF ARDUINO (Badamasi, 2014) ..................................... 6
e. MICROCONTROLLER-BASED CONTROL SYSTEM IN ELECTRICAL
ENGINEERING TECHNOLOGY (Lozano-Nieto, 2014) ......................................................... 6
f. SIGNAL ............................................................................................................................... 7
V. THEORETICAL CONSIDERATIONS .............................................................................. 8
VI. SOLUTION.......................................................................................................................... 8
VII. DISCUSSION .................................................................................................................... 10
VIII. CONCLUSION .............................................................................................................. 11
IX. RECOMMENDATION ..................................................................................................... 11
X. REFERENCES .................................................................................................................. 11
XI. APPENDICES ................................................................................................................... 12
Appendix A: Specification of Project ....................................................................................... 12
Appendix B: List of Components and Cost .............................................................................. 12
Appendix C: Fabrication Process.............................................................................................. 13
Appendix D: Work Distribution ............................................................................................... 15

3
I. OVERVIEW
Our group wanted to apply this project in real life scenarios and products such as
automatic night light and emergency light system.

II. STATEMENT OF THE PROBLEM


Manually turning on your bedside lampshade to read a book after turning the lights out
may not be a really serious problem, but making it turn on by itself is convenient. Hence,
the creation of automatic night light.

III. OBJECTIVE
Our group aimed to create a simple prototype of an automatic night light that turns on
whenever it can’t detect any light within the sensor’s range.

IV. RELATED LITERATURE


Here are some of the paper works and articles that is related to our project.

a. AUTOMATIC ROOM LIGHT INTENSITY DETECTION AND CONTROL


USING A MICROPROCESSOR AND LIGHT SENSORS (Ying-Wen Bai, 2008)
In this paper we propose a design using both a microprocessor and light sensors for
automatic room light detection and control. Our design, the HLCM (Home Light Control
Module) which will be installed in every light fixture of a family, is made up of four blocks:
the pyroelectric infrared (PIR) sensor circuit, the light sensor circuit, the microprocessor
and the RF module. By using the PIR sensor circuit, the HLCM detects if a human body
enters the detection area or not. If there is no human body present, all controlled lights are
turned off. If there is, the HLCM detects the light intensity under the environment and
maintains sufficient light by controlling the number of lights. We have also integrated an
RF module to transmit and receive the data from each HLCM so we can control different
lights in different regions. The result of using the HLCM shows that the total power
consumption can be reduced.

b. LIGHT SENSORS FOR OBJECTIVE LIGHT MEASUREMENT IN


AMBULATORY POLYSOMNOGRAPHY (Rachel Schmebri, 2017)
Ambulatory polysomnography (PSG) does not commonly include an objective
measure of light to determine the time of lights off (Loff), and thus cannot be used to
calculate important indices such as sleep onset latency and sleep efficiency. This study
examined the technical specifications and appropriateness of a prototype light sensor (LS)
for use in ambulatory Compumedics Somte PSG. Two studies were conducted. The first

4
examined the light measurement characteristics of the LS when used with a portable PSG
device, specifically recording trace range, linearity, sensitivity, and stability. This involved
the LS being exposed to varying incandescent and fluorescent light levels in a light
controlled room. Secondly, the LS was trialed in 24 home and 12 hospital ambulatory PSGs
to investigate whether light levels in home and hospital settings were within the recording
range of the LS, and to quantify the typical light intensity reduction at the time of Loff. A
preliminary exploration of clinical utility was also conducted. Linearity between LS
voltage and lux was demonstrated, and the LS trace was stable over 14 hours of recording.
The observed maximum voltage output of the LS/PSG device was 250 mV, corresponding
to a maximum recording range of 350 lux and 523 lux for incandescent and fluorescent
light respectively. At the time of Loff, light levels were within the recording range of the
LS, and on average dropped by 72 lux (9±245) in the home and 76 lux (4±348) in the
hospital setting. Results suggest that clinical utility was greatest in hospital settings where
patients are less mobile. The LS was a simple and effective objective marker of light level
in portable PSG, which can be used to identify Loff in ambulatory PSG. This allows
measurement of additional sleep indices and support with clinical decisions.

c. INTEGRATED HIGH RESOLUTION DIGITAL COLOR LIGHT SENSOR IN


130 nm CMOS TECHNOLOGY (Vincent Chi Zhang, 2015)
This article presents a color light detection system integrated in 130 nm CMOS
technology. The sensors and corresponding electronics detect light in a CIE XYZ color
luminosity space using on-chip integrated sensors without any additional process steps,
high-resolution analog-to-digital converter, and dedicated DSP algorithm. The sensor
consists of a set of laterally arranged integrated photodiodes that are partly covered by
metal, where color separation between the photodiodes is achieved by lateral carrier
diffusion together with wavelength-dependent absorption. A high resolution, hybrid, ΣΔ
ADC converts each photo diode’s current into a 22-bit digital result, canceling the dark
current of the photo diodes. The digital results are further processed by the DSP, which
calculates normalized XYZ or RGB color and intensity parameters using linear
transformations of the three photo diode responses by multiplication of the data with a
transformation matrix, where the coefficients are extracted by training in combination with
a pseudo-inverse operation and the least-mean square approximation. The sensor system
detects the color light parameters with 22-bit accuracy, consumes less than 60 μA on average
at 10 readings per second, and occupies approx. 0.8 mm2 of silicon area (including three
photodiodes and the analog part of the ADC). The DSP is currently implemented on FPGA.

5
d. THE WORKING PRINCIPLE OF ARDUINO (Badamasi, 2014)
Arduino Uno is a microcontroller board based on the ATmega328P (datasheet). It
has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog
inputs, a 16 MHz quartz crystal, a USB connection, a power jack, an ICSP header and
a reset button. It contains everything needed to support the microcontroller; simply
connect it to a computer with a USB cable or power it with a AC-to-DC adapter or
battery to get started.You can tinker with your UNO without worring too much about
doing something wrong, worst case scenario you can replace the chip for a few dollars
and start over again.Uno" means one in Italian and was chosen to mark the release of
Arduino Software (IDE) 1.0. The Uno board and version 1.0 of Arduino Software
(IDE) were the reference versions of Arduino, now evolved to newer releases. The Uno
board is the first in a series of USB Arduino boards, and the reference model for the
Arduino platform; for an extensive list of current, past or outdated boards see the
Arduino index of boards.

The UNO is the best board to get started with electronics and coding. If this is your
first experience tinkering with the platform, the UNO is the most robust board you can
start playing with. The UNO is the most used and documented board of the whole
Arduino family.

e. MICROCONTROLLER-BASED CONTROL SYSTEM IN ELECTRICAL


ENGINEERING TECHNOLOGY (Lozano-Nieto, 2014)
A microcontroller is a compact integrated circuit designed to govern a specific
operation in an embedded system. A typical microcontroller includes a processor,
memory and input/output (I/O) peripherals on a single chip. Sometimes referred to as
an embedded controller or microcontroller unit (MCU), microcontrollers are found in
vehicles, robots, office machines, medical devices, mobile radio transceivers, vending
machines and home appliances among other devices.A microcontroller's processor will
vary by application. Options range from the simple 4-bit, 8-bit or 16-bit processors to
more complex 32-bit or 64-bit processors. In terms of memory, microcontrollers can
use random access memory (RAM), flash memory, EPROM or EEPROM. Generally,
microcontrollers are designed to be readily usable without additional computing
components because they are designed with sufficient onboard memory as well as
offering pins for general I/O operations, so they can directly interface with sensors and
other components.

6
f. SIGNAL
Signals are one of the most important thing in Arduino programing. Signals gives
a big help on the operation of the device. For example for every sensor that we will be
applying on the device the proper signal for that specific sensor should be used in order
for it to function properly. This also applies to the other components that requires to be
on or off in the device. According to Jimbo, signal is defined to be a quantity that is
varying from time in which contains information. Signals are important and travels
from one device to another with the means of wires or air via radio frequency waves.
The signals are used to send and receive certain information. For Arduino there are two
kinds of signals that are used and here are they:

 ANALOG SIGNAL – Analog signals are one of the kinds of signals that is
being used in the Arduino. According to Yarlagadda, most of the signals that
are being used are analog signal (2010). According to Kuphaldt, analog signals
is defined to be a signal in which it is continuous. In order to easily determine
if the signal that will be used is an analog signal, we should know if there will
be a specific range of action that will be done. Analog signal are used in
temperature sensor. This is because in order to determine the temperature of the
environment, there should be a range of the voltage difference. Another thing
that transmits an analog signal is the speed of the motor, the speed of the rotating
shaft can be varied by using an analog signal. This gives an ability to the user
to change the motor’s speed.
 DIGITAL SIGNAL – Digital signal is also one of the kinds of signals that is
being used in an Arduino. According to Jimbo, digital signals commonly have
two values, one is a low number and the other one is high number that is not
infinity. Digital signals are said to have finite values. Commonly the most used
digital signal value is 0V and 5V. One of the component that uses a digital
signal is the light emitting diode or the LED. This is because there is only two
possibilities that may happen to a light emitting diode. This is to light up or be
turned off. When it is lighted up it uses a 5V signal on the other hand if it is
light off, it makes use of a 0V signal. The on value of a digital signal is referred
to be high and on the other hand the off value of a digital signal is referred to
be low.

7
V. THEORETICAL CONSIDERATIONS
The whole idea of this group’s project is to have a control system involving automatic
switching on/off of the LED based on the area’s light intensity using Arduino UNO board
and a photocell. In this system, when the room is bright, the LED of the system remains
off, and when the light in the room goes out, the LED will automatically turn on. This
principle will be applied on automatic night lights, like the ones in some people’s
bedrooms. This is possible because the Arduino UNO board was programmed to do so,
basing on the light intensity’s value.

VI. SOLUTION
In this project, we made a very simple automatic night light, a combination of Arduino
board and LED that is initially turned off the whole time, but turns itself on whenever the
light within the room is out. Here is the code used for the project.
int sensor=A1;
int LED= 7;
int Light=0;
int timer=0;
unsigned long prevmil=0;
const long interval = 500;
//Automatic Night Light
//Description: This project lights up when it senses that the room
//is dark and turns off if the room has light
void setup() {
Serial.begin(9600);

pinMode(LED,OUTPUT);

8
void loop() {

unsigned long currentM=millis();


if (currentM-prevmil >= interval)
{
prevmil = currentM;
Light= analogRead(sensor);
Serial.println(Light);
if(Light >= 870)
{
digitalWrite(LED,HIGH);
}
else
{
digitalWrite(LED,LOW);
}
}

9
As for the circuit itself, here’s the connection diagram of our project using the Fritzing
software.

VII. DISCUSSION
In this project, we used Arduino UNO microcontroller. The goal of this project is to
create a simple control system involving an automatic light that turns off when the
surrounding is bright and turns on when the surroundings turn dark. We injected a code
that programs the board to turn on/off the light emitting diode depending on the light
intensity of the surroundings. The program code involves interval, and an if-else command
that if the light intensity of the area is greater than a value of 870, the LED will turn off,
else if it is lower than 870 units, it will turn on. Other materials include the light sensor
or photocell itself which sends signal to the Arduino board, and converts light energy into
electrical energy. When no light is present, they have a very high resistance that may be
millions of ohms. In contrast, when light is present, their resistance lowers greatly to a few
hundred ohms. This allows more current to flow inside the circuit, resistors for
miscellaneous stuff, and the light emitting diode as a signal receiver.

In certain applications, the microcontroller systems must perform certain actions


automatically once they meet a certain criteria. Sample applications of these
microcontroller systems are temperature buzzer systems, motion sensing systems such as
tilt-motion systems, motor fan that turns on once the temperature around gets too high, and
many others. Going back to our photocell, they may be used with either alternating or direct
currents. Photocells are small in size, but inexpensive and durable. Their versatility allows
them to detect all kinds of light in all kinds of conditions. The range is from visible to

10
infrared light. Examples of the light sources may include sunlight, moonlight, fire, lasers,
neon, fluorescent, and other similar ones. This allows the photocells to function in two
ways: digitally, to indicate whether a source of light is present, or in analog fashion, to
indicate the light source’s intensity. Despite being made up with semiconductors,
photocells doesn’t have a PN junction. A PN junction is formed by combining positive and
negative type semiconductors, and is the basis of components, such as diodes and
transistors. In photocells, a photon or light particle forces electrons from their positions in
the material's atoms, leaving holes with positive charges. An applied voltage through the
photocell forces the holes and the electrons flow, thereby creating a current. Their symbol
is that of a resistor with two arrows pointing towards one side. Like ordinary resistors, they
lack polarity, which and so they may be placed in either direction inside a circuit.

VIII. CONCLUSION
Same concept can be applied to create autonomous control systems that can function
on its own depending on the status of its surroundings. This paper successfully integrated
the microcontroller system and light sensor technology. It gives the user a convenience of
having a light source in the dark.

IX. RECOMMENDATION
The main thing to improve this project is by using a PCB instead of a breadboard, and
soldered components for more stability. Also, it can be improved by scaling the project up
to a larger one, like using an actual light build and a larger photocell instead of LED.

X. REFERENCES
 G. Batistell (2015), “Integrated High resolution Digital Color Light Sensor”
 De Graaf, G., & Wolffenbuttel, R. F. (1998). Smart optical sensor systems in
CMOS for measuring light intensity and colour. Sensors and Actuators A: Physical,
67(1-3), 115–119. doi:10.1016/s0924-4247(97)01774-3
 Schembri, R., Spong, J., Peters, A., Rochford, P., Wilksch, P., O’Donoghue, F. J.,
… Berlowitz, D. J. (2017). Light sensors for objective light measurement in
ambulatory polysomnography. PLOS ONE, 12(11), e0188124.
doi:10.1371/journal.pone.0188124
 http://arduino.cc/en/Main/arduinoBoardUno

11
XI. APPENDICES

Appendix A: Specification of Project

Arduino-based Automatic Night Light


Specifications:

 Arduino UNO Microcontroller


 Arduino Software
 470-ohms resistor
 Jumper Wires
 Breadboard

Appendix B: List of Components and Cost

Components Price Quantity


Arduino UNO Beginner Kit PHP 2499.00 1

12
Appendix C: Fabrication Process

Completing the circuit by connecting the components based on the schematic diagram

Creating the code in Arduino software that will be used for the automatic night light

13
How the circuit and LED looks like when there is light in the room

Automatic night light when the room is dark

14
Appendix D: Work Distribution

MEMBER TASK ASSIGNED


BERNAL, Chris Dane B.  Paperwork
 Code
 Circuit Installation
Javier, John Lawrence  Paperwork
 Support
 Materials
Libao, Clarence V.  Paperwork
 Materials
 Troubleshooting and Testing
Papio, Roberto  Paperwork
 Materials
 Support

15

You might also like