Você está na página 1de 56

CAR BLACK BOX EVIDENCE COLLECTING SYSTEM

1



ACKNOWLEDGEMENTS



It would be our heartily pleasure to thank our faculty member for project lab Mr. Rajesh Ishwar ,whose
friendly and faithful guidance thought the academic session and deep knowledge in this field helped me to
succeed in this project. We are greatly obliged to their guidance and the paid they took for us.

We were also provided the worthily resource of library and Internet within department itself in very hardly
form to use any time to polish our knowledge regarding my project topic. Hence we are so much thankful to
respected H.O.D. and E.C. department as well as S.P.B. PATEL ENGINEERING College for allotting us
such facilities.
We extend our appreciation and thanks to all of our classmates and friend for their support and constant
encouragement and suggestion.
Finally, we pay my thanks to all people who have touched our project and help us directly or indirectly for
this wonderful project.






PRITESH H. VIRADIYA (100390111002)
JUGAL S. PATEL (100390111008)
HARDIK M. MEHTA (100390111043)



CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
2


ABSTRACT

This demonstration shows how to effectively collect and manage information obtained from car black
boxes in vehicular networks. The car black box is a vehicle-based CCTV which records video images,
sound, GPS position, speed, and time. These data can be used for accurate car accident investigation and
some public crimes prevention. However, there are important issues such as user privacy and a data
management for a vehicle-based CCTV records. The proposed evidence collection system can reduce driver
privacy concerns and communication and management overheads. Our contribution is that we propose a
feasible and useful scenario for public safety

CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
3


LIST OF FIGURES

FIG-1 MICROCONTROLLER .15
FIG-2 GPS MODULE (MT3339)..16
FIG-3 GSM MODULE (SIM 300).17
FIG-4 LCD 20
FIG-5 CIRCUIT DIAGRAM OF VIBRATOR SENSOR 21
FIG-6 FULL WAVE BRIDGE RECTIFIER 24
FIG-7 MESSAGE 2.33
FIG-8 BLOCK DIAGRAM 34
FIG-9 CIRCUIT DIAGRAM .35

CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
4


Content
Chapter 1: Introduction ..10
1.1 Overview of Project........10
1.2 List of feature .10
1.3 Proposed existing system ...10
1.4 Limitation of project ..10
Chapter 2: Project Management.......11
2.1 Project Plan.11
2.2 Project Scheduling..11
Chapter3: System Requirement and specification13
3.1 User characteristic13
3.2 System characteristic13
3.3 Product prospective......14
3.3.1 Microcontroller (AT 89S52)..14
3.3.2 GPS Module (MT 3339)16
3.3.3 GSM Module (SIM 300)...17
3.3.4 16*4 LCD..19
3.3.5 Vibrations Sensor..21
3.3.6 Night Vision Camera22
3.3.7 Power Supply23
3.3.8 Buzzer...25
3.4 Constraints.27
3.5 System Reliability..27
3.6 Safety and security of system28
Chapter 4: System design.29
4.1 System analysis.29
4.2 System activity..33

CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
5


4.3 Block Diagram.34
4.4 Circuit Diagram35
4.5 Sequence Diagram36
Chapter 5: implementing detail..37
5.1 Program.37
Chapter 6: System testing58
6.1 Test Case 58
6.2 Test Plan.58
Chapter 7: Conclusion and future plane..59
7.1 Conclusion ..59
7.2 Future Plane.59
Chapter 8: Reference ..60











CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
6


CHAPTER 1: INTRODUCTION

1.1 OVERVIEW OF PROJECT
When car is started the audio and video recording will be done by Black box and it can now play a key role
in motor vehicle crash investigations. When accident happened, The GPS and GSM module will send a
massage to a number of a location of accident and emergency is provided to them.
1.2 LIST OF FEATURES
, When car is started. The GPS and GSM module will send a information of latitude and The main features
of black box is audio and video recording longitude of car, date of accident, time of accident, car speed and
head to a specified number
1.3 PROPOSED EXISTING SYSTEM
As per the National Crime Records Bureau (NCRB), in the year 2013 there were 440,123 road accidents
resulting in the death of 136,834 people .The incidence of accidental deaths increased by 44.2% in 2012
from 2013. This figure translates into one death every five minutes on Indian roads and is expected to
escalate to two death every three minutes by 2020.the death of people might be reduced if emergency
medical help was provided them immediately.
Beside this no evidence are available for a 48% to 50% of an accident ,due to this lots of problem take place
in insurance time and the data can be used against car owners, to find fault in accidents or in criminal investigations.
That why we develop car black box for evidence collecting and providing emergency medical help to an of
accident place.

1.4 LIMITATION OF PROJECT
1. Developing a different vibration sensor for a different vehicle according to mechanical force .
2. GPS and GSM MODULE does not work in no network area.
3. For audio and video recording more memory require.


CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
7



CHAPTER 2: PROJECT MANAGEMENT

2.1 PROJECT PLAN
Since the project belonged to new application development category, I selected the following tasks.
Domain understanding.
Analysis of required system.
Defining scope and objectives.
Finding out the efforts and the time estimation.
Preparing the schedule.
Finding our resources requirement.
Implementation.
Testing.
From the selection of above tasks, I can elaborate them into pictorial representation so that I can understand
the activities in more understandable manner along with their respected time interval.
2.2 PROJECT SCHEDULING:
Project scheduling is an activity that distributes estimated efforts across the plan duration by
allocating the effort of specific software engineering task
Proper scheduling required.
All tasks appear in work.
Efforts and timing are intelligently allocated to each task.
Interdependencies between tasks are properly indicated.
Resources are allocated for the work to be done.
Though there are many reasons for completion of project, following are the prominent ones that are the roots
of late completion.



CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
8



Unrealistic deadline estimation under excitation of getting a project or under some other pressure.
Changing user requirements that are not reflected in schedule changes.
Conceptual change requirement during the course of the project.
An appropriate distribution of time.
Human and natural problems that were not predicted.
Failure in recognizing that project is lagging behind schedule.






MILESTONE & DELIVERABLES









CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
9



CHAPTER3: SYSTEM REQUREMENT AND SPECIFICATION

3.1 USER CHARACTERISTICS
Black box recorders and before the crash the event of after, The GPS and GSM module will send a massage
to a number of a location of accident and emergency is provided to them
This project helps in preventive maintenance of vehicle such that vehicle does not get breakdown on road.
Project helps in tracking driving behavior for fright, cargo truck operator & company car operator.
It can be used to evaluate performance of new car.
Project helps in getting information about pre accident driving scenario.

3.2 SYSTEM CHARACTERISTICS
Black box recorders and before the crash the event of after, The GPS and GSM module will send a massage
to a number of a location of accident and emergency is provided to them.
When car is started, the GPS and GSM module will send a information of latitude and The main features of
black box is audio and video recording longitude of car, date of accident, time of accident, car speed and
head to a specified number Developing a different vibration sensor for a different vehicle according to
mechanical force.
GPS and GSM MODULE does not work in no network area.
For audio and video recording more memory is required.




CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
10




3.3 PRODUCT PROSPECTIVE
HARDWERE
Microcontroller (AT 89S52)
GPS Module (MT 3339)
GSM Module (SIM 300)
Camera (AL422B)
Vibrator Sensor

3.3.1 MICROCONTROLLER (AT 89S52)
FEATURES

8K Bytes of In-System Programmable (ISP) Flash Memory.
Endurance: 1000 Write/Erase Cycles.
4.0V to 5.5V Operating Range.
Fully Static Operation: 0 Hz to 33 MHZ.
Three-level Program Memory Lock.
256 x 8-bit Internal RAM.
32 Programmable I/O Lines.
Three 16-bit Timer/Counters.
Eight Interrupt Sources.
Full Duplex UART Serial Channel.
Low-power Idle and Power-down Modes.
Interrupt Recovery from Power-down Mode.
Watchdog Timer.
Dual Data Pointer.
Power-off Flag.
Fast Programming Time.
Flexible ISP Programming (Byte and Page Mode).

CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
11



FIG 1: MICROCONTROLLER

The 89S52 has 4 different ports, each one having 8 Input/output lines providing a total of 32 I/O lines. Those
ports can be used to output DATA and orders do other devices, or to read the state of a sensor, or a switch.
Most of the ports of the 89S52 have 'dual function' meaning that they can be used for two different functions.
The first one is to perform input/output operations and the second one is used to implement special features
of the microcontroller like counting external pulses, interrupting the execution of the program according to
external events, performing serial data transfer or connecting the chip to a computer to update the software.
Each port has 8 pins, and will be treated from the software point of view as an 8-bit variable called 'register',
each bit being connected to a different Input/output pin.
There are two different memory types: RAM and EEPROM. Shortly, RAM is used to store variable during
program execution, while the EEPROM memory is used to store the program itself, that's why it is often
referred to as the 'program memory'. It is clear that the CPU (Central Processing Unit) is the heart of the
CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
12



microcontrollers. It is the CPU that will Read the program from the FLASH memory and Execute it by
interacting with the different peripherals

Diagram below shows the pin configuration of the 89S52, where the function of each pin is written next to it,
and, if it exists, the dual function is written between brackets. Note that the pins that have dual functions can
still be used normally as an input/output pin. Unless the program uses their dual functions, all the 32 I/O pins
of the microcontroller are configured as input/output pins.

3.3.2 GPS MODULE (MT 3339)




FIG 2: GPS MODULE (MT3339)

The Locosys LS20031 GPS receiver integrates a MediaTek MT3339 66-channel GPS chip with a ceramic
antenna to create a complete GPS module that can track up to 66 GPS satellites at a time. The GPS module
supports up to a 10Hz update rate, a built-in rechargeable battery for rapid satellite acquisition (external
power is still required for normal operation), and more than 6 different NMEA ASCII sentences that are
output to a TTL-level serial port.

CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
13




FEATURES
32 second cold start, less than 1 second hot start
Supports 66-channel GPS
Up to 10Hz update rate
3 to 4.2 V operating range
Built-in rechargeable battery to preserve system data for rapid satellite acquisition
Red LED indicator for GPS fix or no fix
MediaTek MT3339 receiver chipset
Capable of QZSS and SABS (WAAS, EGNOS, MSAS, GAGAN)
Self-generated ephemeris prediction
Supports assisted GPS (AGPS)


3.3.3 GSM MODULE (SIM300)


FIG 3: GSM MODULE (SIM300)


CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
14


These products are widely used for GSM voice communications and TCP or IP stacks. These products offer
a high quality serial TTL interface for easy and direct interface to microcontroller. These products are
available at standard market prices. These products are manufactured using optimum raw materials coupled
with latest technology machinery.

FEATURES
AC/DC 9-12 V /1.5 A Power Input
8-pin flip type reliable SIM card holder
DC socket for Power Adapter.
RS-232 Interface with Hardware Flow Control support.(5 signals - TX, RX, RTS, CTS & GND through
D-type 9 connector).
Average Current consumption in normal operation 250 mA, can rise up to 500-700 mA during Voice and
GPRS connections.
Uses the extremely popular SIM 300 GSM module
Provides the industry standard serial RS232 interface
Provide serial TTL interface for easy and direct interface to microcontroller
Provision for 3V lithium battery holder
Can be used for GSM voice communications, data/fax, SMS, GPRS and TCP/IP stack
Can be controlled through standard AT commands
Operating voltage: 7-15 AC or DC (Board has on board rectifier)

SPECIFICATIONS:
Interface: RS 232
Voltage: 50V


CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
15



3.3.4 16x4 LCD
A 16*4 character LCD display with white text on a vivid blue backlit LCD. The pictures don't do justice to
the bright blue background with clear white text of this display. I HAVING A 4 lines of 16 characters.
Standard Hitachi HD44780 compatible interface for easy connection to microcontrollers

DIMENSIONS
Width 3.45 inches (87mm)
Height 2.35 inches (60mm)
Display view size 62mm x 26mm

LCDs are used in a wide range of applications including computer monitors, televisions, instrument
panels, aircraft cockpit displays, and signage.
They are common in consumer devices such as video players, gaming devices, clocks, watches, calculators,
and telephones, and have replaced cathode ray tube (CRT) displays in most applications.

They are available in a wider range of screen sizes than CRT and plasma displays, and since they do not use
phosphors, they do not suffer image burn-in. LCDs are, however, susceptible to image persistence.








CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
16




FIG 4: LCD


TABLE 1: PIN OUT CONNECTION OF LCD

Pin out Connections
Pin No Symbol Level Description
1 VSS 0V Ground
2 VDD 5V Supply Voltage for logic
3 VO (Variable) Operating voltage for LCD
4 RS H/L H: DATA, L: Instruction code
5 R/W H/L H: Read(MPU?Module) L: Write(MPU?Module)
6 E H,H->L Chip enable signal
7 DB0 H/L Data bus line
8 DB1 H/L Data bus line
9 DB2 H/L Data bus line
10 DB3 H/L Data bus line
11 DB4 H/L Data bus line
12 DB5 H/L Data bus line
13 DB6 H/L Data bus line
14 DB7 H/L Data bus line
15 A 5V LED +
16 K 0V LED-

CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
17



3.3.5 VIBRATION SENSOR
This project can be used as vibration activated sensor. Piezo electric sensor plate can be fixed on table, door,
car, window etc. ..using cello tape or adhesive.
When the sensor vibrate, piezo electric sensor converts mechanical vibrations into electrical variations.
Electrical pulses are undergone amplification by transistor amplification stages. Final transistor drives a
piezo buzzer.
Time delay can be changed by adjusting value of capacitor connected across 220K resistors. To active AC
loads buzzer may be replaced by relay. Load to be controlled can be connected via normally opened contacts
of the relay.
For demonstration a 9V DC battery can be used. For continuous use, alarm may be powered using 9V or
12V adaptor. Simple unregulated supply is enough.


This alarm can be used to protect car and other vehicles. Other application of this project is an earthquake
warning alarm.





FIG 5: CIRCUIT DIAGRAM OF VIBRATOR SENSOR
BATT.
R2
D2
R7 PIEZO
R6
C3
+
C2
R3
R8
R4
R5
+
Q1
R9 R13 R12
Q2
C6
+
R11
C1
Q3
LD1
BZ
C4
Q4
+
Q5
C5
Q6
R10
1
2
D1
R1
CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
18






TABLE 2: PART LIST OF VIBRATION SENSOR

Part List

R1 - -680 C1 -22F/25V
R2 - -100 C2,C5 -100KPF-104
R3 - -220K C3,C4 -100/16V
R4 - -22K C6 -1KPF-102
R5,R8 -1K D1,D2 -IN4148
R6 - -2K7 L1,L2 -5MM LED
R7 - -100K Q1 -BC557
R9,R12 -4K7 Q2-Q5 -BC547
R10 - -10K Q6 -BC549
R11 - -270K PIEZO SENSOR PLATE
R13 - -1M PIEZO BUZZER

3.3.6 NIGHT VISION CAMERA (SC V1S/V2S)
CMOS high definition CMOS sensor.
Pixels: 300K pixels resolution.
Minimum illumination: 0 Lux/F1.2 (IR leds on).
Resolution VGA mode (640*480).
High speed arm CPU, advanced DSP processing and software control technology.
Adopt vimicro advanced DSP.
Support max 16G TF card.
Real time image capture without pause.
The transmission rate up to 60 frames/sec and monitor moving object without delay.
Image is more exquisite and clearer.
Passive infrared ray (PIR) motion-detecting tech adopted.
Support hot-swapping, support the random power off video data reliable preservation.
Supply power: DC 12V 1A.
Power : < 3W.

CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
19


3.3.7 POWER SUPPLY
A power supply is a device that supplies electric power to an electrical load.
The term is most commonly applied to electric power converters that convert one form of electrical energy
to another, though it may also refer to devices that convert another form of energy to electrical energy.
A regulated power supply is one that controls the output voltage or current to a specific value; the controlled
value is held nearly constant despite variations in either load current or the voltage supplied by the power
supply's energy source.
DC POWER SUPPLY

An AC powered unregulated power supply usually uses a transformer to convert the voltage from the wall
outlet (mains) to a different, nowadays usually lower, voltage.
If it is used to produce DC, a rectifier is used to convert alternating voltage to a pulsating direct voltage,
followed by a filter, comprising one or more capacitors, resistors, and sometimes inductors, to filter out
(smooth) most of the pulsation.
A small remaining unwanted alternating voltage component at mains or twice mains power frequency ripple
is unavoidably superimposed on the direct output voltage.
For purposes such as charging batteries the ripple is not a problem, and the simplest unregulated mains-
powered DC power supply circuit consists of a transformer driving a single diode in series with a resistor.

AC POWER SUPPLY
An AC power supply typically takes the voltage from a wall outlet (mains supply) and lowers it to the
desired voltage. Some filtering may take.

FULL WAVE RECTIFIER
Another type of circuit that produces the same output waveform as the full wave rectifier circuit above, is
that of the Full Wave Bridge Rectifier.
CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
20


This type of single phase rectifier uses four individual rectifying diodes connected in a closed loop "bridge"
configuration to produce the desired output.

The main advantage of this bridge circuit is that it does not require a special centre tapped transformer,
thereby reducing its size and cost. The single secondary winding is connected to one side of the diode bridge
network and the load to the other side as shown below.

The four diodes labelled D
1
to D
4
are arranged in "series pairs" with only two diodes conducting current
during each half cycle.
During the positive half cycle of the supply, diodes D1 and D2 conduct in series while diodes D3 and D4 are
reverse biased and the current flows through the load as shown below.




FIG 6: FULL WAVE BRIDGE RECTIFIER


CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
21


3.3.8 BUZZER

These electronic buzzers offer a high but rich sound. They are ideal for all applications and can be
applied to telephone times, calling devices, time pieces electronic toys, safety equipment.

Base of the buzzer is potted to maximise protection against flux contamination
Masking label is included over the sound emission hole to permit board cleaning

Supplied with PCB pins for direct mounting to PCBs
Encapsulated in a low profile housing
Suitable for inclusion in miniature electronics instrumentation
Small / low profile design
Available in 5, 12V operating versions
7.6mm pitch
Dimensions 12mm diameter x 7.5(H)mm

SOFTWERE
EXPRESS PCB DESIGN/EIGAL
KEIL
PROGAMMIG IN C


KEIL SOFTWARE

KEIL Micro Vision is an integrated development environment used to create software to be run
on embedded systems (like a microcontroller). It allows for such software to be written either in
assembly or C programming languages and for that software to be simulated on a computer
before being loaded onto the microcontroller. The software used is c programming.
Vision3 is an IDE (Integrated Development Environment) that helps write, compile, and
debug embedded programs. It encapsulates the following components:
CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
22


A project manager.
A make facility.
Tool configuration.
Editor.
A powerful debugger.


To create a new project, simply start micro vision and select Project=>New Project
from the pulldown menus. In the file dialog that appears, a filename and directory was chosen for the
project. It is recommended that a new directory be created for each project.

As several files will be generated. Once the project has been named, the dialog shown in the figure below
will appear, prompting the user to select a target device.
The chip being used is the AT89S52, which is listed under the heading Atmel.
Next, Micro Vision was instructed to generate a HEX file upon program compilation.

A HEX file is a standard file format for storing executable code that is to be loaded onto the microcontroller.
In the Project Workspace pane at the left, rightclick on Target 1 and select Options for Target 1
.Under the Output tab of the resulting options dialog, ensure that both the Create Executable and
Create HEX File options are checked.
Then click OK. Next, a file must be added to the project that will contain the project code.
To do this, expand the Target 1 heading, rightclick on the Source Group 1 folder, and select Add
files Create a new blank file (the file name should end in .c), select it, and click Add. The new file
should now appear in the Project Workspace pane under the Source Group 1 folder.




CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
23


Double-click on the newly created file to open it in the editor. To compile the program, first save all source
files by clicking on the Save All button, and then click on the Rebuild All Target
Files to compile the program as shown in the figure below.
If any errors or warnings occur during compilation, they will be displayed in the output window at the
bottom of the screen.

All errors and warnings will reference the line and column number in which they occur along with a
description of the problem so that they can be easily located .
When the program has been successfully compiled, it can be simulated using the integrated debugger in Kiel
Micro Vision. To start the debugger, select Debug=>Start/Stop
Debug Session from the pulldown menus.
At the left side of the debugger window, a table is displayed containing several key parameters about the
simulated microcontroller, most notably the elapsed time (circled in the figure below). Just above that, there
are several buttons that control code execution.

The Run button will cause the program to run continuously until a breakpoint is reached, whereas the
Step Into button will execute the next line of code and then pause (the current position in the program is
indicated by a yellow arrow to the left of the code).








CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
24


3.4 CONSTRAINTS
In any event, Trask has not been charged with speeding in relation to the incident, and continued to serve as
the governor's driver.


3.5 SYSTEM RELIABILITY
These devices record both pre- and post-accident data in a storage device and The GPS and GSM module
will send information of latitude and The main features of black box is audio and video recording longitude
of car, date of accident, time of accident, car speed and head to a specified number but not give information
whether or not the driver or passenger was wearing a seatbelt.
In any event, Trask has not been charged with speeding in relation to the incident, and continued to serve as
the governor's driver.



3.6 SAFETY AND SECURITY OF SYSTEM
This system is fitted in car and if accident occurred then all the information of car and location is send to the
emergency centre. In security system if another person start the car then the GSM module will send the
manage to the owner of car.







CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
25


CHAPTER 4: SYSTEM DESIGN
4.1 SYSTAM ANALISIS
A system analysis is a short, focused study, which aims to answer a number of questions:

Does the system contribute to the overall objective of the organization?
Can the system be implemented using current technology and within given cost and schedule constrains?
Can the system be integrated with system which already in place?

1) OPTIONAL FEASIBILITY:
Operational feasibility measures how well the solution will work in the organization and how well
end-user & management feel about system? Proposed system is helpful for the operator and user. It will
allow them to get the appropriate and adequate information.
On studying the operational feasibility of the project, the following conclusion can be derived:
Developed system for the elevator control system will provide the adequate throughput and all necessary
information to users and operators.
It will provide advantageous and reliable services.
If it can be installed within suitable environment, system will do operations under environment of limited
resources.
Thus, it is operationally feasible to develop the proposed system.
2) TECHNICAL FEASIBILITY:
Technical feasibility tries to answer the following questions to make the project feasible to develop.
The hardware and software tools necessary for building or running the application are easily available or
not?
The compatibility amongst system exists or not?
Are developers aware of these technologies?
What about the alternative of this chosen system?
So, I have found the answer of the above questions, as given below:
Here I have preferred AT89C51 microcontroller .
So, the project is feasible.
CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
26



3) ECONOMIC FEASIBILITY:
Economic feasibility addresses the following issues:
Is the organization having the suitable budget to develop the proposed system?
How much profit can be earned from the system organization?
Would it be cost effective to develop the system or is worthwhile to remain with current system?
I would like to answer for the above questions below:
As development hardware and software with functionally and cost concern
The organization doesnt having the same system, so it is certainly required for them.
The project will be remarkable according to our team has seen as far as older one AFT concerned
So, it is economical feasible to the organization.
4) IMPLEMENTATION FEASIBILITY:
Under the study of implementation feasibility, I have got to draw the finger to the certain issues, like:
Is it possible to install within the given environment?
Will organization management and users support for the installation of the project?
Will proposed system cause any harm to operation of the organization?
Operationally, this system can be installed and it can work according to its functionalities. There would
be very little barriers in implementations, if application will be prepared according to hardware barriers.
The management has already approved this project to be developed and it wont cause any harm to users
operation or day to day activities.
5) PROJECT SCHEDULING:
Project scheduling is an activity that distributes estimated efforts across the plan duration by
allocating the effort of specific software engineering task
Proper scheduling required.
All tasks appear in work.
Efforts and timing are intelligently allocated to each task.
Interdependencies between tasks are properly indicated.
Resources are allocated for the work to be done.

CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
27


Though there are many reasons for completion of project, following are the prominent ones that are
the roots of late completion.
To schedule our project, we followed basic principles of project scheduling.
6) COMPARTMENTALIZATION:
I have divided the project into following task:
Hardware interface
Programming
Testing

7) INTERDEPENDENCY:

Interdependency of each compartmentalized activities were hence found out. Some tasks must occur in
sequence whereas some can occur in parallel.
8) TASK SET:
A task set was defined for the project; task set is a collection or work task, milestones and outcomes
that must be accomplished to complete a particular project.
Hardware divides in main groups as given below:
Concept development
Make a circuit as per that
New application development
Application enhancement
Application maintenance
Testing
Software divides in main groups as given below:
Logic development
Module designing
Module integrating
Testing

CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
28


9) DEFINING ADAPTATION CRITERIA:

Adaptation criteria were used to determine the recommended degree of rigor with which the hardware-
software should be applied on a project.
Criteria for the project:
Size
Number of users
Mission critical
Application longevity
Application requirement
Stable requirement
Maturity of technology used
Performance constrains
Embedded/ non embedded
Re-engineering efforts

10) SELECTION OF PROJECT TASKS:
Since the project belonged to new application development category, I selected the following tasks.
Domain understanding
Analysis of required system
Defining scope and objectives
Finding out the efforts and the time estimation
Preparing the schedule
Finding our resources requirement
Implementation
Testing
From the selection of above tasks, I can elaborate them into pictorial representation so that I can understand
the activities in more understandable manner along with their respected time interval.



CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
29


4.2 SYSTAM ACTVITY
When car is started the audio and video recording is started by a night vision camera which is in a black box,
normally it record front view of the car.
When car is started the GPS and GSM module send a alert message to a car owner or emergency canter that
inform them its car states like longitude of car, date of accident, time of accident, car speed and head to a
specified number.

When the accident is take place, it is detected by a vibration sensor and it send a alert message to a car
owner or emergency canter that inform them its car states like longitude of car, date of accident, time of
accident, car speed and head to a specified number.

FIG 7: MESSAGE






CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
30


4.3 DATA BLOCK DIAGRAM




FIG 8: BLOCK DIAGRAM






CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
31



4.4 CIRCUIT DIAGRAM


FIG 9: CIRCUIT DIAGRAM
CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
32


4.5 SEQUANCE DIAGRAM









CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
33


CHAPTER 5: IMPLIMANTING DETAIL

5.1 PROGRAM

//------------
//HEADER FILES
//------------
#include<REG51F.H>
#include<std io.h>
#include<string.h>
#include<LCD.h>
#include<EEPROM.h>


sbit EEPROM_CS=P2^3;
sbit EEPROM_CLK=P0^2;
sbit EEPROM_DI=P0^1;
sbit EEPROM_DO=P0^0;

sbit SELGPS=P1^0;
sbit SELGSM=P1^1;
sbit SELGSMRX=P1^2;

sbit CNFG=P2^4;

sbit INFRA=P3^3;
sbit BUZZ=P3^2;
CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
34


//Interrupt Routines
void delay(int);

//EEPROM routines
extern void eeprom_datawrite(unsigned int,float,int);
extern float eeprom_dataread(unsigned int,int);

//LCD Routines
extern void lcd_init();
extern void lcd_clear();
extern void printl(char [],int,int,int);
extern void lcdprint(int,int);

//Serial Routines
extern void se_out_wr();
extern void se_in_rd();

extern void SendInitialize();
extern void SendString();

void config_device();
void read_config();

//GLOBLE VARIABLES
//----------------

//serial variable
CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
35

int sp_buff_out[50],sp_buff_in[75],dta_count=0;
int si_ptr_in=0,si_ptr_out=0,se_flag=0;
int ptr=0;

unsigned int string_buff[75];
char string_in[10],string_out[50];
int date_dd=0,date_mm=0,date_yy=0;

int data_valid=0;
float latitude=0,latitude_d=0;
float longitude=0,longitude_d=0;
int lt_dir=0,ln_dir=0;

float act_lat=0,act_long=0;
int time_hh=0,time_mm=0,time_ss=0;
int time_mm_hi=0,time_mm_lo=0;

float speed=0,head=0;
unsigned int old_time_mm=0;

///sms variables

int send_sms=0;
char phstr[12];

bit check_ok=0,ok_done=0;
int ptr_n=0;
bit sending_data=0,chk_new_msg=0,new_msg=0;
CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
36


int in_cmd_err=0,in_cmd_err_type=0;
char in_ph[12];
int in_msg=0;
int emm_data_send=0,emm_data_sent=0;
int buzz_count=0,buzz_on=0;
int ok_count=0;


//MAIN
void main()
{
//----------------
//SERIAL INTERFACE
//----------------
SCON=0X50;
T2CON=0X30;
T2MOD=0X00;
RCAP2L=0XB8;
RCAP2H=0XFF;
TR2=1;
TI=1;

printf("\n\nGPS VEHICLE TRACKING ON SMS\n");
//-------------------------------------------------------------------------------------------------------------
//LCD INITIALIZATION
//-------------------------------------------------------------------------------------------------------------

CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
37

lcd_init(); //call routine to initialize lcd
lcd_clear(); //call routine to clear lcd display

lcdprint(" REAL TIME VEHICLE ",2);
lcdprint(" TRACKING SYSTEM ",3);

clear_arrays();
clear_ee_array();

if(CNFG==0)
{
lcdprint(" CONFIGURATION.. ",2);
lcdprint(" ",3);
read_config();
config_device();
}
read_config();

IP=0X10; //set serial priority
maximum
IPH=0X10;
IE=0X90; //enable
interrupt(global,serial)

delay(2000);

lcdprint(" UNIVERSAL TECHNOMATION ",2);
lcdprint(" STUDENT GROUP" ,3);
lcdprint(" ",4);
CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
38

delay(2000);

lcdprint(" ",1);
lcdprint(" ",2);
lcdprint(" ",3);
lcdprint(" ",4);

lcdprint(" INITIALIZING.. ",2);

sending_data=1;
send_sms=1;
SELGPS=0;
SELGSM=1;
SELGSMRX=1;

SendInitialize();

sending_data=0;
if(ok_done==1)
{
check_ok=0;
ok_done=0;
lcdprint(" MODEM OK ",2); //modem ok

}
else
{
check_ok=0;
CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
39

lcdprint(" MODEM ERROR ",2);
delay(1500);
}

send_sms=0;

delay(1000);

lcdprint(" ",1);
lcdprint(" ",2);
lcdprint(" ",3);
lcdprint(" ",4);

old_time_mm=0;

while(1)
{
if(send_sms==0)
{
send_sms=0;
SELGPS=1;
SELGSM=0;
SELGSMRX=0;
}

if(se_flag==1)
{
se_in_rd();
CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
40

if(data_valid==1)
{
lcdprint("LT: %.6f SPEED",1,act_lat);
lcdprint("LN: %.6f .2f",2,act_long,speed);

lcdprint("DATE: %02d/%02d/%02d HEAD" ,3,date_dd,date_mm,date_yy);

lcdprint("TIME: %02d:%02d:%02d .1f ",4,head);

if(INFRA==0) emm_data_send=0;
else emm_data_send=1;

if(emm_data_send==0)
{
buzz_on=1;
if(emm_data_sent==1)
{
emm_data_send=1;
}
}
else
{
emm_data_sent=0;
}


if((time_mm_lo != old_time_mm) || emm_data_send==0)
{
CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
41

send_sms=1;
sending_data=1;
SELGPS=0;
SELGSM=1;
SELGSMRX=1;

if(buzz_on==1)
{
buzz_count++;
BUZZ=1;
if(buzz_count > 1)
{
buzz_count=0;
buzz_on=0;
}
}
else BUZZ=0;

lcdprint(" ",1);
lcdprint(" ",2);
lcdprint(" ",3);
lcdprint(" ",4);

lcdprint(" SENDING SMS ",2); // sending sms
if(emm_data_send==0) lcdprint(" EMERGENCY... ",3);

delay(10);

SendString();
CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
42


while(ok_done==0)
{
ok_count++;
if(ok_count > 1000) ok_done=2;
}

if(ok_done==1)
{
check_ok=0;
ok_done=0;
lcdprint(" SMS SENT ",2); //sms sent
if(emm_data_send==0) emm_data_sent=1;
}
else
{
check_ok=0;
lcdprint(" SMS SENT ERROR ",2);
delay(1000);
}
delay(500);
lcdprint(" ",1);
lcdprint(" ",2);
lcdprint(" ",3);
lcdprint(" ",4);

old_time_mm = time_mm_lo;
send_sms=0;
CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
43

sending_data=0;
}

}
else
{
lcdprint(" ",1);
lcdprint(" INVALID DATA ",2);
lcdprint(" ",3);
lcdprint(" ",4);
}
se_flag=0;
}
delay(10);
}
}



void delay(int delay_value)
{
int out_delay,in_delay;

for(out_delay=0 ; out_delay < delay_value ; out_delay++)
{
for(in_delay=0 ; in_delay <= 208 ; in_delay++);
}
}
CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
44




void config_device()
{
printf("\n\nEnter New Phone No: ");
gets(phstr,11);

eeprom_datawrite(2,phstr);

printf("\n\n Please Attach the GSM Modem and Reboot the Device... ");
while(1);
}

void read_config()
{
printf("\n\n---- GPS VEHICLE TRACKING ON SMS ----");
printf("\n-------------------------------------");

eeprom_dataread(1,0);

phstr = eeprom_dataread(2,0);

printf("\n\n Pnone No = %s",phstr);
}

void clear_ee_array()
{
CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
45

int l=0;

for(l=0;l<=12;l++)
{
phstr[l]=1;
}
}



void serl_int() interrupt 4
{
int cnt=0;

if(RI==1) //serial receive interrupt
{
RI=0; //clear serial receive
interrupt flag

if(send_sms == 0)
{
if(se_flag==0)
{
sp_buff_in[si_ptr_in]=SBUF; //store data in buffer at location
indicated by pointer

if(sp_buff_in[si_ptr_in]==10 && sp_buff_in[si_ptr_in-1]==13)
{
if(sp_buff_in[0]==36 && sp_buff_in[1]==71 && sp_buff_in[2]==80
&& sp_buff_in[3]==82 && sp_buff_in[4]==77 && sp_buff_in[5]==67)
CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
46

{
se_flag=1;
ptr=si_ptr_in;
}
si_ptr_in=0;
}
else si_ptr_in++; //increment
pointer

if(si_ptr_in>149) si_ptr_in=0;
}
}
else
{
sp_buff_in[si_ptr_in]=SBUF; //store data in buffer at location indicated
by pointer

if(sp_buff_in[si_ptr_in]==10 && sp_buff_in[si_ptr_in-1]==13)
{
if(sending_data==1)
{
ptr = si_ptr_in;
si_ptr_in=0;
}
else
{
if(new_msg==1)
{
new_msg=0;
CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
47

ptr = si_ptr_in;
si_ptr_in=0;
se_flag=1;
}
if(chk_new_msg==1)
{
chk_new_msg=0;
if(sp_buff_in[0]==43 && sp_buff_in[1]==67 &&
sp_buff_in[2]==77 && sp_buff_in[3]==84)
{
ptr_n = si_ptr_in;
si_ptr_in++;
new_msg=1;
}
else
{
si_ptr_in=0;
}
}
if(si_ptr_in==1 && new_msg==0 && chk_new_msg==0)
{
chk_new_msg=1;
si_ptr_in=0;
}
}
if(check_ok==1)
{
if(sp_buff_in[0]==79 && sp_buff_in[1]==75) ok_done=1;
}
CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
48

}
else si_ptr_in++; //increment pointer

if(si_ptr_in>99) si_ptr_in=0;
}

}
}

void se_in_rd()
{
int lp1=0;
double lt[15];
double ln[15];
int comma=0,dt_st=0,sp_st=0,sp_dec=0,hd_st=0,hd_dec=0;

for(lp1=0;lp1<=100;lp1++)
{
if(lp1 < ptr-1) string_buff[lp1] = (sp_buff_in[lp1]);
else string_buff[lp1] = 0;

sp_buff_in[lp1]=0;
}

for(lp1=0;lp1<=10;lp1++)
{
lt[lp1]=0;
ln[lp1]=0;
}
CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
49


if(string_buff[18] == 65)
{
data_valid=1;
lt[0]=0;
ln[0]=0;

for(lp1=0;lp1<=10;lp1++)
{
string_buff[lp1+7] = string_buff[lp1+7] - 48;
lt[lp1+1] = (string_buff[lp1+20] - 48);
ln[lp1+1] = (string_buff[lp1+32] - 48);
}

time_hh = (string_buff[7]*10) + (string_buff[8]);
time_mm_hi = string_buff[9];
time_mm_lo = string_buff[10];
time_mm = (string_buff[9]*10) + (string_buff[10]);
time_ss = (string_buff[11]*10) + (string_buff[12]);// + (string_buff[14]*0.1) +
(string_buff[15]*0.01) + (string_buff[16]*0.001);;

latitude = (lt[1]*1000.0)+(lt[2]*100.0)+(lt[3]*10.0)+(lt[4]);
latitude_d = (lt[6]*1000.0)+(lt[7]*100.0)+(lt[8]*10.0)+(lt[9]);

act_lat = ((lt[1]*10.0)+(lt[2])) + ((
(lt[3]*10.0)+(lt[4])+(lt[6]*0.1)+(lt[7]*0.01)+(lt[8]*0.001)+(lt[9]*0.0001))/60.0 );

lt_dir = string_buff[30];
if(lt_dir==83 || lt_dir==115) act_lat = 0.0 - act_lat;
CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
50


longitude = (ln[1]*10000.0)+(ln[2]*1000.0)+(ln[3]*100.0)+(ln[4]*10.0)+(ln[5]);
longitude_d = (ln[7]*1000.0)+(ln[8]*100.0)+(ln[9]*10.0)+(ln[10]);

act_long = ((ln[1]*100.0)+(ln[2]*10.0)+(ln[3])) + ( (
(ln[4]*10.0)+(ln[5])+(ln[7]*0.1)+(ln[8]*0.01)+(ln[9]*0.001)+(ln[10]*0.0001) )/60.0 );

ln_dir = string_buff[43];
if(ln_dir==87 || ln_dir==119) act_long = 0.0 - act_long;

comma=0;
dt_st=0;

for(lp1=0;lp1<=15;lp1++)
{
if(string_buff[lp1+43] == 44)
{
comma++;
if(comma==1) sp_st = lp1+43+1;
if(comma==2) hd_st = lp1+43+1;
if(comma==3) dt_st = lp1+43+1;
}
if(string_buff[lp1+43] == 46)
{
if(comma==1) sp_dec = lp1+43;
if(comma==2) hd_dec = lp1+43;
}
}
date_dd = ((string_buff[dt_st]-48)*10)+(string_buff[dt_st+1]-48);
CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
51

date_mm = ((string_buff[dt_st+2]-48)*10)+(string_buff[dt_st+3]-48);
date_yy = ((string_buff[dt_st+4]-48)*10)+(string_buff[dt_st+5]-48);

speed=0;
for(lp1=sp_st;lp1<sp_dec;lp1++)
{
speed=speed*10;
speed = speed+(string_buff[lp1]-48);
}
speed = speed + ((string_buff[sp_dec+1]-48)*0.1) + ((string_buff[sp_dec+2]-48)*0.01);

head=0;
for(lp1=hd_st;lp1<hd_dec;lp1++)
{
head=head*10;
head = head+(string_buff[lp1]-48);
}
head = head + ((string_buff[hd_dec+1]-48)*0.1) + ((string_buff[hd_dec+2]-48)*0.01);
}
else
{
data_valid=0;
}
}

void SendString()
{
printf("AT\r");
CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
52


printf("AT+CMGF=1\r");

printf("AT+CMGS=\"+91%s\"\r",phstr);
delay(1000);


if(emm_data_send==0)
{
printf("EMERGENCY\n");
}
printf("Latitude:%09.6f\n",act_lat);
printf("Longitude:%010.6f\n",act_long);
printf("Date: %02d/%02d/%02d\n",date_dd,date_mm,date_yy);
printf("Time: %02d:%02d:%02d\n",time_hh,time_mm,time_ss);
printf("Speed: %04.2f\n",speed);
printf("Head: %05.1f \x1A",head);

check_ok=1;
se_outbuff_write(strlen(string_out));
}


void SendInitialize()
{
printf("AT\r");

printf("AT\r");
CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
53


printf("AT+CMGF=1\r");

printf("AT+CNMI=2,2,0,0,0\r");
check_ok=1;
}


















CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
54



CHAPTER 6: SYATEM TESTING

6.1 TEST CASE
First we check the system is fitted in car properly or not.
Then, front camera is fitted and we will check whether camera is working or not. The video captured by
camera is recorded and stored in memory storage.
Now, there is GPS and GSM module. GPS will show the location of the car and GSM module is used to
send message when accident occurred. And it is also used for security system. Suppose a different person
start a car then a message will be sent to the owner of the car.
We have tested the whole system by planning mock accident. In case of accident,the information (Location
and details) of car will be sent to emergency centre.



6.2 TEST PLAN
If accident happened than the ambulance reach their that take long time and dont get proper information
from this system a massage will be send to the emergency centre and easily ambulance can reach there. We
test this system through three different cases which is tested above in test.







CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
55



CHAPTER 7: CONCLUSION AND FATURE PLAN

7.1 CONCLUSION

With this technology, the details of the car like speed, location of the vehicle etc, at a certain given time
can be recorded. This system is easy to implement and reduce dead percentage of people with the
accident occur using the wireless communication technologies.
The driving behaviors that are monitored are ones which influence the likelihood of the driver crashing
(for example, speed) or the severity of the crash (for example, seat belt use). These are proxies for crash
and injury risk, and monitoring a drivers propensity to indulge in such behaviors enables the technology
to calculate a risk rating for that driver. It also, potentially, enables measures to be identified that may
reduce the drivers crash risk.
With the help of GPS located the location of accident area, where accident is occurred and reduce death
percentage of people with providing fast services like ambulance.


7.2 FATURE PLAN
We can enhance the present system to check other parameters like fuel level, tire pressure and working
of headlights before starting the vehicle.
Another useful add-on to the present system could be cameras on front and backsides which keep
recording live images and storing them in memory
We get to learn various aspects of digital electronics. This gives us complete knowledge of designing
microcontroller based system and developing embedded software. This principle can be utilized for
Vigilance, security, scrutiny of various kinds of transportation means Sense Cam: this badge-sized
wearable camera reportedly captures up to 2000 VGA images within a 12-hour day and stores it in a
128Mbyte flash memory. So, most every scribbled note and every promised meeting would be recorded
for to look at later
In the future we can integrate this device with alcohol detector circuit. With the help of this device car
cannot be start when alcohol is detected so that number of accident can be reduce
CAR BLACK BOX EVIDENCE COLLECTING SYSTEM
56



CHAPTER 8: REFERANCE


G. Hayes, F. Blosser, "Motor Vehicle Crashes Claim More than a Million Accident Position Lives
Worldwide", CDC Injury Center Media Relations, Press Release, At the Ajkident.
http://www.airbagcrash.com (General Motor Event Data Recorders)
Thomas K. Kowalick, "Black Boxes: Event Data Recorders", MICAH, summer 2005.
K. Kowalick, "Black Boxes: Event Data Recorder Rulemaking for Automobiles", MICAH.
Thomas K. Kowalick, "Fatal Exit: The Automotive Black Box Debate", Wiley, IEEE Press.
Available [online]: www.alldatasheet.com
M. A. Mazidi, J. C. Mazidi, R. D. Mckinaly, the 8051 Microcontroller and Embedded Systems, Pearson
Education.
http://www.keil.com
http://www.microcontroller.com/EmbeddedSystems.asp?c=11
http://www.scienceprog.com/arm7-lpc2129-mini-board/

Você também pode gostar