Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Sriram Srinidhi
1MS15MCA80
Ananda N Assistant
Professor
With deep sense of gratitude I am thankful to our beloved principal. I would like to
express my sincere gratitude to our department for providing us with good infrastructure and
the right atmosphere to carry out the project. It was really challenging to carry out the project
work within the stipulated time period, which was made possible with the help of many. I do
acknowledge the support and encouragement of all of them. I would like to thank our most
respected HOD, Dr. T V Suresh Kumar for his pillared support and encouragement. I would
like to convey my heartfelt thanks to my internal Project Guide Ananda N, Assistant
professor, Department of Computer Applications for giving me an opportunity to embark
upon this topic and for his constant encouragement and I would also like to thank Girish M a
fellow student for his enormous help in project. It gives me great pleasure to acknowledge the
contribution of all people who helped me directly or indirectly realize it. First I would like to
acknowledge the love and tremendous sacrifices that my Parents made to ensure that I always
get an excellent education. For this and much more, I am forever in their debt.
I am thankful to all my friends for their moral and material support throughout the course of my
project. Finally, I would like to thank all the teaching and non-technical staff of Department Of
Computer Applications for their assistance during various stages of my project work.
SRIRAM SRINIDHI
ABSTRACT
The huge amount of electrical power of many countries is consumed in lighting the
streets. However, vehicles pass with very low rate in specific periods of time and parts of the
streets are not occupied by vehicles over time. Smart Street Lighting is a project on intelligent
illumination control of street lights to optimize the problem of power consumption. 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
project discusses a Smart Street Lighting system, whose concept is to automatically turn on
the light when required and turn off when not required. This proposed system uses sensors to
control the street light and wireless communication to communicate with central server.
The lights are turned on in dim state by default when it is darker, the light will be
brighter if any one comes around. These lights are monitored and if any lights are not
working then notification are sent to concerned team to fix it. By this project around 40% of
energy can be saved.
Table of Contents
1. INTRODUCTION ............................................................................................................................................. 2
1.1 OVERVIEW ................................................................................................................................................. 2
1.2 FEASIBILITY STUDY................................................................................................................................. 2
1.2.1 Social Feasibility ................................................................................................................................... 2
1.2.2 Economic Feasibility ............................................................................................................................. 2
1.2.3 Operational Feasibility ........................................................................................................................... 2
1.2.4 Technical Feasibility .............................................................................................................................. 3
1.3 EXISTING SYSTEM ................................................................................................................................... 3
1.4 PROPOSED SYSTEM ................................................................................................................................. 3
2. LITERATURE SURVEY .................................................................................................................................. 5
2.1 SURVEY ON SIMILAR KIND OF SYSTEM ............................................................................................ 5
2.2 TOOLS AND TECHNOLOGIES ................................................................................................................. 5
3. HARDWARE AND SOFTWARE REQUIREMENTS ..................................................................................... 8
3.1 HARDWARE REQUIREMENTS ............................................................................................................... 8
3.2 SOFTWARE REQUIREMENTS ................................................................................................................. 9
4. SOFTWARE REQUIREMENTS SPECIFICATION ....................................................................................... 11
4.1 INTRODUCTION ...................................................................................................................................... 11
4.1.1 Purpose ................................................................................................................................................ 11
4.1.2 Document Conventions........................................................................................................................ 11
4.1.3 Intended Audience and Reading Suggestions ...................................................................................... 11
4.1.4 Product Scope ...................................................................................................................................... 11
4.1.5 References ........................................................................................................................................... 11
4.2 OVERALL DESCRIPTION ...................................................................................................................... 12
4.2.1 Product Perspective ............................................................................................................................ 12
4.2.2 Design and Implementation Constraints .............................................................................................. 12
4.2.3 User Documentation ........................................................................................................................... 12
4.2.4 Assumption and Dependencies ............................................................................................................ 12
4.3 EXTERNAL INTERFACE REQUIREMENTS ......................................................................................... 13
4.3.1 User Interfaces .................................................................................................................................... 13
4.3.2 Hardware Interfaces ............................................................................................................................ 13
4.3.3 Software Interfaces ............................................................................................................................. 14
4.3.4 Communications Interfaces ................................................................................................................. 14
4.4 SYSTEM FEATURES ............................................................................................................................... 14
4.4.1 Off state .............................................................................................................................................. 14
4.4.2 Dim state ......................................................................................................................................... 15
4.4.3 Bright state .......................................................................................................................................... 15
4.4.4 Energy efficient .................................................................................................................................. 15
4.5 OTHER NON-FUNCTIONAL REQUIREMENTS .................................................................................... 17
4.5.1 Safety Requirements .........................................................................................................................17
4.5.2 Security Requirements ......................................................................................................................17
4.5.3 Software Quality Attributes .............................................................................................................. 17
4.5.4 Hardware Quality Attributes ............................................................................................................. 17
4.5.5 Other Requirements .......................................................................................................................... 17
5. SYSTEM DESIGN DESCRIPTION ............................................................................................................... 19
5.1 INTRODUCTION ................................................................................................................................ 19
5.1.1 Purpose ............................................................................................................................................. 19
5.1.2 Scope ................................................................................................................................................19
5.1.3 Overview .......................................................................................................................................... 19
5.1.4 Constraints ........................................................................................................................................19
5.2 SYSTEM OVERVIEW ............................................................................................................................. 20
5.2.1 System Architecture .......................................................................................................................... 20
5.2.2 Architectural Alternatives ................................................................................................................. 21
5.2.3 Design Rationale ............................................................................................................................... 21
5.3 FUNCTIONAL DESIGN ..................................................................................................................... 21
5.3.1 Data Flow Diagram ............................................................................................................................ 21
5.3.2 Use Case Diagram ............................................................................................................................. 23
5.3.3 Flow Diagram .................................................................................................................................... 24
5.3.4 Activity Diagram ............................................................................................................................... 25
5.4 HUMAN INTERFACE DESIGN ........................................................................................................... 25
5.5 OTHER INTERFACES .......................................................................................................................... 25
6. IMPLEMENTATION ................................................................................................................................... 27
6.1 ARDUINO CODE .................................................................................................................................. 27
7. TESTING ..................................................................................................................................................... 29
7.1 INTRODUCTION .................................................................................................................................. 30
7.2 TESTING STRATEGIES ....................................................................................................................... 30
7.3 TEST CASES .......................................................................................................................................... 30
8. SCREENSHOTS............................................................................................................................................ 32
9. CONCLUSION .............................................................................................................................................. 36
10. FUTURE ENHANCEMENTS ..................................................................................................................... 38
11. BIBLIOGRAPHY ....................................................................................................................................... 40
12. USER MANUAL ........................................................................................................................................ 42
12.1 HARDWARE REQUIREMENTS 42
12.2 SOFTWARE REQUIREMENTS . 43
12.3 HARDWARE CONFIGURATION.. 43
12.4 HARDWARE INSTALLATION.. 44
12.5 SOFTWARE INSTALLATION... 44
SMART STREET LIGHTING 1
INTRODUCTION
1. INTRODUCTION
1.1 OVERVIEW
Nowadays every aspect of life is becoming smarter from home television to entire city so
adaptation for smarter roads is a necessity. Thats where the idea of Smart Street Lighting comes
into play. Smart Street Lighting is not only an automated process but also an energy efficient and
cost efficient approach towards smart city. In this system, information of pedestrian and vehicles
are sensed and gathered by array of sensors. All the sensors are placed on the pole and it is called
a node. Node reads the data and does the required action i.e. switch on the light at full intensity if
any pedestrian or vehicle on the road else node will glow at low intensity and in the morning it
automatically switches off. These data are sent on to a server through wireless communication
using nRF24L01.
Preliminary investigation of the requirements defines the feasibility of a project. The main
objective of this system is to reduce power consumption of street lights. This project is extremely
feasible for who cares for energy saving.
This system is said to be socially feasible as it is accessible to the general public. This
system is designed mainly for the people to use the road at night with fully illuminated street with
less power consumption.
This system is cost effective because the components used in this like Arduino Nano,
LDR and PIR sensors are cheaper and effective in working.
The operation of the system is so feasible that the hardware need to be installed once
to the street light so that the system could perform its action efficiently and if any node is not
working or working incorrectly, then message will be sent to the concerned team by using
Amazon Web Services.
The hardware installation is so simple that you do not need to have any extra technical
assistant and communication between sensors is very simple. The data is stored in Dynamo
DB provided by AWS which will be monitored continuously for high performing.
According to a report by market researchers, more than 280 million streetlights are
currently in place globally, with this number expected to grow to nearly 340 million by 2025. The
costs of these street lights are staggering. Each streetlight uses 600 to 1,000 kWh/yr of energy.
Current scenario includes manual operating of street lights or automated street light which
switches ON when the night falls and turns OFF when the sun rises. It causes problems when
they are not working properly at any given time. These are not very efficient and typically operate
for up to 12 hours a day, at full intensity. Even using ambient light sensors for switching
individual street lights, the energy costs of providing this service is high. Lack of monitoring
leads to unsafe situations like road accidents and many more. Faulty lights take more than 20
days to recover the fault which leads to customer dissatisfaction as well as a safety risk until
faulty light are fixed.
LITERATURE SURVEY
2. LITERATURE SURVEY
Arduino Nano is a surface mount breadboard embedded version with integrated USB. It
is a smallest, complete, and breadboard friendly. It has more analog input pins and onboard +5V
AREF jumper. Physically, it is missing power jack. The Nano is automatically sense and switch
to the higher potential source of power, there is no need for the power select jumper.
Arduino IDE
The Arduino development environment contains a text editor for writing code, a message
area, a text console, a toolbar with buttons for common functions, and a series of menus. It
connects to the Arduino hardware to upload programs and communicate with them.
LDR Sensor
An LDR or light dependent resistor is also known as photo resistor, photocell and
photoconductor. It is a one type of resistor whose resistance varies depending on the amount of
light falling on its surface. When the light falls on resistor then resistance changes. These
resistors are often used in many circuits where it is required to sense the presence of light.
PIR Sensor
A passive infrared sensor (PIR sensor) is an electronic sensor that measures infrared (IR)
light radiating from objects in its field of view. They are most often used in PIR-based motion
detectors.
Dynamo DB
Amazon Dynamo DB is a fast and flexible NoSQL database service for all applications
that need consistent, single-digit millisecond latency at any scale. It is a fully managed cloud
database and supports both document and key-value store models. Its flexible data model,
reliable performance, and automatic scaling of throughput capacity, makes it a great fit for
mobile, web, gaming, ad tech, IoT, and many other applications.
Street light where the components like Arduino Nano and sensors are attached also
called node.
LDR Sensor
Light dependent resistor (LDR) sensor is to detect whether the environment light
intensity.
PIR Sensor
Passive infrared (PIR) sensor to detect any motion on the street.
BreadBoard
It is the board with multiple pins where the pins are used for multiple and parallel
connection that is using the single Arduino board you can connect to multiple street
lights and sensors with the help of bread board.
nRF24L01
Connecting Wires
The wires are used to connect Arduino, Sensors, wireless communication device
and relay.
Single Channel Relay
Single channel relay is an electronic switch which receives signal from a
processing unit and acts accordingly.
Arduino IDE
This is the tool where the programmer is going to write the code and dump into the
Arduino Nano board so that the Arduino Nano board is going to work as the programmer
needs.
Dynamo DB
Amazon Dynamo DB is a fast and flexible NoSQL database service provided by
AWS. It is a fully managed cloud database and supports both document and key-value
store models..
SOFTWARE REQUIREMENTS
SPECIFICATION
4.1 INTRODUCTION
4.1.1 Purpose
The purpose of this document is to describe the requirements for this project. The
document focuses particularly on the requirements for Smart Street Lighting which includes
enhancements to the existing system. It also describes the scope of the system, functional and
non-functional requirements for the system and system interfaces.
This SRS will be used to verify and ensure that all specifications are correct.
The format of this SRS is simple; throughout this document the font used is Times New
Roman. All headings are in Bold and are intended. Chapter headings are in size 24, headings in
size 14 and sub headings in size 12. The rest of the document content is in size 12 without bold.
Any other words in Bold are to be considered as important terms, and have been formatted so to
grab the attention of the reader.
This document is primarily intended for the evaluators of the system. Other than that the
developers of the system can use this as a guideline. Any third party who needs a basic
understanding of the system may find this document helpful.
The scope of the work involves in developing a product which is used to make the street
lights smarter. The product will turn on or off the street lights by sensing the environmental light.
Further, once the lights are on; if there is any movement of objects or people on the streets the
lights will glow brighter else they will remain in the dim state. This will help to save lot of power
as there will be very less movement of people or objects in the night. The saved power can be
utilized in many better ways for the benefit and improvement of the society.
4.1.5 References
This product consists of nodes (Street light unit) where each node consists of Arduino
Nano, LDR sensor, PIR sensor and a Wi-Fi module. LDR sensor senses the intensity of
surrounding light; if the intensity is high, node will be switched off. If the intensity of
surrounding light is low then node will be switched on but will glow with less power and if
vehicular movement or pedestrian movement is sensed by the PIR sensor multiple nodes will
glow brighter. The Wi-Fi module will send the data to the control centre where raspberry pi will
receive the data which is used to notify that the node is not working, that node has to be checked
and this can be used for monitoring and maintenance purpose. This data will usually be 0 or 1,
where 0 represents the node which works properly and 1 which represents the node not working
and this can be used to alert the user to check street light.
Design constraints are, the developer must have the knowledge about the hardware
components and the working of those hardware components and also need to have the software
developing tools and idea how to build the software.
Implement constraint are the hardware need to be installed in proper place on to the street
light so that it is not easily accessible to the outsiders, And the software need to be installed in the
hardware with minimum configurations so that it works properly with that configuration without
hanging or software crash.
One assumption about the product is that any object should not be blocking the sensors
which affect the communication through nRF24L01. Another assumption would be objects on
the road to be pedestrians or vehicles.
Not Applicable
Normal street light unit on which all the other components are connected.
Arduino unit
An arduino Nano device for uploading the code and a breadboard for making the
circuit.
Sensor array
o LDR sensor
LDRs or Light Dependent Resistors are very useful especially in light/dark
sensor circuits. Normally the resistance of an LDR is very high, sometimes as high
as 1000 000 ohms, but when they are illuminated with light resistance drops
dramatically. When the light level is low the resistance of the LDR is high.
o PIR sensor
A passive infrared sensor (PIR sensor) is an electronic sensor that
measures infrared (IR) light radiating from objects in its field of view. They are
most often used in PIR-based motion detectors.
MOSFET
The metaloxidesemiconductor field-effect transistor (MOSFET) is a type of
field-effect transistor (FET). It has an insulated gate, whose voltage determines the
conductivity of the device. This ability to change conductivity with the amount of applied
voltage can be used for amplifying or switching electronic signals.
Connecting wire
Connecting wires are electrical wires which are used to connect different hardware
parts.
Communication between node (Arduino Nano with sensors) and central server is
established using wireless connection. Once connection is started it will continue until connection
is closed.
Street light will be in off state when there is excess of environment light.
RAMAIAH INSTITUTE OF TECHNOLOGY DEPARTMENT OF COMPUTER APPLICATIONS JUNE 2017
SMART STREET LIGHTING 15
This state will occur when surrounding light goes down and there is a vehicular or
pedestrian movement.
Actual usage of unit will be even reduced because we would not be using the street at full
intensity for 12 hours straight, we might actually use it from 6 pm to 12 am.
i.e 25 hours for 1 unit then for 6 hours how many units?
From 12am to 6 am, lights will be dimmed and energy consumption of the light will directly
depend of itself i.e. LED lights will save the maximum energy and CFL lights save up to 50%
energy and normal halogen bulbs save up to 20% energy.
For 1 hour
32 x 3600 = 115200 Joules/second
For 6 hours
6 x 115200 = 691200 Joules/second
For 115200 Joules/second 1 hour for 3600000 Joules/second how many hours?
i.e. for 31 hours 1 unit will be utilized then for 6 hours how many units will be utilized
Let z2 be the unit of current
z2 = (6 x 1) / 31
z3 = z1 + z2
z3 = 0.24 + 0.19
-------------------------- IV
z3 = 0.43 units
Comparing I and IV with original value
On an average we can save up to
z = 1 - [ ( 0.48 + 0.43 ) / 2 ]
z = 1 - 0.45
z = 0.55 units
Heat sink has to be installed to the MOSFET as stopping 220v of AC would generate a
lot of heat.
All the sensors and arduino has to be secure as even one missing part would corrupt the
systems flow.
The system has a very simple generic programming and is adaptable to changes.
The hardware has a very simple method to install, with a single controlling Arduino unit
you can connect to a street light and control it.
The purpose of this document is to provide an architectural design for the better
understanding of Smart Street Lighting where hardware installation and working of sensor.
5.1.2 Scope
The scope of the work involves in developing a product which is used to make the street
lights smarter. The product will turn on or off the street lights by sensing the environmental light.
Further, once the lights are on; if there is any movement of objects or people on the streets the
lights will glow brighter else they will remain in the dim state. This will help to save lot of power
as there will be very less movement of people or objects in the night. The saved power can be
utilized in many better ways for the benefit and improvement of the society.
5.1.3 Overview
This complete SDD will contain the general definition and features of the Smart Street
Lighting, design constraints, the overall system architecture and data architecture. With the help
of UML diagrams, design of the system and subsystems/modules will be explained visually in
order to help the programmer to understand all information stated in this document correctly and
easily.
5.1.4 Constraints
The lamp module consists of the sensors and Arduino nano board to control lights. The
data from Arduino is sent to Raspberry Pi which acts as a server here. That data is stored in
dynamo DB by Raspberry Pi. Data in database is continuously monitored and if any issues arises
it triggers notification to the concerned team to fix it.
Fig 5.5 shows that DFD contains 4 processes Sensors, Micro-controller, Operational
Analytics and In-memory Analytics, here user triggers the sensor which detects user
and sends to micro-controller where it is processed and sent to operational analytics in
which MQTT is accessed and is communicated with Amazon Web Service IoT in In-
memory Analytics which is stored in Dynamo Database.
Use case diagram for users specifies the primary and secondary actions need to
be performed and rights differentiated to each user type.
Fig 5.6 shows the use case diagram for pedestrian. When a person moves near street light
in day then the light remains off itself whereas if the person moves near street light during night
then the sensor detects the person and makes light brighter otherwise the light stays dimmer.
Fig 5.7 shows the flow diagram of different states of sensors. If LDR senses the darkness
then light is switched on, if it doesnt then the light will be in OFF state. If PIR senses the motion
of the object then the light will be brighter else it will be in dim state.
Fig 5.8 shows the flow of sending notification if LDR sensor fails working. If darkness is
sensed and light is not switched on then notification is sent to concerned team.
Fig 5.9 shows the activity diagram for pedestrian. When a person moves near street light
in day then the light remains off itself whereas if the person moves near street light during night
then the sensor detects the person and makes light brighter otherwise the light stays dimmer.
IMPLEMENTATION
6. IMPLEMENTATION
6.1 ARDUINO CODE
#include <SPI.h>
#include <nRF24L01.h>
#include <printf.h>
#include <RF24.h>
#include <Wire.h>
#include <RF24_config.h>
RF24 radio(9,10);
char pp[6];
int j;
int lval=0;
int lval1=1
int LDR=A0;
int LDR1=A1;
int led1=3;
int dim=15;
int b=255;
int PIR=2;
int pval=0;
int c;
int relay=5;
void setup()
{
pinMode(tp,OUTPUT);
pinMode(ep,INPUT);
pinMode(led1,OUTPUT);
pinMode(relay,OUTPUT);
while(!Serial);
Serial.begin(9600);
radio.begin();
radio.setPALevel(RF24_PA_MAX);
radio.setChannel(0x76);
radio.openWritingPipe(0xF0F0F0F0E1LL);
radio.enableDynamicPayloads();
radio.powerUp();
}
void loop()
{
digitalWrite(tp,LOW);
lval=analogRead(LDR);
if(lval>200)
{
if(b>125||b!=0)
b=b-dim;
analogWrite(led1,b);
digitalWrite(relay,LOW);
lval1=analogRead(LDR1);
if(lval1<50)
{
const char text4[]="OK";
radio.write(&text4,sizeof(text4));
}
RAMAIAH INSTITUTE OF TECHNOLOGY DEPARTMENT OF COMPUTER APPLICATIONS JUNE 2017
SMART STREET LIGHTING 28
else
{
const char text4[]="NOTOK";
radio.write(&text4,sizeof(text4));
}
delay(50);
}
else
{
digitalWrite(relay,HIGH);
pval=digitalRead(PIR);
if(pval==HIGH)
{
b=255;
analogWrite(led1,b);
lval1=analogRead(LDR1);
if(lval1>200)
{
const char text4[]="OK";
radio.write(&text4,sizeof(text4));
}
else
{
const char text4[]="NOTOK";
radio.write(&text4,sizeof(text4));
}
delay(50);
}
else
{
b=125;
analogWrite(led1,b);
lval1=analogRead(LDR1);
if(lval1>100)
{
const char text4[]="OK";
radio.write(&text4,sizeof(text4));
}
else
{
const char text4[]="NOTOK";
radio.write(&text4,sizeof(text4));
}
delay(50);
}
}
delay(100);
}
TESTING
7. TESTING
7.1 INTRODUCTION
Testing is a method to determine the behavior, working and performance of the
application against the intended requirement. As testing is the last phase before the final software
is delivered, it has the enormous responsibility of detecting any type of error that may be present
in the software. During testing, the program is executed with a set of test cases and the output of
the program for the test cases is evaluated to determine if the program is performing as it is
expected to perform.
Test cases constitute to asset of conditions which will determine if the system being tested
satisfies the SRS and works correctly. A test case may contain the following Meta data: test ID,
brief summary, supplied inputs, preexisting conditions, and recorded output. This process of
testing purely eradicates the minor issues like undesirable lines in the code, adds the comments as
essential places and enhances the code conferring to the standards retained by the industry.
7.2 TESTING STRATEGIES
Unit testing:
It is a level of software testing where individual units/ components of software are tested.
The purpose is to validate that each unit of the software performs as designed. A unit is the
smallest testable part of software. It usually has one or a few inputs and usually a single output.
7.3 TEST CASES
The test cases are written in the table 7.1 which shows the test scenarios and the test
results.
SCREENSHOTS
Fig 8.1 shows the screenshot of the code of the Smart Street Lighting
Fig 8.2 shows the screenshot of the code of the Smart Street Lighting
Fig 8.3 shows the screenshot of the code of the Smart Street Lighting
Fig 8.4 shows the screenshot of the code of the Smart Street Lighting
CONCLUSION
9. CONCLUSION
Smart Street Lighting fine tune the existing technologies offering ease of maintenance
and energy savings. The proposed system is appropriate for street lighting in remote as well as
urban areas where traffic is low at times. Along with energy saving it also tackles monitoring and
maintenance problems.
This project is a cost efficient as the components used in this are cheaper but effective in
performance. It saves lots of energy by dimming the light. All the lights are monitored
continuously and if any of them are not working then notification is sent to concerned team.
In Conclusion, this project reduces power consumption and saves energy by almost 40%
compared to the existing system
10
FUTURE ENHANCEMENTS
11
BIBLIOGRAPHY
11. BIBLIOGRAPHY
Website Reference:
http://www.arduino.cc/
http://www.bristolwatch.com/arduino/arduino1.htm
https://aws.amazon.com/dynamodb/
Books Reference:
Michael R Blaha and James R Rumbaugh: Object oriented design and modelling with
UML, Pearson Education, 2013.
th
Ian Sommerville: Software engineering, 8 edition, Addison-Wesley. 2015.
12
USER MANUAL
It is the heart of the hardware, it is actually the circuit board where the Electric
street light triggered data will be processed in this circuit board and the data is sent to
the central server.
It is the board with multiple pins where the pins are used for multiple and parallel connection
that is using the single Arduino board you can connect to multiple electric door strike with the
help of bread board.
Arduino IDE
This is the tool where the programmer is going to write the code and dump into the
Arduino Nano board so that the Arduino Nano board is going to work as the programmer
needs.
The hardware components consists of Arduino Nano board, Bread Board, LDR
sensor, PIR sensor, MOSFET, Single channel relay, nRF24L01, Raspberry Pi and
electric bulb.
The Sensor Array, MOSFET, single channel relay, bulb and nRF24L01 are
connected as a single unit to Arduino Nano board and Raspberry Pi is treated as
communication device to server.
The connection of LDR to Arduino is simple as it includes 3 pins VCC, GND and
SIG pin for taking input, connection of PIR is similar to LDR as it also includes 3 pins
with similar functionality. Connection to nRF24L01 and Arduino includes 8 pins VCC,
GND for 3v and ground respectively, CSN is Chip Select NOT, CE is Chip Enable, SCK
is serial clock, MOSI is Master Out Slave In pin, MISO Master In Slave Out pin and IRQ
is Interrupt Request pin which is normally not connected.
The connection of single channel relay includes 3 pins VCC, GND and input to
connect to Arduino and 3 sockets NC, NO and CP where NC is Normally Closed, NO is
Normally Open and CP is connected to ground.
MOSFET connections include 3 pins Gate, Source and Drain where Gate is used to
logically control MOSFET, Source where we plug-in the positive of the 230v and Drain is
where we plug-in negative or ground.
2. Lamp unit
Lamp unit consists of simple lamp post with working street light unit.