0% found this document useful (0 votes)
8 views

Traffic IOT Final Form 2

This project aims to develop a traffic control system for ambulances using IoT to clear traffic and allow ambulances to reach their destination faster. The system detects an approaching ambulance and automatically turns all traffic lights green along its path to minimize delays. By reducing traffic congestion, this system could help save lives by getting patients to the hospital more quickly in emergency situations.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Traffic IOT Final Form 2

This project aims to develop a traffic control system for ambulances using IoT to clear traffic and allow ambulances to reach their destination faster. The system detects an approaching ambulance and automatically turns all traffic lights green along its path to minimize delays. By reducing traffic congestion, this system could help save lives by getting patients to the hospital more quickly in emergency situations.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 70

Future University

Faculty of Engineering
Electronics Engineering

Title:

Traffic Control System (ITCS) for ambulance


Submitted by:

- Tagelsir Mubarak Osman (201522006)


- Moayad Abd Elrahim Mohamed (201522023)
- Isam Eldin Sayed Alhadi (201522030)

This Research was Submitted in Partial fulfillment for the


Requirements of the Bachelor Degree in Electronics Engineering

Supervisor:

Dr. Omer Mohamed

October 2020
‫اآليـــــة‬

‫قال تعالى‪:‬‬

‫اعلا ْمتَ نَا ِإ َّنكَ أ َ ْنتَ ْال َع ِلي ُم ْال َح ِكي ُم﴾‬ ‫ِ‬
‫ْم لَنَا إِال َم َ‬
‫﴿قَالُوا ُس ْب َحانَك َل عل َ‬

‫صدق هللا العظيم‬


‫(البقرة – ‪)32‬‬
Dedication

Dedicated to our mothers…


With warmth and faith...
Dedicated to our fathers…
With love and respect …
Dedicated to our friends...
Whom we cherish their friendship
Dedicated to our special people
Who mean so much to us…
Dedicated to all my teachers …
In whom we believe so much …
Acknowledgement

We extend our thanks to all who stood


With us to achieves this research which
It com because of grace of God
And reconcile.
We would like to give special thanks
Our supervisor
Doctor: Omer Mohamed
For his great help and support.
And
Our teachers that gave us information and all staff in Future University.
Finally yet importantly we dedicate this project for everyone that helped us to be at
the place that we are today.
I

Table of Contents
List of figures…………………………………………………………………….III
Abstract…………………………………………………………………………..IV
Chapter One: Background of the study

1. Introduction ......................................................................................................... 1

1.1 Statement of the Problem .................................................................................. 2

1.2 Objectives .......................................................................................................... 3

1.2.1 General Objectives...................................................................................... 3

1.2.2 Specific Objectives ..................................................................................... 3

1.3 Thesis Outline.................................................................................................... 3

Chapter Two: Literature Review and Previous Experiments

2.1.Litreture Review ............................................................................................... 4

2.1.1 Internet of things ......................................................................................... 4

2.1.2 IOT Applications………………………………………………………....4


2.1.3 Advantages of IoT ...................................................................................... 8

2.1.4 Disadvantages ........................................................................................... 10

2.1.5 Traffic Management System………………………….............................11

2.1.6 Traffic Light Controller…………………………………………………13

2.2 Related Experiments……………….………………………………………...14

2.3 Comparison…………………………………………………………………..16

Chapter Three: Methodology

3.1 General Description of System .……………………………………………..17

3.1.1 System Block Diagram ............................................................................. 17

3.1.2 System Flowchart…………………………………………….…………18

3.1.2.1 Requesting Ambulance……………………………………………...18

3.1.2.2 Traffic Control………………………………………………………19


II

3.2 Hardware Requirements and Components…………………………….…….20

3.2.1 Potentiometer…………………………………………………………….20

3.2.2 Liquid Crystal Display…………………………………………………...20

3.2.3 Wi-Fi Module……………………………………………………………21

3.2.4 Current Amplifier IC ULN2804…………………………………………21

3.2.5 Arduino Mega……………………………………………………………22

3.2.6 GSM Modems…………………………………………………………...23

3.2.7 Colored Resistor…………………………………………………………24

3.2.8 Capacitor…………………………………………………………………24

3.2.9 Light-emitting diode……………………………………………………..25

3.3 Programming for Software Implementation…………………………………26

3.3.1 Programming Environment………………………………………………26

3.3.2 Proteus Design Suite…………………………………………………….27

Chapter Four: Results and Discussion


4.1 Interfacing……………………………………………………………………28

4.1.1 Interfacing Wi-Fi module to Arduino Mega……………………….…….28

4.1.2 Interfacing LCD to Arduino Mega………………………………………28

4.1.3 Interfacing Traffic light to Arduino……………………………………...29

4.2 Final layout ………………………………………………………………….29

4.2 Testing……………………………………………………………………….31

4.3 Discussion…………………………………………………………………....31

Chapter Five: Conclusion and Recommendation

5.1 Conclusion ………………………………………………………….……….32

5.2 Recommendation …………………………………………………………....32


III

Reference………………………………………………………………………...33

List of figures:
Figure 3.1: System Block Diagram……………………………...……….17
Figure 3.1: Shows a Typical Single-turn Potentiometer……..…..……...20

Figure 3.2: Liquid Crystal Display……………………………………….21

Figure 3.3: Wi-Fi Module ESP8266……………………………………..21

Figure 3.4: Shows Current Amplifier ULN2804…………………………22

Figure 3.5: Arduino Mega 2560 Sample Board………………………….23

Figure 3.6: GSM Modem Module……………………………………….23

Figure 3.7: A Resistor 4 Band……………………………………………24

Figure 3.8:: An Electric Capacitor..……………………………………..25

Figure 3.9: Light Emitting Diode………………..………………………25

Figure 3.10: Arduino IDE Sketch………………...……………………..26

Figure 3.11: Proteus Splash Screen………..………………………….....27

Figure 4.1: Interfacing Wi-Fi module to Arduino Mega…………….......28

Figure 4.2: Interfacing LCD to Arduino Mega………………………......28

Figure 4.3: Interfacing Traffic Light to Arduino……….………………..29

Figure 4.4: System Components…………………………………………29

Figure 4.5: Screenshot of Readings Display.……….………………..…..30

Figure 4.6: Project Final Layout……… ..…..…………………….……..30


IV

Abstract
Recent development of technology has leads to IoT, which provides an
efficient method to address these issues. The difficulties faced by emergency
vehicles can be avoided using Automated Traffic Control System. One of the
widely affected services due to traffic jams is that of an ambulance. Many a times,
ambulance consist of emergency or critical patients which needs to be taken to the
hospital in minimum amount of time providing proper treatment to the patient so
that chances of surviving increases in critical condition in order to solve this
problem to some extent have apparently come up with “Traffic Control System
(ITCS) for ambulance”. The proposed system clears the traffic congestion by
turning all the red lights to green on the path of the ambulance, hence helping in
clearing the traffic and providing way towards its destination. The project based
on IoT and GSM network.
Chapter One

Background of the Study


1

1. Introduction
In today’s world traffic being the main issue in concern, is creating
innumerable problems to the general life. Apart from the common issues of
congestion, it poses serious hindrance to the normal functioning of emergency
vehicles. Emergency vehicles have to be prioritized in comparison with all other
vehicles, but either due to unavoidable situations or due to self-centered motorists
emergency vehicles do not reach their destinations on time [1]. Delayed arrival of
emergency vehicles may pose threats to life. Apparently, there has to be a system
which detects the emergency vehicle prior to its arrival at the junction and clear
the traffic ahead of it before-hand. This may minimize the delays and facilitate the
needy during their emergency. Unfortunately, there are no efficient measures
taken to deal with this problem in most of the countries including India. And thus
either emergency vehicles may remain statutory or may override the signal. In
case the emergency vehicles override the traffic signal, there are high possibilities
of encountering accidents. Recent development of technology has leads to IoT,
which provides an efficient method to address these issues. The difficulties faced
by emergency vehicles can be avoided using Automated Traffic Control System.

One of the widely affected services due to traffic jams is that of an


ambulance. Many a times, ambulance consist of emergency or critical patients
which needs to be taken to the hospital in minimum amount of time providing
proper treatment to the patient so that chances of surviving increases in critical
condition [2].

A Patient may lose his life if there is delay in reaching of ambulance to the
hospital. According to the surveys 95% of the heart attacks cases can be treated, if
the ambulance can reach the hospital at current time without stuck into the traffic.
For this, it is needed that the vehicles on the road to make way for the ambulance.
But sometimes, the ambulance gets stuck in the traffic which in turn wastes a lot
of time waiting for the traffic to get clear. The proposed solution can overcome
these limitations by the emerging technology such as IoT i.e. Internet of Things
[2].

Various software implementations and hardware devices can be connected


with the help of wireless networking tools or wired tools. In IoT the components
2

are connected and controlled by the internet. Thus, the impact of IoT in today’s
era is significant as it helps to represent the object digitally and makes itself
something greater than the object by itself. In this paper, we have come up with
the ‘Intelligent Traffic Control System for Smart Ambulance’ [3].

The main objective of this system is to make it possible for the ambulance
to reach a particular location without having it to stop anywhere until the
destination is reached. The proposed solution offers a monitoring of traffic lights
and its controlling by the driver of the ambulance.

Basic information of the patient is taken along with the status of the
patient such as critical or non-critical. This information is further used to send it
to the hospital. Depending upon the emergency, the driver sends the direction
towards which it wants to travel.

Depending upon the command, that particular signal is made green to


provide way to the ambulance and simultaneously the others are changed to red.
Using this method, way is provided to the ambulance resulting it to reach the
destination in minimum time [3][4].

1.1 Statement of the Problem

• The growth of industrialization and urbanization has leads to an immense


increase in the population invariably leading to rise in the number of
vehicles on road.
• The resulting traffic congestion and traffic jams are the major hurdles for
emergency vehicles such as ambulance carrying critical patients as these
emergency vehicles are not able to reach their destination in time,
resulting into a loss of human life.
3

1.2 Objectives

1.2.1 General Objectives

To design a device that can solve this problem to some extent have apparently
come up with “Traffic Control System (ITCS) for ambulance”. The proposed
system clears the traffic congestion by turning all the red lights to green on the
path of the ambulance, hence helping in clearing the traffic and providing way
towards its destination. The project based on IoT and GSM network.

1.2.2 Specific Objectives

1- To study and design an IoT structure and the communication protocols


and the applications that covered.
2- To study the traffic light systems and the problem facing the existing
systems
3- To study and design an open source android systems that offer tracking
through smart phones based on internet and mobile network to enhance
the locating procedure of ambulance vehicle.
4- To interface traffic lighting system into the tracking server to control the
traffic light using IoT.

1.3 Thesis Outline


This thesis consist of five chapters in Chapter one an Introduction
discussing the main idea around the project. Problem statement showing the
problems solved by the project and the objectives achieved. In Chapter two
literature review is included while Chapter three represent the Methodology
explaining of the steps, that was done to solve problem and accomplish the
objective. In Chapter four the results and discussion included, While Chapter five
Represent the conclusion and Future work that can improve the project is
included.
Chapter Two

Literature Review and Previous Experiments


4

2.1 Literature Review

2.1.1 Internet of things

The Internet of Things, or IoT, refers to the billions of physical devices


around the world that are now connected to the internet, collecting and sharing
data. Thanks to cheap processors and wireless networks, it's possible to turn
anything, from a pill to an airplane, into part of the IoT. This adds a level of
digital intelligence to devices that would be otherwise dumb, enabling them to
communicate without a human being involved, and merging the digital and
physical worlds [5].

2.1.2 IoT Applications

There are many applications of internet of things including the following:


[5]
1. Smart Home

‘Smart Home’ is the most application that is based on IoT, through IoT the
user can switch on air conditioning before reaching home or switch off lights even
after you have left home, or unlock the doors to friends for temporary access even
when you are not at home.

Smart Home has become the revolutionary ladder of success in the


residential spaces and it is predicted Smart homes will become as common as
smart phones.

2. Wearable’s

Wearables have experienced an explosive demand in markets all over the


world. Companies like Google, Samsung have invested heavily in building such
devices. Wearable devices are installed with sensors and software’s which collect
data and information about the users. This data is later pre-processed to extract
essential insights about user.
5

These devices broadly cover fitness, health and entertainment


requirements. The pre-requisite from internet of things technology for wearable
applications is to be highly energy efficient or ultra-low power and small sized.

3. Connected Cars

The automotive digital technology has focused on optimizing vehicles


internal functions. But now, this attention is growing towards enhancing the in-car
experience.

A connected car is a vehicle which is able to optimize its own operation,


maintenance as well as comfort of passengers using onboard sensors and internet
connectivity.

Most large auto makers as well as some brave startups are working on
connected car solutions. Major brands like Tesla, BMW, Apple, and Google are
working on bringing the next revolution in automobiles.

4. Industrial Internet

Industrial Internet is the new buzz in the industrial sector, also termed as
Industrial Internet of Things (IIoT). It is empowering industrial engineering with
sensors, software and big data analytics to create brilliant machines.

According to Jeff Immelt, CEO, GE Electric, IIoT is a “beautiful,


desirable and investable” asset. The driving philosophy behind IIoT is that, smart
machines are more accurate and consistent than humans in communicating
through data. And, this data can help companies pick inefficiencies and problems
sooner.

5. Smart Cities

Smart city is another powerful application of IoT generating curiosity


among world’s population. Smart surveillance, automated transportation, smarter
energy management systems, water distribution, urban security and
6

environmental monitoring all are examples of internet of things applications for


smart cities.

IoT will solve major problems faced by the people living in cities like
pollution, traffic congestion and shortage of energy supplies etc. Products like
cellular communication enabled Smart Belly trash will send alerts to municipal
services when a bin needs to be emptied.

6. IoT in agriculture

With the continuous increase in world’s population, demand for food


supply is extremely raised. Governments are helping farmers to use advanced
techniques and research to increase food production. Smart farming is one of the
fastest growing field in IoT.

Farmers are using meaningful insights from the data to yield better return
on investment. Sensing for soil moisture and nutrients, controlling water usage for
plant growth and determining custom fertilizer are some simple uses of IoT.

7. Smart Retail

The potential of IoT in the retail sector is enormous. IoT provides an


opportunity to retailers to connect with the customers to enhance the in-store
experience.

Smart phones will be the way for retailers to remain connected with their
consumers even out of store. Interacting through Smart phones and using Beacon
technology can help retailers serve their consumers better. They can also track
consumers’ path through a store and improve store layout and place premium
products in high traffic areas.

8. Energy Engagement

Power grids of the future will not only be smart enough but also highly
reliable. Smart grid concept is becoming very popular all over world.
7

The basic idea behind the smart grids is to collect data in an automated
fashion and analyze the behavior or electricity consumers and suppliers for
improving efficiency as well as economics of electricity use.

Smart Grids will also be able to detect sources of power outages more
quickly and at individual household levels like nearby solar panel, making
possible distributed energy system.

9. IOT in Healthcare

Connected healthcare yet remains the sleeping giant of the Internet of


Things applications. The concept of connected healthcare system and smart
medical devices bears enormous potential not just for companies, but also for the
well-being of people in general.

Research shows IoT in healthcare will be massive in coming years. IoT in


healthcare is aimed at empowering people to live healthier life by wearing
connected devices.

The collected data will help in personalized analysis of an individual’s


health and provide tailor made strategies to combat illness.

10. IoT in Poultry and Farming

Livestock monitoring is about animal husbandry and cost saving. Using


IoT applications to gather data about the health and wellbeing of the cattle,
ranchers knowing early about the sick animal can pull out and help prevent large
number of sick cattle. With the help of the collected data and ranchers can
increase the poultry production.
8

2.1.3 Advantages of IoT

a) Communication

IoT encourages the communication between devices, also famously


known as Machine-to-Machine (M2M) communication. Because of this, the
physical devices are able to stay connected and hence the total transparency is
available with lesser inefficiencies and greater quality [5].

b) Automation and Control

Due to physical objects getting connected and controlled digitally and


centrally with wireless infrastructure, there is a large amount of automation and
control in the workings. Without human intervention, the machines are able to
communicate with each other leading to faster and timely output [5].

c) Information

It is obvious that having more information helps making better decisions.


Whether it is mundane decisions as needing to know what to buy at the grocery
store or if your company has enough widgets and supplies, knowledge is power
and more knowledge is better [5].

D) Monitor

The second most obvious advantage of IoT is monitoring. Knowing the


exact quantity of supplies or the air quality in your home, can further provide
more information that could not have previously been collected easily. For
instance, knowing that you are low on milk or printer ink could save you another
trip to the store in the near future. Furthermore, monitoring the expiration of
products can and will improve safety [5].

E) Time

As hinted in the previous examples, the amount of time saved because of


IoT could be quite large. And in today’s modern life, we all could use more time
[5].
9

F) Money

The biggest advantage of IoT is saving money. If the price of the tagging
and monitoring equipment is less than the amount of money saved, then the
Internet of Things will be very widely adopted. IoT fundamentally proves to be
very helpful to people in their daily routines by making the appliances
communicate to each other in an effective manner thereby saving and conserving
energy and cost. Allowing the data to be communicated and shared between
devices and then translating it into our required way, it makes our systems
efficient [5].

g) Automation of daily tasks leads to better monitoring of devices

The IoT allows you to automate and control the tasks that are done on a
daily basis, avoiding human intervention. Machine-to-machine communication
helps to maintain transparency in the processes. It also leads to uniformity in the
tasks. It can also maintain the quality of service. We can also take necessary
action in case of emergencies [5].

h) Efficient and Saves Time

The machine-to-machine interaction provides better efficiency, hence;


accurate results can be obtained fast. This results in saving valuable time. Instead
of repeating the same tasks every day, it enables people to do other creative jobs
[5].

i) Saves Money

Optimum utilization of energy and resources can be achieved by adopting


this technology and keeping the devices under surveillance. We can be alerted in
case of possible bottlenecks, breakdowns, and damages to the system. Hence, we
can save money by using this technology [5].
10

2.1.4 Disadvantages

Compatibility: Currently, there is no international standard of


compatibility for the tagging and monitoring equipment. I believe this
disadvantage is the most easy to overcome. The manufacturing companies of
these equipment just need to agree to a standard, such as Bluetooth, USB, etc.
This is nothing new or innovative needed [5].

Complexity: As with all complex systems, there are more opportunities of


failure. With the Internet of Things, failures could sky rocket. For instance, let’s
say that both you and your spouse each get a message saying that your milk has
expired, and both of you stop at a store on your way home, and you both purchase
milk. As a result, you and your spouse have purchased twice the amount that you
both need. Or maybe a bug in the software ends up automatically ordering a new
ink cartridge for your printer each and every hour for a few days, or at least after
each power failure, when you only need a single replacement [5].

Privacy/Security: With all of this IoT data being transmitted, the risk of
losing privacy increases. For instance, how well encrypted will the data be kept
and transmitted with? Do you want your neighbors or employers to know what
medications that you are taking or your financial situation? [5].

Safety: Imagine if a notorious hacker changes your prescription. Or if a


store automatically ships you an equivalent product that you are allergic to, or a
flavor that you do not like, or a product that is already expired. As a result, safety
is ultimately in the hands of the consumer to verify any and all automation [5].

As all the household appliances, industrial machinery, public sector


services like water supply and transport, and many other devices all are connected
to the Internet, a lot of information is available on it. This information is prone to
attack by hackers. It would be very disastrous if private and confidential
information is accessed by unauthorized intruders [5].

One of the first considerations when putting together an M2M / IoT


system is what protocol to use between the remote device or asset (the client) and
11

the central server (e.g. the cloud server). This article discusses the factors to
consider when choosing a protocol and looks at some of the more popular ones
used when connecting remote devices to a server [5].

Over the years we have seen a huge array of protocols used to


communicate between the remote device and the central server. Some have been
good, well thought out and worked well; others (most) have not. The ideal
situation is where we get to choose the protocol before the project starts, whether
that be an existing open protocol or one designed from scratch. The preferred
route is to use something open, stable, well understood and well tested instead of
something recently invented. However there are situations when an open protocol
just doesn’t suit and something more bespoke is required. These days on the rare
occasions when we use one of our bespoke protocols (usually for data efficiency
reasons) we have one or two that have been used in multiple projects over a long
period that have existing robust client and server implementations [5]

2.1.5 Traffic Management System

Is a cornerstone of a Smart city. In the current problems of the world, urban


mobility is one of the major problems, especially in metropolitan cities. Previous
traffic management systems are not capable enough to tackle this growth of traffic
on the road networks.a smart traffic management system using the Internet of
Things and a decentralized approach to optimize traffic on the roads and intelligent
algorithms to manage all traffic situations more accurately. This kind of systems is
overcoming the flaws of previous traffic management systems [6].
12

Fundamental features of designing an enhanced traffic control system


consist of linking traffic signals and traffic control centers with GIS enabled digital
road map of the town using intelligent computational power of data analytics as a
key module. In this context, the basic challenge lies in usage of real time analytics
on online traffic information and correctly applying it to some basic traffic flow [6].

Data analytics tools take data from the Traffic Management System and
using GIS mapping under real time support, they provide useful information to the
drivers in the vehicles and help reduce the traffic congestion. Additionally, basic
tourist information such as visiting places, parking area and distance are also
projected on a real time basis on large digital screens installed at city centers
entrance points to guide the drivers toward their destination. This helps to save fuel
and finally to save a lot of time spent in searching various visiting places. The smart
living style in metro cities is also fulfilled as the environment becomes pollution
free and more hygienic [6].

The projected transport system has been planned in a Vehicular Ad-hoc


Networks (VANETs) scenario, as these networks are becoming more of a common
technology in smart road traffic management and control systems. The problem
faced by smart cities in terms of traffic congestion issues can be solved better using
VANETs, as there is a network connectivity between the vehicle and the network
infrastructure. Therefore, predictable information regarding road conditions ahead
13

and route information can be directed to the smart vehicles in transit and intelligent
decisions can be made before any problem occurs [6].

2.1.6 Traffic Light Controller

The Traffic Light Controllers are based on a variety of electronic


technologies. These Traffic Light Controllers have some limitations due to using
a pre-defined hardware, which is programmed according to fixed time that never
change. Hence, there is no flexibility of modification on real time basis. Due to
the fixed time for the three color signals, the waiting time is more and vehicles
waste a lot of fuel. The aim of the driver is to reach at the destination without
wasting time and fuel. But the resources provided by the current infrastructures
are limited. So the traffic management at road is crucial to reduce waiting and
traveling times, save fuel and money. Many times accidents happen due to the
poor performance of the system. The proposed system provides the map feature,
which controls the traffic on request. The traffic density is increasing at an
alarming rate all over the world which calls for the need of advance intelligent
traffic signals to replace the conventional manual and time based traffic signal
system .The system should give priority to the density of traffic on the roads .This
can be done by using an IR sensor on the road intersections and make the decision
according to the information that the sensor senses. The timings of the traffic
lights at each crossing of road will be intelligently decided based on the total
traffic on all adjacent roads. Thus, optimization of traffic light switching increases
road capacity and traffic flow, and can prevent traffic congestions. The primary
role of the personnel computer in the system is to provide a programmable
process and an interfacing to the external devices. In the proposed design the
personnel computer will be the master of the system. It is well suited for
monitoring a selected variety of inputs and responding to them in real time using
the preprogrammed instructions that are executed by the built-in microprocessor.
The IR sensor detects vehicles and also detects the emergency vehicles. It is
interfaced to the computer through the parallel port. The program in the PC polls
the IR sensor periodically and accordingly responds. In this paper, intelligent
traffic light controller based on the personnel computer is implemented using the
14

IR sensor and GSM system to provide users who wish to obtain the latest status of
traffic on congested roads [7].

2.2 Related Experiments

2.2.1 Intelligent Ambulance with Traffic Control Gargi Beri1 ,


Ashwin Channawar2 , Pankaj Ganjare3 , Amruta Gate4 , Prof.
Vijay Gaikwad 5 1 (Department of Electronics, Vishwakarma
Institute of Technology, 666, Upper Indira Nagar, Bibvewadi,
Pune411 037, India).

In this project hardware is used to calculate the health parameters. Serial


communication is used to store it in PC which is in ambulance through which
they are transferred to the hospital. RF communication is used to control the
traffic. The two systems which are combined in this paper are - health monitoring
and traffic controlling systems. Data acquisition will take place in Health
monitoring system and parameters will be sent to the hospital server via PC. The
driver of the ambulance controls the traffic using the keypad in the ambulance.
Both the systems will work simultaneously. The doctor in the hospital monitors
the patients’ health parameters. The signals could be manipulated by the driver of
the ambulance at the same time. By adding a GPS navigation system with a
congestion detection module, this system can be improved for the real time
scenario.

2.2.2 Smart traffic light control system Conference Paper · April


2016 with 73,045 Reads DOI: 10.1109/EECEA.2016.7470780
Conference: 2016 Third International Conference on Electrical,
Electronics, Computer Engineering and their Applications
(EECEA).

The main aim of the paper is to design a Microcontroller based intelligent


ambulance system which can change the traffic lights upon its arrival at traffic
light junction using IR(Infrared) sensors. The ambulance system also has Global
15

System for Mobile Communication based information device that alerts the
doctors about the patient’s condition and informs the doctors to report to the
nearest hospital for patient’s quick recovery. There could be a case where two
Ambulances are exactly at equal distance from traffic light, in this case the traffic
light receiver will give chance to the transmitter of any one Ambulance randomly
without considering any fact.

2.2.3 The Security of Big Data in Fog-Enabled IoT Applications


Including Blockchain: A Survey Noshina Tariq.

The large amount of data that is generated by these devices can be handled
by cloud computing and it can also be used to send command to those devices to
perform a task. This project is based on the IoT and cloud. This project is to
establish the communication between the traffic signals and the ambulance so that
the traffic signal can respond to the arrival of the ambulance. The application
needs a required bandwidth for the instantaneous communication between the
ambulance and the traffic signal.

2.2.4 Smart Traffic Control System Using Image Processing


Prashant Jadhav1, Pratiksha Kelkar2, Kunal Patil3, Snehal
Thorat4 1234Bachelor of IT, Department of IT, Theem College Of
Engineering, Maharashtra, India.

The system will be image processing based adaptive signal controlling.


Proposed system will be based on traditional system along with automated signal.
Digital camera is mounted on the motor for rotation. This faces the lanes and gets
the sense of the traffic. The artificial vision is captured with the help of the digital
camera. The camera’s direction changes in the steps of 90 degrees, it faces each
lane and captures the image. In order to change the direction of the camera, it is
controlled by the PC through microcontroller. Load of the traffic on each lane is
estimated by Image processing techniques. The accuracy of the image processing
compared to GPS is low. If a vehicle of a bigger size than an ambulance is in
front of the ambulance, then the camera will not be able to capture the ambulance.
16

2.3 Comparison
The usage of hardware implementation circuit inside the vehicle is the interest
of all of the developers which may lead to an increasing on the cost of the
solution also the complexity. In this project the usage of the open source
ambulance tracking and requesting system help on implementing the system
without the need of external interface to GPS or other components. Also the
system provides the ambulance driver with information about the shortest path.
Chapter Three

Methodology
17

3.1 General Description of System


Whenever ambulance reaches to the accident spot, first the ambulance
driver will feed the patient's information in the android application. This
information will be sent to the hospital's server for further processes. On the way
whenever ambulance halts at the traffic signal, the ambulance driver will send
emergency command along with direction from the android application to the
server. Also the current GPS coordinates of ambulance is also sent to the server.
At the server, depending upon the co-ordinates of the ambulance, the nearest
signal is detected and the emergency command along with the direction is sent to
that particular signal. Depending on the direction received from the server that
particular signal is made green.

3.1.1 System Block Diagram

Figure 3.1: System Block Diagram


18

3.1.2 System Flowchart


3.1.2.1 Requesting Ambulance

Start

Numerical Values

Wait for Ambulance


Request

No Request Yes
Received

Get Patient Location

Get Nearest Ambulance

Draw Path and Direction

Address Traffic Light on


Path
19

3.1.2.2 Traffic Control

Start

Numerical Values

Wait for Path and Traffic


Location

No Ambulance Yes Switch Traffic Light


near Traffic to Green

Return to
No
Normal
Received

Yes

Switch Traffic to Normal


Mode
20

3.2 Hardware Requirements and Components

3.2.1 Potentiometer

A potentiometer measuring instrument is essentially a voltage divider used


for measuring electric potential (voltage); the component is an implementation of
the same principle, hence its name.

Figure 3.1: Shows a Typical Single-turn Potentiometer.

Potentiometers are commonly used to control electrical devices such as


volume controls on audio equipment. Potentiometers operated by a mechanism
can be used as position transducers, for example, in a joystick. Potentiometers are
rarely used to directly control significant power (more than a watt), since the
power dissipated in the potentiometer would be comparable to the power in the
controlled load.

3.2.2 Liquid Crystal Display

A liquid-crystal display (LCD) is a flat-panel display or other


electronically modulated optical device that uses the light-modulating properties
of liquid crystals combined with polarizes. Liquid crystals do not emit light
directly, instead using a backlight or reflector to produce images in color or
monochrome.
21

Figure 3.2: Liquid Crystal Display

3.2.3 Wi-Fi Module

The ESP8266 is a low-cost Wi-Fi microchip, with a full TCP/IP


stack and microcontroller capability, Wi-Fi works off of the same principal as
other wireless devices - it uses radio frequencies to send signals between devices.
The radio frequencies are completely different say from walkie talkies, car radios,
cell phones, and weather radios.

Figure 3.3: Wi-Fi Module ESP8266

3.2.4 Current Amplifier IC ULN2804

The ULN2804 is a high voltage, high current Darlington array comprised


of eight NPN Darlington pairs. The device features open-collector outputs with
suppression diodes for inductive loads and is ideally suited for interfacing
between low-level logic circuitry and high power loads. Typical loads including
22

relays DC motors, filament lamps, LED displays, printer hammers and high
power buffers.

Features of ULN 2804:

➢ Eight Darlington with common emitters.


➢ TTL, PMOS or CMOS Compatible inputs.
➢ Peak output current to 500mA.
➢ Output voltage to 50V.
➢ Clamp diodes for transient suppression.

Figure 3.4: Shows Current Amplifier ULN2804

3.2.5 Arduino Mega

The Arduino MEGA 2560 is designed for projects that require more I/O
lines, more sketch memory and more RAM. With 54 digital I/O pins, 16 analog
inputs and a larger space for your sketch it is the recommended board for 3D
printers and robotics projects. This gives your projects plenty of room and
opportunities maintaining the simplicity and effectiveness of the Arduino
platform. This document explains how to connect your Mega2560 board to the
computer and upload your first sketch. The Arduino Mega 2560 is programmed
using the Arduino Software (IDE), our Integrated Development Environment
common to all our boards and running both online and offline.
23

Figure 3.5: Arduino Mega 2560 Sample Board

3.2.6 GSM Modems

A GSM modem is one of the wireless modem that is devised to work with
a GSM wireless network. It works with the same frequency of GSM wireless
network. It is an important part of the GSM network. Now a day’s GSM based
cell phones are more preferred than CDMA phones, hence let us see its operation
and its features.

Figure 3.6: GSM Modem Module

The GSM wireless modem works in the way like a dial-up modem. The
main difference between the GSM modem and dial up modem is that a dial-up
modem sends and receives data through a fixed telephone line, while a GSM
wireless modem sends and receives data through radio wave-propagation.
24

3.2.7 Colored Resistor

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


electrical resistance as a circuit element. The current through a resistor is in direct
proportion to the voltage across the resistor's terminals. Thus, the ratio of the
voltage applied across a resistor's terminals to the intensity of current through the
circuit is called resistance. This relation is represented by Ohm's law:

Equation (2.1)

Resistors are common elements of electrical networks and electronic circuits and
are ubiquitous in most electronic equipment. Practical resistors can be made of
various compounds and films, as well as resistance wire (wire made of a high-
resistivity alloy, such as nickel-chrome). Resistors are also implemented within
integrated circuits, particularly analog devices, and can also be integrated into
hybrid and printed circuits.

Figure 3.7: A resistor 4 Band

3.2.8 Capacitor

A capacitor (formerly known as condenser) is a passive two-terminal


electrical component used to store energy in an electric field. The forms of
practical capacitors vary widely, but all contain at least two electrical conductors
separated by a dielectric (insulator).
25

Figure 3.8:: An Electric Capacitor

When there is a potential difference (voltage) across the conductors, a


static electric field develops across the dielectric, causing positive charge to
collect on one plate and negative charge on the other plate. Energy is stored in the
electrostatic field. The capacitance is greatest when there is a narrow separation
between large areas of conductor; hence capacitor conductors are often called
"plates," referring to an early means of construction

3.2.9 Light-emitting diode

A light-emitting diode (LED) is a semiconductor light source. LEDs are


used as indicator lamps in many devices and are increasingly used for other
lighting. When a light-emitting diode is forward-biased (switched on).

Figure 3.9: Light Emitting diode


26

Light-emitting diodes are used in applications as diverse as replacements


for aviation lighting, automotive lighting (in particular brake lamps, turn signals,
and indicators) as well as in traffic signals.

3.3Programming for Software Implementation

3.3.1 Programming Environment

Arduino is an open source computer hardware and software company,


project, and user community that designs and manufactures single-board
microcontrollers and microcontroller kits for building digital devices and
interactive objects that can sense and control objects in the physical world. The
project's products are distributed as open-source hardware and software, which
are licensed under the GNU Lesser General Public License (LGPL) or the GNU
General Public License (GPL),[1] permitting the manufacture of Arduino boards
and software distribution by anyone. Arduino boards are available commercially
in preassembled form, or as do-it-yourself kits.

Figure 3.10: Arduino IDE Sketch.


27

Arduino board designs use a variety of microprocessors and controllers.


The boards are equipped with sets of digital and analog input/output (I/O) pins
that may be interfaced to various expansion boards (shields) and other circuits.
The boards feature serial communications interfaces, including Universal Serial
Bus (USB) on some models, which are also used for loading programs from
personal computers. The microcontrollers are typically programmed using a
dialect of features from the programming languages C and C++. In addition to
using traditional compiler tool chains, the Arduino project provides an integrated
development environment (IDE) based on the Processing language project.

The Arduino project started in 2003 as a program for students at the Interaction
Design Institute Ivrea in Ivrea, Italy,[2] aiming to provide a low-cost and easy way
for novices and professionals to create devices that interact with their
environment using sensors and actuators. Common examples of such devices
intended for beginner hobbyists include simple robots, thermostats, and motion
detectors.

The name Arduino comes from a bar in Ivrea, Italy, where some of the founders
of the project used to meet. The bar was named after Arduin of Ivrea, who was
the margrave of the March of Ivrea and King of Italy from 1002 to 1014.[3]7

3.4.2 Proteus Design Suite

The Proteus Design Suite is an Electronic Design Automation (EDA) tool


including schematic capture, simulation and PCB Layout modules.

Figure 3.11: Proteus Splash Screen.


28

Chapter Four

Results and Discussion

4.1 interfacing

4.1.1 Interfacing Wi-Fi module to Arduino Mega

The Wi-Fi module has enable pin and supply pin 3.3 volt its connected
together to the 3.3v on Arduino Mega, the TX and RX are connected to pin
19, 18 TX,RX.

Figure 4.1: Interfacing Wi-Fi Module to Arduino Mega

4.1.2 Interfacing LCD to Arduino Mega

The LCD was supplied with 5 volt and ground from Arduino Mega, then
the Enable pin to be 2, W/R Grounded, Reset to pin 3, D4,D5,D6,D7 to pins
4-5-6-7 on Arduino, and the backlight pins 15 and 16 to the VCC and Ground
of Arduino.

Figure 4.2: Interfacing LCD to Arduino Mega


29

4.1.3 Interfacing Traffic light to Arduino

Figure 4.3: Interfacing traffic Light to Arduino

4.2 Final layout

Figure 4.4: System Components


30

Figure 4.5: Screenshot of Readings Display

Figure 4.6: Project Final Layout


31

4.2 Testing

Test No. Distance (M) Transmit via Status


1 10 Wi-Fi Received
2 20 Wi-Fi Received
3 40 Wi-Fi Received
4 80 Wi-Fi Received
5 90 Wi-Fi Received
6 100 GSM Received
7 >150 meter GSM Received

4.3 Discussion
The first idea came up in this project is, using GPS to detect nearest hospital, and
the shortest path that the ambulance can pass through in reduce time, best routing
provided by navigation system, but there are some problems that face the project
including in which direction the ambulance will take, so the problem was solved
by using a manual transmission to the direction required by the ambulance using
GSM modem and Wi-Fi, this solution improve the connectivity between the
ambulance and the traffic light.

In example, if there was more than one ambulance coming from different
directions at the same time. The system will give priority to the first ambulance that send
message to the traffic control system
Chapter Five

Conclusion and Recommendation


32

5.1 Conclusion
In this project IoT, provides an efficient method to address the solution of
the thesis issues. The difficulties faced by emergency vehicles can be avoided
using Automated Traffic Control System was solved. To solve this problem to
some extent have apparently come up with “Traffic Control System (ITCS) for
ambulance”. The proposed system clears the traffic congestion by turning all the
red lights to green on the path of the ambulance, hence helping in clearing the
traffic and providing way towards its destination. The project based on IoT and
GSM network.

5.2 Recommendation
1- Use GPS for navigation.

2- Compass used for angle and direction.

3- Google map integration can simplify the routing path.


33

Reference

1. Hacking Exposed Linux: Linux Security Secrets & Solutions


(third ed.). McGraw-Hill Osborne Media. 2008. p. 298.
ISBN 978-0-07-226257-5.
2. Sen, Dipankar; Sen, Prosenjit; Das, Anand M. (2009), RFID
For Energy and Utility Industries, PennWell, ISBN 978-1-
59370-105-5, pp. 1-48
3. Daniel M. Dobkin, The RF in RFID: Passive UHF RFID In
Practice, Newnes 2008 ISBN 978-0-7506-8209-1, chapter 8
4. John R. Vacca Computer and information security handbook,
Morgan Kaufmann, 2009 ISBN 0-12-374354-0, page 208
5. Bill Glover, Himanshu Bhatt ,RFID essentials, O'Reilly Media,
Inc., 2006 ISBN 0-596-00944-5, pages 88-89
6. Bill Glover, Himanshu Bhatt, RFID Essentials, O'Reilly Media,
Inc., 2006 ISBN 0-596-00944-5 page 43
7. Ilyas, edited by Syed Ahson, Mohammad (2008). "26.5". RFID
handbook ISBN 9781420054996. Retrieved 7 August 2012.
8. Katherine Albrecht; Liz McIntyre (2005). Spychips: how major
corporations and government plan to track your every move
with RFID. Thomas Nelson Inc. ISBN 1-59555-020-8.
9. Intelligent Ambulance with Traffic Control Gargi Beri1 ,
Ashwin Channawar2 , Pankaj Ganjare3 , Amruta Gate4 , Prof.
Vijay Gaikwad 5 1 (Department of Electronics, Vishwakarma
Institute of Technology, 666, Upper Indira Nagar, Bibvewadi,
Pune411 037, India)
10.Smart traffic light control system Conference Paper · April
2016 with 73,045 Reads DOI:
10.1109/EECEA.2016.7470780 Conference: 2016 Third
34

International Conference on Electrical, Electronics, Computer


Engineering and their Applications (EECEA)
11. The Security of Big Data in Fog-Enabled IoT Applications
Including Blockchain: A Survey Noshina Tariq,
12.Smart Traffic Control System Using Image Processing Prashant
Jadhav1, Pratiksha Kelkar2, Kunal Patil3, Snehal Thorat4
1234Bachelor of IT, Department of IT, Theem College Of
Engineering, Maharashtra, India
A-1

Appendix

#include <SoftwareSerial.h>

#include <LiquidCrystal.h>

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

LiquidCrystallcd(2, 3, 4, 5, 6, 7);

SoftwareSerialmygsm(10, 11);

// twelve servo objects can be created on most boards

int mos_value;

int r1=23;

int y1=25;

int g1=27;

int r2=29;

int y2=31;

int g2=33;

int r3=35;

int y3=37;

int g3=39;

int r4=41;

int y4=43;

int g4=45;
A-2

void setup() {

Serial.begin(9600);

mygsm.begin(9600);

pinMode(r1,OUTPUT);

pinMode(y1,OUTPUT);

pinMode(g1,OUTPUT);

pinMode(r2,OUTPUT);

pinMode(y2,OUTPUT);

pinMode(g2,OUTPUT);

pinMode(r3,OUTPUT);

pinMode(y3,OUTPUT);

pinMode(g3,OUTPUT);

pinMode(r4,OUTPUT);
pinMode(y4,OUTPUT);
pinMode(g4,OUTPUT);
// put your setup code here, to run once:
lcd.begin(16, 2);

while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}
while (!mygsm) {
; // wait for serial port to connect. Needed for native USB port only
}
A-3

// Print a message to the LCD.


lcd.print("Traffic IoT Sys.");
delay(1500);
Serial.println("Start");
gsm_init();
init_sms();
send_data("Traffic IoT System is Ready");
send_sms();
configure();
lcd.clear();
}

void loop() {
lcd.setCursor(0, 1);
lcd.print("Normal Mode");

// all Red
digitalWrite(r1,HIGH);
digitalWrite(r2,HIGH);
digitalWrite(r3,HIGH);
digitalWrite(r4,HIGH);

digitalWrite(y1,LOW);
digitalWrite(y2,LOW);
digitalWrite(y3,LOW);
digitalWrite(y4,LOW);

digitalWrite(g1,LOW);
digitalWrite(g2,LOW);
digitalWrite(g3,LOW);
A-4

digitalWrite(g4,LOW);
//
delay(10);

// yellow1
digitalWrite(r1,LOW);
digitalWrite(y1,HIGH);
digitalWrite(g1,LOW);

delay(10);

// green 1
digitalWrite(r1,LOW);
digitalWrite(y1,LOW);
digitalWrite(g1,HIGH);

// RETURN TO RED 1
delay(1000);
digitalWrite(r1,HIGH);
digitalWrite(y1,LOW);
digitalWrite(g1,LOW);

// STAGE 2

// yellow1
digitalWrite(r2,LOW);
digitalWrite(y2,HIGH);
digitalWrite(g2,LOW);

delay(10);
A-5

// green 1
digitalWrite(r2,LOW);
digitalWrite(y2,LOW);
digitalWrite(g2,HIGH);

// RETURN TO RED 1
delay(10);
digitalWrite(r2,HIGH);
digitalWrite(y2,LOW);
digitalWrite(g2,LOW);

// STAGE 3

// yellow1
digitalWrite(r3,LOW);
digitalWrite(y3,HIGH);
digitalWrite(g3,LOW);

delay(10);

// green 1
digitalWrite(r3,LOW);
digitalWrite(y3,LOW);
digitalWrite(g3,HIGH);

// RETURN TO RED 1
delay(10);
A-6

digitalWrite(r3,HIGH);
digitalWrite(y3,LOW);
digitalWrite(g3,LOW);

// Stage 4

// yellow1
digitalWrite(r4,LOW);
digitalWrite(y4,HIGH);
digitalWrite(g4,LOW);

delay(10);

// green 1
digitalWrite(r4,LOW);
digitalWrite(y4,LOW);
digitalWrite(g4,HIGH);

// RETURN TO RED 1
delay(10);
digitalWrite(r4,HIGH);
digitalWrite(y4,LOW);
digitalWrite(g4,LOW);

Serial.println(".");
while(mygsm.available()){
if (mygsm.find("NNN"))
{
Serial.println("*** NNN FOUND ***");
A-7

lcd.setCursor(0, 1);
lcd.print("North OPEN ");
digitalWrite(g4,HIGH);
digitalWrite(y4,LOW);
digitalWrite(r4,LOW);
digitalWrite(r3,HIGH);
digitalWrite(g3,LOW);
digitalWrite(y3,LOW);
digitalWrite(r2,HIGH);
digitalWrite(y2,LOW);
digitalWrite(g2,LOW);
digitalWrite(r1,HIGH);
digitalWrite(y1,LOW);
digitalWrite(g1,LOW);
delay(5000);
break;
}
if (mygsm.find("SSS"))
{
Serial.println("*** SSS FOUND ***");
lcd.setCursor(0, 1);
lcd.print("South OPEN ");
digitalWrite(g4,LOW);
digitalWrite(y4,LOW);
digitalWrite(r4,HIGH);
digitalWrite(r3,LOW);
digitalWrite(g3,HIGH);
digitalWrite(y3,LOW);
digitalWrite(r2,HIGH);
digitalWrite(y2,LOW);
A-8

digitalWrite(g2,LOW);
digitalWrite(r1,HIGH);
digitalWrite(y1,LOW);
digitalWrite(g1,LOW);
delay(5000);
break;
}
if (mygsm.find("EEE"))
{
Serial.println("*** EEE FOUND ***");
lcd.setCursor(0, 1);
lcd.print("East OPEN ");
digitalWrite(g4,LOW);
digitalWrite(y4,LOW);
digitalWrite(r4,HIGH);
digitalWrite(r3,HIGH);
digitalWrite(g3,LOW);
digitalWrite(y3,LOW);
digitalWrite(r2,LOW);
digitalWrite(y2,LOW);
digitalWrite(g2,HIGH);
digitalWrite(r1,HIGH);
digitalWrite(y1,LOW);
digitalWrite(g1,LOW);
delay(5000);
break;
}
if (mygsm.find("WWW"))
{
Serial.println("*** WWW FOUND ***");
A-9

lcd.setCursor(0, 1);
lcd.print("West OPEN ");
digitalWrite(g4,LOW);
digitalWrite(y4,LOW);
digitalWrite(r4,HIGH);
digitalWrite(r3,HIGH);
digitalWrite(g3,LOW);
digitalWrite(y3,LOW);
digitalWrite(r2,HIGH);
digitalWrite(y2,LOW);
digitalWrite(g2,LOW);
digitalWrite(r1,LOW);
digitalWrite(y1,LOW);
digitalWrite(g1,HIGH);
delay(5000);
break;
}
}
}

void gsm_init()
{
Serial.println("Finding GSM.");
booleanat_flag=1;
while(at_flag)
{
mygsm.println("AT");
while(mygsm.available()>0)
{
if(mygsm.find("OK"))
A-10

at_flag=0;
}
delay(1000);
}
Serial.println("Module Connected..");
delay(1000);
Serial.println("Disabling ECHO");
booleanecho_flag=1;
while(echo_flag)
{
mygsm.println("ATE0");
while(mygsm.available()>0)
{
if(mygsm.find("OK"))
echo_flag=0;
}
delay(1000);
}
Serial.println("Echo OFF");
delay(1000);
Serial.println("Finding Network..");
booleannet_flag=1;
while(net_flag)
{
mygsm.println("AT+CPIN?");
while(mygsm.available()>0)
{
if(mygsm.find("+CPIN: READY"))
net_flag=0;
}
A-11

delay(1000);
}
Serial.println("GSM is Ready");
delay(1000);
}

void init_sms()
{
mygsm.println("AT+CMGF=1");
delay(1000);
mygsm.println("AT+CMGS=\"+249918814188\""); // use your 10 digit cell
no. here
delay(1000);
}

void send_data(String message)


{
mygsm.println(message);
delay(500);
}

void send_sms()
{
mygsm.write(26);
delay(1000);
}

void configure()
{
Serial.println("Configure GSM.");
boolean at_flag2=1;
A-12

while(at_flag2)
{
mygsm.println("AT+CMGF=1");
while(mygsm.available()>0)
{
if(mygsm.find("OK"))
at_flag2=0;
}
delay(1000);
}
booleanat_flag=1;
while(at_flag)
{
mygsm.println("AT+CNMI=2,2,0,0,0");
while(mygsm.available()>0)
{
if(mygsm.find("OK"))
at_flag=0;
}
delay(1000);
}
Serial.println("Module Configured..");
delay(1000);
}
String readMessages()
{
String buffer;

while (mygsm.available())
{
A-13

char c = mygsm.read();
buffer.concat(c);
delay(10);
}

return buffer;
}
B-1

Datasheet

Wi-Fi Module ESP8266

ESP8266 Pin Configuration

Pin Pin Alternate Normally used for Alternate purpose


Number Name Name

1 Ground - Connected to the -


ground of the circuit

2 TX GPIO – Connected to Rx pin Can act as a General


1 of programmer/uC purpose Input/output
to upload program pin when not used as
TX

3 GPIO-2 - General purpose -


Input/output pin

4 CH_EN - Chip Enable – -


Active high

5 GPIO - Flash General purpose Takes module into


B-2

0 Input/output pin serial programming


when held low during
start up

6 Reset - Resets the module -

7 RX GPIO - 3 General purpose Can act as a General


Input/output pin purpose Input/output
pin when not used as
RX

8 Vcc - Connect to +3.3V


only

ESP8266-01 Features

• Low cost, compact and powerful Wi-Fi Module


• Power Supply: +3.3V only
• Current Consumption: 100mA
• I/O Voltage: 3.6V (max)
• I/O source current: 12mA (max)
• Built-in low power 32-bit MCU @ 80MHz
• 512kB Flash Memory
• Can be used as Station or Access Point or both combined
• Supports Deep sleep (<10uA)
• Supports serial communication hence compatible with many development
platform like Arduino
• Can be programmed using Arduino IDE or AT-commands or Lua Script
B-3

ESP8266 Equivalents

ESP-12 (Has more GPIO pins that support ADC, PWM, SPI etc)

Alternative for ESP8266-01

ESP32 (more powerful and standalone module)

ESP8266-01 Boot Option

GPIO – GPIO – 2 Mode Used For


0

High High Flash Mode Run the program that is already


uploaded to the module

Low High UART Mode Programming mode- to program


using Arduino or any serial
communication

Where to use ESP8266-01

The ESP8266 is a very user friendly and low cost device to provide internet
connectivity to your projects. The module can work both as a Access point (can
create hotspot) and as a station (can connect to Wi-Fi), hence it can easily fetch
data and upload it to the internet making Internet of Things as easy as possible. It
can also fetch data from internet using API’s hence your project could access any
information that is available in the internet, thus making it smarter. Another
exciting feature of this module is that it can be programmed using the Arduino
IDE which makes it a lot more user friendly. However this version of the module
has only 2 GPIO pins (you can hack it to use up to 4) so you have to use it along
B-4

with another microcontroller like Arduino, else you can look onto the more
standalone ESP-12 or ESP-32 versions. So if you are looking for a module to get
started with IOT or to provide internet connectivity to your project then this
module is the right choice for you.

How to use the ESP8266 Module

There are so many methods and IDEs available to with ESP modules, but the
most commonly used on is the Arduino IDE. So let us discuss only about that
further below.

The ESP8266 module works with 3.3V only, anything more than 3.7V would kill
the module hence be cautions with your circuits. The best way to program
an ESP-01 is by using the FTDI board that supports 3.3V programming. If you
don’t have one it is recommended to buy one or for time being you can also use
an Arduino board. One commonly problem that every one faces with ESP-01 is
the powering up problem. The module is a bit power hungry while programming
and hence you can power it with a 3.3V pin on Arduino or just use a potential
divider. So it is important to make a small voltage regulator for 3.31v that could
supply a minimum of 500mA. One recommended regulator is the LM317 which
could handle the job easily. A simplified circuit diagram for using the ESP8266-
01 module is given below

The switch SW2 (Programming Switch) should be held pressed to hold the GPIO-
0 pin to ground. This way we can enter into the programming mode and upload
the code. Once the code is released the switch can be released.
B-5

GSM Modem Module

The SIM900A is a readily available GSM/GPRS module, used in many mobile


phones and PDA. The module can also be used for developing IOT (Internet of
Things) and Embedded Applications. SIM900A is a dual-band GSM/GPRS
engine that works on frequencies EGSM 900MHz and DCS 1800MHz. SIM900A
features GPRS multi-slot class 10/ class 8 (optional) and supports the GPRS
coding schemes CS-1, CS-2, CS-3 and CS-4.

SIM900A GSM Module Pin out Configuration

SIM900A is a 68 terminal device as shown in pin diagram. We will describe the


function of each pin below.

Pin Number Pin Name Description

1 PWRKEY Voltage input for PWRKEY. PWRKEY


should be pulled low to power on or
power off the system.

The user should keep pressing the key for


a short time when power on or power off
the system because the system need
margin time in order to assert the
software.
B-6

2 PWRKEY_OUT Connecting PWRKEY and


PWRKEY_OUT for a short time then
release also can power on or power off
the module.

3 DTR Data terminal Ready [Serial port ]

4 RI Ring indicator [Serial port ]

5 DCD Data carry detect [Serial port ]

6 DSR Data Set Ready [Serial port ]

7 CTS Clear to send [Serial port ]

8 RTS Request to send [Serial port ]

9 TXD Transmit data [Serial port ]

10 RXD Receive data [Serial port ]

11 DISP _CLK Clock for display [Display interface]

12 DISP_DATA Display data output [Display interface]

13 DISP _D/C Display data or command select [Display


B-7

interface]

14 DISP _CS Display Enable [Display interface]

15 VDD_EXT 2.8V output power supply

16 NRESET External reset input

17,18,29,39,45, GND Ground

46,53,54,58,59,

61,62,63,64,65

19 MIC_P Microphone Positive

20 MIC_N Microphone Negative

21 SPK_P Speaker Positive

22 SPK_N Speaker Negative

23 LINEIN_R Right Channel input [External line inputs


are available to directly mix or multiplex
externally generated analog signals such
as polyphonic tones from an external
melody IC or music generated by an FM
tuner IC or module.]
B-8

24 LINEIN_L Left Channel Input

25 ADC General purpose analog to digital


converter.

26 VRTC Current input for RTC when the battery is


not supplied for the system.

Current output for backup battery when


the main battery is present and the
backup battery is in low voltage state.

27 DBG_TXD Transmit pin [Serial interface for


debugging and firmware upgrade ]

28 DBG_RXD Receive pin [Serial interface for


debugging and firmware upgrade ]

30 SIM_VDD Voltage supply for SIM card

31 SIM_DATA SIM data output

32 SIM_CLK SIM clock

33 SIM_RST SIM reset


B-9

34 SIM_PRESENCE SIM detect

35 PWM1 PWM Output

36 PWM2 PWM Output

37 SDA Serial Data [I2C]

38 SCL Serial Clock [I2C]

40,41,42,43,44 KBR0 to KBR4 Keypad interface [ROWS &


COLUMNS]
& &

47,48,49,50,51 KBC4 to KBC0

52 NETLIGHT Indicate net status

55,56,57 VBAT Three VBAT pins are dedicated to


connect the supply voltage. The power
supply of SIM900A has to be a single
voltage source of VBAT= 3.4V to 4.5V.
It must be able to provide sufficient
current in a transmit burst which typically
rises to 2A.

60 RF_ANT Antenna connection


B-10

66 STATUS Indicate working status

67 GPIO 11 General Purpose Input/output

68 GPIO 12 General Purpose Input/output

SIM900A GSM MODULE Features

• Single supply voltage: 3.4V – 4.5V


• Power saving mode: Typical power consumption in SLEEP mode is 1.5mA
• Frequency bands: SIM900A Dual-band: EGSM900, DCS1800. The SIM900A
can search the two frequency bands automatically. The frequency bands also
can be set by AT command.
• GSM class: Small MS
• GPRS connectivity: GPRS multi-slot class 10 (default) , GPRS multi-slot
class 8 (option)
• Transmitting power: Class 4 (2W) at EGSM 900, Class 1 (1W) at DCS 1800
• Operating Temperature: -30ºC to +80ºC
• Storage Temperature: -5ºC to +90ºC
• DATA GPRS: download transfer max is 85.6KBps, Upload transfer max
42.8KBps
• Supports CSD, USSD, SMS, FAX
• Supports MIC and Audio Input
• Speaker Input
• Features keypad interface
• Features display interface
• Features Real Time Clock
• Supports UART interface
• Supports single SIM card
• Firmware upgrade by debug port
B-11

• Communication by using AT commands

Similar Modules

SIM800L, QUECTEL M95

Applications

• Cellular Communication
• Robotics
• Mobile Phone Accessories
• Servers
• Computer Peripherals
• Automobile
• USB Dongles

You might also like