Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/327820150

An Automated Zebra Crossing using Arduino-UNO

Conference Paper · February 2018


DOI: 10.1109/IC4ME2.2018.8465496

CITATIONS READS

4 25,990

5 authors, including:

A M Muntasir Muntasir Rahman Md Rakib Hossain


New Jersey Institute of Technology Hajee Mohammad Danesh Science and Technology University
3 PUBLICATIONS 18 CITATIONS 31 PUBLICATIONS 260 CITATIONS

SEE PROFILE SEE PROFILE

Md Quamar Jia Uddin


Aligarh Muslim University Woosong University
1 PUBLICATION 4 CITATIONS 177 PUBLICATIONS 1,247 CITATIONS

SEE PROFILE SEE PROFILE

All content following this page was uploaded by Jia Uddin on 05 January 2021.

The user has requested enhancement of the downloaded file.


An Automated Zebra Crossing using Arduino-UNO
A M Muntasir Rahman Md. Quamar Mehdi
Department of Computer Science and Engineering Department of Computer Science and Engineering
BRAC University BRAC University
Dhaka, Bangladesh Dhaka, Bangladesh
arsnmoon@gmail.com aurko180595@gmail.com

Md. Rakib Hossain Eftakhar Alam Nirob


Department of Computer Science and Engineering Department of Computer Science and Engineering
BRAC University BRAC University
Dhaka, Bangladesh Dhaka, Bangladesh
md.rakib.hossain.khan nirob.eftakhar@gmail.com

Jia Uddin
Department of Computer Science and Engineering
BRAC University
Dhaka, Bangladesh
engrjiauddin@gmail.com

Abstract— In many underdeveloped and developing of the most reliable example of people’s apathetic behavior
countries, the custom and laws of crossing the roads are not very towards following traffic rules [2].
strict, in which case an automated road crossing system is much
needed. Besides, the amount of risk being taken every other day Other than the fact that people are unwilling to abide by the
around us, only makes the case for an automated zebra crossing rules, it should also be noticed that crossing roads at random is
system stronger. This paper presents a cost effective and easy risky and may result in untimely and accidental deaths. So, to
solution to this problem using a simple system based on Arduino- bring forward a simple solution to this day-to-day and
UNO. The system is entirely autonomous and can effectively controvertibly burning question, this paper presents an
measure the parameters expected of an Automated Zebra automated system, that takes in some valuable parameter to
Crossing system. Measurements of the parameters required in calculate the necessity and frequency of a zebra crossing to be
the system has been done by ultrasonic sensors, and the active and inactive [2]. For the system to be cost effective and
experiments done on the system show that it has a chance of easy to build and maintain, Arduino-UNO and ultrasonic
being outsmarted 1 out of 200 times, which is an efficiency rate sensors have been used. Ultrasonic sensors take in the
close to 99.5%. measurement required for the system to understand the number
of people that need to cross at a particular time and the Arduino
Keywords— Arduino; Ultrasonic Sensor; Electrical Devices; processor calculates this measurement alongside other
Sonar; Servo Motor; Automated Zebra Crossing, LED.
important parameters, such as, time, characteristics of the road
etc. The proposed system is very easy to install and is very
I. INTRODUCTION cheap, and this point is accented because it is proposed
st
In the 21 century, traffic control systems all over the world especially for underdeveloped and developing countries with
are becoming more and more technology oriented and the low budget on hand to walk on the path of automation in traffic
development of such technology has reached the point of control system [2].
automation. That being said, the automation process is only The rest of the paper is organized as follows: Section II
limited to the already developed countries or to some describes the background study behind the realization of this
developing countries. Although technology based, many project. Section III gives an overall idea of the proposed model
developing and underdeveloped countries still rely a and the components used. Section IV details the prototype
tremendous amount on the physical and tactical services of the structure, how it was implemented and how the entire system
traffic management officials [1]. It goes without saying that the functions, and finally section V concludes the paper.
task of orienting and managing traffic can be extremely bleak
and hard for a human being to focus on 24/7 and should be
managed by automatic systems to get the best output. It is also II. BACKGROUND STUDY
necessary to mention that the traffic systems of the latter The area of automation in traffic control systems has been
mentioned countries fail to commit people to the laws and significantly explored throughout the years. One significant
customs of traffic, especially road crossing. Bangladesh is one such work has been done back in 2013; the system had the
capability to check for violation of traffic rules committed by
vehicles, especially how vehicles are not supposed to cross the The ultrasonic sensor is one of our main components and
zebra crossing mark when the red light is on [3]. Works on serves wonderfully to provide perfect input data to measure the
disabled individuals, especially blind travelers have also been required parameter for our system. The sensor model that we
done in some of the works where the automations main target used, basically use an ultrasonic sound to measure a distance or
was to develop a system that was safe for people like them [4]. depth like a bat would do. It has an ultrasonic transmitter and a
Similar work has been done for blind people using bipolarity receiver module. The sensor sends out a sonar and tries to catch
segmentation and projective invariant based recognition [5]. the echo and using the timing in between of the two measures
Most of the works done with embedded systems have followed the distance in front [10].
some sort of genetic algorithms, and genetic algorithms are
thought to be the next evolution of programs [6]. For the gate on the footpath side to control a servo motor
was needed. But it is necessary to mention that the servo used
Road traffic monitoring has indeed been a very touched in the prototype will not be sufficient for the real life scaled
topic in statistical computing work and has been one of the model as the SG90 Micro servo has a very low torque (2.5 KG-
inspirations of this paper [7]. But, what inspired the most is the cm) and a weight of (14.7g) which is conspicuously not enough
work of automatically identifying inaccessible sidewalks using to withstand the weight of a gate in real life model. The Micro
Google street view [8]. Servo has 3 pins, the one labeled 5V is connected to the high
point of the power source and the GND to the ground [11]. The
III. PROPOSED MODEL micro servo can rotate 180 degrees approximately.
Prior to implementation in a real life scenario, the proposed For the hardware implementation, at first the proposed
system had to be properly scaled in order for the system to give model had been sketched onto a circuit diagram and later
out the perfect output in a controlled environment. For the following the diagram we implemented the entire hardware
prototype that has been developed for the showcasing of the system. We have tried to keep the circuit as simple as possible
capabilities and potential of the system, a miniature model has for better maintenance in the future. The proposed model is a
been created. Fig. 1 shows the outlining block diagram of the real life archetype and a prototype, which is a miniature scaled
system. model of the real life system, has been built for understanding
and showcasing the capabilities of our intended system. The
above mentioned apparatuses have been used to implement the
entire system, and PVC boards and color papers have been
used to model the prototype structure of the automated Zebra
Crossing system.

A. Circuit detail of the proposed model


First off, the hardware elements were joined together based
Fig. 1. Block Diagram of the System on the sketched circuit diagram and was tested for accuracy.
After that, the field test was done using actual persons. Later
For the prototype model of Automated Zebra Crossing we added the components onto the miniature prototype model.
system Arduino-UNO (R3) has been used as the computational Fig. 2 shows the circuit diagram of the prototype.
device and for input and output the following devices have
been used: Two HC-SR04 Ultrasonic Sensors, One SG90
Micro Servo, several LED Lights, Male-Female Jumper Wires
and a Standard Breadboard. Below is a short description of the
important modules used in the system.
Arduino is an open-source hardware which has many
important and easy to implement functionalities. There are
several versions of Arduino, such as Arduino-Mega, Arduino-
Uno. It was a rather easy decision when it came to the question
of choosing the type of Arduino for the project. Arduino-UNO
can store 32KB of flash memory onto it, which can be easily
kept track via the open source IDE used for implementing the
software instructions onto the SRAM of it. The IDE can be
easily downloaded from the arduino.cc website and which
makes the manipulation of the system much easier using an Fig. 2. Circuit Diagram
Arduino as a computational device for the project. The
Arduino-UNO board has 14 advanced input/output pins (of B. Hardware implementation of proposed model
which 6 might be utilized as PMW outputs), 6 simple inputs,
an USB connection, an energy jack and a reset catch [9]. It has The hardware implementation of the model has been done
all the components required for a simple system to develop. according to the circuit diagram given above. All the power
The Arduino-UNO can be powered through the USB link via a pins of the modules (Ultrasonic Sensor, Servo) were connected
PC or a Laptop, or can be plugged onto a batter using an AC- on to the breadboard which took the power input pins in from
to-DC connector [9]. the Arduino 5V pin and GND pin. The miniature model of the
prototype was made accordingly and Fig. 3 shows the the servo to rotate 90 degrees for the gate to open for the
prototype miniature model of the system. passerby(s) to cross the street. Fig. 5 shows the scenario of
opened gate and red light turned on.

Fig. 5. Red light and opened gate


Fig. 3. Prototype miniature model of the system

C. Flow diagram of proposed model


The way the system works is that the first sonar will let the
system know whenever there is a person getting ready to cross
the road and the second sonar will confirm his/her presence and
increase the people count by 1. After a certain amount of count,
which will be learnt by the characteristics of the road and
place, the system will let the traffic signal know that it is time
for the signal to go yellow and in turn to red and the gate to
open for the people to cross the road.
The intelligent part of the system is that it will recognize
whenever a person leaves the lobby, be it because he/she no
longer requires to cross the street/road, or be it because she/he
thinks that the system can be outsmarted by crossing the sonar
several times and increasing the counter for people present. In
other words, whenever there is a situation that the second sonar
gets a reading and consequently the first sonar gets a reading
the system will automatically decrement the value of people
present by 1. The same will happen even if someone just
crosses the first sonar and never crosses the second sonar.
After “n-r” (where, n is the desired people for red light
prompt and r is the number of desired people for yellow light
prompt) number of people pass the sonars and wait in the lobby
the system will turn on the yellow light, and subsequently
additional “r” number of people crossing and waiting in the
lobby will trigger the red light. Fig. 4 shows when there is less
than “n-r” number of people.

Fig. 4. Green light and closed gate

The system will also wait “t1” number of time according to


the traffic regulations of the country for “r” more people to Fig. 6. Flowchart of the entire system
come and after timeout it will turn on the red light and signal
The next intelligent part of the system is that if there is only problems and risks involved during road crossing will be
a little number of people waiting for the gate to open and the removed due to the implementation of this project in busy
number is not the set value that triggers the system to open the roads throughout developing and underdeveloped countries.
gate then the system will wait a minimum amount of time to
see if the people count gets increased, if not, the gate will REFERENCES
automatically open for the already few people waiting to cross [1] R. Sundar, S. Hebbar and V. Golla, “Implementing Intelligent Traffic
the street. Fig. 6 presents the flowchart of the system. Control System for Congestion Control, Ambulance Clearance, and
Stolen Vehicle Detection,” IEEE Sensors Journal, vol. 15, no. 2, pp.
1109-1113, 2015.
IV. EXPERIMENTAL SETUP AND ANALYSIS
[2] Varaprasad, G., and R. S. D. Wahidabanu “Flexible routing algorithm
To test the precision of the proposed system we built the for vehicular area networks,” In Proc. IEEE Conf. Intell. Transp. Syst.
prototype miniature model mentioned above. In a single run of Telecommun., Osaka, Japan, pp. 30-38. 2010.
the system (no reset) we tested the setup for an encounter of [3] J. Sampathkumar and K. Rajamani, “Automatic Detection of Zebra
Crossing Violation,” In Proc. Fourth International Conference on Signal
50 events of people waiting in the lobby where we fashioned and Image Processing, ICSIP 2012, Dr. N.G.P. Institute of Technology,
stick figures out of cardboards. The amount of people required Kalapatti, Coimbatore, 2012, pp.499-509.
for the yellow light to turn on (n-r) had been set as 5 and the [4] D. Ahmetovic, C. Bernareggi, A. Gerino and S. Mascetti,
amount of additional people required to ignite the red light had “ZebraRecognizer: Efficient and Precise Localization of Pedestrian
been set to 3. The timeout value had been set as 20 sec. for Crossings,” in Proc. 22nd International Conference on Pattern
Recognition, 2014, pp. 2566-2571.
yellow light and an additional 10 sec. for red light. After
[5] M. Uddin and T. Shioyama, “Detection of Pedestrian Crossing using
testing the system for the miniature model we tried to inspect Bipolarity and Projective Invariant,” in IAPR Conference on Machine
the system for real life situation when a person would walk by VIsion Applications,, Tsukuba Science City, Japan, 2005, pp. 132-135.
in front of the sonars. The Table 1 represents the accuracy [6] Z. Michalewicz, Genetic Algorithms + Data Structures = Evolution
comparison of the movement reading from real life situation Programs. 3rd edition, Springer-Verlag, Berlin, Heidelberg, 1996.
and miniature model. [7] C. Setchell, “Applications of computer vision to road traffic
monitoring,” Ph.D thesis, Computer Vision Group, Bristol University,
1997.
TABLE I. ACCURACY OF MOVEMENT READING
[8] K. Hara, V. Le, J. Sun, D. Jacobs and J. Froehlich, “Exploring early
Accuracy solutions for automatically identifying inaccessible sidewalks in the
Case physical world using google street view,” Cs.umd.edu, 2013. [online].
Incrementing counter Decrementing counter
http://cs.umd.edu/~jonf/publications/Hara_ExploringEarlySolutionsFor
Miniature AutomaticallyIdentifyingInaccessibleSidewalksInThePhysicalWorldUsi
97.5% 98.51%
model ngGoogleStreetView_HCIC2013.pdf. [Accessed: 28- Nov- 2017].
Real-life
96.5% 99.1% [9] “What is an Arduino? - learn.sparkfun.com,” Learn.sparkfun.com, 2015.
scenario
[online]. https://learn.sparkfun.com/tutorials/what-is-an-arduino.
[Accessed: 29- Nov- 2017].
From the Table I it can be observed that the inaccurate [10] “Ultrasonic Sensor What is an Ultrasonic
results given by the sensors is purely random, as incrementing Sensor?,” Education.rec.ri.cmu.edu. [online].
and decrementing variations in different scenarios are not http://education.rec.ri.cmu.edu/content/electronics/boe/ultrasonic_sensor
/1.html. [Accessed: 29- Nov- 2017].
consistent, we can only assume that these inaccuracies are
[11] “Servo Motor SG90,” Ee.ic.ac.uk. [online].
related to the quality of the ultrasonic sensors, but can http://www.ee.ic.ac.uk/pcheung/teaching/DE1_EE/stores/sg90_datasheet
conclude by saying that regardless of the inaccuracies the .pdf. [Accessed: 29- Nov- 2017].
system should still be a viable option for real time use for its [12] J. Ahsan, “What traffic rules?,” Dhaka Tribune, 2017.
cost effective side and convenient installment process.
V. CONCLUSION
In the proposed automated zebra crossing system, one
would have a very hard time outsmarting it to get the benefit
of the system towards his/herself. The automation of this
particular system relies entirely upon the characteristics of the
road and area, which in the upgraded versions will be
estimated automatically as well. The system removes the risky
business of road crossing to a minimum and the cost effective
and simplicity of the system gives value to it to the point that
it becomes a demanding project for developing and
underdeveloped countries where traffic laws are hardly
followed [12]. The implementation of ultrasonic sensors in the
system adds to its cost effectiveness, when in comparison with
existing automation of such system. It is hoped that the

View publication stats

You might also like