Академический Документы
Профессиональный Документы
Культура Документы
PROJECT REPORT
SUBMITTED BY
ADHIL P P (GCAOEAE002)
ALAKA K (GCAOEAE003)
BILAL Y (GCAOEAE015)
PREJITH R (GCAOEAE036)
RESHMA RAJ D (GCAOEAE039)
GUIDED BY,
DR. MEENAKSHI K
Assistant Professor
MARCH - 2018
CERTIFICATE
GOVERNMENT ENGINEERING
COLLEGE
KOZHIKODE
Place:
Date:
Car black box
ACKNOWLEDGEMENT
At the outset we would like to express our sincere gratitude to God Almighty for his
abundant grace and guidance without which this project would not have been
successfully completed. We would like to thank Prof. Dr. Celine Mary Stuart (Head
of Department, Dept. of AE&I) for her encouragement. Our earnest thanks to our
project coordinators Dr.Agnes Jacob(Associate Professor, Dept. of AE&I) and
Prof.Sreeraj S (Assistant Professor, Dept. of AE&I) for their timely advice and
support that give us confidence to complete the project successfully. Our earnest
thanks to our project guide Dr.Meenakshy K (Assistant Professor, Dept. of AE&I)
for her timely advice and support that give us confidence to complete this venture
successfully. Our sincere thanks to all other faculties of Applied Electronics and
Instrumentation Department, for their co-operation and guidance. We convey our
honest gratitude and thanks to all our classmates and friends for being at hand when
needed them the most.
I
Car black box
ABSTRACT
Car black box is a device to record driving history which can be used for car forensics
in case of car accident or related crimes. It records driving data, visual data, collision
data before the accident so that it can be used to analyze the accident easily and to
settle many disputes related to car accidents such as crash litigation and insurance
settlement. It can be used to not only reconstruct what happened before an accident by
Insurance agents and police but improve vehicle design, roadway design and
emergency medical service by automakers, government and hospital. It consists of
data collection devices for collecting the information about car’s status and driver’s
action, a non-volatile memory device for recording, a microprocessor for controlling
the unit. When two cars collide, the sensor detects an accident and stores information
regarding the car's speed, whether the seatbelts are fastened, the status of indicators
and headlights and whether the driver was drunk or not. The number plate of the
nearby vehicle is extracted from the captured images when accident was detected and
the data is stored.
II
Car black box
CONTENTS
ACKNOWLEDGEMENT i
ABSTRACT ii
LIST OF FIGURES iv
CHAPTER 1
1.1 INTRODUCTION 1
1.2 PROJECT MOTIVATION 2
1.3 PROBLEM STATEMENT 2
1.4 PROJECT OBJECTIVES 2
CHAPTER 2
2.1 LITERARY SURVEY 3
CHAPTER 3
3.1 INTRODUCTION 5
3.2 PROPOSED SYSTEM 5
3.3 RASPBERRY PI 3 5
3.4 BLOCK DIAGRAM 7
3.5 HARDWARE DETAILS 9
3.6 SOFTWARE REQUIREMENTS 19
3.7 FLOW CHART 21
CHAPTER 4
CONCLUSION 26
REFERENCES 27
APPENDIX 28
III
Car black box
LIST OF FIGURES
1. POWER 6
2. USB CONNECTOR 6
3. RASPBERRY PI 10
4. ARDUINO 11
5. HALL SENSOR 13
6. LM 35 15
7. MQ3 17
8. ULTRASONIC SENSOR 18
9. WEB CAMERA 19
IV
Car black box
CHAPTER 1
INTRODUCTION
1.1 INTRODUCTION
The term black box refers to collection of several different recording devices used in
transportation: the flight recorders (flight data recorder and cockpit voice recorder) in
aircraft, the event recorder in railway diesel locomotives, the event data recorder in
automobiles and the voyage data recorder in ships. If an airplane crash, there are
many unanswered questions as to what brought the plane down. Investigators turn to
the plane’s flight data recorder (FDR) and cockpit voice recorder (CVR) also known
as “BLACK BOXES” for answers.
Like Black Box of airplane, Car Black Box (known as Event Data Recorder) is used
to record information related to accidents. Car black box is a device to record driving
history which can be used for car forensics in case of car accident or related crimes. It
records driving data, visual data, collision data before the accident so that it can be
used to analyze the accident easily and to settle many disputes related to car accidents
such as crash litigation and insurance settlement.
It can be used to not only reconstruct what happened before an accident by Insurance
agents and police but improve vehicle design, roadway design and emergency medical
service by automakers, government and hospital. It consists of data collection devices
for collecting the information about car’s status and driver’s action, a non-volatile
memory device for recording, a microprocessor for controlling the unit.
When two cars collide, the sensor detects an accident and stores information
regarding the car's speed, whether the seat belts are fastened, the status of indicators
and headlights and whether the driver was drunk or not. The number plate of the
nearby vehicle is extracted from the captured images when accident was detected and
the data is stored.
Car black boxes are also ideal solution for young drivers below the age of 25 who are
at increased risk of getting involved into an accident. This small device that is
installed in the vehicle records several key actions that have been made by the driver
before the collision including the speed of engine, accelerating, braking, turning, etc.
which typically reveals enough information. Also, with a car black box that includes a
camera, there will be no longer any word against the police while insurance claims
will be approved a lot faster.
ii. The causes of car accidents are not that difficult to investigate as plane crashes but
there are cases that are very difficult to solve due to contradictory stories of the
drivers or/and absence of witnesses of the accident. And in these cases, a car black
box can be crucial piece of evidence for the investigators as well as the insurance
companies.
ii. The various sensors are controlled using the microcontroller ATmega 328.
To design a Black Box, which will keep a record of the events that took place
just before the accident.
To save the collected data for a predetermined time for verification.
CHAPTER 2
LITERATURE SURVEY
This small device that is installed in the vehicle, under the seat, behind the dashboard
or even better on the windshield records several key actions that have been made by
the driver before the collision including the speed of engine, accelerating, braking,
turning, etc. which typically reveals enough information. Also, with a car black box
that includes a camera there will be no longer any word against the police while
insurance claims will be approved a lot faster.
Insurance companies have shown a great interest in widespread use of car black boxes
because the data obtained from the device reveal a great deal about the drivers. In fact,
some insurance companies have even offered a discount for drivers who have
installed a car black box because it enables them to evaluate which drivers that are
less likely to get involved into an accident and lower their premiums, while increasing
the rates to risky drivers. This also means that the device can help save money for car
insurance if we drive safely.
In addition to insurance companies and car accident investigators, car black boxes are
also very useful for car rentals because any disputes about car damage can be easily
resolved by reviewing the data from the device. These are typically stored on a secure
digital (SD) card, while all accidents are stored automatically. However, this is good
news for the customers as well because they will no longer be charged for car damage
they have not done.
Car black boxes are also ideal solution for young drivers below the age of 25 who are
at increased risk of getting involved into an accident. Studies have shown that young
drivers are involved in about 40% of all accidents. With a car black box, parents can
easily monitor their child's driving style and habits over the computer.
CHAPTER 3
METHODOLGY
3.1 INTRODUCTION
The car black box as a whole is a combination of several modules each provides some
necessary information to be stored. The modules are constructed using suitable
sensors and the sensor readings are interfaced with the processor so as to perform the
necessary action depending on the sensor readings. It also has a camera section to
capture images and extract data from the images.
Speed sensor
Temperature sensor
Gas sensor
Light status sensor
Seat belt status sensor
Webcam
All sensors are interfaced to the processor and the data are recorded to the memory.
RTC module is used to keep track of time and date of the events. Cameras placed at
different positions of the vehicle are used to capture pictures. When collision occurs
previous images are processed to localize the number plate. The data is stored in the
raspberry pi.The datas are real time monitored and saved as a txt file.
3.3 RASPBERRY PI 3
Latest version of the Raspberry Pi computer. The Pi isn't like the typical machine, in
its cheapest form it doesn't have a case, and is simply a credit-card sized electronic
board -- of the type you might find inside a PC or laptop but much smaller.It Runs at
1.2 GHz, has an upgraded power system, four USB ports and extendable 'naked
board' design.It comes with on-board wireless LAN and Bluetooth, 50 percent more
processing power, and a Quad Core 64bit processor.
3.3.1 POWER
The Raspberry pi 3 uses a micro USB power connector, as used by most modern
smart phones.The PSU (Power supply Unit) must supply 5V and at least 700mA (0.7
A). Most plug in PSUs will be marked with their rating.
Fig 1 Power
3.3.2 DISPLAY
Your display will depend on what you have available to you. Most digital TVs will
have an HDMI connection and newer LCD monitors will often have DVI connections
(you will need to use an HDMI to DVI adaptor).
The each block has some particular information to be provided to the BBB for
creating the database with the essential information and provide the same to the
authorized user.
Speed measurement
It is done by using Hall Effect sensor. To measure speed (e.g. the angular speed of a
turning shaft) a magnet is attached to the shaft, and then the sensor is placed near this
moving magnet. The sensor produces a pulse, each time the magnet comes near it,
once every revolution of the shaft. The pulses are fed to some sort of counter, and the
number of pulses in a specific time interval is counted.
Temperature sensor
It is used to measure the temperature inside the engine. It helps to find the engine
damage if any.
It indicates whether seat belts are fastened. This is ensured by checking if the button
connected is pressed or not.
The status of indicators can be checked using a three way switch with each position
corresponding to the three required status of head light viz bright, dim, dark.
Alcohol sensor
Web cam
Camera is used to capture pictures. When collision occurs previous images are
processed to localize the number plate.
Raspberry pi
generates the necessary controls to manage the working of the user interface as well
as the flow control and database management mechanisms.
Arduino
Power supply
The camera needs no external power supply when connected to the central processor.
The various sensing circuits are powered from the power supply we have designed
which consists of a 9V battery from which the 5V required for the working of the
sensors and ATmega 328P is obtained through a 7805 voltage regulator.
2. Arduino
4. Temperature sensor(LM35)
5. Seatbelt sensor(switch)
7. Gas sensor(MQ3)
8. Ultrasonic sensor
9. Webcam
3.5.1 Raspberry pi
does not include peripherals (such as keyboards, mice and cases). However, some
accessories have been included in several official and unofficial bundles.
Performance
Raspberry Pi 2 V1.1 included a quad-core Cortex-A7 CPU running at 900 MHz and 1
GB RAM. It was described as 4–6 times more powerful than its predecessor. The
GPU was identical to the original. In parallelised benchmarks, the Raspberry Pi 2
V1.1 could be up to 14 times faster than a Raspberry Pi 1 Model B+.
While operating at 700 MHz by default, the first generation Raspberry Pi provided a
real-world performance roughly equivalent to 0.041 GFLOPS.On the CPU level the
performance is similar to a 300 MHz Pentium II of 1997–99. The GPU provides 1
Gpixel/s or 1.5 Gtexel/s of graphics processing or 24 GFLOPS of general purpose
computing performance. The graphical capabilities of the Raspberry Pi are roughly
equivalent to the performance of the Xbox of 2001.
Fig 3 Raspberry PI
Car black box
3.5.2 ARDUINO
Fig 4 ARDUINO
The Arduino platform has become quite popular with people just starting out with
electronics, and for good reason. Unlike most previous programmable circuit boards,
the Arduino does not need a separate piece of hardware (called a programmer) in
order to load new code onto the board – you can simply use a USB cable.
Additionally, the Arduino IDE uses a simplified version of C++, making it easier to
learn to program. Finally, Arduino provides a standard form factor that breaks out the
functions of the micro-controller into a more accessible package.
FEATURES
It is an easy USB interface. This allows interface with USB as this is like a
serial device.
The chip on the board plugs straight into your USB port and supports on your
computer as a virtual serial port. The benefit of this setup is that serial
Car black box
A Hall Effect sensor is a transducer that varies its output voltage in response to a
magnetic field. Hall Effect sensors are used for proximity switching, positioning,
speed detection, and current sensing applications.
In its simplest form, the sensor operates as an analog transducer, directly returning a
voltage. With a known magnetic field, its distance from the Hall plate can be
determined. Using groups of sensors, the relative position of the magnet can be
deduced.
Frequently, a Hall sensor is combined with circuitry that allows the device to act in a
digital (on/off) mode, and may be called a switch in this configuration. Commonly
seen in industrial applications such as the pictured pneumatic cylinder, they are also
used in consumer equipment; for example some computer printers use them to detect
missing paper and open covers. When high reliability is required, they are used in
keyboards.
Hall sensors are commonly used to time the speed of wheels and shafts, such as for
internal combustion engine ignition timing, tachometers and anti-lock braking
systems. They are used in brushless DC electric motors to detect the position of the
permanent magnet. In the pictured wheel with two equally spaced magnets, the
voltage from the sensor will peak twice for each revolution. This arrangement is
commonly used to regulate the speed of disk drives.
Working principle
When a beam of charged particles passes through a magnetic field, forces act on the
particles and the beam is deflected from its straight line path. The beam of charged
particles refers to the electrons flowing through a conductor. When a current carrying
conductor is placed in a magnetic field perpendicular to the path of the electrons, the
electrons are deflected from its straight line path. Therefore, one side of the conductor
Car black box
becomes negative portion and the other side becomes positive one. The transverse
voltage is measured and is known as Hall Voltage.
The charge separation continues until the force on the charged particles from the
electric field balances the force produced by magnetic field. If the current is constant,
then the Hall voltage is a measure of the magnetic flux density. There are two forms
of Hall Effect Sensors. One is linear where the output voltage linearly varies with the
magnetic flux density. The other is known as threshold where there is a sharp drop of
output voltage at a particular magnetic flux density.
When no magnetic field is applied to the current carrying thin semiconductor material
(hall element) the hall voltage(Vh) is zero. When an external magnetic field is applied
to the current carrying hall element perpendicular to the current flow a Lorentz force
acts on the current due to which a voltage called hall voltage(Vh) is generated
perpendicular to both the current and the magnetic field. This voltage is very small (in
uV) and needs amplification.
The LM35 is an integrated circuit sensor that can be used to measure temperature with
an electrical output proportional to the temperature (in °C).It can measure temperature
more accurately than a using a thermistor. The sensor circuitry is sealed and not
subject to oxidation.The LM35 generates a higher output voltage than thermocouples
Car black box
and may not require that the output voltage be amplified.The LM35 has an output
voltage that is proportional to the Celsius temperature.The scale factor is .01V/°C.
Features
Fig 6 LM 35
The function of Light status checking is done by a three way mechanical switch.
Accordingly there are three conditions for headlight viz bright, dim and dark. These
status are indicated by the three positions of the switch.
This is an alcohol sensor from futurelec, named MQ-3, which detects ethanol in the
air. It is one of the straightforward gas sensors so it works almost the same way with
other gas sensors. It costs $6.90.Typically, it is used as part of the breathanalyzers or
breath testers for the detection of ethanol in the human breath.
it has 6pins, the cover and the body. Even though it has 6 pins, we can use only 4 of
them. Two of them are for the heating system, which are called H and the other 2 are
for connecting power and ground, which are called A and B.
If we look at the inside of the sensor, we will find the little tube. Basically, this tube is
a heating system that is made of aluminum oxide and tin dioxide and inside of it there
are heater coils, which practically produce the heat. And we can also find 6 pins. 2
pins that are called Pin H are connected to the heater coils and the other ones are
connected to the tube.
The core system is the cube. Basically, it is an Alumina tube cover by SnO2, which is
tin dioxide. And between them there is an Aurum electrode. Basically, the alumina
tube and the coils are the heating system. If coil is heated SnO2 ceramics will become
the semi - conductor, so there are more movable electrons, which means that it is
ready to make more current flow.
Then, when the alcohol molecules in the air meet the electrode that is between
alumina and tin dioxide, ethanol burns into acetic acid then more current is produced.
So the more alcohol molecules there are, the more current we will get. Because of this
current change, we get the different values from the sensor.
Fig 7 MQ3
Ultrasonic sensors (also known as transceivers when they both send and receive, but
more generally called transducers) work on a principle similar to radar or sonar,
which evaluate attributes of a target by interpreting the echoes from radio or sound
waves respectively. Active ultrasonic sensors generate high frequency sound waves
and evaluate the echo which is received back by the sensor, measuring the time
interval between sending the signal and receiving the echo to determine the distance
to an object. Passive ultrasonic sensors are basically microphones that detect
ultrasonic noise that is present under certain conditions.
FEATURES
3.5.9 WEBCAM
Webcam is a video came that feeds or streams its image in real time to or through a
computer to computer network. When "captured" by the computer, the video stream
may be saved, viewed or sent on to other networks via systems such as the internet,
and email as an attachment. When sent to a remote location, the video stream may be
saved, viewed or on sent there. Unlike an IP camera (which connects using Ethernet
or Wi-Fi), a webcam is generally connected by a USB cable, or similar cable, or built
into computer hardware, such as laptops.
The camera used is high resolution Logitech C270 camera. It is made to capture the
image of nearby vehicles and the images are stored for some time and overwritten at a
latter point of time when new images are captured. On occurrence of an accident, the
just before captured images are processed for number plate extraction.
Car black box
FEATURES
FEATURES
this software, read it's source code, make changes to it, use pieces of it in new free
programs, and that you know you can do these things. FLOSS is based on the concept
of a community which shares knowledge. This is one of the reasons why Python is so
good - it has been created and is constantly improved by a community who just want
to see a better Python.
High-level Language: When you write programs in Python, you never need to
bother about the low-level details such as managing the memory used by your
program, etc.
Portable: Due to its open-source nature, Python has been ported (i.e. changed
to make it work on) to many platforms. All your Python programs can work
on any of these platforms without requiring any changes at all if you are
careful enough to avoid any system-dependent features. You can use Python
on Linux, Windows, FreeBSD, Macintosh, Solaris, OS/2, Amiga, AROS,
AS/400, BeOS, OS/390, z/OS, Palm OS, QNX, VMS, Psion, Acorn RISC OS,
VxWorks, PlayStation, Sharp Zaurus, Windows CE and even PocketPC !
Extensible: If you need a critical piece of code to run very fast or want to have
some piece of algorithm not to be open, you can code that part of your
program in C or C++ and then use them from your Python program.
Embeddable: You can embed Python within your C/C++ programs to give
'scripting' capabilities for your program's users.
Extensive Libraries: The Python Standard Library is huge indeed. It can help
you do various things involving regular expressions, documentation
generation, unit testing, threading, databases, web browsers, CGI, ftp, email,
XML, XML-RPC, HTML, WAV files, cryptography, GUI (graphical user
interfaces), Tk, and other system-dependent stuff.
text editor and are saved with the file extension .ino. The editor has features for
cutting/pasting and for searching/replacing text. The message area gives feedback
while saving and exporting and also displays errors. The console displays text output
by the Arduino Software (IDE), including complete error messages and other
information. The bottom righthand corner of the window displays the configured
board and serial port. The toolbar buttons allow you to verify and upload programs,
create, open, and save sketches, and open the serial monitor.
START
SEAT BELT=”YES”
If
NO ACTION
DISTANCE>
20
“TAKE PHOTO”
ALCOHOL SENSOR
If SENSOR
“NON ALCOHOLIC”
>>!VALUE>25
0
“ALCOHOLIC”
HALL SENSOR
TEMPERATURE SENSOR
IF
BUTTONSTATE3==1 “OFF”
IF
“DIM”
BUTTONSTATE1==1
“BRIGHT”
CONCATENATE THE
PROCESSED DATA OF
SENSOR OUTPUTS
STOP
Raspberry Pi side
START
IMPORT TIME
If YES
RUN THE
COMMAND TO
TAKE PHOTO
TAKE PHOTO
APPEARS
NO
SAVE THE FILE
AS .jpg
STOP
CHAPTER 4
CONCLUSION
Black box refers to collection of several different recording devices used in transportation: the
flight recorders (flight data recorder and cockpit voice recorder) in aircraft, the event recorder in
railway diesel locomotives, the event data recorder in automobiles and the voyage data recorder
in ships. Car black box is an Event Data Recorder. When two cars collide, the sensor detects an
accident and stores information regarding the car's speed, whether the seatbelts are fastened, the
status of indicators and headlights and whether the driver was drunk before a collision. The
number plate of the nearby vehicle is extracted from the captured images when accident was
detected and the data is stored.
Just like black boxes in aircrafts help determine the cause of an airplane accident, car black
boxes help determine what has caused a car accident and the events that led to collision. They are
particularly valuable when no witnesses are present at the scene of the accident and when each
driver has his/her own version of the events. The benefits of car black boxes for reconstruction of
the events before accident are also emphasized by accident investigators, the police and
increasing number of insurance companies which now have a powerful tool to determine
whether the claim is justified or not. The benefits of a car black box outweigh the drawbacks in
virtually all aspects. In addition to insurance companies and car accident investigators, car black
boxes are also very useful for car rentals because any disputes about car damage can be easily
resolved by reviewing the data from the device. Car black boxes are also ideal solution for young
drivers below the age of 25 who are at increased risk of getting involved into an accident.
The system proposed can be further expanded in future to accommodate more number of
functionalities. By incorporating GPS module, the location of the vehicle can be traced and using
Google map, they path traversed can be routed. Using GSM module, the black box can be
designed so as to send a message to the authority in case of an accident and with the help for
GPS location of vehicle can also be provided with the alert message.
REFERENCES
INDIA,” Vehicle Accident Automatic Detection and Remote Alarm Device”, International
Journal of Reconfigurable and Embedded Systems (IJRES) Vol. 1, No. 2, July 2012, pp.
49~54 ISSN: 2089-4864 _ 49 Journal homepage:
http://iaesjournal.com/online/index.php/IJRES
https://learn.adafruit.com/category/raspberry
http://en.wikipedia.org
htttp://github.com
electrical4u.com
Arduino.forum
APPENDIX
PROGRAM
//TEMP SENSOR
int VA1;
inttempPin = A1;
//HALL SENSOR
unsignedint rpm;
//SEAT BELT
//ultrasonic
constinttrigPin = 9;
constintechoPin = 10;
// defines variables
long duration;
int distance;
//toggle
constint buttonpin2 = 5;
int buttonstate2 = 0;
//one way
int state = 0;
//alcohol
float value;
int limit;
void setup()
Serial.begin(9600);
//HALL SENSOR
attachInterrupt(0, magnet_detect, RISING); //Initialize the intterrupt pin (Arduino digital pin 2)
half_revolutions = 0;
rpm = 0;
timeold = 0;
//SEAT BELT
pinMode(buttonPin, INPUT);
//ultra
//toggle
pinMode(buttonpin1, INPUT);
pinMode(buttonpin2, INPUT);
void loop()
//TEMPRATURE SENSOR
VA1 = analogRead(tempPin);
floatcel = mv / 10;
Serial.println();
Serial.print("TEMPRATURE = ");
Serial.print(cel);
Serial.print("*C");
delay(1000);
//SEAT BELT
state = digitalRead(buttonPin);
if (state == HIGH)
Serial.print("SEATBELT FASTENED");
else
Serial.print("SEATBELT UNFASTENED");
//HALL SENSOR
if (half_revolutions>= 1)
timeold = millis();
half_revolutions = 0;
Serial.print(rpm);
//ultra
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
// Reads the echoPin, returns the sound wave travel time in microseconds
Serial.print("Distance: ");
Serial.print(distance);
Serial.print("Take photo");
//toggle
buttonstate1 = digitalRead(buttonpin1);
buttonstate2 = digitalRead(buttonpin2);
if (buttonstate1 == HIGH)
Serial.print("off");
Serial.print("bright");
else
Serial.println("dim");
value=analogRead(A0);
Serial.print("alcohol value:");
if (value<150)
Serial.print("safe");
delay(100);
if (value>250)
Serial.print("alcoholic") ;
Serial.print(value);
half_revolutions++;
Raspberry Pi side
import serial
import time
import os
ser=serial.Serial("/dev/ttyACM0",9600)
ser.baudrate=9600
while True:
read_ser=ser.readline()
print(read_ser)
f=open('carblackbox.txt','a')
f.write(str(read_ser))
f.close
m=read_ser[0];
if m==84:
os.system('fswebcam /home/pi/webcam/%H%M%S.jpg')
DATASHEETS