Вы находитесь на странице: 1из 33

DENSITY BASED TRAFFIC SIGNAL CONTROL SYTEM AND AMBULANCE DETECTION

CHAPTER – 1

INTRODUCTION

1.1 Traffic Congestion System


Traffic congestion is a condition on transport networks that when a volume of traffic or modal
split generates demand for space greater than the available street capacity; this point is
commonly termed saturation. When traffic demand is great enough that the interaction between
vehicles slows the speed of the traffic stream, this results in some congestion. While congestion
is a possibility for any mode of transportation. As demand approaches the capacity of a road,
extreme traffic congestion sets in. When vehicles are fully stopped for periods of time, this is
colloquially known as a traffic jam or traffic snarl-up. Traffic congestion can lead to drivers
becoming frustrated and engaging in road rage. A steady increase in metro-city population, the
number of automobiles and cars increases rapidly and metro traffic is growing crowded which
leads to the traffic jam problem. Nowadays, controlling the traffic becomes major issue because
of rapid increase in automobiles and also because of large time delays between traffic lights.
There are a number of specific circumstances which cause or aggravate congestion; most of them
reduce the capacity of a road at a given point or over a certain length, or increase the number of
vehicles required for a given volume of people or goods. About half of U.S. traffic congestion is
recurring, and is attributed to sheer weight of traffic; most of the rest is attributed to traffic
incidents, road work and weather events.

1.2 Density Based Traffic Control System

So, in order to rectify this problem, we will go for density based traffic signal control system
and ambulance detection. This explains you how to control the traffic based on density. The
traffic lights ensure that vehicles from every direction get a chance to proceed through
intersection in an orderly fashion. Normally, the traffic lights are programmed for particular time
intervals. But, in day-to-day life, it has been observed that traffic on on side on a two way road is
predominantly more when compared to the other. In such situation, programming equals interval
of time for both types of traffics, attributes to congestion during hours of heavy traffic, making
traffic delays.

In this system, we will use IR sensors to measure the traffic density. We have to arrange one IR

Department of Electronics and Communication Engineering Page 1


DENSITY BASED TRAFFIC SIGNAL CONTROL SYTEM AND AMBULANCE DETECTION

sensor for each road; these sensors always sense the traffic on that particular road. All these
sensors are interfaced to the microcontroller. And RF module is used for Ambulance detection.
Based on these sensors and RF module, microcontroller detects the traffic and controls the traffic
system.

Figure 1: Overview of Density Based Traffic Signal control system.

The advantages of this project are road congestion is reduced, road which is heavily dense is
given high priority and released first thus saving time of larger number of passengers, helps in
violating traffic rules, reduced man power and further allow any kind of emergency vehicle to
pass through the signals by turning the green light on of that lane by pressing the switch.

Department of Electronics and Communication Engineering Page 2


DENSITY BASED TRAFFIC SIGNAL CONTROL SYTEM AND AMBULANCE DETECTION

CHAPTER – 2

COMPONENTS

2.1 Hardware Required

 Arduino Mega
 IR sensor
 RF Transmitter and Receiver
 LED
 Switch
 Resistors
 Connecting Wires

2.2 Software Required

 Arduino IDE

Department of Electronics and Communication Engineering Page 3


DENSITY BASED TRAFFIC SIGNAL CONTROL SYTEM AND AMBULANCE DETECTION

CHAPTER – 3

PROPOSED SYSTEM

3.1 Block Diagram

Figure 3.1: Block Diagram of Density Based Traffic Control System and Ambulance Detection.

Department of Electronics and Communication Engineering Page 4


DENSITY BASED TRAFFIC SIGNAL CONTROL SYTEM AND AMBULANCE DETECTION

CHAPTER – 4

HARDWARE COMPONENT REQUIRED

4.1 ARDUINO MEGA

4.1.1 Arduino Mega 2560

The Arduino Mega 2560 is a microcontroller board based on the ATmega2560. It has 54 digital
input/output 16 analog inputs, 4 UARTs (hardware serial ports), 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; simply connect it to a computer with a USB cable or power it
with a AC-to-DC adapter or battery to get started.

Fig 4.1: Arduino Mega 2560

The Arduino Mega2560 can be powered via the USB connection or with an external power
supply. The power source is selected automatically. External (non-USB) power can come either
from an AC-to-DC adapter or battery. 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.

Department of Electronics and Communication Engineering Page 5


DENSITY BASED TRAFFIC SIGNAL CONTROL SYTEM AND AMBULANCE DETECTION

4.1.2 Pin Description

VIN: The input voltage to the Arduino board when it's using an external power. 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.
 3V3. A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50
mA.
 GND. Ground pins.

Each of the 54 digital pins on the Mega can be used as an input or output, using pinMode(),
digitalWrite(), and digitalRead() 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 kohms. In addition, some pins have specialized functions:

 Serial: 0 (RX) and 1 (TX); Serial 1: 19 (RX) and 18 (TX); Serial 2: 17 (RX) and 16
(TX); Serial 3: 15 (RX) and 14 (TX). Used to receive (RX) and transmit (TX) TTL
serial data. Pins 0 and 1 are also connected to the corresponding pins of the ATmega8U2
USB-to-TTL Serial chip.
 External Interrupts: 2 (interrupt 0), 3 (interrupt 1), 18 (interrupt 5), 19 (interrupt
4), 20 (interrupt 3), and 21 (interrupt 2). 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
attachInterrupt() function for details.
 PWM: 0 to 13. Provide 8-bit PWM output with the analogWrite() function.
 SPI: 50 (MISO), 51 (MOSI), 52 (SCK), 53 (SS). These pins support SPI
communication, which, although provided by the underlying hardware, is not currently
included in the Arduino language. The SPI pins are also broken out on the ICSP header,
which is physically compatible with the Duemilanove and Diecimila.
 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.

Department of Electronics and Communication Engineering Page 6


DENSITY BASED TRAFFIC SIGNAL CONTROL SYTEM AND AMBULANCE DETECTION

4.1.3 Specifications
 Microcontroller : ATmega2560
 Operating Voltage : 5V
 Input Voltage (recommended) : 7-12V
 Input Voltage (limits) : 6-20V
 Digital I/O Pins : 54 (of which 14 provide PWM output)
 Analog Input Pins : 16
 DC Current per I/O Pin : 40 mA
 DC Current for 3.3V Pin : 50 mA
 Flash Memory : 256 KB of which 8 KB used by boot loader
 SRAM : 8 KB
 EEPROM : 4 KB
 Clock Speed : 16 MHz

Fig4.2: Arduino Mega 2560 Pin out

Department of Electronics and Communication Engineering Page 7


DENSITY BASED TRAFFIC SIGNAL CONTROL SYTEM AND AMBULANCE DETECTION

4.1.4 Working
The Arduino Mega2560 has a number of facilities for communicating with a computer, another
Arduino, or other microcontrollers. The ATmega2560 provides four hardware UARTs for TTL
(5V) serial communication. An ATmega8U2 on the board channels one of these over USB and
provides a virtual com port to software on the computer (Windows machines will need an .in file,
but OSX and Linux machines will recognize the board as a COM port automatically. The
Arduino software includes a serial monitor which allows simple textual data to be sent to and
from the board. The RX and TX LEDs on the board will flash when data is being transmitted via
the ATmega8U2 chip and USB connection to the computer.
A Software Serial library allows for serial communication on any of the Mega's digital pins. The
ATmega2560 also supports I2C (TWI) and SPI communication. The Arduino software includes
a Wire library to simplify use of the I2C bus.
The Arduino Mega has a resettable polyfuse that protects your computer's USB ports from shorts
and over current. Although most computers provide their own internal protection, the fuse
provides an extra layer of protection. If more than 500 mA is applied to the USB port, the fuse
will automatically break the connection until the short or overload is removed.
The maximum length and width of the Mega PCB are 4 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 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. The Mega is
designed to be compatible with most shields designed for the Diecimila or Duemilanove. Digital
pins 0 to 13 (and the adjacent AREF and GND pins), analog inputs 0 to 5, the power header, and
ICSP header are all in equivalent locations. Further the main UART (serial port) is located on the
same pins (0 and 1), as are external interrupts 0 and 1 (pins 2 and 3 respectively). SPI is available
through the ICSP header on the Mega and Duemilanove / Decimal.

Department of Electronics and Communication Engineering Page 8


DENSITY BASED TRAFFIC SIGNAL CONTROL SYTEM AND AMBULANCE DETECTION

4.2 IR Sensors

4.2.1 IR Sensor LM393

Infrared Sensor Module has built-in IR transmitter and IR receiver that sends out IR energy and
looks for reflected IR energy to detect presence of any obstacle in front of the sensor module.
The module has on board potentiometer that lets user adjust detection range. The sensor has very
good and stable response even in ambient light or in complete darkness.

An object can be detected with an infrared system consisting of an infrared transmitter and a
receiver. More in detail an IR transmitter, also known as IR LED, sends an infrared signal with a
certain frequency compatible with an IR receiver which has the task to detect it. There is
different kind of IR sensors for different type of application. IR technology is used, for example,
in proximity sensors to detect a near object, in contrast sensors to find a path or in counting
sensors to count objects.

Figure 4.3: IR sensor

IR sensors are used to sense the traffic density of every road in the junction and release the
heavily dense road first. IR sensors work by using a specific light sensor to detect light
wavelength in the IR spectrum. When an object is close to the sensor, the light from LED
bounces off the object and into the light sensor. This results in a large jump in intensity, which is
detected using a threshold value.

Department of Electronics and Communication Engineering Page 9


DENSITY BASED TRAFFIC SIGNAL CONTROL SYTEM AND AMBULANCE DETECTION

4.2.2 Pin description


The pin description of the IR Sensor is as follows:
VCC – Power Supply Input
GND - Power Supply Ground
OUT – Active High Ground
MODE SELECTION - Configurable HIGH / LOW Output State (Using AH and AL

Pins)

Modes of Operation

1. High Level Mode (AH mode)

 In High Level Mode, if there is no obstacle then the output will be LOW (0V) &
detecting an obstacle will change the output to HIGH (5V) Level.

2. Low Level Mode (AL mode)

 In Low Level Mode, if there is no obstacle then the output will be HIGH (5V) &
detecting an obstacle will change the output to LOW (0V) level.

IR Transmitter:

Infrared Transmitter is a light emitting diode (LED) which emits infrared radiations. Hence, they
are called IR LED’s. Even though an IR LED looks like a normal LED, the radiation emitted by
it is invisible to the human eye.

Figure 4.4: IR Transmitter

Department of Electronics and Communication Engineering Page 10


DENSITY BASED TRAFFIC SIGNAL CONTROL SYTEM AND AMBULANCE DETECTION

IR Receiver:

Infrared receivers are also called as infrared sensors as they detect the radiation from an IR
transmitter. IR receivers come in the form of photodiodes and phototransistors. Infrared
Photodiodes are different from normal photo diodes as they detect only infrared radiation. The
picture of a typical IR receiver or a photodiode is shown below.

Figure 4.5: IR Receiver

Different types of IR receivers exist based on the wavelength, voltage, package, etc. When used
in an infrared transmitter – receiver combination, the wavelength of the receiver should match
with that of the transmitter.

4.2.3 Working Principle of IR Sensor

An IR sensor consists of an IR LED and an IR Photodiode; together they are called as Photo–
Coupler or Opto–Coupler. As said before, the Infrared Obstacle Sensor has built-in IR
transmitter and IR receiver. Infrared Transmitter is a light emitting diode (LED) which emits
infrared radiations. Hence, they are called IR LED’s. Even though an IR LED looks like a
normal LED, the radiation emitted by it is invisible to the human eye. Infrared receivers are also
called as infrared sensors as they detect the radiation from an IR transmitter. IR receivers come
in the form of photodiodes and phototransistors. Infrared Photodiodes are different from normal
photo diodes as they detect only infrared radiation. When the IR transmitter emits radiation, it
reaches the object and some of the radiation reflects back to the IR receiver. Based on the
intensity of the reception by the IR receiver, the output of the sensor is defined.

Department of Electronics and Communication Engineering Page 11


DENSITY BASED TRAFFIC SIGNAL CONTROL SYTEM AND AMBULANCE DETECTION

4.2.4 Specifications and Features

Specifications:

 Operating Voltage: 3.0V – 5.0V

 Detection range: 2cm – 30cm (Adjustable using potentiometer)

 Current Consumption: at 3.3V : ~23 mA, at 5.0V: ~43 mA

 Active output level: Outputs Low logic level when obstacle is detected

 On board Obstacle Detection LED indicator

 Output type: Digital switching output (0 and 1)

 Board size: 3.2 x 1.4cm

Features:

 There is an obstacle, the green indicator light on the circuit board

 Digital output signal

 Detection distance: 2 ~ 30cm

 Detection angle: 35 ° Degree

 Comparator chip: LM393

 Adjustable detection distance range via potentiometer:

 Clockwise: Increase detection distance

 Counter-clockwise: Reduce detection distance

Department of Electronics and Communication Engineering Page 12


DENSITY BASED TRAFFIC SIGNAL CONTROL SYTEM AND AMBULANCE DETECTION

4.3 RF Transmitter and Receiver


4.3.1 RF Module
An RF module (radio frequency module) is a (usually) small electronic device used to transmit
and/or receive radio signals between two devices. In an embedded system it is often desirable to
communicate with another device wirelessly. This wireless communication may be
accomplished through optical communication or through radio frequency (RF) communication.
For many applications the medium of choice is RF since it does not require line of sight. RF
communications incorporate a transmitter and a receiver. They are of various types and ranges.
Some can transmit up to 500 feet. RF modules are widely used in electronic design owing to the
difficulty of designing radio circuitry.

Figure 4.6: RF Module

Basically the RF modules are 433 MHz RF transmitter and receiver modules. The transmitter
draws no power when transmitting logic zero while fully suppressing the carrier frequency thus
consume significantly low power in battery operation. When logic one is sent carrier is fully on
to about 4.5mA with a 3volts power supply. The data is sent serially from the transmitter which
is received by the tuned receiver. Transmitter and the receiver are duly interfaced to two
microcontrollers for data transfer. This RF module comprises of an RF Transmitter and an RF
Receiver. The transmitter/receiver (Tx/Rx) pair operates at a frequency of 434 MHz. An RF
transmitter receives serial data and transmits it wirelessly through RF through its antenna
connected at pin4. The transmission occurs at the rate of 1Kbps - 10Kbps.The transmitted data is
received by an RF receiver operating at the same frequency as that of the transmitter.

Department of Electronics and Communication Engineering Page 13


DENSITY BASED TRAFFIC SIGNAL CONTROL SYTEM AND AMBULANCE DETECTION

4.3.2 Types of RF modules


The term RF module can be applied to many different types, shapes and sizes of small electronic
sub assembly circuit board. It can also be applied to modules across a huge variation of
functionality and capability. RF modules typically incorporate a printed circuit board, transmit or
receive circuit, antenna, and serial interface for communication to the host processor.

Most standard, well known types are covered here:

 Transmitter module
 Receiver module
 Transceiver module
 System on a chip module

Transmitter modules

An RF transmitter module is a small PCB sub-assembly capable of transmitting a radio wave


and modulating that wave to carry data. Transmitter modules are usually implemented alongside
a micro controller which will provide data to the module which can be transmitted.

Receiver modules

An RF receiver module receives the modulated RF signal, and demodulates it. There are two
types of RF receiver modules: super heterodyne receivers and super-regenerative receivers.
Super-regenerative modules are usually low cost and low power designs using a series of
amplifiers to extract modulated data from a carrier wave.

Transceiver modules

An RF transceiver module incorporates both a transmitter and receiver. The circuit is typically
designed for half-duplex operation, although full-duplex modules are available, typically at a
higher cost due to the added complexity.

System on a chip (SoC) module

An SoC module is the same as a transceiver module, but it is often made with an onboard
microcontroller. The microcontroller is typically used to handle radio data packetisation or
managing a protocol such as an IEEE 802.15.4 compliant module.

Department of Electronics and Communication Engineering Page 14


DENSITY BASED TRAFFIC SIGNAL CONTROL SYTEM AND AMBULANCE DETECTION

4.3.3 Features

 Range in open space(Standard Conditions) : 100 Meters


 RX Receiver Frequency : 433 MHz
 RX Typical Sensitivity : 105 Dbm
 RX Supply Current : 3.5 mA
 RX IF Frequency : 1MHz
 Low Power Consumption
 Easy For Application
 RX Operating Voltage : 5V
 TX Frequency Range : 433.92 MHz
 TX Supply Voltage : 3V ~ 6V
 TX Out Put Power : 4 ~ 12 Dbm

4.3.4 Specifications:

 Wireless (RF) Simplex Transmitter and Receiver


 Receiver Operating Voltage: 3V to 12V
 Receiver Operating current: 5.5mA
 Operating frequency: 433 MHz
 Transmission Distance: 3 meters (without antenna) to 100 meters (maximum)
 Modulating Technique: ASK (Amplitude shift keying)
 Data Transmission speed: 10Kbps
 Circuit type: Saw resonator
 Low cost and small package

Department of Electronics and Communication Engineering Page 15


DENSITY BASED TRAFFIC SIGNAL CONTROL SYTEM AND AMBULANCE DETECTION

4.4 Light-emitting diode (LED):


4.4.1 LED
A light-emitting diode (LED) is a semiconductor device that emits visible light when an
electric current passes through it. The light is not particularly bright, but in most LEDs it is
monochromatic, occurring at a single wavelength. The output from an LED can range from red
(at a wavelength of approximately 700 nanometers) to blue-violet (about 400 nanometers). Some
LEDs emit infrared (IR) energy (830 nanometers or longer); such a device is known as
an infrared-emitting diode (IRED).

An LED or IRED consists of two elements of processed material called P-type semiconductors
and N-type semiconductors. These two elements are placed in direct contact, forming a region
called the P-N junction. In this respect, the LED or IRED resembles most other diode types, but
there are important differences. The LED or IRED has a transparent package, allowing visible or
IR energy to pass through. Also, the LED or IRED has a large PN-junction area whose shape is
tailored to the application.

LEDs are versatile semiconductor with a number of attributes which make them perfect for most
applications. Their features include:

 Long Life: LEDs can last over 100,000 hours (10+ years) if used at rated current
 No annoying flicker like from fluorescent lamps
 LEDs are impervious to heat, cold, shock and vibration
 LEDs do not contain breakable glass
 Solid-State, high shock and vibration resistant
 Extremely fast turn On/Off times
 Low power consumption puts less load on the electrical systems increasing battery life.

Presently it is possible to produce white light with a single LED using a phosphor layer (Yttrium
Aluminum Garnet) on the surface of a blue (Gallium Nitride) chip. Although this technology
produces various hues, white LEDs may be appropriate to illuminate opaque lenses or backlight
legends. However, using colored LEDs to illuminate similarly colored lenses produces better
visibility and overall appearance.

Department of Electronics and Communication Engineering Page 16


DENSITY BASED TRAFFIC SIGNAL CONTROL SYTEM AND AMBULANCE DETECTION

4.2.2 LED Working:


This is a very simple explanation of the construction and function of LEDs. White LEDs need
3.6VDC and use approximately 30 milliamps of current, a power dissipation of 100 mill watts.
The positive power is applied to one side of the LED semiconductor through a lead (1 anode)
and a whisker (4). The other side of the semiconductor is attached to the top of the anvil (7) that
is the negative power lead (2 cathode). It is the chemical makeup of the LED semiconductor (6)
that determines the color of the light the LED produces. The epoxy resin enclosure (3 and 5) has
three functions. It is designed to allow the most light to escape from the semiconductor, it
focuses the light (view angle), and it protects the LED semiconductor from the elements. As you
can see, the entire unit is totally embedded in epoxy. This is what make LEDs virtually
indestructible. There are no loose or moving parts within the solid epoxy enclosure.

Figure 4.7: LED

When light from all parts of the visible spectrum overlap one another, the additive mixture of
colors appears white. However, the eye does not require a mixture of all the colors of the
spectrum to perceive white light. Primary colors from the upper, middle, and lower parts of the
spectrum (red, green, and blue), when combined, appear white. To achieve this combination with
LEDs requires a sophisticated electro-optical design to control the blend and diffusion of colors.
Variations in LED color and intensity further complicate this process.

Department of Electronics and Communication Engineering Page 17


DENSITY BASED TRAFFIC SIGNAL CONTROL SYTEM AND AMBULANCE DETECTION

4.5 Switch

Slide switches are mechanical switches using a slider that moves (slides) from the open (off)
position to the closed (on) position. They allow control over current flow in a circuit without
having to manually cut or splice wire. This type of switch is best used for controlling current
flow in small projects. There are two common internal designs of slide switches. The most
common design uses metal slides that make contact with the flat metal parts on the switch. As
the slider is moved it causes the metal slide contacts to slide from one set of metal contacts to the
other, actuating the switch. The second design uses a metal seesaw. The slider has a spring that
pushes down on one side of the metal seesaw or the other.

Figure 4.8: Slide Switch

Slide switches are maintained-contact switches. Maintained-contact switches stay in one state
until actuated into a new state and then remain in that state until acted upon once again.
Depending on the actuator type, the handle is either flush or raised. Choosing a flush or raised
switch will depend on the intended application.

Department of Electronics and Communication Engineering Page 18


DENSITY BASED TRAFFIC SIGNAL CONTROL SYTEM AND AMBULANCE DETECTION

4.6 Resistor

A resistor is a passive two-terminal electrical component that implements electrical resistance as


a circuit element. In electronic circuits, resistors are used to reduce current flow, adjust signal
levels, to divide voltages, bias active elements, and terminate transmission lines, among other
uses. High-power resistors that can dissipate many watts of electrical power as heat, may be used
as part of motor controls, in power distribution systems, or as test loads for generators. Fixed
resistors have resistances that only change slightly with temperature, time or operating voltage.
Variable resistors can be used to adjust circuit elements (such as a volume control or a lamp
dimmer), or as sensing devices for heat, light, humidity, force, or chemical activity.

Figure 4.9: Resistors

Resistors manufactured for military use may also include a fifth band which indicates component
failure rate (reliability); refer to MIL-HDBK-199[4] for further details.

Tight tolerance resistors may have three bands for significant figures rather than two, or an
additional band indicating temperature coefficient, in units of ppm/K.

All coded components have at least two value bands and a multiplier; other bands are optional.

Department of Electronics and Communication Engineering Page 19


DENSITY BASED TRAFFIC SIGNAL CONTROL SYTEM AND AMBULANCE DETECTION

4.7 Jumper wires

A jump wire (also known as jumper wire, or jumper) is an electrical wire, or group of them in a
cable, with a connector or pin at each end (or sometimes without them – simply "tinned"), which
is normally used to interconnect the components of a breadboard or other prototype or test
circuit, internally or with other equipment or components, without soldering.

Individual

Figures 4.10: Jumper Wires

Types:

There are different types of jumper wires. Some have the same type of electrical connector at
both ends, while others have different connectors. Some common connectors are:

 Solid tips – are used to connect on/with a breadboard or female header connector. It allows
increasing the mounting density of both components and jump wires without fear of short-
circuits
 Crocodile clips – are used, among other applications, to temporarily bridge sensors, buttons
and other elements of prototypes with components or equipment that have arbitrary
connectors, wires, screw terminals, etc.
 Banana connectors – are commonly used on test equipment for DC and low-frequency AC
signals.
 Registered jack (RJnn) – are commonly used in telephone (RJ11) and computer networking
(RJ45).
 RCA connectors – are often used for audio, low-resolution composite video signals, or other
low-frequency applications requiring a shielded cable.

Department of Electronics and Communication Engineering Page 20


DENSITY BASED TRAFFIC SIGNAL CONTROL SYTEM AND AMBULANCE DETECTION

CHAPTER 5

DEVELOPMENT OF SOFTWARE

5.1 Arduino Software

Arduino program may be written in any programming language with a compiler that produces a
binary machine code. Atmel provides a development environment for their microcontrollers.
AVR studio and the newer Atmel studio.

The Arduino projects provide the Arduino integrated development environment (IDE), which is
a cross platform application written. It is designed to introduce programming to artists and the
other newcomers unfamiliar with software development. It includes a code editor with features
such as syntax highlighting, brace matching, and automatic indentation, and provides simple one
click mechanism to compile and load programs to an Arduino board. A program written with the
Arduino is called a “sketch”.

The Arduino IDE supports the language C and C++ using some special rules to organize code.
The Arduino IDE supplies a software library called Wiring from Wiring project, which provides
many common input and output procedures. A typical Arduino C/C++ sketch consists of two
functions that are compiled and linked with a program stub into an executive program.

Department of Electronics and Communication Engineering Page 21


DENSITY BASED TRAFFIC SIGNAL CONTROL SYTEM AND AMBULANCE DETECTION

5.2 Using Arduino IDE

Step 1: Get an Arduino board and USB cable

We are using an Arduino Uno we also need a standard USB cable the kind you would connect to
a USB printer.

Step 2: Download the Arduino Environment

Get the latest version from the download page. When the download finishes, unzip the
downloaded file. Make sure to preserve the folder structure. Double-click the folder to open it.
There should be a few files and sub-folders inside.

Step 3: Connect the board

The Arduino Uno, Duemilanove and Arduino Nano automatically draw the power from either
the USB connection to the computer or an external power supply. If you are using an Arduino
Diecimila, you will need to make sure that the board is configures to draw power from the USB
connection. The power source is selected with a jumper, a small piece of plastic that fits onto two
of the three pins between the USB and power jacks. Check that it’s on the two pins closest to the
USB port. Connect the Arduino board to your computer using the USB cable. The green Power
LED should go on.

Step 4: Install the drivers

Installing the drivers for the Arduino Uno with Windows 7, Vista, or XP.

Department of Electronics and Communication Engineering Page 22


DENSITY BASED TRAFFIC SIGNAL CONTROL SYTEM AND AMBULANCE DETECTION

Figure 5.1: Downloading Arduino

Step 5: Launch the Arduino Application


Double click Arduino application.

(Note: If the Arduino software loads in the wrong language, you can change it in the preferences
dialog box. See the environment for details.)

Step 6: Open the blink example


Open the LED blink example sketch: File> Examples > 1.Basics > Blink

Step 7: select your board


You will need to select the entry in the tools> Board menu that corresponds to your Arduino.

Department of Electronics and Communication Engineering Page 23


DENSITY BASED TRAFFIC SIGNAL CONTROL SYTEM AND AMBULANCE DETECTION

Step 8: Select your Serial port

Select the serial device of the Arduino board from the tools > Serial port menu. This is likely to
be the COM 3 or higher (COM 1 and COM 2 are usually reserved for hard ware serial ports). To
find out, you can disconnect your Arduino board and reopen the menu; the entry that disappears
should be the Arduino board. Reconnect the board and select the serial port.

Figure 5.2: Selection of ports

Step 9: Upload the program

No, simply click the upload button in the environment. Wait for few seconds- you should see the
Rx and Tx LED’s on the board flashing. If the upload is successful, the message “Done
Uploading” will appear in the status bar.

Department of Electronics and Communication Engineering Page 24


DENSITY BASED TRAFFIC SIGNAL CONTROL SYTEM AND AMBULANCE DETECTION

CHAPTER 6

WORKING

This Project is implemented by involving twelve LED's, Eight IR Sensors, Arduino Mega, RF
Transmitter and Receiver. The Working of the module can be implemented in three stages. The
output at every stage is based on the input to the different sensors used.

6.1 Conventional Traffic System

The Density of vehicles is calculated using IR sensors placed on either sides of Road in four
ways (A,B,C,D). In each Lane two IR sensors are placed with certain distance to calculate the
density of vehicles When the Density of vehicles is equal in all the Lanes at Low Level or High
Level the traffic control system operate conventionally.

Figure 6.1: Conventional traffic system

Department of Electronics and Communication Engineering Page 25


DENSITY BASED TRAFFIC SIGNAL CONTROL SYTEM AND AMBULANCE DETECTION

6.2 When the density is high in Lane D

When the density of vehicles is High in Lane A then the information from IR sensors is sent to
the Arduino Mega as input. So, the traffic signal control system varies according to the IR
sensors information. As the density at Lane D is High then the Priority order of traffic signal
system will be first A lane will be cleared then other Lanes (A, B, C).

Figure 6.2: When lane-D is high

Department of Electronics and Communication Engineering Page 26


DENSITY BASED TRAFFIC SIGNAL CONTROL SYTEM AND AMBULANCE DETECTION

6. 3 When the Ambulance is detected in Lane C

When the RF Receiver placed at traffic signal receives the signal from the RF Transmitter which
is placed in Ambulance then the presence of ambulance in Lane C is detected. Depending on the
input to Arduino the traffic is cleared in lane C then other lanes (A, B, D) and the switching of
traffic lights is done by Arduino Mega.

AMBULANCE

Figure 6.3: When ambulance is detected

Department of Electronics and Communication Engineering Page 27


DENSITY BASED TRAFFIC SIGNAL CONTROL SYTEM AND AMBULANCE DETECTION

CHAPTER 7

ADVANTAGES AND DISADVANTAGES

ADVANTAGES

 Avoids wastage of time due to the traffic

 Fully automatic.

 Low power consumption.

 It provides the easy access in the traffic light.

 Low cost to design the circuit, maintenance of the circuit is good.

 Easy convenience to handle

 Reduces accident.

DISADVANTAGES

 IR sensors work only for certain range.

Department of Electronics and Communication Engineering Page 28


DENSITY BASED TRAFFIC SIGNAL CONTROL SYTEM AND AMBULANCE DETECTION

CHAPTER 8

APPLICATIONS

Applications

 For traffic signal monitoring and controlling.

 If a number of signals are synchronized, it is possible to build a smart city.

 Automated driving vehicles can communicate with the signals wirelessly, so indicators
may become redundant.

 It can also be used at highways for having less wastage of time.

 In case of emergency, a pedestrian can cross the road by just turn a switch on.

 Emergency vehicles like ambulance or fire brigade truck can pass through the signals
without any kind of wastage of time.

Department of Electronics and Communication Engineering Page 29


DENSITY BASED TRAFFIC SIGNAL CONTROL SYTEM AND AMBULANCE DETECTION

CHAPTER 9

OUTPUT

The Designing, Construction and Implementation of the project “DESNITY BASED TRAFFIC
SIGNAL CONTROL SYSTEM AND AMBULANCE DETECYION” has been completed and tested
successfully.

Figure 9.1: Output of Density Based Traffic Signal Control System and Ambulance
Detection

Department of Electronics and Communication Engineering Page 30


DENSITY BASED TRAFFIC SIGNAL CONTROL SYTEM AND AMBULANCE DETECTION

CHAPTER 10

CONCLUSION

Density Based Traffic Signal Control System and Ambulance Detection shows how the Traffic
light Signal control, including with the implementation of Emergency vehicle get passed through
signals. The acquired data from IR Sensors reschedule the traffic light timing according to the
traffic condition for low or high density road traffic. If the density of the road traffic is high then
Maximum density of traffic will allow maximum default timing for traffic lights. Minimum
density of traffic will allow traffic with minimum timing for traffic lights. If the traffic rate on
both side is Equal or gap within traffic then according to arrival time traffic light signal set to
minimized. Ambulance can be detected by RF module and sends information to microcontroller
which controls green signal until the vehicle get passed up through signals. Ambulance can cross
the road by turning the switch.

Department of Electronics and Communication Engineering Page 31


DENSITY BASED TRAFFIC SIGNAL CONTROL SYTEM AND AMBULANCE DETECTION

CHAPTER 11

FUTURE SCOPE AND REFERENCES

11.1 Future Scope

In Future we can replace IR Sensors by Ultrasonic sensors or laser sensors to increase the
accuracy of Density based traffic signal control system and ambulance detection to calculate
density of vehicles. The detection distance of laser sensor is high compared to IR sensor. The
Efficiency of Density based traffic signal control system and ambulance detection is increased.

11.2 References
[1]. ”An Intelligent System for Traffic Control in Smart Cities: A Case Study”, Okene david
Ese, Okhueleigbe Emmanuel Ighodalo, Department of Electrical and Electronics, Federal
University of Petroleum Resources,Effurun, Nigeria, okene.david7@gmail.com,
ighomma4real@yahoo.com
[2]. “Design and Implementation of a Density- Based Traffic Light Control with Surveillance
System”, Y. N. Udoakah*, I. G. Okure, Department of Electrical & Computer
Engineering, University of Uyo, Uyo, Akwa Ibom State, Nigeria,
yeobongudokah@uniuyo.edu.ng, okure74@gmail.com
[3]. “Smart Traffic Control System Using Weighted Data”, Priyanka Sharma, Dr. Anjana
Goen, Department of Electronics & Communication, RJIT, Tekanpur.
[4]. “IoT Based Smart Traffic Signal Monitoring System using Vehicles Counts”, Senthil
Kumar janahan*, M.R.M. Veeramanickam, S. Arun, Kumar Narayanan, R. Anandan,
Shaik Javed Parvez.
[5]. “IoT Based Smart Traffic Density Alarming Indicator”, Yashashree Joshi, Ashwini
Joshi, Neha Tayade, Priyanka Shinde, Prof. S.M. Rokade, B. E. Department of Computer
Engineering, S.V.I.T College, Nashik, India.
[6]. “Density Based Traffic Control For Smart Ambulance System”, Umakant, Veeresh
Pujari, Baswaraj Gadgay, Department of VLSI Design & Embedded Systems, VTU
Centre for PG Studies, Kalaburagi, India.

Department of Electronics and Communication Engineering Page 32


DENSITY BASED TRAFFIC SIGNAL CONTROL SYTEM AND AMBULANCE DETECTION

[7]. “Improved Traffic Control Sytems for Emergency Vehicle Clearance and Stolen Vehicle
Detecction”, Mrs. EShanthini.E, Sreeja.G, SNS college of technology, Coimbatore.
[8]. “Intelligent Traffic Control System for Smart Ambulance”, Prof. Deepali Ahir, Saurabh
Bharade, pradnya Botre, Sayali Nagane, Mihir shah, Department of Computer
Engineering, Modern Education Society’s College of Engineering, Maharshtra, India.
[9]. “Intelligent Traffic Control System”, Mrs. Vidya Bhilawade, Dr. L. K. RAgha
[10]. “Smart Traffic Light Control Sytem for Emergency Ambulance”, asmaa Shaalan
Abdul Munem, Dr. Muayad Sadik Croock.

Department of Electronics and Communication Engineering Page 33

Вам также может понравиться