Smart Street Light Monitoring System 2021 - 2022
CONTENTS
ABSTRACT...........................................................................................................................1-1
INTRODUCTION
1.1 OVERVIEW....................................................................................................................4-5
1.2 PROBLEM STATEMENT............................................................................................5-5
1.3 OBJECTIVE....................................................................................................................5-5
1.4 SCOPE OF THE PROJECT..........................................................................................5-5
LITERATURE SURVEY....................................................................................................6-6
2.1 RELATED WORK........................................................................................................6-6
METHODOLOGY
3.1 SYSTEM REQUIREMENTS......................................................................................7-7
3.1.1 HARDWARE REQUIREMENTS............................................................................7-7
3.1.2 SOFTWARE REQUIREMENTS.............................................................................7-7
3.1.1.1 ESP8266 NodeMCU.................................................................................................8-8
3.1.1.2 IR SENSOR.............................................................................................................8-8
3.1.1.3 LDR SENSOR.........................................................................................................9-9
3.1.1.4 JIMPER WIRES.....................................................................................................9-9
3.1.1.5 BREAD BOARD.....................................................................................................10-10
3.1.2.1 ARDUINO IDE........................................................................................................10-11
3.1.2.2 THINGSPEAK........................................................................................................11-11
3.2 WORKING PRINCIPLE.............................................................................................11-11
DESIGN DETAILS
INSTALLING THINGSPEAK LIBRARY IN ARDUINO IDE........................................13-13
UPLOADING SAMRT STREET LIGHT DATA ON THINGSPEAK.............................13-14
Department of Testing and Programming,Contriver 1|Page
2021 - 2022
TESTING............................................................................................................................16-17
CHAPTER 6
CONCLUSION..................................................................................................................18-18
CHAPTER 7
SCOPE OF THE FUTURE WORK................................................................................18-18
REFERENCES....................................................................................................................19-19
ANNEXURES......................................................................................................................20-23
DETAILED VIEW PHOTOS............................................................................................24-24
LIST OF FIGURES
FIGURE 3.1 NODEMCU ESP8266........................................................................................8
FIGURE 3.2 IR SENSOR........................................................................................................9
FIGURE 3.3 LDR SENSOR....................................................................................................9
FIGURE 3.4 JUMPER WIRES..............................................................................................10
FIGURE 3.5 BREAD BOARD................................................................................................10
FIGURE 4.1 CIRCUIT DIAGRAM........................................................................................12
FIGURE 5.1 PROJECT SETUP.............................................................................................16
FIGURE 5.2 THINGSPEAK OUTPUT..................................................................................17
DETAILVIEW PHOTOS.........................................................................................................24
Department of Testing and Programming,Contriver 2|Page
Smart Street Light Monitoring System 2021 - 2022
ACKNOWLEDGMENT
Most of the places have automatic street light which can sense the daytime and night
time, and automatically turns on and off according the night and day. Here we are extending this
project by adding one more constraint to turn on the light that is Street light will only glow if
there is darkness and someone is passing through the street. The main objective of this project is
to reduce the power consumption by glowing the Street light only when it is needed. In this
project we are demonstrating the prototype of the Smart Street Light with 3 IR sensors, 1 LDR
sensor and 3 LEDs
- each representing one street light. We will also update the LDR sensor data to the ThingSpeak
and control the LEDs (Street lights) over the internet from anywhere in the world. Currently,
in the whole world, enormous electric energy is consumed by the street lights, which are
automatically turn on when it becomes dark and automatically turn off when it becomes bright.
This is the huge waste of energy in the whole world and should be changed. This paper discusses
a smart street light system, whose concept is proposed by Fujii et al. The main aim of smart street
light systems is that lights turn on when needed and light turn off when not needed. Moreover,
the smart street light system in this paper behaves like usual street lights that turn on all night.
The ideal behavior of the smart street light system is that no one finds turn-off of street lights at
night. Whenever someone see street lights, they turn on and whenever no one see street lights,
they turn off. The smart street light system consists of LED lights, brightness sensors, motion
sensors and short-distance communication networks. The lights turn on before pedestrians and
vehicles come and turn off or reduce brightness when there is no one. It will be difficult for
pedestrians and drivers of vehicles to distinguish our smart street lights and the conventional
street lights because our street lights all turn on before they come.
Department of Testing and Programming,Contriver 3|Page
INTRODUCTION
1.1 Overview
The street lighting is one of the largest energy expenses for a city. An intelligent street
lighting system can cut municipal street lighting costs as much as 50% - 70%.The present
system is like the lights will be switched on in the evening before the sun sets and they are
switched off the next day morning after there is sufficient light on the outside[1]. But the
actual timing for these lights to be switched on are when there is absolute darkness. With
this, the power will be wasted up to some extent. In sunny and rainy days, ON and OFF
time differ discernibly which is one of the significant hindrances of the present street lights
systems. Also the manual operation of the lighting system is completely eliminated. The
energy consumption in entire world is increasing at the fastest rates due to population
growth and economic development and the availability of energy sources remains woefully
constrained. Resource augmentation and growth in energy supply has not kept pace with
increasing demand and, therefore, continues to face serious energy shortages. 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. The main aim of the project is to provide an
“IoT based Automatic Street Lightning System” powered with solar energy during night
time. We use the word “smart” because the system not only provide power to the street
lights but also helps in detecting the direction of movement of the pedestrian and helps him
by means of illuminating the path of movement till the near next street light. By integrating
the entire street lights with Smart street light system it is possible to systematically help the
pedestrian to reach the destination in the remote rural areas which are facing serious electric
power supply problem. The same system can also be used in metropolitan cities as well. 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.
4|Page
This
5|Page
would save a lot of energy and also reduce cost of operation of the streetlights. We can
check the status of street light on internet using IOT (Internet of things) from anywhere in
real time and solve the issues if happen during the processing.
1.2 PROBLEM STATEMENT
Statement 1 : Street lights are on in the presence of sun light.
Statement 2 : Street lights are on in the absence of any vehicle and pedestrian.
1.3 OBJECTIVE
The main objective of this project is to implement an IoT based Automatic Street Lightning
System. As the traffic decreases slowly during late-night hours, the intensity gets reduced
progressively till morning to save energy and thus, the street lights switch on at the dusk
and then switch off at the dawn, automatically. The process repeats every day.
1.4 SCOPE OF THE PROJECT
Smart street light system tries to find solution for the faster depletion of energy resources
due to the inefficient usage and wastage of these resources. Increasing electricity bill is
something that can be witnessed by these practices. This project help to decrease the wastage
of electricity by controlling the working of street light system that attributes to a good
amount of electricity bills in our nation This project does not include methods to incorporate
usage of renewable resources like solar energy.
6|Page
LITERATURE SURVEY
A literature review is a survey of scholarly sources on a specific topic. It provides an
overview of current knowledge, allowing you to identify relevant theories, methods and gaps in
the existing research.
2.1 RELATED WORK
1 . S.Suganya et al have proposed about Street Light Glow on detecting vehicle movement
using sensor isa system that utilizes the latest technology for sources of light as LED lamps. It is
also used to control the switching of street light automatically according to the light intensity to
develop flow based dynamic control statistics using infrared detection technology and maintain
wireless communication among lamppost and control terminal using ZigBee Wireless
protocol. It also combines various technologies: a timer, a statistics of traffic flow magnitude,
photodiodes, LED, power transistors.
2 . K.Santha et al have surveyed on Street Lighting System Based on Vehicle Movements. The
system operates in the automatic mode which regulates the streetlight according to brightness
and dimness algorithm and light intensity. The control can be made according to the seasonal
variation. It includes a time cut-out function and an automatic control pattern for conserving
more electricity. The whole project was implemented using a PIC microcontroller.
3 . Proposed a ZigBee based Remote Control Automatic Street Light System. The system is
designed with the help of ZigBee modules that helps in detecting the faulty lights and control
the light. It also discusses about an intelligent system that takes automatic decisions for
ON/OFF/DIMMING considering the vehicle movement or pedestrian and also the surrounding
environment. PIR motion sensor is used to detect movement of both living and non-living
things.
4 . C.Bhuvaneshwari et al have analysed the street light with auto tracking system by which one
can increase the conversion efficiency of the solar power generation. Here, the sun tracking
sensor is the sensing device which senses the position of the sun time to time and gives the
output to the amplifier based on light density of the sun. Sun tracking sensor is LDR, amplifier
unit is used to amplify the LDR signals which converts low level signals to high level signals
and the output is given to comparator. The LM324 IC is used as an amplifier. Comparator
compares the signals and gives the command to AT89C51 microcontroller.
Department of Testing and Programming,Contriver 7|Page
Smart Street Light Monitoring System 2021 - 2022
METHODOLOGY
A system requirement specification (SRS) is a specification for a software system which
gives the complete behavioral description of the system to be developed. It is comprised of ussd
cases which describes all the interactions of the user with the software. Along with the used
cases, it also contains functional and non-functional requirements.
3.1 SYSTEM REQUIREMENTS
3.1.1 HARDWARE REQUIREMENTS
ESP8266 Node MCU
LEDs
Jumper wires
IR Sensors
LDR Sensors
Bread board
3.1.2 SOFTWARE REQUIREMENTS
Arduino IDE
Thing Speak
Department of Testing and Programming,Contriver 8|Page
Smart Street Light Monitoring System 2021 - 2022
3.1.1.1 ESP8266 NodeMCU
ESP8266 NodeMCU is an open source IoT platform. It includes firmware which runs on
the low cost Wi-Fi enabled ESP8266 Wi-Fi SoC from Espressif Systems, and hardware which is
based on the ESP-12 module. It has GPIO, SPI, I2C, ADC, PWM AND UART pins for
communication and controlling other peripherals attached to it. On board NodeMCU has
CP2102 IC which provides USB to TTL functionality.
Fig 3.1: NodeMCU ESP8266
3.1.1.2 IR Sensor
IR sensor is an electronic device which is used to detect objects by sensing infrared
radiations reflected from the objects. It mainly consists of a transmitter IR LED and a receiver
photodiode. It detects infrared radiations which have wavelength from 700nm to 1mm. When a
specific positive voltage is applied across the transmitter LED it transmits the IR rays. If these
rays fall on some object then that object reflects back the IR rays which are received by the
receiver photodiode. The receiver diode generates a voltage across its terminals which depend on
the intensity of light reflected by the object. Generally IR receiver LED is darker (black) whereas
transmitter is transparent in color.
Department of Testing and Programming,Contriver 9|Page
Smart Street Light Monitoring System 2021 - 2022
Fig 3.2: IR Sensor
3.1.1.3 LDR Sensor
LDR stands for Light Dependent Resistor also known as photo-resistor. LDR is sensitive
to light and its resistance changes according to the intensity of light falling on it. It is made up
of high resistance semiconductor and its resistance increases in darkness and decreases in light.
When light incident on the LDR exceeds some threshold, it absorbs the photons and allows
electrons to jump into the conduction band. LDR generates a variable resistance which depends
on the intensity of light falling on it. It is mainly used in electric circuits like street light, alarm
clock, automatic brightness and contrast control etc.
Fig 3.3: LDR
3.1.1.4 jumper wires
A jump wire is an electrical wire, or group of them in a cable, with a connector or pin at
each end which is normally used to interconnect the components of a breadboard or other
prototype or test circuit, internally or with other equipment or components, without soldering.
Individual jump wires are fitted by inserting their "end connectors" into the slots provided in a
breadboard, the header connector of a circuit board, or a piece of test equipment.
Department of Testing and Programming,Contriver 10 | P a g e
Smart Street Light Monitoring System 2021 - 2022
Fig 3.4: jumper wires
3.1.1.5 BREAD BOARD
A breadboard, or protoboard, is a construction base for prototyping of electronics.
Originally the word referred to a literal bread board, a polished piece of wood used when slicing
bread.[1] In the 1970s the solderless breadboard (a.k.a. plugboard, a terminal array board) became
available and nowadays the term "breadboard" is commonly used to refer to these.
Fig 3.5 : Bread Board
3.1.2.1 Arduino IDE
The Arduino Integrated Development Environment (IDE) is a cross-platform application
(for Windows, macOS, Linux) that is written in functions from C and C++. It is used to write and
upload programs to Arduino compatible boards, but also, with the help of third-party cores, other
vendor development boards. The source code for the IDE is released under the GNU General
Public License, version 2. The Arduino IDE supports the languages C and C++ using special
rules of code structuring. The Arduino IDE supplies a software library from the Wiring project,
which provides many common input and output procedures. User-written code only requires two
basic functions, for starting the sketch and the main program loop, that are compiled and linked
with a
Department of Testing and Programming,Contriver 11 | P a g e
Smart Street Light Monitoring System 2021 - 2022
program stub main() into an executable cyclic executive program with the GNU toolchain, also
included with the IDE distribution.
3.1.2.2 Thingspeak
ThingSpeak is a cloud based data platform which is used to send and receive the data in
real time using HTTP protocol. It is used in Iot applicaiotn to store and monitor the data from
anywhere in the world over internet. Here are some Iot projects where ThingSpeak is used as an
IoT cloud:
IoT Wireless Weather Station using Arduino, ESP8266 and ThingSpeak
IoT Based Temperature and Humidity Monitoring over ThingSpeak using Arduino UNO
and ESP8266
IoT Based Raspberry Pi Weather Station using DHT11 and BMP180 Sensor
IoT Based Temperature and Humidity Monitoring using ThingSpeak and ESP8266
3.2 WORKING PRINCIPLE
The present system employs power delivery via a single phase line to the streetlight. The
proposed system involves five more components to regulate the power delivery.An
Infra -Red Proximity Sensor at the base of the street light detects presence in a small area
around the street light. The data from the sensor is sent to the Arduino which forms brain of the
circuit. The Arduino then commands to switch between dim and bright modes depending upon
the requirement and thus controls the brightness of the street light. A battery eliminator, also
powered by the single phase line, is used to supply 5V inputs to the sensors and Arduino.
Department of Testing and Programming,Contriver 12 | P a g e
Smart Street Light Monitoring System 2021 - 2022
CHAPTER 4
DESIGN DETAILS
Fig 4.1: circuit diagram
This circuit mainly consists ESP8266, LDR sensor, IR sensors and LEDs.
Here the LDR sensor is used to detect whether it is daytime or night time. Since LDR
sensor generates variable resistance based on the amount of light falling on it, it has to be
connected like a potentiometer. One end of the LDR sensor is connected to 5V and other end is
connected to fixed resistance which is further connected to ground. Node MCU has one ADC pin
(A0) which is connected to point between fixed resistance and one end of the LDR sensor as
shown in the circuit diagram. Since the LDR sensor gives variable resistance therefore variable
voltage will be generated at A0 according to the amount of light falling on LDR.
IR sensors are used to detect if someone is crossing the street or not. It detects the
obstacle or motion in the surrounding. The transmitter will transmit IR rays which will be
reflected back if it falls on some object like person, animal, vehicles, etc. The reflected ray will
be received by receiver diode and hence will confirm the presence of object and the
corresponding LED will be glowed. This method will save significant amount of electricity as the
street light will only turns on if there is someone present in the Street. IR sensor has 3 pins, two
of which are VCC and ground and one is output pin. The output of IR sensor gets high if detects
presence of some object. This pin is connected to GPIO pin of NodeMCU so whenever the IR
sensor detects someone passing through the street it triggers the Street light. In our case one LED
Department of Testing and Programming,Contriver 13 | P a g e
Smart Street Light Monitoring System 2021 - 2022
will be turned on.
Department of Testing and Programming,Contriver 14 | P a g e
Smart Street Light Monitoring System 2021 - 2022
Installing ThingSpeak library in Arduino IDE
Open Arduino IDE and Go to Sketch -> Include Library -> Manage Libraries.
Now search for ThingSpeak in library manager and install ThingSpeak library by MathWorks.
Uploading Smart Street Light data on ThingSpeak
Department of Testing and Programming,Contriver 15 | P a g e
Smart Street Light Monitoring System 2021 - 2022
Now Click on New Channel and then give some name to your channel and then fill the fields as
shown below. Field 1 is for LDR sensor data, Field 2 to Field 4 are for IR sensors, Field 5 to
Field 7 are for LEDS. After filling the details scroll down and click on “Save Channel”.
Your channel will be created and now you will be able to see field charts. Now Click
on API Keys and copy channel id, read and write API keys and paste them in the Arduino
code
given at the end of the tutorial. Now upload the Arduino code to the Node MCU. On successfully
uploading, test your project by putting objects in front of IR sensors. You will be able to see the
change in the ThingSpeak charts for every change in values of LDR, ir sensors and LEDs.
Controlling the Street Light from anywhere using ThingSpeak
Now we have to control the LEDs over the internet using ThingSpeak. Click on Sharing
and select the “Share channel view with everyone” radio button.
Department of Testing and Programming,Contriver 16 | P a g e
Smart Street Light Monitoring System 2021 - 2022
Now go to API keys and copy the URL given in “Update a Channel Feed”. We have to edit this
URL to change the status of LED.
Here we are setting field 5, field 6 and field 7 as 1 to turn on the LEDs. Copy this URL
and paste it in a new tab. It will turn on the LEDs with some delay time. You can observe the
change in field charts.
Department of Testing and Programming,Contriver 17 | P a g e
Smart Street Light Monitoring System 2021 - 2022
CHAPTER 5
TESTING
Fig 5.1: project setup
Department of Testing and Programming,Contriver 18 | P a g e
Smart Street Light Monitoring System 2021 - 2022
Fig 5.2: Thingspeek output
Department of Testing and Programming,Contriver 19 | P a g e
Smart Street Light Monitoring System 2021 - 2022
CHAPTER 6
CONCLUSION
Using this smart project, we can also estimate the speed of the vehicle, recognizing the number
plate, recognizing the accidents took place on roads etc. This Smart Street light project not only
helps in rural areas but also beneficial in urban areas too.
As we are moving towards more advancement we require more power so use of renewable
resources is useful and advantageous. With this project, we can even add smart parking of
vehicle and it is even useful for driverless cars.
CHAPTER 7
SCOPE OF FUTURE WORK
With the advances in technology and good resource planning the cost of the project can be cut
down and also with the use of good equipment the maintenance can also be reduced in terms of
periodic checks. The LEDs have long life, emit cool light, donor have any toxic material and
can be used for fast switching. For these reasons our project presents far more advantages which
can over shadow the present limitations. Keeping in view the long term benefits and the initial
cost would never be a problem as the investment return time is very less. The project has scope
in various other applications like for providing lighting in industries, campuses and parking
lots of huge shopping malls. This can also be used for surveillance in corporate campuses and
industries.
This project “IoT Based Smart Intelligent Lighting System for Smart City “ is a cost effective
, practical, eco-friendly and the safest way to save energy and this system the light status
information can be accessed from anytime and anywhere. It clearly tackles the two problems
that world is facing today, saving of energy and also disposal of incandescent lamps, very
efficiently.
Department of Testing and Programming,Contriver 20 | P a g e
Smart Street Light Monitoring System 2021 - 2022
REFERENCES
[1]. S. Suganya, R. Sinduja, T. Sowmiya& S. Senthilkumar, Street light glow on
detecting vehicle movement using sensor.
[2]. K.Santha Sheela,S.Padmadevi, Survey on Street Lighting System Based On
Vehicle Movements.
[3]. Srikanth M, Sudhakar K N,ZigBee Based Remote Control Automatic Street Light System.
[4]. M.Abhishek, Syed ajram shah, K.Chetan, K,Arun Kumar, Design and implementationof
traffic flow based street light control system with effective utilization of solar energy,
International journal of Science Engineering and Advance Technology, IJSEAT, Vol 3,
Issue 9, September – 2015.
Department of Testing and Programming,Contriver 21 | P a g e
Smart Street Light Monitoring System 2021 - 2022
ANNEXURES
#include <ESP8266WiFi.h>;
#include <WiFiClient.h>;
#include <ThingSpeak.h>;
const char* ssid = "CircuitLoop";
const char* password = "circuitdigest101";
WiFiClient client;
unsigned long myChannelNumber = 795820;
const char * myWriteAPIKey = "FZTOUARV558GRZ8J";
const char * myReadAPIKey = "T52GT3QQOQBVPG4V";
int led_1;
int led_2;
int led_3;
int ir1 = D0;
int led1 = D5;
int ir2 = D1;
int led2 = D6;
int ir3 = D2;
int led3 = D7;
int ldr = A0;
int val =0;
void setup() {
Serial.begin(9600);
delay(10);
pinMode(ir1,INPUT);
pinMode(led1,OUTPUT);
pinMode(ir2,INPUT);
pinMode(led2,OUTPUT);
Department of Testing and Programming,Contriver 22 | P a g e
Smart Street Light Monitoring System 2021 - 2022
pinMode(ir3,INPUT);
pinMode(led3,OUTPUT);
WiFi.begin(ssid, password);
ThingSpeak.begin(client);
}
void loop() {
int s1 = digitalRead(ir1);
int s2 = digitalRead(ir2);
int s3 = digitalRead(ir3);
s3 = not(s3);
val = analogRead(ldr);
Serial.print(s1);
Serial.print(":");
Serial.print(s2);
Serial.print(":");
Serial.print(s3);
Serial.print(" ");
Serial.println(val);
if(val<800)
{
if(s1==0)
{
digitalWrite(led1,LOW);
}
else
{
digitalWrite(led1,HIGH);
}
if(s2==0)
{
digitalWrite(led2,LOW);
}
else
{
Department of Testing and Programming,Contriver 23 | P a g e
Smart Street Light Monitoring System 2021 - 2022
digitalWrite(led2,HIGH);
}
if(s3==0)
{
digitalWrite(led3,LOW);
}
else
{
digitalWrite(led3,HIGH);
}
}
else
{
digitalWrite(led1,LOW);
digitalWrite(led2,LOW);
digitalWrite(led3,LOW);
}
ThingSpeak.writeField(myChannelNumber, 1,val, myWriteAPIKey);
ThingSpeak.writeField(myChannelNumber, 2,s1, myWriteAPIKey);
ThingSpeak.writeField(myChannelNumber, 3,s2, myWriteAPIKey);
ThingSpeak.writeField(myChannelNumber, 4,s3, myWriteAPIKey);
ThingSpeak.writeField(myChannelNumber, 5,led1, myWriteAPIKey);
ThingSpeak.writeField(myChannelNumber, 6,led2, myWriteAPIKey);
ThingSpeak.writeField(myChannelNumber, 7,led3, myWriteAPIKey);
led_1 = ThingSpeak.readIntField(myChannelNumber, 5, myReadAPIKey);
led_2 = ThingSpeak.readIntField(myChannelNumber, 6, myReadAPIKey);
led_3 = ThingSpeak.readIntField(myChannelNumber, 7, myReadAPIKey);
if(led_1==1)
{
digitalWrite(led1,HIGH);
}
else
{
Department of Testing and Programming,Contriver 24 | P a g e
Smart Street Light Monitoring System 2021 - 2022
digitalWrite(led1,LOW);
}
if(led_2==1)
{
digitalWrite(led2,HIGH);
}
else
{
digitalWrite(led2,LOW);
}
if(led_3==1)
{
digitalWrite(led3,HIGH);
}
else
{
digitalWrite(led3,LOW);
}
}
Department of Testing and Programming,Contriver 25 | P a g e
Smart Street Light Monitoring System 2021 - 2022
DETAILED VIEW PHOTOS
Department of Testing and Programming,Contriver 26 | P a g e