0% found this document useful (0 votes)
19 views19 pages

Iot-Based Smart Street Light System: Department of Electronics and Communication Engineering

Internet of things project
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views19 pages

Iot-Based Smart Street Light System: Department of Electronics and Communication Engineering

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

IoT-Based Smart Street Light System

DEPARTMENT OF ELECTRONICS AND COMMUNICATION


ENGINEERING

SUBMITTED BY,
R.Muthubalan,
713622106031,
ECE DEPT
GUIDED BY
M.MANORANJANI
ABSTRACT:
An IoT-Based Smart Street Light System aims to optimize energy consumption and
enhance urban lighting management. This system leverages sensors, microcontrollers, and IoT
technology to automatically control streetlights based on environmental conditions, such as
ambient light levels and pedestrian or vehicle movement. By using motion sensors, streetlights
can switch on or dim depending on activity, thereby reducing unnecessary power usage. The
system can be monitored and managed remotely, enabling real-time data analysis and fault
detection. Overall, this approach increases energy efficiency, reduces costs, and contributes to
sustainable urban development.
METHODOLOGY:

 System Design: The system includes LED streetlights, microcontrollers (such as Arduino
or ESP8266), motion sensors, light sensors (LDRs), and communication modules. Each
streetlight is equipped with a sensor module to detect ambient light and movement in its
vicinity.
 Sensor Integration: Motion sensors detect pedestrian or vehicle movement, and light
sensors monitor ambient light levels. When movement is detected, the system turns on the
streetlight, and in the absence of motion, the lights remain dimmed or off during daylight.
 Data Transmission: Using wireless communication protocols like Wi-Fi or Zigbee, data
collected from sensors is transmitted to a central server, allowing real-time monitoring and
control.
 Control System: The microcontroller processes sensor data and activates the streetlight
only when necessary, adjusting brightness based on detected activity and light levels.
 Remote Monitoring and Control: Through an IoT platform or cloud-based interface, city
officials can monitor the streetlights, analyze energy usage data, detect faults, and adjust
settings as needed.

HARDWARE ARCHITECTURE:
1.Light dependent resistor (LDR) :
A Light dependent resistor (LDR) also termed as a photoresistor is adevice
whose resistivity factor is a function of the electromagnetic radiation. Hence, they are
light sensitive devices which are similar to that of human eyes. They are also named as
photoconductors, conductive cells or simply photocells. They are made up of
semiconductor materials with high resistance A LDR works on the principle of photo
conductivity. Photo conductivity is an optical phenomenon in which the materials
conductivity gets reduced when light is actually absorbed by the material. However,
when light shines onto the LDR its resistance falls and current flows into the base of the
first transistor and then the second transistor. The pre set resistor can be turned up or
down to increase or decrease resistance, in this way it can make the circuit more or less
sensitive. LDR send response to Arduino.

LDR SENSOR
LIGHT DETECTION USING LDR AND ARDIUNO
2.IR Sensor:
An infrared sensor is an electronic instrument that is used to sense certain
characteristics of its surroundings by either emitting and/or detecting infrared radiation. It is
also capable of measuring heat of an object and detecting motion. Infrared waves are not
visible to the human eye. In the electromagnetic spectrum, infrared radiation is the region
having wavelengths longer than visible light wavelengths, but shorter than microwaves. The
infrared region is approximately demarcated from 0.75 to 1000µm. IR (infrared)sensors
detect infrared light. The IR light is transformed into an electric current, and this is detected
by a voltage or amperage detector. IR Sensorsends response to arduino.

 2.LED:
 Alight-emitting diode (LED) is a junction diode, which emits light when activated.
When we apply voltage across its leads, electrons are able torecombine with holes
within the LED, releasing energy in the form of photonswhich gives the light.
Hence, it is a two-lead semiconductor light source.
 Light emitting diodes represents our lighting system and the amount of light
emitted by it is directly related to the amount of light in the environment that is
when outside light is less than the light given by LEDS is at its full intensity and
visa-versa.
o

4.ESP8266:
ESP8266 is Wi-Fi enabled system on chip (SoC) module developedby Espressif system. It is
mostly used for development of IoT (Internet of Things) embedded applications.
ESP8266 comes with capabilities of
 2.4 GHz Wi-Fi (802.11 b/g/n, supporting WPA/WPA2)
 General purpose input/output (16 GPIO)
 Inter-itegrated circuit (I²C) serial communication protocol
 Analog-to-digital conversion (10-bit ADC)
 Serial peripheral interface (SPI) serial communication protocol
 I²S (inter-IC sound) interfaces with DMA (direct memory access) (sharing pins with GPIO)
 UART (on dedicated pins, plus a transmit-only UART can be enabled on GPIO2)
 Pulse-width modulation (PWM)
 It employs a 32-bit RISC CPU based on the Tensilica Xtensa L106 running at 80 MHz
(oroverclocked to 160 MHz). It has a 64 KB boot ROM, 64 KB instructionRAM and 96 KB data
RAM. External flash memory can be accessed through SPI.
 ESP8266 module is low cost standalone wireless transceiver that can be used forend-point
IoT developments.
 To communicate with the ESP8266 module, microcontroller needs to use set of AT
commands. Microcontroller communicates with ESP8266-01 module using UART having
specified Baud rate.
 There are many third-party manufacturers that produce different modules based on this chip.
So, the module comes with different pin availability options like:
 ESP-01 comes with 8 pins (2 GPIO pins) – PCB trace antenna. (shown in above figure)
 ESP-02 comes with 8 pins, (3 GPIO pins) – U-FL antenna connector.
 ESP-03 comes with 14 pins, (7 GPIO pins) – Ceramic antenna.
 ESP-04 comes with 14 pins, (7 GPIO pins) – No ant.
etc.
ESP8266-01 Module Pin Description:
3V3: - 3.3 V Power Pin.
GND: - Ground Pin.
RST: - Active Low Reset Pin.
EN: - Active High Enable Pin.
TX: - Serial Transmit Pin of UART.
RX: - Serial Receive Pin of UART.
Schematics:

Code:
int smooth;
int LDR;
int threshold = 40;//sun's intensity
int brightness = 0;
int ledState = 0;
int sensor1 = 11;
int sensor2 = 8;
int sensor3 = 9;
int led1=5;
int led = 6;
int led2=2;
int carPresent = 0;
int carPresent1 = 0;

float beta = 0.65;


void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
pinMode(sensor1, INPUT);
pinMode(sensor2, INPUT);
pinMode(sensor3, INPUT);
pinMode(led,OUTPUT);
pinMode(led1,OUTPUT);
pinMode(led2,OUTPUT);
}
void loop() {
smooth = smooth - (beta * (smooth - analogRead(A0)));
delay(1);
LDR = round(((float)smooth / 1023) * 100);
if (LDR <= 40)
brightness=0;
else
{
brightness = map(LDR, 40, 100, 0, 255);
}
checkSensors();
if (carPresent == 1)
{
ledState = 1;
digitalWrite(led,HIGH);
digitalWrite(led1,HIGH);
analogWrite(led,brightness);
analogWrite(led1,brightness);
}
else if (carPresent == 0)
{
ledState = 0;
digitalWrite(led,HIGH);
//digitalWrite(led1,HIGH);
analogWrite(led,ledState);
//analogWrite(led1,ledState);
if(carPresent1 == 1)
{
ledState = 1;
if(ledState == 1)
{
analogWrite(led1,brightness);
analogWrite(led2,brightness);
}
}
else if (carPresent1 == 0)
{
ledState = 0;
digitalWrite(led1,HIGH);
digitalWrite(led2,HIGH);
analogWrite(led1,ledState);
analogWrite(led2,ledState);
}
}
String data = (String)ledState+","+(String)brightness+";";
Serial.print(data);
// Serial.print(digitalRead(sensor1));
// Serial.print("\t");
// Serial.print(digitalRead(sensor2));
// Serial.print("\t");
// Serial.print(ledState);
// Serial.print("\t");
// Serial.println(brightness);
delay(100);
}
void checkSensors()
{
if (digitalRead(sensor1) == 0)//Car captured in 1st sensor
{
if (digitalRead(sensor2) == 1)//Car still didnt reach the 2nd sensor
carPresent = 1;
}
else if (digitalRead(sensor2) == 0)//Car reached the 2nd sensor
{ //No cars detected behind the first car
if (digitalRead(sensor1) == 1)
{
carPresent = 0;
carPresent1 = 1;
}

else if (digitalRead(sensor1) == 0 )
{
analogWrite(led,brightness);
analogWrite(led1,brightness);
analogWrite(led2,brightness);

digitalWrite(led,HIGH);
digitalWrite(led1,HIGH);
digitalWrite(led2,HIGH);
}
}

else if(digitalRead(sensor3) == 0)//car reached the 3rd sensor


{
//No cars detected behind the first car
if (digitalRead(sensor2) == 1)
{
carPresent = 0;

carPresent1 = 0;
}
else if (digitalRead(sensor2) == 0 )
{
carPresent = 0;
carPresent1 = 1;
}
}
}

Conclusion:
In conclusion, the IoT-Based Smart Street Light System offers significant benefits in
terms of energy efficiency, cost savings, and enhanced public safety. By using sensors and
real-time data, the system adjusts lighting based on environmental conditions, reducing
energy waste and operational costs. It also contributes to sustainability by lowering carbon
emissions and providing valuable data for urban planning. While challenges like cybersecurity
and initial costs exist, the long-term advantages make it a promising solution for modernizing
urban infrastructure. As smart cities continue to grow, IoT-based street lighting will play a key
role in creating more efficient and livable urban environments.

You might also like