Академический Документы
Профессиональный Документы
Культура Документы
CHAPTER – 1
INTRODUCTION
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
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.
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.
CHAPTER – 2
COMPONENTS
Arduino Mega
IR sensor
RF Transmitter and Receiver
LED
Switch
Resistors
Connecting Wires
Arduino IDE
CHAPTER – 3
PROPOSED SYSTEM
Figure 3.1: Block Diagram of Density Based Traffic Control System and Ambulance Detection.
CHAPTER – 4
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.
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.
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.
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
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.
4.2 IR Sensors
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.
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.
Pins)
Modes of Operation
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.
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.
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.
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.
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.
Specifications:
Active output level: Outputs Low logic level when obstacle is detected
Features:
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.
Transmitter module
Receiver module
Transceiver module
System on a chip module
Transmitter modules
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.
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.
4.3.3 Features
4.3.4 Specifications:
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.
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.
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.
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.
4.6 Resistor
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.
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
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.
CHAPTER 5
DEVELOPMENT OF 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.
We are using an Arduino Uno we also need a standard USB cable the kind you would connect to
a USB printer.
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.
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.
Installing the drivers for the Arduino Uno with Windows 7, Vista, or XP.
(Note: If the Arduino software loads in the wrong language, you can change it in the preferences
dialog box. See the environment for details.)
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.
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.
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.
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.
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).
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
CHAPTER 7
ADVANTAGES
Fully automatic.
Reduces accident.
DISADVANTAGES
CHAPTER 8
APPLICATIONS
Applications
Automated driving vehicles can communicate with the signals wirelessly, so indicators
may become redundant.
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.
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
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.
CHAPTER 11
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.
[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.