Download as pdf or txt
Download as pdf or txt
You are on page 1of 41

University of Baghdad

College of Engineering
Electrical Department

Smart Street Lighting

By
Mortadha Qassim Hadi
Supervisor
MSc. Nadia Qassim

Submitted in Partial Fulfillment


For the degree of B.Sc. in
Electrical Engineering
CONTENT

Abstract ------------------------------------------------------------------------------------ii

Chapter 1: Introduction
Introduction ------------------------------------------------------------------------------- 2

Chapter 2: Arduino Microcontroller


2.1 Definition of Arduino --------------------------------------------------------------- 4
2.2 Types of Arduino microcontroller ------------------------------------------------- 5
2.3 Programming Arduino -------------------------------------------------------------- 7

Chapter 3: Hardware Components


3.1 Dimmer ------------------------------------------------------------------------------ 14
3.2 Motion detector --------------------------------------------------------------------- 17
3.3 Relay (5V) --------------------------------------------------------------------------- 20
3.4 LDR (light dependent resistance) ------------------------------------------------ 23
Chapter 4: Project Implementation
4.1 Components connection ---------------------------------------------------------- 27
4.2 Principle of operation ------------------------------------------------------------- 35

Chapter 5: Conclusion
Conclusion ----------------------------------------------------------------------------- 37

References ------------------------------------------------------------------------------ iii

i
ABSTRACT

The project aims to describe a method for modifying street light


illumination by using sensors at minimum electrical energy consumption. When
presence is detected, all surrounding street lights glow at their brightest mode,
else they stay in the dim mode.

LED bulbs shall be implemented as they are better than conventional


incandescent bulbs in every way. This shall reduce heat emissions, power
consumption, maintenance and replacement costs, and carbon dioxide emissions.
In addition to SSLS (Smart Street Light System), massive energy-savings are
envisioned. Also, a demonstration with a real-time proto type model involving
costs and implementation procedure has been developed.

ii
REFERENCES

1- Müllner, Reinhard, and Andreas Riener. "An energy efficient pedestrian aware
Smart Street Lighting system." International Journal of Pervasive Computing and
Communications 7.2 (2011): 147-161.
2- Plamp, Diann F., and LaDell R. Swiden. "Illuminated memorial." U.S. Patent
No. 5,255,170. 19 Oct. 1993.
3- Sehulster, Lynne, et al. "Guidelines for environmental infection control in
health-care facilities." Morbidity and Mortality Weekly Report
Recommendations and Reports RR 52.10 (2003).
4- Brown, Emery Alan, and Pervaiz Lodhie. "Dimmer circuit for LED." U.S.
Patent No. 7,102,902. 5 Sep. 2006.
5- Lenz, Mark. "Fluorescent light and motion detector with quick plug release
and troubleshooting capabilities." U.S. Patent No. 6,091,200. 18 Jul. 2000.
6- Chen, Tung-Yang, Ming-Dou Ker, and Chung-Yu Wu. "The application of
transmission-line-pulsing technique on electrostatic discharge protection
devices." Proc. of Taiwan EMC Conference. 1999.

iii
Chapter One

Chapter 1
Introduction

Introduction
Chapter One

1|Page
Chapter One

INTRODUCTION

Streetlights are an integral part of any developing locality. They are present
on all major roadways and in the suburbs too. Every day, streetlights are powered
from sunset to sunrise at full strength, even when there is no one around. On a
global scale, millions of dollars are spent each day on these street lights to provide
the required electrical energy. The maintenance and replacement costs of
conventional incandescent bulbs are immense. They consume a lot of electric
power to function and their heat emissions are also quite high. All of this
contributes to greater demand of electricity production and consequently, more
carbon dioxide emissions from powerhouses. So, along with unnecessary light
pollution, this practice causes damage to our planet too.

A simple and effective solution to this would be dimming the lights during
off peak hours. Whenever presence is detected, the lights around it will glow at
the normal (bright) mode. This would save a lot of energy and also reduce cost of
operation of the streetlights.

2|Page
Chapter Two

Chapter 2
Arduino Microcontroller

Arduino Microcontroller
Chapter Two

3|P age
Chapter Two

2.1 Definition of Arduino

Arduino refers to an open-source electronics platform or board and the


software used to program it. Arduino is designed to make electronics more
accessible to artists, designers, hobbyists and anyone interested in creating
interactive objects or environments. An Arduino board can be purchased pre-
assembled, because the hardware design is open source, built by hand. Either
way, users can adapt the boards to their needs, as well as update and distribute
their own versions.

Arduino is common term for a software company, project, and user


community, that designs and manufactures computer open-source hardware,
open-source software, and microcontroller-based kits for building digital devices
and interactive objects that can sense and control physical devices.

This system provides sets of digital and analog I/O pins that can interface to
various expansion boards (termed shields) and other circuits. The boards feature
serial communication interfaces, including Universal Serial Bus (USB) on some
models, for loading programs from personal computers. For programming the
microcontrollers, the Arduino project provides an integrated development
environment (IDE) based on a programming language named Processing, which
also supports the languages C and C++.

4|P age
Chapter Two

2.2 Types of Arduino microcontroller

There are many types of Arduino microcontroller used in different


applications likes (Arduino UNO, MEGA, NANO and others). These are shown
in Figure below.

UNO NANO

MEGA

Figure 2.1: Types of Arduino

5|P age
Chapter Two

The Arduino Uno is used in this project for the following reasons:

1. It contains everything needed to support the microcontroller.


2. Simply connect it to a computer with a USB cable or power it with
AC-to-DC adapter or battery to get started.
3. The user can tinker his UNO without worrying about doing
something wrong, worst case scenario is to replace the chip for a few
dollars and start over again.

The Arduino Uno is a microcontroller board 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, a reset button.

The Uno is the most common board and the one labeled as the classic
Arduino. This board comes with everything new users need to learn about the
electronics and programming required to start this hobby. It is compatible with
most available Arduino shields. This is shown in Figure 2.2.

Figure 2.2: Arduino UNO Specifications

6|P age
Chapter Two

2.3 Programming Arduino

2.3.1 Downloading the Arduino Software

Download the Arduino Software package for the operating system of the
PC. The Arduino installation file can be found from the Arduino download
page. After downloading and installing the application successfully the user
should see the Arduino window as shown below.

Figure 2.3: Arduino Window

7|P age
Chapter Two

2.3.2 The Initial Setup


Setup the environment to Tools menu and select Board as shown below.

Figure 2.4: Arduino Board Selection

Then select the type of Arduino wanted in the program, because in this
project the Arduino UNO is used, the Arduino UNO is chosen from the selection
menu shown in Figure 2.5.

8|P age
Chapter Two

Figure 2.5: Arduino Selection

9|P age
Chapter Two

2.3.3 The Code

The code for Arduino is written in C++.Every code needs two type
functions, setup ( ) and loop ( ).

Figure 2.6: Void Functions

The setup ( ) function is ran once at the just after the Arduino is powered
up.in this function we write the pin mode configuration (input or output).

Figure 2.7: Configuring PinMode

10 | P a g e
Chapter Two

The loop ( ) function is ran continuously afterwards. In loop ( ) you can


run the code you want to run over and over again. So, the basic sketch or program
should look like this:

Figure 2.8: Basic Program Sketch

2.3.4 Verification and Uploading


After writing the code, the user must verify the code from the option
shown

Figure 2.9: Vertifying Option

11 | P a g e
Chapter Two

If there is no error, the following message should be displayed.

Figure 2.10: Error Compiling Message

After that connect the Arduino to the computer through USB cable to
upload the program to the Arduino.

Figure 2.11: Arduino Cable

Finally, upload the code to the Arduino by the option upload as shown
below.

Figure 2.11: Uploading Code Option

12 | P a g e
Chapter Three

Chapter 3
Hardware Components

Hardware Components
Chapter Three

13 | P a g e
Chapter Three

3.1 Dimmer

Dimmer is a simple TRIAC AC load dimmer used to control the power of


a resistive load such as lamp or heater element. The max load it can handle is
400VA. Such a circuit is often found on cheap commercial light dimmers and is
proven to work reliable for the rated power.

The circuit is working by controlling the phase of the 220VAC voltage


allowing the load to be powered for less than 360º of the full sine wave. Powering
the load for smaller period than full sine wave delivers less power, so it has a
dimming effect on the load.

Figure 3.1: Dimmer

Control is done through R2 potentiometer which controls the time needed


for the C2 to be charged through R1-R2. C2 is charging until it reaches the
breakdown voltage of DIAC D1 which then fires the TRIAC T1. Once the TRIAC
is contacting the circuit is closed and the load receives power.

14 | P a g e
Chapter Three

The rate which C2 charges determinates the point on 220VAC sine wave
where it reaches the breakdown voltage of DIAC. So, slow C2 charging means
that the DIAC conducts at the end of AC period and fast C2 charging means that
DIAC conducts at the beginning of AC sine.

Note: that C1 and L1 represent as snapper circuit used to prevent the spark of the
TRIAC switching.

Figure 3.2: Dimmer Circuit

15 | P a g e
Chapter Three

Figure 3.3: Dimmer Waveforms

16 | P a g e
Chapter Three

3.2 Motion Detector

This is a circuit which can detect any motion or movement. It's most
common use is to detect a person moving through an area where the motion
detector can sense. For example, the motion detector may be placed near a door,
so that if any person passes through this doorway, the motion detector will be
triggered.

The main electronic component we will use that allows us to pick up this
detection is the PIR motion sensor. The PIR motion sensor is a sensor which
detects movement through picking up infrared waves. Being that a person emits
infrared waves, the detector is able to detect these waves and react, and according
to the how the circuit is designed to react. The sensor can also pick up the
movement of inanimate objects as well, such a rolling ball, because as those
objects move, friction acts on them, generating heat. This heat emits infrared
radiation, which the PIR sensors may be able to detect if great enough. The PIR
motion sensor is, again, a sensor which can detect movement through picking up
infrared radiation. Being that people naturally give off radiation, because of our
generated body heat, the motion can easily detect people walking and moving
through a vicinity within the sensor's range.

The motion sensor has a sensitivity range up to 20 feet (6 meters) and a


110° x 70° detection range, making it a wide lens detection sensor. This means it
can measure 110° vertically (from top to bottom) and 70° horizontally (from left
to right).

17 | P a g e
Chapter Three

The best way to check its sensitivity is when the circuit is built, try moving
around through all of its angles. See at which angles it can detect your movement
and at which angles it is not able to detect your movement, meaning you’re out
of its angle scope. A lot of it is trial and error and experimenting. Once you know
where it can and cannot detect, you can place it in an optimal place where it can
detect in areas where you want it to.

The PIR motion sensor is a 3-pin device. Below is the pin out of this device:

Figure 3.4: Motion Detector

18 | P a g e
Chapter Three

Pin 1 is the pin which receives the positive DC voltage. The PIR motion
sensor needs between 5V-9VDC of power for operation. In our case, we will use
about 6V of power. This can be obtained from switching a DC power supply to
6V or using 4 'AA' batteries connected in series. We will then feed this voltage
into pin 1 of the PIR module. Pin 3 is the negative DC voltage or ground pin of
the device. We connect the negative terminal of the power source to this pin, for
a return path. Pin 2 is the Output pin of the PIR module. This is where the output
of the PIR will leave from. When motion is detected by the PIR, its output will
go high to 3V.

When no motion is detected, its output low and it gives off practically no
voltage. When high you can see then how it can power a load, such as an LED to
light. This way we can know when it has detected motion or not.

Pin 2 is the Output pin of the PIR module. This is where the output of the
PIR will leave from. When motion is detected by the PIR, its output will go high
to 3V. When no motion is detected, its output low and it gives off practically no
voltage. When high you can see then how it can power a load, such as an LED to
light. This way we can know when it has detected motion or not.

Figure 3.5:Schematic Diagram of the Motion


Detector Circuit

19 | P a g e
Chapter Three

3.3 Relay (5V)

A relay is an electrically operated switch. It is mainly used to control higher


voltage circuits with lower voltage. The 'control' and 'controlled' circuits are
electrically isolated from each other.

Since relays are switches, the terminology applied to switches is also


applied to relays; a relay switches one or more poles, each of whose contacts can
be thrown by energizing the coil.

1. Normally-Open (NO): The circuit is disconnected i.e. open when the relay
is inactive.
2. Normally-Closed (NC): The circuit is connected i.e. closed when the relay
is inactive.

Figure 3.6: Relay 5V

20 | P a g e
Chapter Three

As shown Figure 3.7, in normally case (no voltage applied to relay) pin 3
is connect to pin 2 and pin 6 is connect to pin 7.

When a voltage (5V) applied to the relay then pin 3 is connect to pin 4
and pin 6 is connect to pin 5.

Figure 3.7: Relay 5V Operation

21 | P a g e
Chapter Three

Features
Very Compact Size
Contact Capacity to 2A
Low Power Consumption Coil

Specifications

Coil Data
Coil Power: 200mW
Nominal Voltage: 5Vdc
Pick-Up Voltage: 3.75Vdc
Drop-Out Voltage: 0.5Vdc
Maximum Voltage: 10.0Vdc
Coil Resistance: 125ohm

Contact Data
Contact Rating: 1A 125Vac / 2A 30Vdc
Maximum Switching Voltage: 250Vac / 220Vdc
Maximum Switching Current: 2 A
Maximum Switching Power: 125VA / 60W

Figure 3.8: Relay 5V Dimensions

22 | P a g e
Chapter Three

3.4 LDR (Light Dependent Resistance)

A Light Dependent Resistor (LDR) or a photo resistor is a device whose


resistivity is a function of the incident electromagnetic radiation. Hence, they are
light sensitive devices.

Figure 3.9: LDR

They are also called as photo conductors, photo conductive cells or simply
photo cells. They are made up of semiconductor materials having high resistance.
There are many different symbols used to indicate a LDR, one of the most
commonly used symbol is shown in the figure below. The arrow indicates light
falling on it.

Figure 3.10: LDR Symbol


22

23 | P a g e
Chapter Three

3.4.1 Principle Working of LDR

A light dependent resistor works on the principle of photo conductivity.


Photo conductivity is an optical phenomenon in which the materials conductivity
is increased when light is absorbed by the material. When light falls i.e. when the
photons fall on the device, the electrons in the valence band of the semiconductor
material are excited to the conduction band. These photons in the incident light
should have energy greater than the band gap of the semiconductor material to
make the electrons jump from the valence band to the conduction band. Hence
when light having enough energy strikes on the device, more and more electrons
are excited to the conduction band which results in large number of charge
carriers. The result of this process is more and more current starts flowing through
the device when the circuit is closed and hence it is said that the resistance of the
device has been decreased.

Characteristics of LDR

LDR’s are light dependent devices whose resistance is decreased when


light falls on them and that is increased in the dark. When a light dependent
resistor is kept in dark, its resistance is very high. This resistance is called as dark
resistance. It can be as high as 1012 Ω and if the device is allowed to absorb light
its resistance will be decreased drastically. If a constant voltage is applied to it
and intensity of light is increased the current starts increasing. Figure 3.11 shows
resistance vs. illumination curve for a particular LDR.

24 | P a g e
Chapter Three

Figure 3.11: LDR Charachteristics

Photocells or LDR’s are nonlinear devices. There sensitivity varies with


the wavelength of light incident on them. Some photocells might not at all
response to a certain range of wavelengths. Based on the material used different
cells have different spectral response curves.

When light is incident on a photocell it usually takes about 8 to 12ms for


the change in resistance to take place, while it takes one or more seconds for the
resistance to rise back again to its initial value after removal of light. This
phenomenon is called as resistance recovery rate.

25 | P a g e
Chapter Four

Chapter 4
Project Implementation

Project Implementation
Chapter Four

26 | P a g e
Chapter Four

4.1 Components Connection

1. Connect the dimmer in series with bulb


2. Connect one side of relay to the dimmer as shown below

3. Connect the other side of relay to power source (AC 220 volte) so the
relay will be in series with the dimmer and the bulb as shown below.

27 | P a g e
Chapter Four

4. Connect anther relay in parallel with the dimmer as shown below.

5. Connect the pin controller of the each relay to Arduino micro controller
as shown below.

28 | P a g e
Chapter Four

6. Connect the motion detection sensor to the Arduino as shown below.

7. Put the motion detection sensor near each bulb as shown below.

29 | P a g e
Chapter Four

8. Connect one side of the LDR sensor to voltage source (DC 5V from
Arduino) and connect the other side to resistor (56K ohms) and connect the
resistor to ground and then connect the common terminal to the Arduino as
shown below.

Note: Make sure that the LDR is in proper place so it can sensitize the light.

30 | P a g e
Chapter Four

9. Connect transformer (220V AC to 9V DC) to the power supply and then


connect it to the Arduino as shown below.

In this way the entire project will need only one power source (220V AC)
and not need any other source like battery.

10. Repeat the connection for each bulb.

31 | P a g e
Chapter Four

11. Program this code to the Arduino (note that this code is used for three bulbs
only)

void setup() {

pinMode(3,INPUT); // LDR input signal

pinMode(4,OUTPUT); // Output to the series relays

pinMode(5,INPUT); // input from the first motion detection

pinMode(6,OUTPUT); // output to the first parallel relay

pinMode(7,INPUT); // input from the second motion detection

pinMode(8,OUTPUT); // output to the second parallel relay

pinMode(9,INPUT); // input from the third motion detection

pinMode(10,OUTPUT); // output to the third parallel relay

void loop() {

if(digitalRead(3)==LOW) // Night-time

digitalWrite(4,LOW); // the series relays will operat

if(digitalRead(5)==LOW) // no motion near the first bulb

digitalWrite(6,HIGH); // dim brightness for the first bulb

if(digitalRead(5)==HIGH) // motion near the first bulb

32 | P a g e
Chapter Four

digitalWrite(6,LOW); // full brightness for the first bulb

if(digitalRead(7)==LOW) // no motion near the second bulb

digitalWrite(8,HIGH); // dim brightness for the second bulb

if(digitalRead(7)==HIGH) // motion near the second bulb

digitalWrite(8,LOW); // full brightness for the second bulb

if(digitalRead(9)==LOW) // no motion near the third bulb

digitalWrite(10,HIGH); // dim brightness for the third bulb

if(digitalRead(9)==HIGH) // motion near the third bulb

digitalWrite(10,LOW); // full brightness for the third bulb

if(digitalRead(3)==HIGH) // Morning-time

digitalWrite(4,HIGH); //no current will flow to the all bulbs

33 | P a g e
Chapter Four

12. All connection is done and the project is ready to be use.

34 | P a g e
Chapter Four

4.2 Principle of operation

After making all connection the project is ready to operate. If there is light
(morning-time) the LDR sensor will send signal to the arduion and then the
Arduino will send signal to the series relay to open the circuit so no current will
flow to the bulb (the series relay will behave as circuit breaker ).

If there is no light (night-time) the Arduino will send signal to the series relay to
close the circuit and then the current will flow to the bulb. In the other way if
there is no motion near the bulb the Arduino will send signal to the parallel relay
to inter the dimmer to the circuit and then the voltage on the bulb will reduce and
the bulb will get dim. If there is motion near the bulb the motion sensor will send
signal to the Arduino and then the Arduino will send signal to the parallel relay
to make short circuit on the dimmer and make it out of the circuit so the all voltage
will be on the bulb and the bulb will operate in full brightness.

35 | P a g e
Chapter Five

Chapter 5
Conclusion

Conclusion
Chapter Five

36 | P a g e
Chapter Five

5.1 Conclusion

The use of power electronics is increasing exponentially across various


sectors of human life. The components used in the project, like Arduino, relays
and sensors, are slowly becoming an indispensable part of our daily routines. So,
it is only fitting that we use them to improve efficiency in every walk of life.
Keeping in mind the urgent need for energy conservation, SSLS (Smart Street
Light System) is an excellent and effective solution. It combines safe lighting
protocols with consumption of minimal amount of power. The energy savings, as
discussed before, are phenomenal. The future scope of this project expands into
speed detection and customizable area of illumination.

An additional component which would lead to better functioning of the


concept would be the use of LED bulbs. Despite their high initial costs, they are
a viable option as they drastically reduce the power consumption. They will aid
in further saving of energy and reduction in operational costs.

37 | P a g e

You might also like