Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 46

SMART STREET LIGHTS

Submitted by

Syed Taimur Ali 17


Muhammad Wisal Khan 08

Muhammad Tayyab Khan 61


Hassan Basry 14

SUPERVISER: Engineer Farooq Khan

Faculty of Electrical Engineering


University of Science & Technology Bannu
Bannu Town ship, Khyber Pakhtunkhwa, Pakistan. www.ustb.edu.pk

Smart street light Page 1


“Behold! In the creation of the heavens and the earth, and the alternation of Night and Day- there are
indeed signs for men of understanding”

[Qur’an 3:190]

Smart street light Page 2


Certificate of Ownership

It is certified that the work contained this report is for the final year project titled:“Smart
Street Light”.The work contained in the report has been brought together by a collective
effort of syed taimur ali, Muhammad tayab khan, Hassan basry and Muhammad wisal khan;
under the guidance of Mr. farooq khan, through wide research, internet, and library and
through diverse expert opinions.

Advisor:
ENGR. Farooq Khan

Chairman:

Dr. Fakhar Anjum

Department of Electrical Engineering, University of Sciences and Technology, Bannu.

Smart street light Page 8


Approval
It is certified that the contents and form of the thesis entitled “ Smart street lights ” submitted
by Syed Taimur ali, Muhammad Tayab khan, Hassan bassry and Muhammad wisal khan
have been found satisfactory.

SUPERVISOR________________

1.ENGR ISLAMUDDIN____________________________

2.ENGR SIKANDAR__________________________

3.ENGR SAKHI REHMAN_____________________

Smart street light Page 9


Abstract

The project “smart street lights” is devoloped to reduce the power consumption and
automatic street lights maintenance. This system is designed by placing the infrared sensors
in all the street light system. These sensors sense the object and send signal to microcontroller
to increse the intensity of light.it is a power efficent system and do not consume huge amount
of electricity. The fault sensors are placed with every street light to sense the fault in the
street light and will automatically report about the faulty street light through the GSM
module. It will send SMS to the concern department for the further action.

Smart street light Page 10


Acknowledgments

Firstly, our intence gratification is to Allah, the Most Merciful and Most Gracious,who give
us persistence and understanding, guided us, made us to accomplished our thesis and enable
us to work on this project because without His approvel man can do nothing.We would like
to recognize the presence of all those people who have helped us. It is a pleasure to thank all
the people who have guided us, who have never been reluctant to help us in the process of
understanding the concepts needed to complete the project.Last our sincere and deep
gratitude is for Engr Frooq khan, for taking his special interst in our work and providing us
all possibilities to make us and comlete our study.

Smart street light Page 11


Table of Contents
Chapter 1: Introduction…………………………………………………………………13

1.1. Project background………………………………………………………………13


1.2. Problem Description……………………………………………………………..13
1.3. Project Objectives……………………………………………………….……....14
1.4. Project Scope……………………………………………………….......……….14
1.5. Outline of Thesis………………………………………………..……………….14

Chapter 2: Literature Review………………….……………………………….……...15

2.1 Arduino……………………………………...……………………………………15

2.1.1 Arduino ports………………………………...…………………………………16

2.1.2 Atmega328 Arduino…………………………..……………………………….. 17

2.1.3 Atmega328 pins description…………………......……………………………...19

2.2 Light dependent resistor……………………..…………………………………....20

2.3 IR Sensor…………………………...………...…………………………………...20

2.4 Transistor………………………...…………..……………………………………23

2.5 GSM……………………………………………………………………………….24

Chapter 3: Methadalogy…………..…………………………………………………….37

3.1 Existing system…….……………..……………………………………………….38

3.2Proposed system………....……………………........................................................40

Chapter 4: Result and conclusion…….………………………………………………….41

Chapter 5: Future work………………..………………………………………………..42


Chapter 6: coding…..…………………………………………………………………....43
Chapter 7:Refrences……………………………………………………………………..51

Smart street light Page 12


Chapter 1

Introduction:

1.1 Project Back ground

Energy is our fundamental need, as the population increses day by day due to which
there is lack of conventional energy sources. This vast use of energy causes energy crises. To
overcome the problem of energy crises we need to implement such a technique which utilize
the conventional source and convert energy into other useful form.In this project, GSM
technology is used to find the position of faulty street light.the position of the faulty street
light is send by the GSM module by sms to the specified phone number or concern authority.
The infrared sensors are used which detect the position of veichles and the street light
become DIM or bright. This is smart way of managing street lighting system.This system will
be easy to use and is quit reliable .this system is of low cost, due to common comonents,
having no complexity at all to use .can be implement easily at all places where the traffic
density is high.

1.2 Problem Description


 The street lights are ON at night and have huge amont of power consummtion

 Normally to detect fault , street light are switch ON at day time to check and
replace faulty street lights.

 Less reliable.

The street lights are unnecessarily glowing with its full intensity in the absence of
any activites in the street light .the main problem which we hear are which we try to tackle
was during day time or even when there is no veichle thestreet lights remain turn ON during
the night which causes huge amont of power loss

By imlemanting a model in which all the street light can only glow with its maximum
intensity when any activity is going on in its region other wise it should glow at a

Smart street light Page 13


minimum to given intensity we can safe huge amount of power.

1.3 Project Objectives


The main objective of a system are;

 To design and implement an automatic street light system.

 To detect fault in the system.

 To inform the concern department about the fault for further action.

1.4 Project Scope


The increase in energy consumption indicates the growth of nature. In energy crisis
Pakistan is at the third number of the world because of huge amount of energy
consumption. As in Pakistan a generation is 22,797 MW and the average demand is 17000
MW , whereas the short fall is between 4000 and 5000 MW .

T0 overcome the energy crises, we save our energy and used it efficiently through smart
street light . it was practically implemented in jersey (Between England and France) china
and Indonesia. No one is happy with present situation of electricity so this is a small step to
improve situation of our country through this project .

1. 5 Outline of thesis
This thesis consist of five chapters. In first chapter it discusses about the introduction,
objective and scope of this project. And while chapter two and three will discuss more on
theory and litreture reviews. In chapter four we discuss about the conclusion in chapter five
discuss about the future work. Chapter consistd of coading of this project, which is based c++
machine langueg. Coadings are helpful for running process.

Smart street light Page 14


Chapter 2

Litrature Review

2.1 Arduino ( microcontroller)


Arduino an open source plat form used for building electronics projects. Arduino consist of
both a physical programmable circuit board (often refer to as micro controller) and a piece of
software, or IDE(integrated devolpment environment) that runs on your computer, used to
write and upload computer code to the physical board. Arduino board is microcontroller
board based on AT mega328 microcontroller arduino has 14 digital input and output pins out
of these 14 pins 6 are used for PWM (pulse width modulation) output while 6 are anlog input
pins. Arduino has USB connection. It has reset button. The different kinds of component of
arduino are discuss below

Fig; 01 Arduino:

Smart street light Page 15


2.1.1 Arduino parts
The main parts of arduino circuit are briefly explain below.

Power USB

Arduino board provides a USB connection it means data can be access through USB cable
just connect USB able with USB connection

Power (power bareel jack)

The function of barrel jack is connecting to arduino direct to ac main power supply.

Voltage regulator

Voltage regulator performed two functions one is to stabilize dc voltage which is used for
processing or for other element and its second function is to control the voltage which is
given to arduino.

Arduino Reset

Reset button are used to reset to the arduino or also to start the program.there are two
methods are used to reset thr arduino.the reset button is used on arduino button which is
denoted by 17 on the board and another is used to connect the external reset button to arduino
labled by reset button.

Analog pins

Analog pinsnare from pin A0 to A5. There are 6 pins are used for analog input. Function of
these pins to read the signal just like a sensor and convert into digital values that can read be
only by microcontroller.

Power LED indicator

The function of led indicator is to light up when you connect your arduino to power supply. It
indicate that arduino is connected to the supply properly

Smart street light Page 16


Digital input and output

The arduino board has 14 digital input and out of 14 pins 6 provided for PWM (pulse width
modulation) output. These pins can be used for both input and output. If it is configured as a
input it read logic value (0&1). If these pins are configured as output it drives different
module like LED , relay, etc.

TX & RX LEDs

There are two label are used on the board one is TX which is used transmit and other is RX
which is used for recive.

AREF

AREF stand for reference voltage. The function of the AREF is to provide limit which is
between (0 & 5) as the upper limits for the analog inputs pins.

2.1.2 ATmega328 arduino


ATmega328 is Advance Virtual RISC microcontroller (AVR). It is an 8 bit program. Its
means it can handle data sized up to 8 bits. It has built in internal memory is 32kb. It operates
from 3 to 5V. It has an ability to store data even when power supply is removed from their
biasing terminals. ATmega328 has 2kb static random access memory. It has 1kb read only
memory. ATmega328 is widely used because of their good diagram of ATmega328 as shown
below

Smart street light Page 17


Fig, 02 PINs Description

Smart street light Page 18


2.1.3 ATmega328 arduino pins description
In atmega328 20 pins are used as a function of input ports. It means that these pins are
used for giving a function of input and output to the circuit. Decision making is based on the
software weather it is input or output it is set in the software. While 14 pins are digital pins
and 6 of pins are PWM output while 6 pins are analog input and output we can divide all pins
to 4 possible ports.

Port A

Port A consist of from pin PA0 to PA7. These pins are used to provide analog input to
analog digital convertar if this port is not used for analog to digital converter. Port A is used
for bidirectional input and output port

Port B

Port B consists from pin PB0 to PB7. This port is bidirectional port. Pins of these ports
consist or we can say these ports contain pull – up resistor.

Port C

Port C consists from pin PC0 to PC7. The pins of port C is used for output buffers and
having symmetrical drive characteristics with source capability and with output sink.

Port D

Port D consists from pin PD0 to PD7. These pins are also called 8-bit input and output port
and it also having internal pull up resistor.

VCC

VCC is digital voltage supply

AVCC

AVCC is supply voltage also we have a positive voltage from pin and this voltage is used
for analog to digital convertor. ADC requires its own power supply and order to do a work.
Smart street light Page 19
GND

GND denotes ground and it has zero volts.

2.2 Light Dependent Resistor ( LDR )


A light dependent resistor is a device which has variable resistor changes with the fall of
light and can detect the light.

The LDR has maximum resistance in the darkness when the light occur its resistance
decreases with the intensity of the light . comperator compares light intensity given by LDR
with in theroshold value the signal is given to the micro controller

2.3 IR Sensor

It is a sensor which detect the object. It consists of two parts transmitter and receiver. The
transmitter emits the light and the receiver absorb the light. When the object is detected, the
light changes which produce an electrical signal at the receiver as an output and sent it to the
microcontroller.

It has the following features;

 It can detect the object for the long distance i-e more than 10 meter.

 Its response is very high because the high speed of light.

 It is easily adjustable because he beams emits the visible light and the beam
positioning is simple.

 It has the property to detect the color. The object reflection and absorption both
depend upon the wavelength of the light and the color of the object.

The transmitter and receiver are placed in front of each other. When an object is

Smart street light Page 20


detected the intensity of light decreases at the receiver end. This intensity of light detect the
object and produce an electrical signal.

IR Sensor Circuit Diagram and Working Principle


An infrared sensor circuit is one of the basic and popular sensor module in an electronic
device. This sensor is analogous to human’s visionary senses, which can be used to detect
obstacles and it is one of the common applications in real time. This circuit comprises of the
following components
 LM358 IC 2 IR transmitter and receiver pair
 Resistors of the range of kilo ohms.
 Variable resistors.
 LED (Light Emitting Diode).

IR Sensor Circuit Daigram


In this project, the transmitter section includes an IR sensor, which transmits continuous IR
rays to be received by an IR receiver module. An IR output terminal of the receiver varies
depending upon its receiving of IR rays. Since this variation cannot be analyzed as such,

Smart street light Page 21


therefore this output can be fed to a comparator circuit. Here an operational amplifier (op-
amp) of LM 339 is used as comparator circuit.
When the IR receiver does not receive a signal, the potential at the inverting input goes
higher than that non-inverting input of the comparator IC (LM339). Thus the output of the
comparator goes low, but the LED does not glow. When the IR receiver module receives
signal to the potential at the inverting input goes low. Thus the output of the comparator (LM
339) goes high and the LED starts glowing. Resistor R1 (100 ), R2 (10k ) and R3 (330) are
used to ensure that minimum 10 mA current passes through the IR LED Devices like
Photodiode and normal LEDs respectively. Resistor VR2 (preset=5k) is used to adjust the
output terminals. Resistor VR1 (preset=10k) is used to set the sensitivity of the circuit
Diagram. Read more about IR sensors.

Different Types of IR Sensors and Their Applications

IR sensors are classified into different types depending on the applications. Some of the
typical applications of different types of sensors are.
The speed sensor is used for synchronizing the speed of multiple motors.
The temperature sensor is used for industrial temperature control.
PIR sensor is used for automatic door opening system and Ultrasonic sensor are used for
distance measurement.

Fig; 04 IR Sensors

Smart street light Page 22


2.4 Transistor
It is basically an NPN bipolar junction transistor (BJT). The word transistor is a combination
of two words, transfer and resistor. So, the basic purpose of transistor is transfer of
resistance. A transistor is normally used for amplification of current.
The larger current at the emitter and collector can be controlled by the small amount of
current at the base. BC547 can be used commonly for amplifiers and switches. Similar to all
the other transistors BC547 has also three terminals e.g. collector terminal, base terminal and
emitter terminal respectively. The amount of current flowing from base to the emitter controls
the amount of the current flowing through the collector. BC547 is usually used for
amplification and switching purposes. Its maximum current gain is around 800. A fixed DC
voltage is required for its proper operation in desired region. Proper voltage supply is known
as biasing. BC547 is biased in a way that it is partially on for all the applied inputs, for the
amplification purpose. The input signal is amplified at the base and then transferred to the
emitter.

BC547 is an NPN Bipolar Junction Transistor. Mostly it is used for the switching purpose as
well as for amplification purposes. Similar to the other transistors BC547 is also used for the
amplification of current. The smaller amount of current at the base is used to control the
larger amount of currents at collector and emitter as well. Its basic applications are switching
and amplification. The transistor, BC 547 is shown in the figure below.

Fig ;05 Transistor

Smart street light Page 23


2.5 GSM
It is khown as Global System for Mobile communication. It is used for many purposes
such as SMS (short messege service). EMS ( multimedia Messeging services)etc. the
frequency band used for its operation in all over the world is 900 or 1800 MHz. it
digitalized the data, compress it and send it to channel.

It has the following input and output pins;

GND,PWR,TX,RX,RST,+5V.

It has the followig features;

 Free serial connection port, you can select Hardware\software serial port control.

 The power consumption is low 1.5mA ( sleep mode)

 The power supply is +5v.

 Power supply range is 3.1 to 4.8

Figure 6 GSM Module


Smart street light Page 24
GSM Module is an ultra-conservative and solid remote module. It is a breakout board and
least arrangement of SIM900 Quad-band GSM/GPRS module. It can communicate with
controllers through AT directions (GSM 07.07, 07.05 and SIMCOM improved AT
Commands). This module support software power on and reset. The GPRS is designed and
controlled by means of its UART utilizing straightforward AT directions. Simply connect on
the Arduino/Raspberry Pi/AVR/PIC/ARM/FPGA board, you could simply use AT command
and control it. This board can be associate with PC by means of FT233RL or USB-to-Serial
Bridge Controller.

IO List: GND, +5V, RX , TX , PWR , RST.

Highlights:

Module No: Simcom SIM900 2G Module

Power Supply: +5V

Completely good with Arduino/Raspberry Pi/AVR/PIC/ARM/FPGA

Free sequential port interfacing, you can choose Hardware/Software Serial port control

Super capacitor power supply for the RTC

Not exclusively can utilize the catch for power on, yet additionally can utilize the advanced
stick of Arduino to control on and reset the SIM900 module

Quad-Band GSM(2G) GPRS/EDGE 850/900/1800/1900 MHz

GPRS multi-space class 10/8

GPRS portable station class B

Agreeable to GSM phase 2/2+

Class 4 (2 W @850/900 MHz)

Class (1 W @ 1800/1900MHz)

Control by means of AT directions (GSM 07.07 ,07.05 and SIMCOM upgraded AT


Commands)

Supply voltage run : 3.1-4.8V Low power utilization: 1.5mA (rest mode)

Smart street light Page 25


Dimension: 60 mm x 53 mm Conventions and abbreviations In this report, the GSM engines
are referred to as following term: 1) ME (Mobile Equipment); 2) MS (Mobile Station); 3) TA
(Terminal Adapter); 4) DCE (Data Communication Equipment) or copy DCE (FAX modem,
FAX board); In application, controlling device controls the GSM engine by sending AT
Command by means of its sequential interface. The controlling engine at the opposite end of
the sequential line is reffered to as following term: 1) TE (Terminal Equipment); 2) DTE
(Data Terminal Equipment).

2.5.1.Inserted framework;

Command syntax

The "AT" or "at" prefix must be set toward the start of each Command line. To end a
Command line enter <CR>. Directions are normally trailed by a reaction that include.
"<CR><LF><response><CR><LF>" Throughout this record, just the reactions are displayed,
<CR><LF> are discarded deliberately.The AT Command set executed by SIM900 is a blend
of GSM07.05, GSM07.07 and ITU-T proposal V.25ter and the AT directions created by SIM
Com. Note: A HEX string, for example, "00 49 FF" will be conveyed through sequential port
at the baud rate of 115200 following SIM900 is controlled on. The string will be overlooked
since it is utilized for synchronization with PC apparatus. Just enter AT Command through
sequential port after SIM900 is controlled on and Unsolicited Result Code "RDY" is gotten
from sequential port. In the event that auto-budding is empowered, the Unsolicited Result
Codes "RDY, etc are not demonstrated when you start up the ME, and the "AT" prefix, not
"at" prefix must be set toward the start of each direction line.All these AT directions can be
part into three classifications grammatically: "essential", "S parameter", and "broadened".
These are as per the following:

Basic language structure

These AT directions have the configuration of "AT<x><n>", or "AT&<x><n>", where


"<x>"is the Command, and "<n>"is/are the argument(s) for that Command. A case of this is
"ATE<n>", which tells the DCE whether got characters ought to be reverberated back to the

Smart street light Page 26


DTE as indicated by the estimation of "<n>". "<n>" is discretionary and a default will be
utilized if missing.SIM900_AT Command Manual_V1.03 12/24/2010 SIM900 AT
Command Manual

Parameter syntax:

These AT directions have the configuration of "ATS<n>=<m>", where "<n>" is the file of
the S register to set, and "<m>"is the incentive to allot to it. "<m>" is discretionary; on the off
chance that it is missing, at that point a default value is assigned.

Extended syntax

These directions can work in a few modes, as in the accompanying table: Table 1: Types
of AT commands and responses Test Command AT+<x>=? The mobile equipment returns
the list of parameters and value ranges set with the corresponding Write Command or by
inner procedures. Peruse Command AT+<x>? This direction restores the at present set
estimation of the parameter or parameters. Compose Command AT+<x>=<...> this order sets
the client perceptible parameter values. Execution Command AT+<x> the execution order
peruses non-variable parameters influenced by interior procedures in the GSM engine.
Combining AT directions on a similar Command line you can enter a few AT directions on a
similar line. For this situation, you don't have to type the "AT" or "at" prefix before each
order. Rather, you just need type "AT" or "at" the start of the direction line. If it's not too
much trouble note to utilize a semicolon as the direction delimiter after an all-encompassing
order, for instance: ATE1&W&F+ICF? ;+CFUN? ; &W.The Command line cushion can
acknowledge a limit of 556 characters. On the off chance that the characters entered
surpassed this number, at that point none of the Command will executed and TA will return
"Mistake".Entering progressive AT directions on isolated lines when you have to enter a
progression of AT directions on independent lines, if it's not too much trouble Note that you
have to hold up the last reaction (for instance OK, CME blunder, CMS mistake) of last AT
Command you entered before you enter the following AT Command.

Supported character sets

Smart street light Page 27


The SIM900 AT Command interface defaults to the IRA character set. The SIM900 underpins the
accompanying character sets:

• GSM group

• UCS2

SIM900_AT Command Manual_V1.03 13 12/24/2010

SIM900 AT Command Manual

• HEX

• IRA

• PCCP

• PCDN

• 8859-1 The character set can be set and cross examined utilizing the "AT+CSCS" Command (GSM
07.07). The character set is characterized in GSM particular 07.05.

The character set influences transmission and reception of SMS and SMS Cell Broadcast messages,
the section and show of telephone directory passages content field and SIM Application Toolkit alpha
strings.

Flow control

Flow control is very important for right correspondence between the GSM engine and DTE. For the
circumstance, for instance, a data or fax call, the sending device is moving data speedier than the
getting side is set up to recognize. Exactly when the tolerant help accomplishes its capacity, the
persuading device should be capable to make the sending contraption stop until it gets up to speed.

There are in a general sense two different ways to manage achieve data flow control: programming
flow control and equipment flow control. SIM900 reinforce both two sorts of flow control. In
Multiplex mode, it is recommended to use the equipment flow control.1.6.1 Software flow control
(XON/XOFF flow control)

Programming flow control sends various characters to stop (XOFF, decimal 19) and resume (XON,
decimal 17) information flow. It is very helpful in certain applications that lone utilize three wires on
the sequential interface. The default flow control approach of SIM900 is equipment flow control
(RTS/CTS flow control), to empower programming flow control in the DTE interface and inside
GSM engine, type the accompanying AT Command:

Smart street light Page 28


AT+IFC=1, 1 This setting is put away unstable, for use after restart, AT+IFC=1, 1 ought to be put
away to the client profile with AT&W. NOTE: The AT directions recorded in the table of AT&W part
ought to be put away to client profile with AT&W for use after restart. Most other AT directions in
V.25, 07.05, 07.07, GPRS will store parameters consequently and can be utilized after module
restart.Guarantee that any correspondences programming bundle (for example Hyper terminal)
utilizes programming flow control. NOTE: Software Flow control ought not be utilized for
information calls where twofold information will be transmitted or

SIM900_AT Command Manual_V1.03 14 12/24/2010

SIM900 AT Command Manual

SIM900 AT Command Manual

gotten (for example TCP/IP) as the DTE interface may translate paired information as flow control
characters.

Hardware flow control (RTS/CTS flow control)

Hardware flow control accomplishes the information flow control by controlling the RTS/CTS line.
At the point when the information move ought to be suspended, the CTS line is set idle until the
exchange from the getting cradle has finished. At the point when the accepting support is alright to get
more information, CTS goes dynamic by and by. To accomplish equipment flow control, guarantee
that the RTS/CTS lines are available on your application phase.

SIM900_AT Command Manual_V1.03 15 12/24/2010

SIM900 AT Command Manual

2 AT Commands According to V.25TER

These AT Commands are planned by the ITU-T (International Telecommunication Union,


Telecommunication division) V.25ter record.

Overview of AT Commands According to V.25TER

Command Description A/RE-ISSUES THE LAST COMMAND GIVEN

ATA ANSWER AN INCOMING CALL

ATD MOBILE ORIGINATED CALL TO DIAL A NUMBER

ATD><N> ORIGINATE CALL TO PHONE NUMBER IN CURRENT MEMORY

Smart street light Page 29


ATD><STR> ORIGINATE CALL TO PHONE NUMBER IN MEMORY WHICH

Compares TO FIELD <STR>

ATDL REDIAL LAST TELEPHONE NUMBER USED

ATE SET COMMAND ECHO MODE

ATH DISCONNECT EXISTING CONNECTION

ATI DISPLAY PRODUCT IDENTIFICATION INFORMATION

ATL SET MONITOR SPEAKER LOUDNESS

ATM SET MONITOR SPEAKER MODE

+++ SWITCH FROM DATA MODE OR PPP ONLINE MODE TO

Order MODE

ATO SWITCH FROM COMMAND MODE TO DATA MODE

ATP SELECT PULSE Dialing

ATQ SET RESULT CODE PRESENTATION MODE

ATS0 SET NUMBER OF RINGS BEFORE AUTOMATICALLY

Noting THE CALL

ATS3 SET COMMAND LINE TERMINATION CHARACTER

ATS4 SET RESPONSE FORMATTING CHARACTER

ATS5 SET COMMAND LINE EDITING CHARACTER

ATS6 PAUSE BEFORE BLIND Dialing

ATS7 SET NUMBER OF SECONDS TO WAIT FOR CONNECTION

Finishing

ATS8 SET NUMBER OF SECONDS TO WAIT FOR COMMA DIAL

MODIFIER ENCOUNTERED IN DIAL STRING OF D COMMAND

ATS10 SET DISCONNECT DELAY AFTER INDICATING THE ABSENCE OF

Information CARRIER

ATT SELECT TONE DIALING

Smart street light Page 30


ATV TA RESPONSE FORMAT

ATX SET CONNECT RESULT CODE FORMAT AND MONITOR CALL

SIM900_AT Command Manual_V1.03 16 12/24/2010

SIM900 AT Command Manual

Advancement

ATZ RESET DEFAULT CONFIGURATION

AT&C SET DCD FUNCTION MODE

AT&D SET DTR FUNCTION MODE

AT&F FACTORY DEFINED CONFIGURATION

AT&V DISPLAY CURRENT CONFIGURATION

AT&W STORE ACTIVE PROFILE

AT+GCAP REQUEST COMPLETE TA CAPABILITIES LIST

AT+GMI REQUEST MANUFACTURER IDENTIFICATION

AT+GMM REQUEST TA MODEL IDENTIFICATION

AT+GMR REQUEST TA REVISION IDENTIFICATION OF SOFTWARE

Discharge

AT+GOI REQUEST GLOBAL OBJECT IDENTIFICATION

AT+GSN REQUEST TA SERIAL NUMBER IDENTIFICATION (IMEI)

AT+ICF SET TE-TA CONTROL CHARACTER FRAMING

AT+IFC SET TE-TA LOCAL DATA FLOW CONTROL

AT+IPR SET TE-TA FIXED LOCAL RATE

AT+HVOIC DISCONNECT VOICE CALL ONLY

2.5.2:PIC16F72

The PIC16F72 has a place with the Mid-Range group of the PIC devices. The program
memory contains 2K words, which mean 2048 directions, since every 14-bit program
memory word is a similar width as every device guidance. The information memory (RAM)

Smart street light Page 31


contains 128 bytes. There are 22 I/O sticks that are client configurable on a stick to-stick
premise. A few pins are multiplexed with other device capacities.

These capacities include:

Outside hinder

Change on PORTB hinder

Timer0 clock input

Timer1 clock/oscillator

Catch/Compare/PWM

A/D converter

SPI/I2C

Details:

Most extreme CPU Frequency: 20 MHz

Design: 8 bit

Program Memory (Flash): 3.5 kB

Smash: 128 byte

Interior Oscillator: No

ADC: 1 (5 channels)

No. of Pins: 28

Voltage: 2V - 5.5V

Exceptional FEATURES:

1,000 delete/compose cycle FLASH program memory regular

Power-on Reset (POR), Power-up Timer (PWRT) and Oscillator Start-up Timer (OST)

Guard dog Timer (WDT) with its own on-chip RC oscillator for dependable activity

Programmable code security

Power sparing SLEEP mode

Selectable oscillator alternatives

Smart street light Page 32


In-Circuit Serial Programming™ (ICSP™) through 2 pins

Processor read access to program memory.

2.5.3LM393/Dual Differential Comparator

These devices comprise of two free voltage comparators that are intended to work from a
solitary power supply over a wide scope of voltages. Task from double supplies likewise is
conceivable as long as the contrast between the two supplies is 2 V to 36 V, and VCC is at
any rate 1.5 V more positive than the input common-mode voltage. Current channel is
autonomous of the supply voltage. The outputs can be connected to other open-collector
outputs to accomplish wired-AND connections.

The LM193 device is portrayed for activity from −55°C to +125°C. The LM293 and
LM293A devices are portrayed for task from −25°C to +85°C. The LM393 and LM393A
devices are portrayed for task from 0°C to 70°C. The LM2903, LM2903V, and LM2903AV
devices are described for activity from −40°C to +125°C.

Highlights

Single-Supply or Dual Supplies

Wide Range of Supply Voltage

Most extreme Rating: 2 V to 36 V

Tried to 30 V: Non-V Devices

Tried to 32 V: V-Suffix Devices

Low Supply-Current Drain Independent of Supply Voltage: 0.4 mA (Typical) Per


Comparator

Low Input Bias Current: 25 nA (Typical)

Low Input Offset Current: 3 nA (Typical) (LM193)

Low Input Offset Voltage: 2 mV (Typical)

Basic Mode Input Voltage Range

Incorporates Ground

Smart street light Page 33


Differential Input Voltage Range Equal to Maximum-Rated Supply Voltage: ±36 V

Low Output Saturation Voltage

Yield Compatible With TTL, MOS, and CMOS

On Products Compliant to MIL-PRF-38535, All Parameters Are Tested Unless Otherwise


Noted. On All Other Products, Production Processing Does Not Necessarily Include Testing
of All Parameters.

2.5.4 MC7805 Voltage Regulator IC

Direct voltage controllers are solid incorporated circuits planned as fixed-voltage controllers for a
wide assortment of uses including nearby, on-card guideline. These controllers utilize inside current
constraining, warm shutdown, and safe-region remuneration. With sufficient heatsinking they can
convey output flows in overabundance of 1.0 A. Albeit structured principally as a fixed voltage
controller, these devices can be utilized with outer segments to acquire movable voltages and flows.

Highlights

Yield Current in Excess of 1.0 A

No External Components Required

Inward Thermal Overload Protection

Inward Short Circuit Current Limiting

Yield Transistor Safe-Area Compensation

Yield Voltage Offered in 1.5%, 2% and 4% Tolerance

Pb-Free Packages are Available

Smart street light Page 34


Schematic of 7805 IC

The heart of the 7805 IC is a transistor (Q16) that controls the current between the input and
output and thus controlling the output voltage. The bandgap reference (yellow) keeps the
voltage stable. It takes the scaled output voltage as input (Q1 and Q6) and provides an error
signal (to Q7) for indication if the voltage is too high or low. The key task of the bandgap is
to provide a stable and accurate reference, even as the chip’s temperature changes.

The error signal from the bandgap reference is amplified by the error amplifier (orange). This
amplified signal controls the output transistor through Q15. This closes the negative feedback
loop controlling the output voltage. The startup circuit (green) provides initial current to the
bandgap circuit, so it doesn’t get stuck in an “off” state. The circuit in purple provides
protection against overheating (Q13), excessive input voltage (Q19) and excessive output
current (Q14). These circuits reduce the output current or shutdown the regulator, protecting

Smart street light Page 35


it from damage in case of a fault. The voltage divider (blue) scales down the voltage on the
output pin for use by the bandgap reference.

Scaling the output

The 7805’s scaled output provides the input voltage (Vin) to the bandgap reference and the
bandgap provides an error signal as the output. The 7805’s bandgap circuit removes the
feedback loop that exists inside a traditional bandgap reference. Instead, the entire chip
becomes the feedback loop.

If the output voltage is correct (5V), then the voltage divider provides 3.75V at Vin.
Any change in output voltage propagates through Q6 and R7, causing the voltage at the base
of Q7 to rise or fall accordingly. This change is amplified by Q7 and Q8, generating the error
output. The error output, in turn, decreases or increases the current through the output
transistor. The negative feedback loop adjusts the output voltage until it is correct.

Application areas for 7805 IC

7805 IC is used in a wide range of circuits. The major ones being:

 Fixed-Output Regulator
 Positive Regulator in Negative Configuration
 Adjustable Output Regulator
 Current Regulator
 Adjustable DC Voltage Regulator
 Regulated Dual-Supply
 Output Polarity-Reversal-Protection Circuit
 Reverse bias projection Circuit

7805 IC also finds usage in building circuits for inductance meter, phone charger, portable
CD player, infrared remote control extension and UPS power supply circuits.

Smart street light Page 36


Chapter 3

Methodology
As in the conventional system the street lights are switched on all night and consumed a huge
amount of electrical power. When is no object on the road (street). We do not require the
light to turn on at maximum intensity. One of the key goal of this project is to overcome this
issue and do not consume huge amount of electricity to reduce use of extra power. This
process is done with help of IR (infrared sensor) sensor. The IR sensor has been installed on
the both side of the street. The transmitter and reciver opposite to each other. A constant
communication is occurred between thr IR transmitter and IR reciver, as the object is
detected it will send the signal to the microcontroller to turn ON the night with full intensity.
The DIM light or the light with low intensity use less power as compared to full brightness.
The brightness of light is directly proportional to the power consumed when the brightness of
light is high poweruse in circuit will be more and vice versa.

In this normal system, we do not know about the faulty street light. We turn on the street light
during the time to check the faulty street light. It also consume electrical power as they turn
on during the day time. Therefor,the system will detect the fault in the street light by placing
the fault detection sensors. For this purpose,the LDR (light dependent resistor ) has been used
which work on the principle of voltage divider rule and it resistance inversely proportion to
the intensity of light is falling it. The LDR is fixed with in the light pole directed to the street
light when the light is falling it. The LDR will create normal signal as the intensity of light as
low from the certain value the LDR will create a high signal and send it to micro controller
that the fault accord in the street light. It will send the signal to the GSM Module to active
and send the message to the concern mobile number which is given in the programming.
Every light has its own number in the programming therefore the worker will come to check
and replace the faulty light.

Intelligent street light and GSM based fault monitoring system is an automated system design
to increase the efficiency and accuracy of a system automatically controlled switching of
street light. this project describe a new economical solution of streetlight control system.the
control system consist of some sensors, GSM Module , control circuitry and electrical

Smart street light Page 37


devices.

3.1 Existing system


The unwanted lights are turned on at the roadwhich consume a huge amount of power during
the night . the light is on with full brightness which is unnecessary and not needed. We need
light when there is some object on the road. In the old system to check the fault in the street
light the light is turned on during the day time and every street light is checked individually.
The circuit diagram of the existing system as follow:

Smart street light Page 38


Fig; 07 Circuit diagram for Exisisting system

Circuit diagram 2

Smart street light Page 39


3.2 PROPOSED SYSTEM

The project will be controlled all the light very accurately a no extra power is wasted in the
system by using different type of sensors. Initially the brightness of the light is low when the
object detected by IR sensor the signal is generated and send to turn on the light will
maximum brightness.The faulty light is detected by LDR which create and gave the signal
to micro controller, the microcontroller further send the signal to GSM module which send
the message to the concern department.In this new system, thesystem with LDR sensor IR
sensor is used to intimate the status of human use some important technique is used in the
project which is explain further

Smart street light Page 40


Chapter 4

Result and conclusion

In short,we get our required objective i.e the street light system we designed is smart.it will
glow at low intensity of light in normal if it detects the object by infrared sensors it will send
the message to the controller and will glow the street light at high intensity.

If any of street light is damaged or out of work it will generate an automatic message
and will send the message to pre -defined number about the fault in the system.this system is
more reliable and do not consume huge amount of electricity.

Moreover,we get our objective to make the power efficient system.this system will
save the use of extra amount of electrical energy which is wasted during the night timing.

Smart street light Page 41


Chapter 5

Future Work

5.1 Future work Recommendation


This system can be advanced to fulfill the future requirements.This system will be
enhanced to produced the large amount of electricity which is used for other purposes.

In future,an accidient avoidance technique will be used for the hilly areas . Specially the
roads where the turns are so closed and people cannot see the vehicle from the other side.

It can be protect from accident in variouse form of causes which can happened due to
accident.

In future it can use in busy street, busy road and mostly in busy city which protect us from
accident and main causes of accident is careless and unfair of knowlwdge.

Smart street light Page 42


Chapter 6

Coding

int min_LdrValue=

int loop1=0;

int loop2=0;

int loop3=0;

int loop4=0;

void setup() {

Serial.begin(9600);

void loop() {

int val1=analogRead(A0);

int val2=analogRead(A1);

int val3=analogRead(A2);

int val4=analogRead(A3);

if(val1<min_LdrValue)

while(loop1<2)

sms2();

loop1++;

else

loop1=0;

Smart street light Page 43


}

if(val2<min_LdrValue)

while(loop2<2)

sms1();

loop2++;

else

loop2=0;

if(val3<min_LdrValue)

while(loop3<2)

sms4();

loop3++;

else

loop3=0;

if(val4<min_LdrValue)

while(loop4<2)

sms3();

loop4++;

Smart street light Page 44


}

else

loop4=0;

void sms1()

Serial.println("AT+CMGF=1"); //Sets the GSM Module in Text Mode

delay(1000); // Delay of 1000 milli seconds or 1 second

Serial.println("AT+CMGS=\"+923419521680\"\r"); //Replace x with mobile number

delay(1000);

Serial.println("light1 is out of working");// The SMS text you want to send

delay(100);

Serial.println((char)26);// ASCII code of CTRL+Z

delay(1000);

void sms2()

Serial.println("AT+CMGF=1"); //Sets the GSM Module in Text Mode

delay(1000); // Delay of 1000 milli seconds or 1 second

Smart street light Page 45


Serial.println("AT+CMGS=\"+923419521680\"\r"); //Replace x with mobile number

delay(1000);

Serial.println("light2 is out of working ");// The SMS text you want to send

delay(100);

Serial.println((char)26);// ASCII code of CTRL+Z

delay(1000);

void sms3()

Serial.println("AT+CMGF=1"); //Sets the GSM Module in Text Mode

delay(1000); // Delay of 1000 milli seconds or 1 second

Serial.println("AT+CMGS=\"+923419521680\"\r"); //Replace x with mobile number

delay(1000);

Serial.println("light3 is out of working ");// The SMS text you want to send

delay(100);

Serial.println((char)26);// ASCII code of CTRL+Z

delay(1000);

void sms4()

Smart street light Page 46


{

Serial.println("AT+CMGF=1"); //Sets the GSM Module in Text Mode

delay(1000); // Delay of 1000 milli seconds or 1 second

Serial.println("AT+CMGS=\"+923419521680\"\r"); //Replace x with mobile number

delay(1000);

Serial.println("light4 is out of working ");// The SMS text you want to send

delay(100);

Serial.println((char)26);// ASCII code of CTRL+Z

delay(1000);

}150;

Smart street light Page 47


const int led1 = 3;

const int led2 = 5;

const int led3 = 6;

const int led4 = 9;

const int button1 = 7;

const int button2 = 8;

const int button3 = 10;

const int button4 = 11;

const int maxBrightness = 100;

const int minBrightness = 10;

int time = 10;

void led1state()

if(digitalRead(button1)==0)

analogWrite(led1,maxBrightness);

Serial.println("button1 is press");

delay(time);

else

analogWrite(led1,minBrightness);

void led2state()

if(digitalRead(button2)==0)

analogWrite(led2,maxBrightness);

Serial.println("button2 is press");

delay(time);

Smart street light Page 48


}

else

analogWrite(led2,minBrightness);

void led3state()

if(digitalRead(button3)==0)

analogWrite(led3,maxBrightness);

Serial.println("button3 is press");

delay(time);

else

analogWrite(led3,minBrightness);

void led4state()

if(digitalRead(button4)==0)

analogWrite(led4,maxBrightness);

Serial.println("button3 is press");

delay(time);

else

analogWrite(led4,minBrightness);

Smart street light Page 49


}

void setup() {

pinMode(led1,OUTPUT);

pinMode(led2,OUTPUT);

pinMode(led3,OUTPUT);

pinMode(led4,OUTPUT);

pinMode(button1,INPUT);

pinMode(button2,INPUT);

pinMode(button3,INPUT);

pinMode(button4,INPUT);

Serial.begin(9600);

void loop() {

led1state();

led2state();

led3state();

led4state();

Smart street light Page 50


Chapter 7

References
[1] Wu, Y.,Shi, C.,Zhang,X.,& Yang, W. (2010,June).Design of new Smart Street lights. In
Control And Automation (ICCA), 2010 8TH IEEE International conference on (pp. 1423-
1427). IEEE.

[2]Amin, C., AshutoshNerkar, P.H., & Kaul, R. (2013). GSM based autonomous street
illumination system for efficient power management. International Journal of Engineering
Trends and Technology, 4(1), 54-60.

[3] Chung H. S. H., Ho, N. M., Hui, S. Y. R.,& Mai, W.Z.(2005,September). Case study of a
highly –reliable dimmable road lighting system with intelligent remote control. In power
Electronics And Applications, 2005 European Conference on (pp.1 –pp). IEEE.

[4] A. Lay-Ekuakille, G. Vendramin,’Led-based public Lighting System Reliability For a


Reduce Impact on Environment And energy Consumption’.

[5]”Every Speed Breaker is now a Source of power”,IPCBEE Vo1.1,2011.

Smart street light Page 51

You might also like