You are on page 1of 69

Dream City

Submitted in partial fulfillment of the requirements


Of the degree of

Bachelor of Engineering
By
UTKARSHA VEKHANDE

13116C1028

NIKHIL SONAWANE

13116C1031

MANSI VASTE

13116C1037

SAGAR SURVE

13116C1043

Under the Guidance of


Prof. VIBHA WALI

Department of Electronics and Telecommunication Engineering


Vidyalankar Institute of Technology, Wadala (E), Mumbai
2015-2016
1

Project Report Approval for Bachelor of


Engineering
This Project Report entitled Dream Cityby
UtkarshaVekhande,NikhilSonawane,MansiVaste,SagarSurveis approved for
the degree of Bachelor of Engineering in Electronic and Telecommunication
Engineering

Examiners
1. _______________

2. _______________

Supervisors/ Guides
1. _______________

2. _______________

Head of Department
1. _______________

Principal
1. _______________

Date:
Place: Mumbai

DECLARATION
We declare that this written submission represents our ideas in our own words and where
others' ideas or words have been included, we have adequately cited and referenced the
original sources. We also declare that we have adhered to all principles of academic honesty
and integrity and have not misrepresented or fabricated or falsified any idea/data/fact/source
in our submission. We understand that any violation of the above will be cause for
disciplinary action by the Institute and can also evoke penal action from the sources which
have thus not been properly cited or from whom proper permission has not been taken when
needed.

Name of Student

Roll No.

1.UTKARSHA VEKHANDE 13116C1028


2.NIKHIL SONAWANE

13116C1031

3. MANSI VASTE

13116C1037

4. SAGAR SURVE

13116C1043

Date:

Signature

ABSTRACT
This project is basically on Traffic Management .The traffic controller will work out in this
system by managing the traffic and giving updates on jammed areas. Here we are using
signals and emergency lanes for the purpose of traffic management. This reduces manpower.
Traffic police will only checkouts that all vehicles are obeying the rules or not.
In this project we are showing the jammed areas in the city by keeping displays on the road
so that newly joined vehicles can change their paths and traffic will be under control. By
measuring the intensity of traffic we are changing the modes of the signal so that we can first
clear the jammed areas. The emergency lane is very useful for the ambulance, vip persons or
any medical emergency of the citizens. With the help of this lane the vehicles will be able to
travel much faster than the jammed traffic.
This project is also including parking for vehicles in available area. The person automatically
gets the idea of the available space in the nearest parking area with help of his cell phone. We
have added this idea just to save the precious time of citizens in such a hectic busy schedule.
Before getting out for the search of the parking slots he/she is able to get the idea that how
many parking slots are available in particular parking area.
Smart Traffic Management is mainly improvised for looking after the Set off data of a region
to manage the Traffic along that area. Mainly the purpose of Smart traffic management
system is to give the details which can be used and they can be implemented in their daily
life. The problems which have been occurred at their presence can be solved by this Smart
Traffic.

ACKNOWLEDGEMENT
A matter of great pleasure and privilege to be able to present the projectDREAM
CITY.This project would not have been possible without the kind support and help of many
individuals. We would like to extend our sincere thanks to all of them.
We are highly indebted to Prof. VibhaWali for her guidance and constant supervision as well
as for providing all the necessary information regarding the project and providing us the
appropriate suggestions and giving us their precious time.
Words are inadequate in expressing our thanksto our classmates for their inputs and
cooperation in carrying out the project work.
We would like to express gratitude towards our parents for their kind co-operation and
encouragement which helped us in completion of this project.
Sincere thank you to our Head of Department, Prof. Saurabh Mehta, for letting us take up this
project.

Table of Contents
Sr. No.
1.
2.

3.

4.

5.
6.
7.
8.

Page Title
Project Overview
Aim & Objective
Introduction & Motivation
2.1 Theory behind the project concept
2.2 Problem Definition
2.3 Need for Project
Analysis and Design
3.1 Software development
3.2 Flow of Project
3.2.1 Preliminary Survey
3.2.2 Feasibility Study
3.2.3 Cost Analysis
3.2.4 Process Model
3.3 UML Diagrams
3.3.1 Use Case Diagram
3.3.2 Activity Diagram

Page Number
1
2
3
3
4
5
6
6
7
7
8
8
9
13
13
14

3.3.3 Deployment Diagram


3.4 Technologies Used
3.4.1 Hardware and Software used

15
16
16

3.4.2 Introduction to Programming Tools


Project Time and Task Distribution
4.1 Timeline Chart for Semester 7

17
19
19

4.2 Timeline Chart for Semester 8


Implementation (Actual Source Code)
Test Cases
6.1 Graphical User Interface
Conclusion And Future Scope
Appendix A:User Manual

20
21
29
29
32
33

Appendix B: Classes and External Libraries

40

Bibliography

42

List of Tables and Figures


Sr. No.

Tables and Figures

Page Number

1.
2.
3.
7

4.
5.
6.
7.

CHAPTER 1
PROJECT OVERVIEW
In our daily life we are facing lots of problems due to improper traffic management,
car accidents, medical emergencies during traffic etc. To overcome this problems we
are introducing a project which will surely help citizens to solve all the problems
without wasting time, manpower.
In this project we are controlling traffic jams by making use of signals. Sometime the
signal switching is illogical& inefficient. The lane that has more traffic gets less
green signal while the ones with less cars are kept open for more time. So we are
controlling Normal signal based on historical data. We are also providing VIP /
emergency traffic clearance.
We are also giving ideas of available parking slots in the area so it will help to save
time. So that by just seating home we will be able to check out theparking slots
available in our areas.This project will be very useful for citizens as we can reach our
destinations on time, it will help during medical emergencies and also helps
to save time.

AIM AND OBJECTIVE


AIM
Smart Traffic Management is mainly improvised for looking after the Set off data of a region
to manage the Traffic along that area. Mainly the purpose of Smart traffic management
system is to give the details which can be used and they can be implemented in their daily
life. The problems which have been occurred at their presence can be solved by this Smart
Traffic.So our aim of the project is to manage cities in effective way which will help the
citizens to solves lots ot traffic related problems.

OBJECTIVE

Access to quality traffic management which lacks in our day to day life
Access to emergency exits on roads which will help during the trafiic jams.
Showing the jammed areas in the cities so that addition of new vehicles will be

avoided and it will become helpful in controlling the traffic in less time.
To enthuse the citizens to follow the rules n help each other to avoid the traffic in their
cities so that everyone will be able to reach their destinations in no time and we will

be able to make our city traffic and pollution free.


To provide easy access to check out the availability of the parking slots. This will help
to save lots of time as we dont need to worry about the availability of parking areas.

CHAPTER 2
INTRODUCTION AND MOTIVATION

2.1. THEORY BEHIND PROJECT CONCEPT

Smart Traffic Management is mainly improvised for looking after the Set off data of a region
to manage the Traffic along that area. Mainly the purpose of Smart traffic management
system is to give the details which can be used and they can be implemented in their daily
life. The problems which have been occurred at their presence can be solved by this Smart
Traffic.
We decided to take this ideas by making the analysis of daily traffic jams in our areas and
addition to this if accident takes place then it takes hours to clear the roads. During this time
if any medical emergency occurs then it is too difficult to reach the hospital on time. Our
project aims at developing a system which can be used to enhance the management of the
dream city. The trafficcontrol in a city will help the citizens to reach their destinations on
time without traffic jam.
The idea behind the parking slots notifications is to save time of working citizens. It is very
annoying when we get to know that parking area is full after reaching the destination as we
are in hurry. This is totally waste of time and addition to these is we have to roam around all
the parking areas in search of available parking slots. So the solution for these is getting the
idea of all the parking slots just by seating home by using our phone. This saves lots of time
and unnecessary roaming in search of parking space.

2.2 PROBLEMDEFINITION
Normally the counter based signaling system is used in practice but there is not any provision
for traffic clearance. This system provides solution for this problem by detecting the density
of the traffic and changing the signaling process accordingly.
Smart Traffic Management is mainly improvised for looking after the set of data of a region
to manage the Traffic along that area. Mainly the purpose of this system is to give the details
which can be used and they can be implemented in their daily life. The problems which have
been occurred at their presence can be solved by this Smart Traffic.
Many times a situation comes when, we came to know about the traffic or the unavailability
of the parking area after reaching at that location. To solve this problem, this system provides
the real time notification on an android app.

2.3. NEED FOR PROJECT


This project will be in future used by all the cities in our country in order to make
their cities traffic free. The citizens will enjoy their journey with the traffic free roads.
This projects ideas will need to be improved and updated along with the time because
as we add new more useful and efficient features to these we can change our city into
actual dream city where citizens can enjoy travelling by roads.
The intended beneficiaries of the Dream City project are:

All citizens will be able to travel on traffic free roads so that they can reach

their destinations on time and enjoy happy journeys.


Medical emergencies can be handled very well with help of special private

lane patient will be able to reach the hospitals in no time.


Citizens will be able to get the idea of availability of the parking slots just

seating at their home and this will save lots of time.


Different cities can implement this and take benefits of it.

The city will comprise of traffic free roads for travelling and if any emergency occurs
citizen will be able to reach hospitals with the special lane clearance with the help of
citizens

CHAPTER 3
ANALYSIS AND DESIGN
3.1 SOFTWARE DEVELOPMENT
ISP Flash Microcontroller Programmer Ver 3.0
Introduction
This ISP Programmer can be used either for in-system programming or as a standalone SPI programmer for Atmel ISP programmable devices.
The programming interface is compatible to STK200 ISP programmer hardware so
the users of STK200 can also use the software which can program both the 8051 and
AVR series devices.
Hardware
Figure 1 shows the circuit diagram of the in-system programmer interface, the power
to the interface is provided by the target system. The 74HCT541 IC isolates and
buffers the parallel port signals. It is necessary to use the HCT type IC in order to
make sure the programmer should work with 3v type parallel port.

Figure 1: Circuit Diagram of the ISP Programmer Interface

Figure 2: Circuit Diagram of the SPI Programmer


Figure 2 shows the circuit diagram of the stand-alone SPI programmer, the
power to the interface is provided by the PC USB port which can supply a max
of 100mA current. Get a cheap USB cable, cut the cable other end connector and
attach a crimp shell connector to this end, red wire is 5v and black is 0V.
The printer port buffer interface is same as shown in figure 1. For the microcontroller
a 40 pin ZIF socket can be used.
This programmer circuit can be used to program the 89S series devices and the AVR
series devices which are pin compatible to 8051, like 90S8515. For other AVR series
devices the user can make an adapter board for 20, 28 and 40 pin devices. The pin
numbers shown in brackets correspond to PC parallel port connector.
Software
The ISP-3v0.zip file contains the main program and the i/o port driver for
windows 2000 & XP. Place all files in the same folder, for win-95/98 use the ISPPgm3v0.exe" file, for win-2000 & XP use the "ISP-XP.bat" file. The main screen
view of the program is shown in figure 3.
7

Also make sure do not program the RSTDISBL fuse in ATmega8,


ATiny26 and ATtiny2313 otherwise further SPI programming is disable and you
will need a parallel programmer to enable the SPI programming. For the fuses
setting consult the datasheet of the respective device.
For the auto hardware detection it is necessary to short pin 2 and 12 of DB25
connector, otherwise the software uses the default parallel port i.e. LPT1.
I have only included the devices which I have in hand, and verified their correct
programming, when I will get the other devices the software will be updated.
Following are the main features of this software,
Read and write the Intel Hex file
Read signature, lock and fuse bits
Clear and Fill memory buffer
Verify with memory buffer
Reload current Hex file
Display buffer checksum
Program selected lock bits & fuses
Auto detection of hardware

Figure 3: Main screen of the program ISP-Pgm3v0


8

3.2. FLOW OF PROJECT


3.2.1. PRELIMANARY SURVEY
Dream City is an efficienttraffic and parking management environment for cities to
managetraffic jam situations and get the information regarding available parking areas in city
without need of manual system and gives closest to real-life experience. Our proposed system
will consist of a hardware model comprising following components:

Timer based traffic management

Fuzzy mode of traffic management

VIP mode of traffic management

Magnetic sensors implementation for a prototype

Counter based parking allocation

3.2.2. FEASIBILTY STUDY


Economic Feasibility
Economic analysis most frequently used for evaluating the effectiveness of the system. More
commonly known as cost/benefit analysis the procedure is to determine the benefit and
saving that are expected from the system and compare them with costs and decision is made
to design and implement the system. This part of feasibility study gives an idea about the
overall cost factor of deploying such a system. This is the important input to the management,
because very often they do not like to get into the various technicalities that are bound to be
associated with the project of this kind. A simple economic analysis that gives the actual
comparisons of costs and benefits is much more meaningful in such cases.

Technical Feasibility

Technical feasibility canters on the existing manual system of the management process and to
what extent it can support the system. According to the feasibility analysis procedure, the
technical feasibility of the system is analyzed and the technical requirements such as
infrastructure requirements are identified.
9

Behavioral Feasibility

An estimate should be made of how strong the new system would prove effective in solving
the problems faced by the clients as well as the management.

3.3.3 COST ANALYSIS

Component Name

Cost

Quantity

Final Cost

89C51

50

100

Eps 8266

500

500

IR LEDs

10

50

IR detector

30

10

300

5 Volt Regulator

30

30

LDR

90

360

Ultrasonic sensor

125

500

speedometer

100

100

LED

30

30

transformer

50

50

capacitors

10

50

Resistors

20

20

LCD display

165

165

ADC

50

50

switch

15

30

server

800

800

Total Cost

4020

10

3.2.4 PROCESS MODEL


Block Diagram

MAGNETIC SENSORS FOR TRAFFIC DENSITY MEASUREMENT

MAGNETIC SENSORS FOR VEHICLE COUNT IN PARKING AREA

MICROCONTROLLER
RFID ENCODER

GSM MODULE

LEDS FOR SIGNALLING

BLOCK DIAGRAM FOR TRAFFIC MANAGEMENT AND PARKING INDICATION

ANTENNA

RFID DECODER

BATTERY

REMOTE CONTROL

11

SWITCH

3.2.4.1. Microcontrller 89C51-

The AT89S51 is a low-power, high-performance CMOS 8-bit microcontroller with 4K bytes


of in-system programmable Flash memory. The device is manufactured using Atmels highdensity nonvolatile memory technology and is compatible with the industry-standard 8051
instruction set and pinout. The on-chip Flash allows the program memory to be
reprogrammed in-system or by a conventional nonvolatile memory programmer. By
combining a versatile 8-bit CPU with in-system programmable Flash on a monolithic chip,
the Atmel AT89S51 is a powerful microcontroller which provides a highly-flexible and costeffective solution to many embedded control applications. The AT89S51 provides the
following standard features: 4K bytes of Flash, 128 bytes of RAM, 32 I/O lines, Watchdog
timer, two data pointers, two 16-bit timer/counters, a five vector two-level interrupt
architecture, a full duplex serial port, on-chip oscillator, and clock circuitry. In addition, the
AT89S51 is designed with static logic for operation down to zero frequency and supports two
software selectable power saving modes. The Idle Mode stops the CPU while allowing the
RAM, timer/counters, serial port, and interrupt system to continue functioning. The Powerdown mode saves the RAM contents but freezes the oscillator, disabling all other chip
functions until the next external interrupt or hardware reset.
3.2.4.2.

Power supply:

Telecommunications equipment is designed to operate on voltages lower than the


domestic Mains voltage. In order to reduce this voltage a PSU is used.
To provide a useable low voltage the PSU needs to do a number of things:

Reduce the Mains AC (Alternating current) voltage to a lower level.

Convert this lower voltage from AC to DC (Direct current)

Regulate the DC output to compensate for varying load (current demand)

Provide protection against excessive input/output voltages.

1POWER SUPPLY UNIT


3.2.4.3.

Decoder HT12D
12

The 212 decoders are a series of CMOS LSIs for remote control system applications. They are
paired with Holtek_s 212 series of encoders (refer to the encoder/decoder cross reference
table). For proper operation, a pair of encoder/decoder with the same number of addresses
and data format should be chosen. The decoders receive serial addresses and data from a
programmed 212 series of encoders that are transmitted by a carrier using an RF or an IR
transmission medium. They compare the serial input data three times continuously with their
local addresses. If no error or unmatched codes are found, the input data codes are decoded
and then transferred to the output pins. The VT pin also goes high to indicate a valid
transmission.
The 212 series of decoders are capable of decoding informations that consist of N bits of
address and 12_N bits of data. Of this series, the HT12D is arranged to provide 8 address bits
and 4 data bits, and HT12F is used to decode 12 bits of address information.
3.2.4.4.

Encoder HT12E

The 212 encoders are a series of CMOS LSIs for remote control system applications. They
are capable of encodinginformation which consists of N address bits and 12_N data bits.
Each address/data input can be set to one of the two logic states. The programmed addresses/
data are transmitted together with the header bits via an RF or an infrared transmission
medium upon receipt of a trigger signal. The capability to select a TE trigger on the HT12E
or a DATA trigger on the HT12Afurther enhances the application flexibility of the 212 series
of encoders. The HT12A additionally provides a 38kHz carrier for infrared systems.
3.2.4.5.

Magnetic Sensor

Magnetic sensors are used for the detection of positions without contact or wear and tear in
control technology. They come into their own where inductive sensors reach their limits.
Advantage: Magnetic sensors offer small designs with very long sensing ranges. Depending
on the orientation of the magnetic field the sensor can be damped from the front or from the
side.
Since magnetic fields penetrate all non-magnetisable materials, the sensors can detect
magnets through walls made of non-ferrous metal, stainless steel, aluminium, plastic or
wood.
In gate systems, for example, the magnet sensor only detects the magnet which is to be
detected. Any possible influences by aluminium in the environment do not impact or reduce
the sensing range.
13

In the food industry the magnetic sensor is often used in connection with pigs (cleaning
devices which pass through the inside of pipes). By means of magnetic sensors their exact
position can be detected from the outside through the wall of the stainless steel pipe.
Operating principle
Magnetic sensors from ifm electronic use GMR (Giant Magneto Resistive Effect) technology.
The measuring cell consists of resistors with several extremely fine, ferromagnetic and nonmagnetic layers. Whereas in a conventional Wheatstone bridge circuit two GMR resistors are
used, a large signal proportional to the magnetic field is produced if a magnetic field is
present. As from a defined threshold value an output signal is switched via a comparator.
3.2.4.6.

GSM Module

GSM is a mobile communication modem; it is stands for global system for mobile
communication (GSM). The idea of GSM was developed at Bell Laboratories in 1970. It is
widely used mobile communication system in the world. GSM is an open and digital cellular
technology used for transmitting mobile voice and data services operates at the 850MHz,
900MHz, 1800MHz and 1900MHz frequency bands.
GSM system was developed as a digital system using time division multiple access (TDMA)
technique for communication purpose. A GSM digitizes and reduces the data, then sends it
down through a channel with two different streams of client data, each in its own particular
time slot. The digital system has an ability to carry 64 kbps to 120 Mbps of data rates.

14

Working of GSM Module:


From the below circuit, a GSM modem duly interfaced to the MC through the level shifter IC
Max232. The SIM card mounted GSM modem upon receiving digit command by SMS from
any cell phone send that data to the MC through serial communication. While the program is
executed, the GSM modem receives command STOP to develop an output at the MC, the
contact point of which are used to disable the ignition switch. The command so sent by the
user is based on an intimation received by him through the GSM modem ALERT a
programmed message only if the input is driven low. The complete operation is displayed
over 162 LCD display.

3.2.5 Circuit Diagram


15

3.2.5.1. Traffic Management

CIRCUIT DIAGRAM OF TRAFFIC MANAGEMENT UNIT

Figure above shows the circuit diagram of the designed system of traffic management. If the
traffic is normal on all the lanes then the timer based mode will be activated. In this mode we
have kept timer of up to 3sec for the case of prototype. We have given names to the lanes as
east west and north south. If east west lane has green signal and north south lane has red
signal then after 3 sec east west lanes signals will be yellow and after 3 sec it will become
red along with this the signals of north south lane will become green and the cycle will
continue until the traffic on all the lane is same.
If the traffic of one particular lane is more compare to other lanes then the system will enter
into fuzzy mode. For example, if traffic is more on the north south lane and it is having red
signal then it will become green irrespective of timer count and it will persist until the traffic
on that particular lane is cleared.
If there is any emergency vehicle coming like ambulance fire brigade etc ; for them we have
kept VIP mode in which we have kept 1 lane as VIP lane. It is used by normal traffic in
normal conditions. But when the emergency vehicle is coming they will be having remote
control. With this remote control when they press the switch for corresponding lane; the
16

traffic on corresponding reserved lane will be diverted to normal lane with the help of a red
signal at the next square. In this way it will help the emergency vehicles to reach their
destinations on time. For the remote control we are using RFID for the prototype purpose.

3.2.5.2. Parking Management

Figure above shows circuit diagram of parking management. Here we are making model for
one parking are where we can park 6 vehicles. We set the counter of 6 when any car is
parked then the counter will be decremented. When any one of parked cars will leave then
the counter will be incremented again. In this way the available space will be known.

3.3 Flow Chart


3.3.1 Traffic Management
17

START

Counter based signaling (Normal Mode)

NO
Traffic is detected?
YES
Increase the timer value for lane with high density of traffic.
Upload the information of traffic location on app

NO
Emergency vehicle arrived?

YES

Make the signal red for emergency lane.

Repeat

3.3.2 Parking Management


18

START

Set the maximum limit of no. of parking space available..

Decrement the count for each car entering in the parking area.

Increment the count for each car leaving the parking area.

No of available space broadcast on app.

Repeat

3.4 TECHNOLOGIES USED


19

3.4.1 HARDWARE AND SOFTWARE USED


3.4.1.1 HARDWARE COMPONENTS

Microcontroller 89C51
16*2 Display
Encoder
Decoder
Magnetic Sensors
LEDs for Signaling
GSM module

3.4.1.2 SOFTWARE COMPONENTS

Keil
Flash Magic
Eagle

3.4.2 Introduction to Development Tools


3.4.2.1 Hardware
Layout making
Eagle's UI is designed with what is called a modal interface. That is, you select one mode,
perform it a bunch of times, as opposed to selecting an object and applying an single
operation at a time. When used properly, this allows you to work very rapidly, but it can also
be a major source of aggravation if you are used to the Windows-y way of doing things.
Eagle has four basic views: Library, Schematic, Board, and Control Panel.
Control Panel is the main window, it launches everything else and when you close it, all
subordinate windows get closed.
Library - Allows you to manage and edit parts. Advanced usage of this will not be covered in
this tutorial
Schematic - This is where you draw the schematic for your project. It defines the parts you
have in your project, and which pins on the parts should be connected.

20

Board - This is where you lay out the pieces of your project and physically connect the
correct pins as defined in the Schematic.
Note that the Schematic's job is only to define the parts and the connections between them.
Only in Board layout does it matter where the parts physically go. On Schematics, parts are
laid out where they make sense electrically, on Boards, they are laid out where they
physically make sense, thus a resistor that is right next to a part in the Schematic may end up
as far away from that part as possible in the Board.
TESTING AND TROUBLESHOOTING:
Before you apply power, read the instructions carefully to check you haven't missed anything,
and whether there are any specific instructions for switching on and testing. Check again that
you have all polarity sensitive components the right way around, and that all components are
in the correct places. Check off - board components are connected correctly. Check the
underside of the board carefully for short circuits between tracks - a common reason
forcircuits failing to work.
When you are sure everything is correct, apply power and see if the circuit behaves as
expected, again following the kit manufacturers instructions.
If it works, WELL DONE! You have your first working circuit - be proud of it! Skip the rest
of this page and click the right arrow at the bottom, or here.
If it doesn't quite work as expected, or doesn't work at all, don't despair. The chances are the
fault is quite simple. However, disconnect the power before reading on.
Check the basic's first - is the battery flat? Are you sure the 'On' switch really is on? (Don't
laugh, it's easily done) If the project has other switches and controls check these are set
correctly.
Next - check again all the components are in the correct place - refer to the diagram in the
instructions. Look again at the underside of the board - are there any short circuits? These can
be caused by almost invisible 'whiskers' of solder, so check for these with a magnifying glass
in good light. Brushing the bottom of the board vigorously with a stiff brush can sometimes
remove these.

21

Pull the components gently to see if they are all fixed into the board properly. Check the
soldered joints - poor soldering is the most common cause of circuits failing to work. The
joints should by shiny, and those on the circuit board should be volcano shaped with the
component wire end sticking out of the top. If any look suspect then redo them. Remove the
solder with a solder sucker or braid and try again.
Check for solder splashes shorting across adjacent tracks on the circuit board, especially
where connections are very close such as on integrated circuits ('chips'). Solder splashes are
most likely on stripboard. You can check for shorts using a multimeter set it to it's continuity
range, or low resistance range. Be aware if you do this though, that there will be a resistance
between some tracks due to the components. Any resistance below 1 ohm between tracks is
likely to be a solder splash. Run the soldering iron between tracks on stripboard to remove
any solder bridges.
If the circuit still fails to work you will need to refer to the circuit diagram and take voltage
readings from the circuit to find out what's wrong. You will need a multimeter to do this (see
tools). Remember that if you find one fault such as a reversed component and correct it, it
might have caused damage to other components.
More Tools & Test Equipment
To design your own circuits, or build more complex kits, you will probably need more in the
way of tools and test equipment. If you did not buy a multimeter before then this is essential
now, a basic power supply is also very useful. More expensive items such as an oscilloscope
can be useful, but think carefully about whether you really need them - after all, you can
build a lot of projects for the price of an oscilloscope. PC-based virtual instruments could
perhaps be more suitable. Other tools can be useful too.
Here is a list of other useful items, although this by no means covers all the tools and
equipment available. Maplin codes are included; however similar items are available from
most suppliers.
Tools:
Helping Hands - Useful for holding PCB's, connectors etc. while you solder them. Also
normally have a magnifying glass to help see small components. Can save hours of
aggravation! Maplin code YK53H A small vice can also be useful and provides a more rigid
mounting than a Helping Hands.
22

Pearl Catcher - Useful for the retrieving those screws that inevitably fall into the most
inaccessible corner of a project! Maplin code BK43W
Heat Shunt - an inexpensive item for soldering heat sensitive devices. Clipped onto the
component lead between the joint and the component it will soak up the heat to save you
melting your components. As you get faster at soldering you probably won't need it so much.
Maplin code FR10L
RCD Circuit Breaker - If you start building mains projects (only do this when you are more
experienced and are aware of the safety requirements) then one of these is ESSENTIAL. It
could also prevent a shock if you accidentally melt through the soldering iron flex. These are
sold very cheaply in most electrical shops. Well worth the price, although check if your
building wiring is already protected by an RCD in the consumer unit first.
Breadboard - If you want to test a circuit without soldering it together permanently then
these are useful. Just push the wires into holes joined by metal strips to build the circuit. If the
circuit doesn't work, you can easily make changes. Different sizes are available, e.g. Maplin
code AG10L
Other items - Other sizes of screwdriver, 0.5Kg reel of solder, tool roll or box etc.
Test Equipment:
Multimeter - almost essential for all but the absolute beginner. See the tools section for more
information.
Power Supply - Also very useful for powering circuits that you are testing. One with a
variable voltage up to at least 12V is best. The current rating doesn't need to be that high; 1A
maximum is fine for most jobs. If you can afford it then one with an adjustable current limit
is useful - set right it can prevent damage to an incorrect circuit, rather than frying it
instantly!
Oscilloscope - Quite expensive and not really worth it for all but the advanced
constructor.Nonetheless a very useful piece of test equipment, especially on audio circuits.
There are some cheaper PC based alternatives, and some hand - held 'scopes now, although I
haven't tried them.

23

Signal Generator - Useful when testing audio circuits, again not really necessary for
beginners. Produces variable frequency waves of several different waveforms (sine, square,
and triangle).

3.4.2.2 Software
Programming or burning a microcontroller means to transfer the program from the
compiler to the memory of the microcontroller. A compiler is a software which provides an
environment to write, test and debug a program for the microcontroller. The program for a
microcontroller is generally written in C or assembly language. Finally the compiler
generates a hex file which contains the machine language instruction understandable by a
microcontroller. It is the content of this hex file which is transferred to the memory of
the microcontroller. Once a program is transferred or written in the memory of the
microcontroller, it then works in accordance with the program.

In order to know how to program a microcontroller, we need a device called a


burner/programmer. A programmer is a hardware device with dedicated software which reads
the content of the hex file stored on the PC or the laptop and transfers it to the microcontroller
to be burned. It reads the data of the hex file by connecting itself to the PC via a serial or
USB cable and transfers the data to the memory of the microcontroller to be programmed in
accordance with the protocols as described by the manufacturer in the datasheet.
The programmer and the compiler differ for microcontrollers from different companies. In
some cases the compiler has programmer software inbuilt in it. You simply need to connect
the programmer hardware and the microcontroller can be programmed from the compiler
itself.
A microcontroller programmer or microcontroller burner is a hardware device
accompanied with software which is used to transfer the machine language code to the
microcontroller/EEPROM from the PC. The compiler converts the code written in languages
like assembly, C, java etc to machine language code (which is understandable by the
machines/microcontrollers) and stores it in a hex file. A microcontroller programmer acts
as an interface between the PC and the target controller. The API/software of the programmer
reads data from the hex file stored on the PC and feeds it into the controllers memory. The
target controller on which the program needs to be burned is placed on the programmer using
24

a ZIP socket. The software transfers the data from the PC to the hardware using serial,
parallel or USB port.

Depending on the way it interacts with PC, there are three types of microcontroller
programmers:
1.Parallel Programmer uses the parallel port of the PC. They are low cost programmer but
not widely used
2.Serial Programmers uses the serial port to interact with PC via RS232 protocols. They are
more popular among hobbyist working on PC. However both the serial and parallel
programmers will become obsolete in near future. The major reason being unavailability of
parallel and serial ports in the PCs & Laptops in the coming years.
3.USB Programmer uses the USB interface to transfer the data from PC. The main
advantage of the USB burner is that they are powered from the PC itself and there is no need
of any additional supply. The USB programmers have already become popular and will soon
replace the serial and parallel programmer
The programmer generally contains a microcontroller which is preprogrammed to take data
from the PC and program the target controller. The programmer burns the target controller
using any of the protocols like SPI, parallel interfacing, I2C/TWI or CAN. The speed of
burning depends on the way of programmer is interfaced with PC and the protocols used to
burn the target controller.
25

The conventional method to burn a controller is to take it out the circuit, place it on burner
and then dump the hex file into the controller using the API. In order to remove this problem
of removing the controller from the circuit every time it needs to be programmed, the
controllers have now been upgraded with In System Programmer (ISP) feature. This allows
burning/programming a controller without removing the controller from the circuit it is used
in. The latest controllers are coming with the feature like boot loader memory which allows
self-burning capabilities, i.e. such microcontroller controller does not need any additional
programmer hardware. They need only an API to transfer the program to the target controller.
This API can also be incorporated in the compiler and hence the compiler can directly burn
the target controllers.

CHAPTER 4
PROJECT TIME AND TASK DISTRIBUTION
26

4.1Timeline Chart for Semester 7 (Table 2)


ACTIVITY

START

END

NOTES

Project start

18//07/2015

18/02/2016

Formation of Project Groups ,


Domain (Subject Areas)
Finalization from Students

Submission of project
idea

23/07/2015

25/07/2015

Submission of Project Idea


Abstracts

Presentation1 on
project idea

28/07/2015

Finalize project idea

4/08/2015

Projects guides
allocation

6/08/2015

Literature survey

10/09/2015

Presentation 2

5/10/2015

Project Report

16/10/2015

19/10/2015

Project A Report - Soft copy


format,
Submission of Photographs &
relevant data by Students for VIdeas to the Project Coordinator

Hard copy
submission

20/10/2015

21/10/2015

Hard Copy Project-A Report , IEEE


format on the project topic

Verification

23/10/2015

24/10/2015

Internal Verification of diary & the


duly filled Format
by Project
Coordinators

Presentation for Finalization of


Project Ideas &
Topic(Presentation:1)
5/08/2015

Finalization of Project Ideas, Topic


Allocation of Project Guides

20/09/2015

Introduction, Aims & Objectives,


Problem Statement, Literature
Survey
Progressive Presentation-2

4.2 Timeline Chart for Semester 8 (Table 3)


Sr.No.

Month

Week

Activity

January

Week 01

Project Implementation

January

Week 02

Midterm Presentation Preparation


27

February

Week 03

Midterm Presentation Preparation,


Discuss issues in implementation,
Discuss progress of project

February

Week 04

Implementation and testing

February

Week 05

Demonstration of partial completion of


executable code

February

Week 06

Implementation and testing

March

Week 07

Submission of term paper in IEEE format

March

Week 08

Implementation and testing,


Preparation of project report in given
format

March

Week 09

Final Presentation,
Final project demonstration,
Present working model of project

10

March

Week 10

Submission of Black Book in given


format

11

April

Week 11

Required changes in the black book

12

April

Week 12

suggested by guide
Final preparation for viva

CHAPTER 5
IMPLEMENTATION

5.1. Layout
5.1.1 Traffic Managemet
28

5.1.2 Parking Management

29

Program
Traffic management
#include<reg51.h>
#include"common.h"
#include"lcd.h"
#include"main.h"
#include"serial.h"
#include"vehical_security.h"
void beep();
unsigned char tap_flage=0,tap_flage_1=0;
bit
east_west_vip_toggle_flage=0,flag_N_S=0,flag_E_W=0,north_south_vip_toggle_flage=0;
void main()
30

{
tap_flage=0;
tap_flage_1=0;
delay_ms1(50);
init_serial();
delay_ms1(50);
transmit_string("AT\r\n");
delay_ms1(100);
transmit_string("ATE0\r\n");
delay_ms1(100);
transmit_string("AT+CMGF=1\r\n");
timer_initialise();
delay_ms1(100);
initialise_lcd();
delay_ms1(50);
send_cmd(0x80);
display_msg(" DREAM CITY ");

//Auto Parking Sytem

send_cmd(0xC0);
display_msg(" BASED ON FUZZY ");
/*--variable of trafic light -------*/
initialise_signal();
delay_ms1(500);
delay_ms1(500);
delay_ms1(500);
send_cmd(0x01);
north_south_vip_flage=0;
east_west_vip_flage=0;
buzzer=1;
/*----end of trafic light---------*/
//

undr_grnd_wtr_lvl_send_sms_flag=0;
n_s_vip_red_signal=1;
e_w_vip_red_signal=1;
east_west_vip_toggle_flage=0;
north_south_vip_toggle_flage=0;
31

//Auto Parking Sytem

//

clear_display_flag=0;

flag_E_W=0;
flag_N_S=0;
/*----end of garbage--------------*/
while(1)
{
/*--Trafic light control*/
traffic_control_3mode();
delay_ms1(500);
/*--AUTO PARKING operation------*/
//auto_parking();
delay_ms1(500);
delay_ms1(500);
delay_ms1(500);
delay_ms1(500);
delay_ms1(500);
}
}
void traffic_control_3mode()
{
if((north_south_vip_flage==0) && (east_west_vip_flage==0))
{
if(timer_mode_flag==1 &&fuzzy_mode_flag==0 )
{
delay_ms1(500);
send_cmd(0x01);
send_cmd(0x80) ;
display_msg("TIMER MODE");
send_cmd(0xC0) ;
display_msg("PLS. WEAR BELT");
tap_flage=7;
32

//TIMER MODE

if(tap_flage!=tap_flage_1)
{
transmit_string("AT+CMGS=\"+919702723588\"");
//918082347133
delay_ms1(100);
transmit_string("WATER LEACKAGE IS
DETECTED\r\n TRAFFIC CONTROL:TIMER MODE");
txdata(0x1a);
transmit_string("\r\n");
beep();
tap_flage_1=tap_flage;
}
if(sec_5_flage)
//after 5sec N&S YELLOW ON & E& W RED ON
{
north_south_yellow_signal();
//light=0;
sec_5_flage=0;
}
else if(sec_7_flage)
//AFTER 7SEC E&W GREEN ON & N&S RED ON
{
east_west_green_signal();
sec_7_flage=0;
}
else if(sec_12_flage)
//AFTER 12 SEC E& W YELLOW ON
{
east_west_yellow_signal();
sec_12_flage=0;
}
else if(sec_14_flage)
{
cnt=0;
sec_14_flage=0;
33

}
else
{}
}
else if(timer_mode_flag==0 &&fuzzy_mode_flag==1)
//FUZZY MODE
{
if((east_magnetic_sensor==1 ||
west_magnetic_sensor==1)&&(north_magnetic_sensor==0 || south_magnetic_sensor==0))
//NORTH OR SOUTH IR SENSOR IS DETECT
{
delay_ms1(500);
send_cmd(0x01);
send_cmd(0x80) ;
display_msg("FUZZY MODE");
send_cmd(0xC0) ;
display_msg("DNT DRINK &DRIVE");
tap_flage=1;
north_south_green_signal();
if(tap_flage!=tap_flage_1)
{
//

transmit_string("AT+CMGS=\"09819482387\"\r\n");

//

delay_ms1(100);

//

transmit_string("NS:G\r\n");

//

txdata(0x1a);

//

transmit_string("\r\n");
transmit_string("AT+CMGS=\"+919702723588\"");
//918082347133
delay_ms1(100);
transmit_string("WATER LEACKAGE IS

DETECTED\r\n FUZZY MODE NS:G");


txdata(0x1a);
transmit_string("\r\n");
beep();
34

tap_flage_1=tap_flage;
}
else{}
}
else if((north_magnetic_sensor==1 ||
south_magnetic_sensor==1)&&(east_magnetic_sensor==0 || west_magnetic_sensor==0))
//EAST OR WEST IR SENSOR IS DETECT
{
tap_flage=2;
east_west_green_signal();
if(tap_flage!=tap_flage_1)
{
//

transmit_string("AT+CMGS=\"09819482387\"\r\n");

//

delay_ms1(100);

//

transmit_string("EW:G\r\n");

//

txdata(0x1a);

//

transmit_string("\r\n");
transmit_string("AT+CMGS=\"+919702723588\"");
//918082347133
delay_ms1(100);
transmit_string("WATER LEACKAGE IS

DETECTED\r\n FUZZY MODE EW:G");


txdata(0x1a);
transmit_string("\r\n");
beep();
tap_flage_1=tap_flage;
}
else{}
}
else
{
}
35

}
else
{
}
}
else
{
}
if((east_west_vip_flage==1)&& (east_west_vip_toggle_flage==0))
//VIP FOR EAST & WEST ROAD
{
//east_west_green_signal();
north_south_green_signal();
n_s_vip_red_signal=1;
e_w_vip_red_signal=0;
tap_flage=3;
if(tap_flage!=tap_flage_1)
{
transmit_string("AT+CMGS=\"+919702723588\"");
//918082347133
delay_ms1(100);
transmit_string("WATER LEACKAGE IS DETECTED\r\n VIP
EW:G");
txdata(0x1a);
transmit_string("\r\n");
beep();
tap_flage_1=tap_flage;
}
delay_ms1(500);
send_cmd(0x01);
send_cmd(0x80) ;
36

display_msg("VIP CMNG FRM E_W");


send_cmd(0xC0) ;
display_msg("PLS. CLEAR ROUTE");
//

delay_ms1(500);

delay_ms1(500);
//while(1);
}
else if((east_west_vip_flage==0)&& (east_west_vip_toggle_flage==1))
//VIP FOR EAST & WEST ROAD
{
north_south_green_signal();
//n_s_vip_red_signal=1;
e_w_vip_red_signal=1;
tap_flage=4;
if(tap_flage!=tap_flage_1)
{
transmit_string("AT+CMGS=\"+919702723588\"");
//918082347133
delay_ms1(100);
transmit_string("WATER LEACKAGE IS DETECTED\r\n VIP
EW:R");
txdata(0x1a);
transmit_string("\r\n");
beep();
tap_flage_1=tap_flage;
}
delay_ms1(500);
send_cmd(0x01);
send_cmd(0x80) ;
display_msg("VIP MODE OVER");
send_cmd(0xC0) ;
display_msg("HAPPY JOURNEY");
}
else if(north_south_vip_toggle_flage==0 &&north_south_vip_flage==1 )//VIP FOR
N& S temp
37

{
//north_south_green_signal();
east_west_green_signal();
n_s_vip_red_signal=0;
e_w_vip_red_signal=1;
tap_flage=5;
if(tap_flage!=tap_flage_1)
{
transmit_string("AT+CMGS=\"+919702723588\"");
//918082347133
delay_ms1(100);
transmit_string("WATER LEACKAGE IS DETECTED\r\n VIP
SN:G");
txdata(0x1a);
transmit_string("\r\n");
beep();
tap_flage_1=tap_flage;
}
delay_ms1(500);
send_cmd(0x01);
send_cmd(0x80) ;
display_msg("VIP CMNG FRM S_N");
send_cmd(0xC0) ;
display_msg("PLS. CLEAR ROUTE");
delay_ms1(500);
//delay_ms1(500);
//while(1);
}
else if(north_south_vip_toggle_flage==1 &&north_south_vip_flage==0 )//VIP FOR
N& S temp
{
east_west_green_signal();
n_s_vip_red_signal=1;
tap_flage=6;
if(tap_flage!=tap_flage_1)
38

{
transmit_string("AT+CMGS=\"+919702723588\"");
//918082347133
delay_ms1(100);
transmit_string("WATER LEACKAGE IS DETECTED\r\n VIP
SN:R");
txdata(0x1a);
transmit_string("\r\n");
beep();
tap_flage_1=tap_flage;
}
//e_w_vip_red_signal=1;
delay_ms1(500);
send_cmd(0x01);
send_cmd(0x80) ;
display_msg("VIP MODE OVER");
send_cmd(0xC0) ;
display_msg("HAPPY JOURNEY");
}
else
{
}
//}
}
void int0(void)interrupt 0
{
flag_N_S=~flag_N_S;
delay_ms1(10);
if(flag_N_S==1)
{
north_south_vip_flage=1;

//toggle this flage at every HARWARE

INTERRUPT
north_south_vip_toggle_flage=0;
}
else
39

{
north_south_vip_flage=0;

//toggle this flage at every HARWARE

INTERRUPT
north_south_vip_toggle_flage=1;
}
timer_mode_flag=0;
//IN VIP MODE TIMER & FUZZY MODE IS
DISABLE
fuzzy_mode_flag=0;
east_west_vip_flage=0;
buzzer=0;

//new added

delay_ms1(1000);
buzzer=1;
}
void int1(void)interrupt 2
{
flag_E_W=~flag_E_W;
delay_ms1(10);
if(flag_E_W==1)
{
east_west_vip_flage=1;

//toggle this flage at every HARWARE

INTERRUPT
east_west_vip_toggle_flage=0;
}
else
{
east_west_vip_flage=0;

//toggle this flage at every HARWARE

INTERRUPT
east_west_vip_toggle_flage=1;
}
north_south_vip_flage=0;
//IN VIP MODE TIMER & FUZZY MODE IS DISABLE
timer_mode_flag=0;
fuzzy_mode_flag=0;
40

buzzer=0;

//new added

delay_ms1(500);
buzzer=1;
}
/*--------THIS IS ISR ROUTING OF TIMER0 FOR TIMER MODE OF TRAFFIC LIGHT
CONTROL -----*/
void isr_timer0(void) interrupt 1

//t0 interrupt//////////////

{
TH0=0x00;
//72Msec////////////////
TL0=0x00;
TF0=0;
if(north_magnetic_sensor==0 &&south_magnetic_sensor==0
&&east_magnetic_sensor==0 &&west_magnetic_sensor==0)

//timer mode

{
timer_mode_flag=1;
fuzzy_mode_flag=0;
//

/*Disable the VIP mode in Timer & Fuzzy mode*/

//

east_west_vip_flage=0;

//toggle this flage at every HARWARE

INTERRUPT
//

east_west_toggle_flage=0;
}
else
//fuzzy mode
{
fuzzy_mode_flag=1;
timer_mode_flag=0;

//

/*Disable the VIP mode in Timer & Fuzzy mode*/

//

east_west_vip_flage=0;

//toggle this flage at every HARWARE

INTERRUPT
//

east_west_toggle_flage=0;
}
41

if(timer_mode_flag==1 &&fuzzy_mode_flag==0)
{
cnt++;
if(cnt==1)
{
north_south_green_signal();

//IN TIMER

INITIALLY NORTH & SOUTH GREEN SIGNAL ON & EAST & WEST RED SIGNAL
ON
}
else if(cnt==70)
//AFTER 5 sec NORTH & SOUTH GREEN SIGNAL OFF ,YELLOW SIGNAL OF
NORTH & SOUTH ON & EAST & WEST RED SIGNAL ON
{
sec_5_flage=1;
}
else if(cnt==98)
//AFTER 7 MIN NORTH & SOUTH RED SIGNAL ON & EAST & WEST GREEN
SIGNAL ON
{
sec_7_flage=1;
}
else if(cnt==168)
//AFTER 12 MIN NORTH & SOUTH RED SIGNAL ON ,YELLOW SIGNAL OF
EAST & WEST ON
{
sec_12_flage=1;
}
else if(cnt==196)
//AFTER 14 MIN NORTH & SOUTH GREEN SIGNAL ON & EAST & WEST RED
SIGNAL ON
{
sec_14_flage=1;
}
else
42

{}
}
}
voidtimer_initialise()
{
IE=0x87; //////////////////ea=1&t0=1////////10000010 of ie register///////////
TCON |=0x00001010b;
TMOD|=0x01; //////////////timer0 mode1

timer1 mode1

TH0=0x00; //////////////72msec////////////////
TL0=0x00;
TR0=1;
}
voidnorth_south_green_signal()
{
north_south_green=0;
east_west_red=0;
east_west_green=1;
north_south_red=1;
east_west_yellow=1;
north_south_yellow=1;
}
voideast_west_green_signal()
{
east_west_green=0;
north_south_red=0;
north_south_green=1;
east_west_red=1;
east_west_yellow=1;
north_south_yellow=1;
}
voideast_west_yellow_signal()
{
east_west_yellow=0;
north_south_yellow=1;
43

east_west_green=1;
east_west_red=1;
}
voidnorth_south_yellow_signal()
{
east_west_yellow=1;
north_south_yellow=0;
north_south_green=1;
north_south_red=1;
}
voideast_west_red_signal();
voidnorth_south_red_signal();
voideast_west_green_yellow_signal();
voidinitialise_signal()
{
north_south_green=0;
north_south_yellow=1;
north_south_red=1;
east_west_green=1;
east_west_yellow=1;
east_west_red=0;
north_magnetic_sensor=1;
south_magnetic_sensor=1;
east_magnetic_sensor=1;
west_magnetic_sensor=1;
}
void delay_ms1(unsigned int c1)

//for 11.059Mhz

{
unsigned c2;
for(;c1>0;--c1)
for(c2=0;c2<115;++c2)
{}
44

}
void beep()
{
buzzer=0;
delay_ms1(500);
//

delay_ms1(500);
buzzer=1;

Parking Management
#include"lcd.h"
#include"common.h"
#include"serial.h"
bitclear_display_flag=0;
unsigned char slot_flage=0,slot_flage_1=0;
voidauto_parking()
{
if(slot_1_magnetic_sensor==0)
{
slot_flage=1;
slot_green=0;
send_cmd(0x01);
send_cmd(0x80);
display_msg("PARKING PLACE");
send_cmd(0xc0);
display_msg("AT SLOT:1");
delay_ms1(500);
delay_ms1(500);
if(slot_flage!=slot_flage_1)
{
45

slot_flage_1=slot_flage;
transmit_string("AT+CMGS=\"+919702723588\"");
//918082347133
delay_ms1(100);
transmit_string("WATER LEACKAGE IS DETECTED\r\n S:1");
txdata(0x1a);
transmit_string("\r\n");
beep();
}
}
else
{
slot_green=1;
clear_display_flag=1;
}
if(slot_2_magnetic_sensor==0)
{
slot_flage=2;
slot_yellow=0;
send_cmd(0x01);
send_cmd(0x80);
display_msg("PARKING PLACE");
send_cmd(0xc0);
display_msg("AT SLOT:2");
delay_ms1(500);
delay_ms1(500);
if(slot_flage!=slot_flage_1)
{
slot_flage_1=slot_flage;
transmit_string("AT+CMGS=\"+918097294245\"");
//918082347133
delay_ms1(100);
transmit_string("WATER LEACKAGE IS DETECTED\r\n S:2");
txdata(0x1a);
46

transmit_string("\r\n");
beep();
}
}
else
{
slot_yellow=1;
clear_display_flag=1;
}
if(slot_3_magnetic_sensor==0)
{
slot_flage=3;
slot_red=0;
send_cmd(0x01);
send_cmd(0x80);
display_msg("PARKING PLACE");
send_cmd(0xc0);
display_msg("AT SLOT:3");
delay_ms1(500);
delay_ms1(500);
if(slot_flage!=slot_flage_1)
{
slot_flage_1=slot_flage;
transmit_string("AT+CMGS=\"+918097294245\"");
//918082347133
delay_ms1(100);
transmit_string("WATER LEACKAGE IS DETECTED\r\n S:3");
txdata(0x1a);
transmit_string("\r\n");
beep();
}
}
else
47

{
slot_red=1;
clear_display_flag=1;
}
if(slot_4_magnetic_sensor==0)
{
slot_flage=4;
slot_green_1=0;
send_cmd(0x01);
send_cmd(0x80);
display_msg("PARKING PLACE");
send_cmd(0xc0);
display_msg("AT SLOT:4");
delay_ms1(500);
delay_ms1(500);
if(slot_flage!=slot_flage_1)
{
slot_flage_1=slot_flage;
transmit_string("AT+CMGS=\"+918097294245\"");
//918082347133
delay_ms1(100);
transmit_string("WATER LEACKAGE IS DETECTED\r\n S:4");
txdata(0x1a);
transmit_string("\r\n");
beep();
}
}
else
{
slot_green_1=1;
clear_display_flag=1;
}
48

if(slot_5_magnetic_sensor==0)
{
slot_flage=5;
slot_yellow_1=0;
send_cmd(0x01);
send_cmd(0x80);
display_msg("PARKING PLACE");
send_cmd(0xc0);
display_msg("AT SLOT:5");
delay_ms1(500);
delay_ms1(500);
if(slot_flage!=slot_flage_1)
{
slot_flage_1=slot_flage;
transmit_string("AT+CMGS=\"+918097294245\"");
//918082347133
delay_ms1(100);
transmit_string("WATER LEACKAGE IS DETECTED\r\n S:5");
txdata(0x1a);
transmit_string("\r\n");
beep();
}
}
else
{
slot_yellow_1=1;
clear_display_flag=1;
}
if(slot_6_magnetic_sensor==0)
{
slot_flage=6;
slot_red_1=0;
send_cmd(0x01);
send_cmd(0x80);
49

display_msg("PARKING PLACE");
send_cmd(0xc0);
display_msg("AT SLOT:6");
delay_ms1(500);
delay_ms1(500);
if(slot_flage!=slot_flage_1)
{
slot_flage_1=slot_flage;
transmit_string("AT+CMGS=\"+917276533247\"");
//918082347133
delay_ms1(100);
transmit_string("WATER LEACKAGE IS DETECTED\r\n S:6");
txdata(0x1a);
transmit_string("\r\n");
beep();
}
}
else
{
slot_red_1=1;
clear_display_flag=1;
}
//

if(slot_4_magnetic_sensor==0)

//

//

slot_white=0;

//

send_cmd(0x01);

//

send_cmd(0x80);

//

display_msg("PARKING PLACE");

//

send_cmd(0xc0);

//

display_msg("AT SLOT:4");

//

delay_ms1(500);

//

delay_ms1(500);

//

//

else
50

//

//

slot_white=1;

//

clear_display_flag=1;

//

//

if(clear_display_flag==1)

//

//

send_cmd(0x01);

//

send_cmd(0x80);

//

display_msg(" WEL COME ");

//

send_cmd(0xc0);

//

display_msg("HAVE NICE DAY");

//

delay_ms1(500);

//

delay_ms1(500);

//

clear_display_flag=0;

//

CHAPTER 6
TEST CASES
(Add photos of model ckt)

51

52

CHAPTER 7
CONCLUSION AND FUTURE SCOPE

7.1 Conclusion
Thus by making use of prominent technologies such as different sensors we are able to
capture the count and to successfully detect traffic intensity and by making use of this
technology it is possible for us to efficiently control the signal timings. With help of parking
automation we are able check the valid slots for parking from our home. This is very useful
for all the citizens.

7.2 Future scope


City includes many aspects for improvement we can add lots of new things to improve it.

53

Appendix A: User Manual


Input and output for test cases

INPUT

54

OUTPUT

Output pic here

Fuzzy Mode

55

Timer Based Mode

56

Emergency Mode

57

OUTPUT

Output pic here

58

Appendix B: Classes & External Libraries


Description:89c51
The AT89C51 is a low-power, high-performance CMOS 8-bit microcomputer with 4K
bytes of Flash programmable and erasable read only memory (PEROM). The device
is manufactured using Atmels high-density nonvolatile memory technology and is
compatible with the industry-standard MCS-51 instruction set and pinout. The on-chip
Flash allows the program memory to be reprogrammed in-system or by a conventional
nonvolatile memory programmer. By combining a versatile 8-bit CPU with Flash
on a monolithic chip, the Atmel AT89C51 is a powerful microcomputer which provides
a highly-flexible and cost-effective solution to many embedded control applications.
Features
Compatible with MCS-51 Products
4K Bytes of In-System Reprogrammable Flash Memory
Endurance: 1,000 Write/Erase Cycles
Fully Static Operation: 0 Hz to 24 MHz
Three-level Program Memory Lock
128 x 8-bit Internal RAM
32 Programmable I/O Lines
Two 16-bit Timer/Counters
Six Interrupt Sources
Programmable Serial Channel
59

Low-power Idle and Power-down Modes

Magnetic sensors
Magnetic sensors are actuated by the presence of a permanent magnet. Their
operating principle is based on the use of reed contacts, whose thin plates are
hermetically sealed in a glass bulb with inert gas. The presences of a magnetic
field makes the thin plates flex and touch each other causing an electrical
contact. The plates surface has been treated with a special material particularly
suitable for low current or high inductive circuits. Magnetic sensors compared to
traditional mechanical switches have the following advantage:
Contacts are well protected against dust, oxidization and corrosion due to the
hermetic glass bulb and inert gas; contacts are activated by means of a
magnetic field rather than mechanical parts
Special surface treatment of contacts assures long contact life
Maintenance free
Easy operation
Reduced size

Measuring A Magnetic Field

A magnetic field surrounds an electric current. The field is detectable by its force or
interaction on electrical charges, magnets and magnetic products. The strength and direction
of a magnetic field can be measured and documented. Fluctuations in that field are sensed
and adjustments or changes are made in a machines response, a doctors decisions, the
direction the navigational instrument gives or the response of a detection system. The Earth's
magnetic field is a great example. It is measured and tracked by magnetic sensors which are
part of the navigational tools that Honeywell and other corporations design and manufacture.
Most magnetic sensors are used for measurement in industrial processes, navigational tools,
and scientific measuring.
60

Magnetic Sensing Technology

There are several types of technologies used to make a magnetic sensor


work. Fluxgate, Hall Effect, magnetoresitive, magnetoinductive, proton precession, optical
pump, , nuclear precession, and SQUID (superconducting quantum interference devices) each
have a different approach to using magnetic sensors. Magnetoresistive devices record
electrical resistance of the magnetic field. Magnetoinductive are coils surrounding magnetic
material whose ability to be permeated changes within the Earth's magnetic field. Fluxgate
measures magnetic fields against a known internally created magnetic based response that
runs through a continually fluxing set of parameters. Each type of technology focuses on a
particular area for detection, a measurement to be detected and way of recording changes.

BIBLIOGRAPHY
We referred these sites and papers while making this project:

1.R. M. Faye, F. Mora-Camino ,S. Sawadogo, and A. Niang, 1998 IEEE. An Intelligent
Decision Support System for traffic System Management
2.Vories, E.D., Glover, R.E., Bryant, K.J., Tacker, P.L., 2003. Estimating the cost of delaying
irrigation for mid-south cotton on clay soil
3.Abreu VM, Pereira LS (2002). Watter lagging storing system using ISAMim.p. 022254.
4. Baggio A (2005). Wireless sensor networks in precision. In: On-line Proc, of the Workshop
on Real-World Wireless Sensor Networks, pp. 50-51.

61