0% found this document useful (0 votes)
15 views60 pages

Automatic Street Light Control System

The project report details the design and implementation of an Automatic Street Light system that incorporates fault detection and location tracking. The system uses sensors to detect vehicle movement, allowing street lights to turn on and off dynamically to save energy, while also notifying users of any faults via a mobile application. The project aims to improve energy efficiency in urban lighting by utilizing LED technology and microcontroller-based control systems.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views60 pages

Automatic Street Light Control System

The project report details the design and implementation of an Automatic Street Light system that incorporates fault detection and location tracking. The system uses sensors to detect vehicle movement, allowing street lights to turn on and off dynamically to save energy, while also notifying users of any faults via a mobile application. The project aims to improve energy efficiency in urban lighting by utilizing LED technology and microcontroller-based control systems.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd

AUTOMATIC STREET LIGHT WITH FAULT

DETECTION & LOCATION TRACKING


A PROJECT REPORT
Submitted by

[Link](2020102060)

[Link] PITCHAI(2020102089)

[Link](2020102102)

in partial fulfillment for the award of the degree

of

BACHELOR OF ENGINEERING

in

COMPUTER SCIENCE AND ENGINEERING

SETHU INSTITUTE OF TECHNOLOGY


(An Autonomous Institution | Accredited with ‘A’ Grade by NAAC)
PULLOOR, KARIAPATTI-626 115.

ANNA UNIVERSITY: CHENNAI 600 025.

MARCH 2023

1
SETHU INSTITUTE OF TECHNOLOGY
(An Autonomous Institution | Accredited with ‘A’ Grade by NAAC)
PULLOOR, KARIAPATTI-626 115.

ANNA UNIVERSITY: CHENNAI 600 025.

BONAFIDE CERTIFICATE

Certified that this project report entitled “AUTOMATIC STREET


LIGHT WITH FAULT DETECTION & LOCATION
TRACKING ” is the bonafide work of “[Link]”,
“[Link]” and “[Link]” who
carried out the project work under my supervision.

SIGNATURE SIGNATURE
Dr. [Link] Mrs. [Link]
HEAD OF THE DEPARTMENT SUPERVISOR

Submitted for the 19UCS801-Project Work, End Semester


Examination, held on ------------------------

INTERNAL EXAMINER EXTERNAL EXAMINER

ACKNOWLEDGEMENTS
2
First we would like to thank GOD the almighty for giving us the
talent and opportunity to complete our project and our B.E degree.
We wish to express our earned great fullness to our Honorable
Founder and Chairman, Mr. S. MOHAMED JALEEL [Link]., B.L., for his
encouragement extended us to undertake this project work.
We wish to thank and express our gratitude to our Chief Executive Officer
Mr. S. M. SEENI MOHIDEEN [Link]., M.B.A., Director-Administration, Mrs.
S. M. NILOFER FATHIMA B.E., M.B.A., Director - R & D, Dr. S. M. NAZIA
FATHIMA [Link]., M.E.,Ph.D and Joint chief executive officer, Mr. S. M.
SEENI MOHAMED ALIAR MARAIKKAYAR B.E., M.E., M.B.A.,(Ph.D) for
their support in this project.
We would like to thank and express our gratitude to our Principal,
Dr. [Link] B.E., M.E., Ph.D., for providing all necessary for
the completion of the project. We wish to thank and express our
gratitude to our Vice Principal, Dr. [Link] KUMAR B.E., M.E., Ph.D.,
for his support to our project work.
We wish to express our profound gratitude to our Head of the
Department Dr. [Link] B.E., M.E., Ph.D., for granting us the
necessary permission to proceed with our project.
We are immensely grateful to our guide, supervisor and overseer
[Link] for encouraging us a lot throughout the course of the
project. We render our sincere thanks of her support in completing this project
successfully.
We thank our Parents, Faculty Members, Supporting Staff and Friends
for their help extended during these times.

3
ABSTRACT

Street lights are a large consumer of energy in cities using upto 50% of a
city’s energy budget. The main aim of our project is to control energy
efficient LED lights on highways (like NH44 & NH47 AND ALSO LOCAL
STREETS) to turn on when needed and to remain in a dim state otherwise
according to the sensor signals. The sensors used on one side of the road,
sense the vehicle movement and send logical commands to the
microcontroller .ARDUINO UNO and the lights will be brightened. Frequent
switching of street lights, reduces its life time. And the another think is fault
detection in that fault detection has been maintained the street light . when
the street light has been damaged using wi-fi connection to intimate the area
in the mobile application (name of the mobile app is tcp client) . In that
mobile application we can saw the damaged street light in which area.

4
TABLE OF CONTENTS

CHAPTER TITLE PAGE


NO. NO.
ACKNOWLEDGEMENT 3
ABSTRACT 4
1 SYNOPSIS 6
2 BLOCK DIAGRAM 7
3 BLOCK DIAGRAM DESCRIPTION 8
3.1 ARDUINO UNO 8
3.2 IR SENSOR 8
3.3 PWM DRIVER 8
3.4 LDR DETECTOR 8
3.5 WIFI MODULE 9
3.6 LCD DISPLAY 9
3.7 POWER SUPPLY 9
4 CIRCUIT DIAGRAM 10
5 CIRCUIT DIAGRAM DESCRIPTION 11
5.1 ARDUINO UNO 11
MICROCONTROLLER
5.2 IR SENSOR MODULE 23
5.3 PWM DRIVER 28
5.4 LDR DETECTOR 31
5.5 WI-FI MODULE 34
5.6 LCD DISPLAY 37
5.7 POWER SUPPLY 44
6 PCB DESIGN AND FABRICATION 49
7 SOLDERING 52
8 ADVANTAGES 53
9 APPLICATIONS 53
10 WORKING OF THE PROJECT 54
11 CONCLUSION 55
12 BIBLIOGRAPHY 60

SYNOPSIS

5
The project is designed to detect vehicle movement on highways to
switch ON only a block of street lights ahead of it (vehicle), and to switch
OFF the trailing lights to save energy. During night all the lights on the
highway remain ON for the vehicles. But lot of energy is wasted when there
is no vehicle movement.

This proposed system provides a solution for energy saving. This is


achieved by sensing an approaching vehicle and then switching ON a block
of street lights ahead of the vehicle. As the vehicle passes by, the trailing
lights switch OFF automatically. Thus, we save a lot of energy. So when
there are no vehicles on the highway, then all the lights remain OFF.
However, there is also another mode of operation. Instead of switching OFF
the lights completely, they remain ON with 10% of the maximum intensity of
the light. As the vehicle approaches, the block of street lights switch to 100%
intensity and then as the vehicle passes by, the trailing lights revert back to
10% intensity again.

High intensity discharge lamp (HID) presently used for urban street
light are based on principle of gas discharge, thus the intensity is not
controllable by any voltage reduction. White Light Emitting Diode (LED)
based lamps are soon replacing the HID lamps in street light. Sensors used
on either side of the road senses vehicle movement and sends logic
commands to microcontroller to switch ON/OFF the LEDs. Thus this way of
dynamically changing intensity ON/OFF helps in saving a lot of energy.

BLOCK DIAGRAM
6
POWER SUPPLY

LCD DISPLAY
IR SENSOR 1

PWM DRIVER LEDS


ARDUINO UNO
IR SENSOR 2 MICROCONTROLLER

LIGHT FAIL WI-FI MODULE


DETECTOR

LDR
DAY\NIGHT

BLOCKDIAGRAM DESCRIPTION
7
ARDUINO UNO
The ARDUINO Uno is a microcontroller board based on the ATMEGA328 .
It has 14 digital input/output pins (of which 6 can be used as PWM outputs),
6 analog inputs, a 16 MHz crystal oscillator, a USB connection, a power jack,
an ICSP header, and a reset button.

IR SENSOR
The IR Sensor Module or infrared (IR) sensor is a basic and most popular
sensor in electronics. It is used in wireless technology like remote controlling
functions and detection of surrounding objects/ obstacles. IR sensors mainly
consist of an Infrared (IR) LED

PWM DRIVER
Pulse width modulation (PWM) is a power technique for controlling
analog circuit with a processor’s digital outputs. PWM is employed in a wide
variety of application, ranging form measurement and communications to
power control and conversion

LDR DETECTOR
Light dependent resistor—photo resistor or Cadmium –Sulfide (Cds) cell. As
their name suggests, these are resistors whose resistance is a function of the
amount of light falling on them

WI-FI MODULE
8
ESP8266 is an impressive, low cost WIFI module suitable for adding WIFI
functionality to an existing microcontroller project via a UART serial
connection. The module can even be reprogrammed to act as a standalone
WIFI connected device–just add power

LCD DISPLAY
LCD is mainly used for display the information. Here we are using 2x16
LCD. Operation of the LCD is the declining prices of LCDs. The ability to
display numbers, characters, and graphics. This is in contrast to LEDs, which
are limited to numbers and characters. The LCDs are light weight with only a
few millimeters

POWERSUPPLY
This power supply circuit is designed to get regulated output DC voltage. The
0-9 volt centre tape transformer is used to step down the main voltage (230v)
into 9 volts. The secondary voltage of transformer is rectified using bridge
rectifier

CIRCUIT DIAGRAM

9
LCD1
LM016L

9V TRANSFORMER POWER SUPPLY


230V\50HZ RECTIFIER

I\P FILTER 7805


D1 D2 REGULATOR PWM DRIVER STREET LIGHT
2

VDD
O\P

VSS
VEE
1 1 3

RW
RS

D0
D1
D2
D3
D4
D5
D6
D7
VI VO

E
D1 D2 D3 D4
GND

D13 LED LED LED LED

1
2
3
4
5
6
7
8
9
10
11
12
13
14
D3 D4 R1 GND C
C2 C1 470k ARDUINO UNO R9
LED
-
2

1000mf
33R D5 D6 D7 D8
100mf SIM1
LED LED LED LED
+5V C
A
R6 + D9 D10 D11 D12
BEL 100N C LED LED LED LED
33R
AREF B

13 MJE 3055
A R D U IN O

RESET 12 E B
~11
5V ~10
IR SENSOR ~9 E
S IM U L IN O

8
POW ER

GND
+5V
ATM E G A3 2 8 P

O\P 7
D IG IT A L ( P W M ~ )

~6
AT M E L

ENTRY
A N A L O G IN

A0 ~5
A1 4
A2 ~3
gnd A3 2
A4 TX > 1
A5 RX < 0
O\P [Link] RX0 esp8266 3.3v
[Link]
+5V SIMULINO UNO
EXIT TX1
LDR DETECTOR
DAY\NIGHT MODE
gnd

R7 WI-FI MODULE
10K
R2 R3 O\P
47K 10K U1
7

3 R4 Q1
6 BC547
2 4K7
LDR1 R8 R5
1.0 10K
LDR
4
1
5

10K 741

GND
LDR DETECTOR
LIGHT FAIL

R14
10K
R10 R11 O\P
47K 10K U2
7

3 R12 Q2
6 BC547
2 4K7
LDR2 R15 R13
1.0 10K
LDR
4
1
5

10K 741

GND

CIRCUIT DIAGRAM DESCRIPTION


10
ARDUINO UNO
The ARDUINO Uno is a microcontroller board based on the
ATMEGA328 . It has 14 digital input/output pins (of which 6 can be used as
PWM outputs), 6 analog inputs, a 16 MHz crystal oscillator, a USB
connection, a power jack, an ICSP header, and a reset button. It contains
everything needed to support the microcontroller. It has 4/8/16/32K bytes of
In- System Programmable Flash with Read-While-Write capabilities,
256/512/512/1K bytes EEPROM, 512/1K/1K/2K bytes SRAM, 23 general
purpose I/O lines, 32 general purpose working registers, three flexible
Timer/Counters with compare modes, internal and external interrupts, a serial
programmable USART, a byte-oriented 2-wire Serial Interface, an SPI serial
port, a 6-channel 10-bit ADC (8 channels in TQFP and QFN/MLF packages),
a programmable Watchdog Timer with internal Oscillator, and five software
selectable power saving modes.

ARDUINO UNO CONTROLLER


USB cable or power it with a AC-to-DC adapter or battery to get started. The
Uno differs from all preceding boards in that it does not use the FTDI USB-
to-serial driver chip. Instead, it features the Atmega8U2 programmed as a
USB-to-serial converter. "Uno" means one in Italian and is named to mark
the upcoming release of ARDUINO 1.0. The Uno and version 1.0 will be the
reference versions of ARDUINO, moving forward. The Uno is the latest in a
series of USB ARDUINO boards, and the reference model for the
ARDUINO platform; for a comparison with previous versions,
 Microcontroller : ATmega328
 Operating Voltage : 5V

 Input Voltage (recommended): 7-12V

11
 Input Voltage (limits) : 6-20V
 Digital I/O Pins : 14 (of which 6 provide PWM output)
 Analog Input Pins : 6
 DC Current per I/O Pin :40 mA
 DC Current for 3.3V Pin : 50 mA
 Flash Memory : 32 KB of which 0.5 KB used by bootloader.
 SRAM : 2 KB
 EEPROM : 1 KB
 Clock Speed : 16 MHz

The ARDUINO Uno can be powered via the USB connection or with an
external power supply. The power source is selected automatically.

12
External (non-USB) power can come either from an AC-to-DC
adapter (wall-wart) or battery. The adapter can be connected by plugging a
2.1mm center-positive plug into the board's power jack. Leads from a battery
can be inserted in the Gnd and Vin pin headers of the POWER connector.
The board can operate on an external supply of 6 to 20 volts. If
supplied with less than 7V, however, the 5V pin may supply less than five
volts and the board may be unstable. If using more than 12V, the voltage
regulator may overheat and damage the board. The recommended range is 7
to 12 volts.
The power pins are as follows:
VIN. The input voltage to the ARDUINO board when it's using an external
power source (as opposed to
5 volts from the USB connection or other regulated power source). You can
supply voltage through
this pin, or, if supplying voltage via the power jack, access it through this pin.

5V. The regulated power supply used to power the microcontroller and other
components on the
board. This can come either from VIN via an on-board regulator, or be
supplied by USB or another
regulated 5V supply.

13
3V3. A 3.3 volt supply generated by the on-board regulator. Maximum
current draw is 50 MA.
GND. Ground pins.
MEMORY:
The Atmega328 has 32 KB of flash memory for storing code (of
which 0,5 KB is used for the boot loader); It has also 2 KB of SRAM and 1
KB of EEPROM.
INPUT AND OUTPUT
Each of the 14 digital pins on the Uno can be used as an input or
output, using pin Mode(), digital Write(), and digital Read() functions. They
operate at 5 volts. Each pin can provide or receive a maximum of 40 MA and
has an internal pull-up resistor (disconnected by default) of 20-50 k Ohms. In
addition, some pins have specialized functions:
Serial: 0 (RX) and 1 (TX)Used to receive (RX) and transmit (TX) TTL
serial data. These pins are
connected to the corresponding pins of the ATmega8U2 USB-to-TTL Serial
chip .
External Interrupts: 2 and 3 These pins can be configured to trigger an
interrupt on a low value, a
rising or falling edge, or a change in value. See the attach Interrupt() function
for details.
PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analog
Write() function.

14
SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI
communication, which,
although provided by the underlying hardware, is not currently included in
the ARDUINO Language.
· LED: 13. There is a built-in LED connected to digital pin 13. When the pin
is HIGH value, the LED is on, when the pin is LOW, it's off.
The Uno has 6 analog inputs, each of which provide 10 bits of
resolution (i.e. 1024 different values). By default they measure from ground
to 5 volts, though is it possible to change the upper end of their range using
the AREF pin and the analog Reference() function. Additionally, some pins
have specialized
functionality:
· I2C: 4 (SDA) and 5 (SCL). Support I2C (TWI) communication using the
Wire library.
There are a couple of other pins on the board:
· AREF. Reference voltage for the analog inputs. Used with analog
Reference().
· Reset. Bring this line LOW to reset the microcontroller. Typically used to
add a reset button
shields which block the one on the board.
CHARACTERITICS
The maximum length and width of the Uno PCB are 2.7 and 2.1 inches
respectively, with the USB connector and power jack extending beyond the
former dimension. Three screw holes allow the board to be attached to a
surface

15
or case. Note that the distance between digital pins 7 and 8 is 160 mil (0.16"),
not an even multiple of the 100 mil spacing of the other pins.
Features:
• High Performance, Low Power AVR® 8-Bit Microcontroller
• Advanced RISC Architecture
– 131 Powerful Instructions – Most Single Clock Cycle Execution
– 32 x 8 General Purpose Working Registers
– Fully Static Operation
– Up to 20 MIPS Throughput at 20 MHz
– On-chip 2-cycle Multiplier
• High Endurance Non-volatile Memory Segments
– 4/8/16/32K Bytes of In-System Self-Programmable Flash program memory
(ATmega48PA/88PA/168PA/328P)
– 256/512/512/1K Bytes EEPROM (ATmega48PA/88PA/168PA/328P)
– 512/1K/1K/2K Bytes Internal SRAM (ATmega48PA/88PA/168PA/328P)
– Write/Erase Cycles: 10,000 Flash/100,000 EEPROM
– Data retention: 20 years at 85°C/100 years at 25°C(1)
– Optional Boot Code Section with Independent Lock Bits
In-System Programming by On-chip Boot Program

16
True Read-While-Write Operation
– Programming Lock for Software Security
• Peripheral Features
– Two 8-bit Timer/Counters with Separate Prescaler and Compare Mode
– One 16-bit Timer/Counter with Separate Prescaler, Compare Mode, and
Capture
Mode
– Real Time Counter with Separate Oscillator
– Six PWM Channels
– 8-channel 10-bit ADC in TQFP and QFN/MLF package
Temperature Measurement
– 6-channel 10-bit ADC in PDIP Package
Temperature Measurement
– Programmable Serial USART
– Master/Slave SPI Serial Interface
– Byte-oriented 2-wire Serial Interface (Philips I2C compatible)
– Programmable Watchdog Timer with Separate On-chip Oscillator
– On-chip Analog Comparator
– Interrupt and Wake-up on Pin Change
• Special Microcontroller Features
– Power-on Reset and Programmable Brown-out Detection
– Internal Calibrated Oscillator
– External and Internal Interrupt Sources
– Six Sleep Modes: Idle, ADC Noise Reduction, Power-save, Power-down,
Standby,
and Extended Standby
• I/O and Packages
– 23 Programmable I/O Lines
– 28-pin PDIP, 32-lead TQFP, 28-pad QFN/MLF and 32-pad QFN/MLF

17
• Operating Voltage:
– 1.8 - 5.5V for ATmega48PA/88PA/168PA/328P
• Temperature Range:
– -40°C to 85°C
• Speed Grade:
– 0 - 20 MHz @ 1.8 - 5.5V
• Low Power Consumption at 1 MHz, 1.8V, 25°C for
ATmega48PA/88PA/168PA/328P:
– Active Mode: 0.2 MA
– Power-down Mode: 0.1 ΜA
– Power-save Mode: 0.75 ΜA (Including 32 kHz RTC)

18
PIN DESCRIPTIONS
1.1.1 VCC
l supply voltage.
1.1.2 GND
Ground.
1.1.3 Port B (PB7:0) XTAL1/XTAL2/TOSC1/TOSC2
Port B is an 8-bit bi-directional I/O port with internal pull-up resistors
(selected for each bit). The Port B output buffers have symmetrical drive
characteristics with both high sink and source capability. As inputs, Port B
pins that are externally pulled low will source current if the pull-up resistors
are activated. The Port B pins are tri-stated when a reset condition becomes
active, even if the clock is not running. Depending on the clock selection fuse
settings, PB6 can be used as input to the inverting Oscillator amplifier and
input to the internal clock operating circuit. Depending on the clock selection
fuse settings, PB7 can be used as output from the inverting Oscillator
amplifier.
If the Internal Calibrated RC Oscillator is used as chip clock source, PB7..6 is
used as TOSC2..1 input for the Asynchronous Timer/Counter2 if the AS2 bit
in ASSR is set.
1.1.4 Port C (PC5:0)
Port C is a 7-bit bi-directional I/O port with internal pull-up resistors
(selected for each bit). The PC5..0 output buffers have symmetrical drive
characteristics with both high sink and source capability. As inputs, Port C
pins that are externally pulled low will source current if the pull-up resistors
are activated. The Port C pins are tri-stated when a reset condition becomes
active, even if the clock is not running.

19
1.1.5 PC6/RESET
If the RSTDISBL Fuse is programmed, PC6 is used as an I/O pin. Note
that the electrical characteristics of PC6 differ from those of the other pins of
Port C.
If the RSTDISBL Fuse is un programmed, PC6 is used as a Reset input. A
low level on this pin for longer than the minimum pulse length will generate
a Reset, even if the clock is not running. T Shorter pulses are not guaranteed
to generate a Reset.

1.1.6 Port D (PD7:0)


Port D is an 8-bit bi-directional I/O port with internal pull-
up resistors (selected for each bit). The Port D output buffers have
symmetrical drive characteristics with both high sink and source capability.
As inputs, Port D pins that are externally pulled low will source current if the
pull-up resistors are activated. The Port D pins are tri-stated when a reset
condition becomes active, even if the clock is not running.
1.1.7AVCC
AVCC is the supply voltage pin for the A/D Converter, PC3:0, and
ADC7:6. It should be externally connected to VCC, even if the ADC is not
used. If the ADC is used, it should be connected to VCC through a low-pass
filter. Note that PC6..4 use digital supply voltage, VCC.
1.1.8 AREF
AREF is the analog reference pin for the A/D Converter.
1.1.9 ADC7:6 (TQFP and QFN/MLF Package Only)
In the TQFP and QFN/MLF package, ADC7:6 serve as analog inputs
to the A/D converter. These pins are powered from the analog supply and
serve as 10-bit ADC channels.

20
BLOCK DIAGRAM

The AVR core combines a rich instruction set with 32 general purpose
working registers. All the 32 registers are directly connected to the
Arithmetic Logic Unit (ALU), allowing two independent registers to be
accessed in one single instruction executed in one clock cycle. The resulting
architecture is more code efficient while achieving throughputs up to ten
times faster than conventional CISC microcontrollers.
The ATMEGA following features 4/8/16/32K bytes of In- System
Programmable Flash with Read-While-Write capabilities, 256/512/512/1K
bytes

21
EEPROM, 512/1K/1K/2K bytes SRAM, 23 general purpose I/O lines, 32
general purpose working registers, three flexible Timer/Counters with
compare modes, internal and external interrupts, a serial programmable
USART, a byte-oriented 2-wire Serial Interface, an SPI serial port, a 6-
channel 10-bit ADC (8 channels in TQFP and QFN/MLF packages), a
programmable Watchdog Timer with internal Oscillator, and five software
selectable power saving modes. The Idle mode stops the CPU while allowing
the SRAM, Timer/Counters, USART, 2-wire Serial Interface, SPI port, and
interrupt system to continue functioning. The Power-down mode saves the
register contents but freezes the Oscillator, disabling all other chip functions
until the next interrupt or hardware reset. In Power-save mode, the
asynchronous timer continues to run, allowing the user to maintain a timer
base while the rest of the device is sleeping. The ADC Noise Reduction mode
stops the CPU and all I/O modules except asynchronous timer and ADC, to
minimize switching noise during ADC conversions. In Standby mode, the
crystal/resonator Oscillator is running while the rest of the device is sleeping.
This allows very fast start-up combined with low power consumption.

The device is manufactured using Atmel’s high density non-volatile memory


technology. The On-chip ISP Flash allows the program memory to be
reprogrammed In-System through an SPI serial interface, by a conventional
non-volatile memory programmer, or by an On-chip Boot program running
on the AVR core. The Boot program can use any interface to download the
application program in the Application Flash memory. Software in the Boot
Flash section will continue to run while the Application Flash section is
updated, providing true Read-While-Write operation. By combining an 8-bit
RISC CPU with In-System Self-Programmable Flash on a monolithic chip,
the ATMEGA is a powerful

22
microcontroller that provides a highly flexible and cost effective solution to
many embedded control applications.
The ATmega48PA328P AVR is supported with a full suite of program
and system development tools including: C Compilers, Macro Assemblers,
Program Debugger/Simulators, In-Circuit Emulators, and Evaluation kits
IR SENSOR MODULE
The IR Sensor Module or infrared (IR) sensor is a basic and most popular
sensor in electronics. It is used in wireless technology like remote controlling
functions and detection of surrounding objects/ obstacles. IR sensors mainly
consist of an Infrared (IR) LED and a Photodiode, this pair is generally called
IR pair. An IR LED is a special purpose LED, it is can emitting infrared rays
ranging from 700 nm to 1 mm wavelength. These types of rays are invisible
to our eyes. In contrast, a photodiode or IR Receiver LED detects the infrared
rays.

IR Sensor Module Pin Diagram/Pinout

IR Sensor Module pin diagram – pin out

23
Pin No Pin Name Description
VCC
1 +5 v power supply
2 GND Ground (-) power supply

3 OUT Digital Output

IR Sensor Module Hardware Overview

The IR sensor module consists mainly of the 1. IR


Transmitter, 2. Photodiode Receiver, 3. LM393 Comparators IC, 4.
Variable Resistor (Trim pot), 5. Power LED, 6. output LED.

1. Infrared LED or IR Transmitter:


An IR LED is a specially designed light-emitting diode (LED), it’s
emitting infrared rays. Infrared rays wavelength ranging is from 700 nm to 1
mm. Normally an IR LED looks like a normal LED. It has two terminals, the
longer one is Positive and the smaller one is negative. When IR LED
operated at a power supply, it starts emitting infrared rays.

IR Infrared LED

2. Photodiode Receiver or IR Receiver:


24
Normally IR receivers are photodiode. It is a
semiconductor which has a P-N junction. A photodiode is capable to detect
infrared rays. It’s operated in Reverse Bias. The photodiode has very High
resistance in the absence of infrared rays and becomes low when infrared
rays fall on it. Also, It has two terminals, the longer one is Positive and the
smaller one is negative.

Photodiode Receiver or IR Receiver

3) LM393 Comparator IC
Introduction
The LM393 integrated circuit (IC) is a dual differential comparator, it
consists of two inbuilt operational amplifiers. Each comparator accepts 2
inputs for comparison. The comparator compares these two input voltages
and measure which input voltage is the larger, then it provides output. These
ICs can perform different tasks using a single power supply. Also, it can be
work perfectly by the split power supply sources.

25
LM393 Comparator IC Internal Structure

The LM393 comparator IC consists of two inbuilt operational


amplifiers(Op-Amp).
The Op-Amp 1 & Op-Amp 2 negative inputs are connected to IC pin
4 and positive inputs are connected to IC pin 8.
The Op-Amp 1 Inverting input is connected to IC pin 2 and the Non-
Inverting input is connected to IC pin 3. The output of the Op-Amp 1 is
connected to IC pin 1.
The Op-Amp 2 Inverting input is connected to IC pin 6 and the Non-
Inverting input is connected to IC pin 5. The output of the Op-Amp 1 is
connected to IC pin 7.
LM393 IC Pin Configuration

LM393 IC Pin Diagram/Pinout

26
Pin Number Pin Name Description
1 OUTPUT1 This is the output pin of the Op-Amp 1
2 INPUT1- Inverting Input pin of Op-Amp 1
3 INPUT1+ Non-Inverting Input pin of Op-Amp 1
This is the Ground pin of the IC. it needs to connect to the
4 VEE, GND Negative(-) terminal of Supply Voltage.
5 INPUT2+ Non-Inverting Input pin of Op-Amp 2
6 INPUT2- Inverting Input pin of Op-Amp 2
7 OUTPUT2 This is the output pin of the Op-Amp 2
This is the positive pin of the IC. it needs to connect to the
8 VCC Positive(+) terminal of Supply Voltage.
Working Principle
First of all, we need to connect the power source with the Vcc and GND pin
of the LM393 IC to activate the IC. Then, we need to provide two input
voltage to the Op-Amp for comparison. Now, we can get an output from the
Op-Amp.

LM393 IC Working Principle


As an example, here we used the Op-Amp1 of the LM393 IC to get output.
First of all, we provide input voltage 1 to the Inverting terminal
(Pin2) and input voltage 2 to the Non-Inverting Terminal (Pin3).
If the input voltage 1 is greater than the input voltage 2, then the output of
the op-amp will be drawn down to the ground, which means the output
voltage is Low (GND).
If the input voltage 1 is less than the input voltage 2, then the output of the
op-amp stays at VCC, which means the output voltage is High (VCC).

4. Variable Resistor (Trim pot)


IR sensor has an on board variable resistor(potentiometer). This variable
resistor is a 10k preset. It is used to set the range of operation. Rotate the

27
preset knob to adjust the detection distance, the effective operation range 2-
10 cm. If the preset knob rotated clockwise, the detection range will be
increased. If it rotated counterclockwise, the detection range will be
decreased.
5. Power LED:
This onboard LED indicates the IR Sensor power supply is ON or
OFF. When we turn on the IR Sensor power supply this RED LED is also
turn on.
6. Output LED:
When infrared reflected back to the IR receiver and the sensor detects
an obstacle, the green LED lights up. So, the Green LED use to indicate the
sensor senses an obstacle.

PWM DRIVER
Pulse width modulation (PWM) is a power technique for controlling
analog circuit with a processor’s digital outputs. PWM is employed in a wide
variety of application, ranging form measurement and communications to
power control and conversion
In a nutshell, PWM is a way of digitally encoding analog signal levels.
Through the use of high-resolution counters. The duty cycle of a square
wave is modulated encode a specific analog signal level. The PWM signal is
still digital because, at any given instant of time, the full DC supply is either
fully on or fully off. The voltage or current source is supplied to the analog
load by means of a repeating series on and off pulses. The on-time is the time
during which the DC supply is applied to the load, and the off-time is the
period during which the supply is switched off. Given a sufficient
bandwidth, any analog value can be encoded with PWM.

28
BASIC HARDWARE CONTROLLERS:
Many microcontrollers include on-chip PWM units. For example,
Microchip’s PIC includes two, each of which has a selectable on-time and
period. The duty cycle is the ratio of the on-time to the period; the
modulating frequency is the inverse of the period. To start PWM operation,
the data sheet suggests the software should
 Set the period in the on-chip timer /counter that provides the
modulating square wave
 Set the on-time in the PWM control register
 Set the direction of the PWM output, which is one of the general-
purpose I/O pins
 Start the timer
 Enable the PWM controller
Although specific PWM controllers do vary in their programmatic details,
the basic idea is generally the same.

29
PWM DRIVER

O\P

D14
LED
R16
33R

C
I\P

BEL 100N C
B

E B

COMMUNICATION AND CONTROL


One of the advantages of PWM is that the signal remains digital all the
way from the processor to the controlled system; no digital to analog
conversion is necessary. By keeping the signal digital, noise effects are
minimized. Noise can only affect a digital signal if it is strong enough to
change a logic-1 to logic 0, or vice versa. Increased noise immunity is yet
another benefit of choosing PWM over analog control, and it the principal
reason PWM is sometimes used for communication. Switching from an
analog to PWM can increase the length of a

30
communications channel dramatically. At the receiving end, a suitable RC
(resistor – capacitor) or LC (inductor-capacitor) network can remove the
modulating high frequency square and return the signal to analog form.
PWM finds application in a variety of systems. As a concrete
example, consider a PWM controller brake. A brake is a device that clamps
down hard on something. In many brakes, the amount of clamping pressure
(or stopping power) is controlled with an analog input signal. The more
voltage or current that’s applied to the brake, the more pressure the brake will
exert.
The output of a PWM controller could be connected to a switch
between the supply and the brake. To produce more stopping power, the
software between only increase the duty cycle of the PWM output. If a
specific amount of braking pressure is desired, measurements would need to
betaken to determine the mathematical relationship between duty cycle and
pressure. (And the resulting formulae or lookup tables would be tweaked for
operating temperature, surface wear, and so on).
To set the pressure on the brake to, say 100 psi, and the software would do a
reverse lookup to determine the duty cycle that should produce that amount
of force. It would then set the PWM duty cycle to the new value and the
brake would respond accordingly. If a sensor is available in the system, the
duty cycle can be tweaked, under closed loop control, until the desired
pressure is precisely achieved
LIGHT DETECTOR
Light sensor is LDR. Here we are using a light sensor which senses the
light level emitted from the machines (spark). The output of this sensor is
compared with a comparator circuit. The output signal is given to
microcontroller.

31
+5V

10K 10K
47K
741
O /P

7
2 4K7
-
6
3 BC 547
+
LD R
4
10K
10K

G ND

LDR-LIGHT DEPENDENT RESISTOR


Light dependent resistor—photo resistor or Cadmium –Sulfide (Cds)
cell. As their name suggests, these are resistors whose resistance is a function
of the amount of light falling on them. Their resistance is very high when no
light is present and is significantly lower when they are illuminated. Under
normal conditions, light falls on LDR and in case of a fault the LDR will be
subjected to darkness.
ON LIGHT
When LDR is subjected to light, its resistance become10K  ; hence
the droop at the inverting terminal is less than at the inverting terminal.
Hence the output from comparator is –Vsat indicating normal condition.
ON DARKNESS
When the LDR is subjected to darkness, its resistance 100K  , and
the thus the drop at the non-inverting terminal than that at the inverting
terminal. Hence the output from this +Vsat indicating a faulty condition.

32
A photo resistor or light dependent resistor or cadmium sulfide (CdS) cell is a
resistor whose resistance decreases with increasing incident light intensity. It

can also be referenced as a photo conductor. A photo resistor is made of a


high resistance semiconductor. If light falling on the device is of high enough
frequency, photons absorbed by the semiconductor give bound electrons enough

energy to jump into the conduction band. The resulting free electron (and its
hole partner) conduct electricity, thereby lowering resistance.

A photoelectric device can be either intrinsic or extrinsic. An intrinsic


semiconductor has its own charge carriers and is not an efficient
semiconductor,

APPLICATION

Photo resistors come in many different types. Inexpensive cadmium


sulfide cells can be found in many consumer items such as camera light

meters, street lights, clock radios, alarms, and outdoor [Link] are also
used in some dynamic compressors together with a small incandescent lamp or
light emitting diode to control gain reduction.

33
Lead sulfide and indium antimonide LDRs are used for the mid infrared spectral

region. Ge:Cu photoconductors are among the best far-infrared detectors


available, and are used for infrared astronomy and infrared spectroscopy

WI-FI MODULE
ESP8266 is an impressive, low cost WIFI module suitable for adding
WIFI functionality to an existing microcontroller project via a UART serial
connection. The module can even be reprogrammed to act as a standalone
WIFI connected device–just add power!
The feature list is impressive and includes:
o 802.11 b/g/n protocol
o Wi-Fi Direct (P2P),
o Soft-AP Integrated TCP/IP protocol stack.
The hardware connections required to connect to the ESP8266 module
are fairly straight-forward but there are a couple of important items to note
related to power:

The ESP8266 requires 3.3V power–do not power it with 5 volts! The
ESP8266 needs to communicate via serial at 3.3V and does not have 5V
tolerant inputs, so you need level conversion to communicate with a 5V

34
microcontroller like most Arduino use. However, if you’re adventurous and
have no fear you can possibly get away with ignoring the second
requirement.

Introduction
ESPRESSIF Systems’ Smart Connectivity Platform (ESCP) is a set of
high performance, high integration wireless SOCs, designed for space and
power constrained mobile platform designers. It provides unsurpassed ability
to embed WIFI capabilities within other systems, or to function as a
standalone application, with the lowest cost, and minimal space requirement.
ESP8266EX offers a complete and self-contained WIFI networking
solution; it can be used to host the application or to offload WIFI networking
functions from another application processor. When ESP8266EX hosts the
application, it boots up directly from an external flash. In has integrated
cache to improve the performance of the system in such applications.
Alternately, serving as a WIFI adapter, wireless internet access can be added
to any micro controller based design with simple connectivity (SPI/SDIO or
I2C/UART interface). ESP8266EX is among the most integrated WIFI chip

35
in the industry; it integrates the antenna switches, RF balun, power amplifier,
low noise receive amplifier, filters, power management modules, it requires
minimal external circuitry, and the entire solution, including front-end
module, is designed to occupy minimal PCB area. ESP8266EX also
integrates an enhanced version of Tensilica’s L106 Diamond series 32-bit
processor, with on-chip SRAM, besides the WIFI functionalities.
ESP8266EX is often integrated with external sensors and other application
specific devices through its GPIOs; sample codes for such applications are
provided in the software development kit (SDK).

Smart Connectivity Platform (ESCP) demonstrates sophisticated system-level


features include fast sleep/wake context switching for energy-efficient VoIP,
adaptive radio biasing for low-power operation, advance signal processing,
and spur cancellation and radio co-existence features for common cellular,
Bluetooth, DDR, LVDS, LCD interference mitigation.
Features
• 802.11 b/g/n
• Integrated low power 32-bit MCU
• Integrated 10-bit ADC
• Integrated TCP/IP protocol stack
• Integrated TR switch, balun, LNA, power amplifier and matching network
• Integrated PLL, regulators, and power management units
• Supports antenna diversity
• WiFi 2.4 GHz, support WPA/WPA2
• Support STA/AP/STA+AP operation modes
• Support Smart Link Function for both Android and iOS devices
• SDIO 2.0, (H) SPI, UART, I2C, I2S, IR Remote Control, PWM, GPIO
• STBC, 1x1 MIMO, 2x1 MIMO
• A-MPDU & A-MSDU aggregation & 0.4s guard interval

36
• Deep sleep power < 5Ua
• Wake up and transmit packets in < 2ms
• Standby power consumption of < 1.0mW (DTIM3)
• +20 dBm output power in 802.11b mode
• Operating temperature range -40C ~ 125C
• FCC, CE, TELEC, WiFi Alliance, and SRRC

LED
A light-emitting diode is like a standard diode in the fact that electrical
current only flows in one direction. The main difference is an LED will emit
light when electricity flows through it. Inside an LED there is an anode and
cathode. Current always flows from the anode (+) to the cathode (-) and
never in the opposite direction. The longer leg of the LED is the positive
(anode) side.

LCD DISPLAY
LCD is mainly used for display the information. Here we are using
2x16 LCD. Operation of the LCD is the declining prices of LCDs. The
ability to display numbers, characters, and graphics. This is in contrast to
LEDs, which are limited to numbers and characters. The LCDs are light
weight with only a few millimeters thickness. Since the LCDs consume less
power, they are compatible with low power electronic circuits, and can be
powered for long durations. The LCDs don’t generate light and so light is

37
needed to read the display. By using backlighting, reading is possible in the
dark. The LCDs have long life and a wide operating temperature range.
Liquid Crystal Displays (LCDs) have materials which combine the properties
of both liquids and crystals. Rather than having a melting point, they have a
temperature range within which the molecules are almost as mobile as they
would be in a liquid, but are grouped together in an ordered from similar to a
crystal.
An LCD consists of two Glass Panels, with the liquid crystal material
sandwiched in between them. The inner surface of the Glass plates is coated
with transparent electrodes which define the character, symbols or patterns to
be displayed. Polymeric layers are present in between the electrodes and the
liquid crystal, which makes the liquid crystal molecules to maintain a defined
orientation angle. One each polarizer’s are pasted outside the two Glass
Panels. This polarizer’s would rotate the light rays passing through them to a
definite angle, in a particular direction .When the LCD is in the off-state,
light rays are rotated by the two polarizer’s and the Liquid Crystal, such that
the light rays come out of the LCD without any orientation, and hence the
LCD appears transparent. When sufficient voltage is applied to the
electrodes, the Liquid Crystal molecules would be aligned in a specific
direction. The light rays passing through the LCD would be rotated by the
polarizer’s, which would result in activating / high lighting the desired
characters. The LCDs are light weight with only a few millimeters thickness.
Since the LCDs consume less power, they are compatible with low power
electronic circuits, and can be powered for long durations.
The LCDs don’t generate light and so light is needed to read the
display. By using backlighting, reading is possible in the dark. The LCDs
have long life and a wide operating temperature range. Changing the display
size or the layout size is relatively simple which makes the LCDs more
customers friendly. The LCDs used exclusively in watches, calculators and

38
measuring instruments are the simple seven – segment displays, having a
limited amount of numeric data. The recent advances in technology have
resulted in better legibility, more information displaying capability and a
wider temperature range. These have resulted in the LCDs being extensively
used in telecommunications and entertainment electronics. The LCD s has
even started replacing the Cathode Ray Tubes (CRTs) used for the display of
text and graphics, and also in small TV [Link] is mainly used for
display the information. Here we are using 2x16 LCD. Operation of the LCD
is
 The declining prices of LCDs.
 The ability to display numbers, characters, and graphics. This is in
contrast to LEDs, which are limited to numbers and characters.
 Incorporation of a refreshing controller into the LCD, thereby relieving
the CPU of the task of refreshing the LCD. In contrast, the LED must be
refreshed by the CPU to keep displaying the data.
 Ease of programming for characters and graphics.

BLOCK DIAGRAM
CONTROLLER

16
E
LCD
R/W
RS 40 40
TO
D7
4 DRIVER
VDD
VL
VSS

39
LCD PIN DESCRIPTIONS
VCC, VSS, and VL (PIN 1 to 3):
While VSS provide Ground Terminal, OV. VCC provide Supply
Terminal, +5. VL is a Liquid Crystal Drive Voltage
RS, register select PIN 4):
There are two very important registers inside the LCD. The RS pin is
used for their selection as follows. If RS=0 the instruction command code
register is selected, allowing the user to send a command such as clear
display, cursor at home, etc. if RS=1d the data register is selected, allowing
the user to send data to be displayed on the LCD.
R/W read or write (PIN 5):
R/W input allows the user to write information to the LCD or read
information from it. R/W =1 when reading; R/W=0 when writing.
E, enable (PIN 6):
The enable pin is used b y the LCD to latch information presented to
its data pins. When data is supplied to data pins, high-to-low pulses must be
applied to this pin in order for the LCD to latch in the present at the data pins.
This pulse is a minimum of 450 ns wide.
D0 – D7 (PIN 7 to 14):
The 8 bit data pins, d0 – d7, are used to send information to the LCD or
read the contents of the LCD’s internal registers. Bi-directional data-bus.
When interface data length is 8-bits, data transfer is done once through DB0-
DB7, when the interface data length is 4-bits, data transfer is done twice
through DB4 – DB7
BACKLIGHT (PIN 15 & 16):
In case of 15 Pin Modules, Pin 15 Is the Supply Voltage (+5V) for
the LED. In case of 16 pin Modules, Pin 15 is the Ground (0V) and Pin 16 is
the Supply voltage (+5V) for the LED.

40
Crystal Oscillator:

We are using 4Hz Crystal Oscillator which is connected to the


pins 11 and 12. Two 22pf capacitors are used across the Crystal Oscillator
and are grounded.

Electrical Characteristics (VDD=5V @ 25 Deg C)

Min. Typ. Max.

Input voltage 2.2V - -

Input Low Voltages - - 0.6V

Output High Voltage 2.4V - -

Output Low Voltage - - 0.4V

Power Supply Current IDD - 0.8mA 18mA

I LED - 130mA 195 mA

41
IMAGE OF LCD DISPLAY

INTERFACING THE PROCESSOR CONTROLLER

The Module, interfaced to the system, can be treated as RAM


(Memory Mapping), Input/ output, expanded parallel I/O (Input/Output
Mapping). Since there is no conventional Chip Select signal,
developing a strobe signal for the Enable signal (E) and applying
appropriate signals to the Register Select (RS) and read/Write strobe.
The resultant signal, applied to the LCD’s Enable (E) input, clocks in
the data. The ‘E’ Signal must be a positive going digital strobe, which
is active while data and control information are stable and true. The
failing edge of the Enable signal enables the data/ Instruction Resister
of the Controller. All Module timings are referenced to specific edges
of the ‘E’ signal. The ‘E’ signal is applied only when a specific Module
transaction is desired.

The read and Write strobes of the Host, which provides the ‘E’
signal, should not be linked to the Module‘s R/W line. An address bit,
which sets up earlier in the Host Machine Cycle, can be used as R/W.
When the Host Processor is so fast that the strobes are too narrow to
serve as the ‘E’ pulse.

When the Controller is performing an internal operation the Busy


Flag (BF) Will set and will not accept any instruction. The user should
check the Busy Flag or should provide a delay of approximately 2 ms
after each instruction. The module presents to difficulties while
42
interfacing slower MPUs. The liquid crystal Display Module can be
interfaced, either to 4-bit or 8-bit MPUs.

For 4-bit data interface, the bus lines DB4 to DB7are used for
data transfer, while DB0 to DB3 lines are disabled. The data transfer
is complete when the 4-bit data has been transferred twice. The Busy
flag must be checked after the 4-bit data has been transferred twice.
Two more 4-bit operations then transfer the Busy Flag and Address
Counter Data.

For 8-bit data interface, all eight-bus lines (DB0 to DB7) are
used.

A liquid crystal display (LCD) is a thin, flat panel used for electronically
displaying information such as text, images, and moving pictures. Its uses
include monitors for computers, televisions, instrument panels, and other
devices ranging from aircraft cockpit displays, to every-day consumer
devices such as video players, gaming devices, clocks, watches, calculators,
and telephones. Among its major features are its lightweight construction, its
portability, and its ability to be produced in much larger screen sizes than are
practical for the construction of cathode ray tube (CRT) display technology.
Its low electrical power consumption enables it to be used in battery-powered
electronic equipment. It is an electronically-modulated optical device made up of

any number of pixels filled with liquid crystals and arrayed in front of a light
source (backlight) or reflector to produce images in color or monochrome. The

earliest discovery leading to the development of LCD technology, the


discovery of liquid crystals, dates from 1888.[1] By 2008, worldwide sales of
televisions with LCD screens had surpassed the sale of CRT units.

43
POWERSUPPLY
Most electronic circuits require DC voltage sources or power
supplies. If the electronic device is to be portable, then one or more
batteries is usually needed to provide the DC voltage required by
electronic circuits. But batteries have a limited life span and cannot be
recharged. The solution is to convert the alternating current lose hold
line voltge to a DC voltage source.

Block diagram of AC to DC power Supply consists,


1. Transformer: Steps the household line voltage up or down as
required.
2. Rectifier : converts AC voltage to pulsating DC voltage.
3. Filter : smooth the pulsating DC voltage to a varying DC
voltage.
4. Regulator : fixed the output voltage to constant value.
5. Transformer :
The basic transformer consists of a primary winding of N1 turns and
secondary winding of N2 turns. When an alternating line voltage V1,is
applied to the primary winding, an alternating current it creates a flux. The
flux flows through the magnetic core, includes an alternating current I2,
which in turn generates an alternating voltage V2 in the secondary winding.

44
Three important specifications are the secondary winding, power rating and
the regulation factor.
Rectifiers :
A rectifier circuit convertsan AC voltage into a pulsating DC voltage.
This is accomplished by using one or more diodes because diodes conduct
current in only one direction.
Types :
Half-wave Rectifier :
The transformer (T1) isolates the household voltage and also steps
down the household voltage to a more useful voltage level. The diode lets
current flow into the load in only one direction. The load current is
unidirectional; therefore, it has a significant dc component(or average value).
When V2 is positive, diode D1 conducts and V L=V2. when V2 is negative ,
diode D1 blocks the current flow and VL=0volts. The load voltage consist of
dc voltage along with ripple voltage. In a half-wave rectifier circuit, the
ripple component is lager than the DC component, which is undesirable.
USEFUL FORMULAS:
VAVG(DC) = 0.637V2
VL(DC) = 0.318V2
VL(AC) = 0.386V2
%RIPPLE = VL(AC)/VL(DC) = 121%
RIPPLE FREQUENCY = SUPPLY FREQUENCY
Full-wave Rectifier :
The full wave rectifier circuit requires a transformer with two
secondary windings. i.e. a center-tapped secondary winding.

The secondary windings are 180 out of phase.


Diode D1 contacts when V2a is positive, producing a half-wave
rectified voltage across the load. Diode D1 does not conduct when V2a is

45
negative. Diode D2 contacts when V2b is positive and does not conduct when
V2b is negative. One of the two diodes is conducting at all times because V2a
and V2b are 180 out of phase and thus producing full-wave rectified voltage.
In the Full wave rectifier, Dc component is larger than ripple.
USEFUL FORMULAS:
VL (DC) = 0.637V2
VL (AC) = 0.307V2
%RIPPLE = VL (AC)/VL(DC) = 48.2%
RIPPLE FREQUENCY = 2 x SUPPLY FREQUENCY
Full-wave bridge rectifier :
The full-wave bridge rectifier circuit requires four diodes. The
transformer has only one secondary winding.
When V2 is positive, diodes D1 & D3 conduct current through the
load. Diodes D2 and D4 block current flow. When V2 is negative,
diodes D2 and D4 conduct current through the load. Diodes D1 and
D3 block current flow. The full-wave bridge rectifier fully utilizes the
transformer winding during both half cycles.

USEFUL FORMULAS:
VL(DC) = 0.637V2
VL(AC) = 0.307V2
%RIPPLE = VL(AC)/VL(DC) = 48.2%
RIPPLE FREQUENCY = 2 x SUPPLY FREQUENCY
Filters:
The 121% ripple in the output of the half-wave rectifier and 48% in the
full-wave rectifier is more than can be normally tolerated. In the full wave
filtering, wherein the frequency of the ripple is 100Hz for a 50Hz ac line
voltage. This is an advantage where either an inductor is used to prevent the
passage of the ripple current(due to its high inductive reactance to ac but

46
quite low resistance to dc), or a capacitor is used to ‘short’ the ripple to
ground but leave the dc to appear at the output. Various combinations of L
and C are also used.
Regulators :
The simplest regulator is a large capacitor in parallel with the load. The
capacitor stores DC voltage while the load voltage increases to its peak value.
The capacitor converts the pulsating DC voltage of a rectifier into a smooth
Dc load voltage.
Two important parameters of a capacitor regulator are its working voltage
and its capacitance. The working voltage must be at least equal to no-load
output voltage of power supply. The capacitance determines the amount of
ripple that appears on the Dc output when current is drawn from the circuit.
The amount of ripple decreases with increase in capacitance.
Capacitance regulator circuit :
L-regulator circuit :
This circuit consists of a series inductor and a capacitance in parallel with
load. The L-regulator is often used in high-power DC supplie
MC 7800 and 7900 Regulators standard application circuit:
The Mc 7800 is a 3 terminal, positive, fixed voltage integrated
circuit regulator. These regulators employ internal current limiting,
thermal shutdown and safe area compensation. The Mc 7900 is a 3
terminal, negative, fixed voltage integrated circuit regulator.

Mc 7800 and Mc 7900 series requires no external components.


The input voltage must be at least two volts higher than the output voltage
capacitor c1 is required if the regulator is located far from the power supply.
Capacitor c2 improve the transient response.
Both series available in To-220 plastic package and T01-3 metal package.

47
Block diagram of Mc 7800 and Mc7900 regulator:
The unregulated input voltage is fed to the control element and the reference
voltage. The output voltage is sampled and fed into one of the error amplifier
inputs. The other error amplifier input connected to the reference voltage.
When the error amplifier senses a difference between the reference and
sampling voltages it acts upon the control element to correct the error by
dropping a greater portion of the input voltage across the control element.
The control element is a transistor which acts as a variable resistor, in which
the resistance is controlled by the error amplifier.
The input voltage however must not be large enough to exceed the
regulator power dissipation specification. Both series have an internal
protection circuit, a current limiting circuit, and a safe-area protection circuit.
The safe-area protection circuit limits the regulator output voltage when the
input voltage is too higher ensuring that the pass transistor control element
operates within its allowed voltage and current ranges

48
CIRCUIT DIAGRAM

7805
1 3 +5V

2
IN4007 IN4007 470E
STEP DOWN
TRANSFORMER
1000MF/25V 100MF/25V +
0.1MF
0-230V 0-9V

IN4007
IN4007
RED

PCB DESIGN AND FABRICATION

PROCEDURE FOR MAKING THE PCB


1. PREPARING OF LAYOUT:
With the diagram and all the components at hand, draw a complete
layout plan of the circuit on a sheet of a tracing paper. As a model, for laying
the circuit, a thermo Cole base may be used to hold components. Avoid over
crowding of components while making full space utilization. Keep the
ground line on the side of the PCB and the supply line on other side as far as
possible. When all the components have been mounted on the tracing paper
sheet fixed on a piece of thermo Cole base, take out a Sketch Pen for making
in such a way that all the connecting wires are equal in width, termination
rounded off. Re-draw it on a fresh paper if required.
49
2. PAINTING OF PCB:
The tracing so prepared has to be imposed over the copper printed
circuit board keeping in view that the component would be mounted from the
non-clad side of the board. Take a PCB lamination sheet and cur a piece of
required size of the board by using hacksaw file edges, put the copper clad
sheet on the table keeping side on the runway the dirt grease and oxide with a
sand paper with its marked side tracing the carbon paper and other side on
top. Since the tracing paper is transformed you can now reproduce a carbon
point over a surface but using ball pen on a hard pencil over the drawing on
the transparent side. When the carbon print has been obtained over the copper
clad board drill ropes in the board using a hand drill. The holes may be draw
with 1/32 bit for component leads and the carbon should be raised or wiped
by mistake. Paint the Connecting lines with the help of an ordinary paint.
Edges should be scratched with tip of razor blade.
3. DEVELOPMENT OF THE PRINTED CIRCUIT DIAGRAM:
After painting the board, it will be made by the cool air for sometime.
Now take a plastic tray and get some Fe Cl3 chemical powder. The ferric
chloride salt is then added with 500ml of water. The color of the solution is
pink. Color of the salt is in yellow. Now we add three to five drops of dilute
HCL or H2S04. This is necessary to quicken the process.
4. ETCHING OF PCB:
Now we take the painted copper clad board and dip it in the solution
kept in the tray. After 15 to 25 minutes we see the board, with only printed
pattern portion remaining in other places the copper coating is removed due
to the chemical action. Then the board is taken out and washes in water.
After wash the board by using thinner solution. Now a printed circuit has
been formed on the board.
Take fresh water and mix a few teaspoons of Fe CL3 add a few drops
of dilute HCL to it, as it speeds the etching process. Shake well immerse the

50
PCB in the solution for about 20 minutes occasionally altering the solution by
giving the seesaw reaction to the disk storing reduces the etching time.
Observe the changing color on the copper surface. Take out the PCB only
when the unpainted portion of the copper surface is completely dissolved in
the solution wash the PCB with the water. After the PCB is thoroughly
washed remove the paint by soft pieces of the cloth dipped in thinner or
turpentine.
5. DRILLING OF HOLES:
Then take a drilling machine with 1/32 drill bit to make holes for the
incretion of the components use 1/18 drill bit for inset wires and other thick
components. Now the PCB is ready to use.
ADVNTAGES:
1. Reliability in operation and low cost.
2. Space required becomes less.
DISADVANTAGES:
It can’t withstand larger weight such as transformer.
6. MATERIAL REQUIRED:
 Copper clad sheet [It is made of hylam or nylon board over which the
sheet of copper is pressed.]
 “Paint or “Nail polish” or even “PCB Ink”.
 Painting brush, tray.
 Ferric chloride solution and also few drop of dilute HCL or H2SO4.
 Thinner or kerosene or petrol.
 Cotton cloth.
 Trace paper.

51
SOLDERING

SOLDERING
Solder is an alloy of tin and lead used for using metals relatively low
temperature about 260-315k the point where two metal conductors are to be
fused is heated and then solder is applied so that it can melt and cover the
connection. The reason for soldering connection is that it makes a good
blend between the joined metals.
Covering the joint completely is to prevent oxidation. The coating of
solder provides protection for practically an in definitive period of time. The
trick in soldering is to heat the joint, not the solder. When the joint is not
enough to melt the solder the cracks, forming a shifty cover without until the
solder has set, which takes only a few seconds. Either a soldering gun can be
used, rated at 25-10,000. The gun is convenient for the intermittent
operation, since it heats almost instantaneously when for press the trigger.
The small pencil iron of 25-4,000 is helpful or small connections where
excessive heat can cause damage. This precaution is particularly important
when working on PCB boards, where too much heat can soften the plastic
form and loosen the printed writing, a soldering iron for F&T devices should
have the tip ground to eliminate static charge.
The three grades of solder, generally used for electronics work are 40-60, 50-
50, 60-40 solder. The 60-40 solders costs more but it melts at the lowest
temperature flows more freely takes less time to harder, and generally makes
it easier to do a soldering [Link] addition to the solder there must be flux to
move any oxide film on the metals being joined otherwise they cannot fuse.
The flux enables the molten solder to wet the metals so that the solder can
stick. The two types are acid flux and rosin flux. Acid flux is more active in

52
cleaning metals but is corrosive. Rosin flux is always used for the light
soldering work in making wire

ADVANTAGES AND APPLICATIONS


ADVANTAGES:
 Ease of maintenance
 LDR 1 detects the day and night mode
 LDR 2detects the lamp failure
 Ir sensor detects the object to entry of vehicle and dark mode the
vehicle is exit then light mode
 This process is will send the message to wi-fi module and intimate the
stages of failure and address
 Highly efficient
 Power saving
 Identify the current status
 Find a path in night time

APPLICATIONS:
 Shopping Malls
 Parking area
 Restaurants
 Recreation Areas
 House hold Applications
 Industries,
 Banks,
 Office,
 Highways

53
WORKING OF THE PROJECT

WORKING OF THE PROJECT


As per as the circuit diagram the project is smart street light on highways,
The mains voltage ac 230v is step down to 9 volt, using 9v step down
transformer. The low value secondary voltage is fed to the rectifier is formed
using four no. of IN 4007. For first half cycle, Diodes D1 & D2 come to
action and next half cycle diode D3 & D4 come to action, finally
unidirectional dc supply is fed to the filter capacitor. The charging &
discharging property of capacitor provide pure smooth dc is nearly peak
value of the secondary voltage. The pure DC supply is fed to regulator IC’s
input terminal. Due to the 5V output the IR sensor detects the object is here
IR sensor 1 is roadway entry side that time detects and transmit the data and
receive the object led ‘s are blinks IR sensor 2 is exit side and IR sensor 3 is
no parking LDR detector that detects day\night mode if the day time there
is no on the street light and night time on highways lights is on that time led
is saving the power and LDR 2 id detected the lamp failure condition if the
car is detected by IR sensor the led blinks dark and car is away the led blinks
low with the help of pulse width modulation it can control the data through
the time then if anybody is car is no parking detects the IR sensor 3 and
intimate the message to WI-FI MODULE by programmed number these data
‘s are stored the ARDUINO UNO microcontroller and sends and receive the
applications through this process and the information’s are LCD display .

54
CONCLUSION
This project on ”AUTOMATIC STREET LIGHT WITH FAULT
DETECTION & LOCATION TRACKING” is working fire, getting the
parameter envisaged during the conceptual stage. During the design, as well
as during the construction, greater care has been put in to avoid hiccups at the
final stage. The PCB layouts were prepared with at most care to incorporate
the circuits in a modular manner. The circuit is made as simple as to our
knowledge. Also components and cost. It was a very interesting process of
developing the prototype, stage by stage and testing the same. We have to go
through fairly large pages of data related to the components etc. It was a
useful and fulfilling assignment to get the project completed in time. This
gave as a sense of satisfaction and accomplishment

PROGRAM:
/*
STREET LIGHT THAT GLOWS ON VEHICLE DETECTION ENERGY
SAVER SYSTEM with Fault Identification

use a 16x2 LCD display. The LiquidCrystal


library works with all LCD displays that are compatible with the
Hitachi HD44780 driver. There are many of them out there, and you
can usually tell them by the 16-pin interface.

The circuit:
* LCD RS pin to digital pin 12
* LCD Enable pin to digital pin 11
* LCD D4 pin to digital pin 5
* LCD D5 pin to digital pin 4
* LCD D6 pin to digital pin 3
* LCD D7 pin to digital pin 2
* LCD R/W pin to ground
* LCD VSS pin to ground
* LCD VCC pin to 5V
* 10K resistor:
* ends to +5V and ground
* wiper to LCD VO pin (pin 3)
55
*/

// include the library code:


#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins


LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

int pwmPin = 6; // connected to uln driver

int sensor1Pin = A0;


int sensor2Pin = A1;
int ldrPin = A2; // Day = 1 state; Night = 0 state
int fault_detect_ldrPin = A3;

int sensor1Value = 0;
int sensor2Value = 0;
int ldrValue = 0;
int fault_detect_ldrValue = 0;

unsigned char LampFailBit = 0;


unsigned char LampOkayBit = 0;
unsigned char OkayMessageSentBit = 0;
unsigned char FailMessageSentBit = 0;

void setup()
{
[Link](115200); // Setting the baud rate of IoT Module
delay(100);
// set up the LCD's number of columns and rows:
[Link](16, 2);
// Print a message to the LCD.
[Link](0, 0);
[Link](" STREET LIGHT ");
[Link](0, 1);
[Link](" ENERGY SAVER ");
delay(2000);

// declare the Input and OUTPUT pins:


pinMode(pwmPin, OUTPUT);

pinMode(sensor1Pin, INPUT);
pinMode(sensor2Pin, INPUT);
pinMode(ldrPin, INPUT);
pinMode(fault_detect_ldrPin, INPUT);

56
analogWrite(pwmPin, 0);

[Link]();
[Link](0,0);
[Link](" WiFi ");
[Link](0,1);
[Link]("Initialising....");
delay(1000);

wificonfig();
delay(3000);
[Link]();
}

void loop()
{
Start:

ldrValue = analogRead(ldrPin);
delay(100);

if(ldrValue > 600)


{
digitalWrite(pwmPin, 0);
delay(100);

[Link](0, 0);
[Link]("STREET LIGHT OFF");
[Link](0, 1);
[Link]("DAY; ");
delay(500);

goto Start;
}

if(ldrValue < 100)


{
[Link](0, 0);
[Link]("STREET LIGHT ON ");
[Link](0, 1);
[Link]("NIGHT;");
delay(100);

analogWrite(pwmPin, 50);
delay(100);

57
ScanIr:
[Link]("AT+CIPSEND=0,24");
delay(500);

[Link](" ");
[Link]();
delay(1000);

sensor1Value = analogRead(sensor1Pin);
sensor2Value = analogRead(sensor2Pin);
ldrValue = analogRead(ldrPin);
fault_detect_ldrValue = analogRead(fault_detect_ldrPin);
delay(100);

if(fault_detect_ldrValue < 100)


{
LampFailBit = 1;
LampOkayBit = 0;
OkayMessageSentBit = 0;
delay(100);
}

if(fault_detect_ldrValue > 700)


{
LampOkayBit = 1;
delay(100);
}

if((LampFailBit) & (!FailMessageSentBit))


{
FailMessageSentBit = 1;

[Link]("AT+CIPSEND=0,62");
delay(500);

[Link]("STREET LAMP FAILED @ POST No.1234, GANDHI


STREET, MADURAI-7 ; ");
delay(1000);
}

if((LampOkayBit) & (!OkayMessageSentBit) & (LampFailBit))


{
OkayMessageSentBit = 1;
LampFailBit = 0;
FailMessageSentBit = 0;

58
[Link]("AT+CIPSEND=0,64");
delay(500);

[Link]("STREET LAMP REPLACED @ POST No.1234, GANDHI


STREET, MADURAI-7 ; ");
delay(1000);
}

if(ldrValue > 600)


{
goto Jump;
}

if((sensor1Value > 800) && (ldrValue < 100))


{
[Link](0, 0);
[Link]("STREET LIGHT ON ");
[Link](0, 1);
[Link]("NIGHT; OBJECT IN");
delay(100);

analogWrite(pwmPin, 255);
delay(500);
}

if((sensor2Value < 250) && (ldrValue < 100))


{
goto ScanIr;
}

if((sensor1Value < 250) && (sensor2Value > 800) && (ldrValue < 100))
{
[Link](0, 0);
[Link]("STREET LIGHT ON ");
[Link](0, 1);
[Link]("NIGHT;OBJECT OUT");
delay(100);

analogWrite(pwmPin, 50);
delay(100);

goto Jump;
}
Jump:
delay(100);
}

59
goto Start;
}
BIBLIOGRAPHY
 PROCESS DATA HAND BOOK

 PUBLISHED BY: BPB PUBLICATION – 1990


 SENSORS AND PRINCIPLES
 PUBLISHED BY: BPB PUBLICATION – 1998

 ELECTRONIC PRINCIPLES SIXTH EDITION

 WRITTEN BY : MALVINO

 ELECTRONIC DEVICES AND CIRCUITS

 WRITTEN BY: JACOB MILLMAN, CHRISTOS


[Link]

 DIGITAL ELECTRONICS AN INTRODUCTION TO THEORY


AND PRACTICE

 WRITTEN BY WILLIAM H. GOTHMANN

 PROGRAMMABLE LOGIC CONTROLLERS (PRINCIPLES AND


APPLICATIONS)
 JOHN. WEBB, RONALD
 PROCESS INSTRUMENTS AND CONTROLS HANDBOOK
 CONSIDINE

60

You might also like