0% found this document useful (0 votes)
33 views21 pages

Major Project Rectified

The document describes the development of a vehicle safety system using an embedded system to monitor sensors for accidents, intoxication, and smoke and send SMS alerts with location. The system was tested individually and during driving to ensure it could accurately detect anomalies and respond as intended. An embedded system provides benefits like cost-effectiveness, flexibility, and reliability for vehicle safety applications.

Uploaded by

jainvipin068
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views21 pages

Major Project Rectified

The document describes the development of a vehicle safety system using an embedded system to monitor sensors for accidents, intoxication, and smoke and send SMS alerts with location. The system was tested individually and during driving to ensure it could accurately detect anomalies and respond as intended. An embedded system provides benefits like cost-effectiveness, flexibility, and reliability for vehicle safety applications.

Uploaded by

jainvipin068
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 21

CHAPTER – 1

INTRODUCTION

Vehicle safety is a major concern worldwide, with millions of accidents and fatalities occurring
each year. A significant number of these accidents are caused by human factors such as
intoxication, fatigue, and distracted driving. Vehicle safety systems can help to reduce the risk of
accidents by detecting and responding to hazards.

This project report describes the development and testing of a vehicle safety system using an
embedded system. The system is designed to monitor the vehicle for accidents, alcohol
intoxication, and smoke, and to send an SMS alert with the vehicle's location to a predefined
phone number in case of an emergency.

The system works by monitoring the sensors for changes in their readings. If any of the sensors
detect an anomaly, the system will trigger the buzzer, send an SMS alert, and stop the engine.
The GPS module is used to track the vehicle's location so that the SMS alert can include the
vehicle's coordinates. The GSM module is used to send the SMS alert. The relay is used to stop
the engine. The system was tested by triggering each sensor individually and verifying that the
system responded correctly. The system was also tested by driving the vehicle in different
conditions to ensure that it was able to detect anomalies accurately.

The vehicle safety system can help to prevent accidents and save lives by alerting the authorities
and loved ones in case of an emergency. It can also help to deter theft by stopping the engine if
the vehicle is tampered with.

There are several benefits to using an embedded system for vehicle safety:

 Cost-effectiveness: Embedded systems are relatively inexpensive to develop and produce,


making them a viable option for individuals and businesses alike.
 Flexibility: Embedded systems can be customized to meet the specific needs of the user. For
example, the system can be programmed to detect additional hazards or to take different
actions in response to an anomaly.
 Reliability: Embedded systems are designed to be reliable and operate in harsh
environments. This makes them ideal for use in vehicles, which are exposed to a variety of
environmental conditions.

1
CHAPTER-2

COMPONENTS USED

For the completion of this project, we need these following components-

1. Arduino Uno
2. GPS Module (e.g., Neo-6M)
3. GSM Module (e.g., SIM900A)
4. Vibration Sensor
5. Smoke Detector Module
6. Alcohol Detector Module
7. 5V Relay
8. Power Supply
9. Connecting Wires

2.1 Arduino UNO-

The Arduino UNO is a standard board of Arduino. Here UNO means 'one' in Italian. It was named
as UNO to label the first release of Arduino Software. It was also the first USB board released by
Arduino. It is considered as the powerful board used in various projects. Arduino.cc developed the
Arduino UNO board.

Arduino UNO is based on an ATmega328P microcontroller. It is easy to use compared to other


boards, such as the Arduino Mega board, etc. The board consists of digital and analog Input/Output
pins (I/O), shields, and other circuits.

The Arduino UNO includes 6 analog pin inputs, 14 digital pins, a USB connector, a power jack, and
an ICSP (In-Circuit Serial Programming) header. It is programmed based on IDE, which stands for
Integrated Development Environment. It can run on both online and offline platforms.
The Arduino board is shown below:

2
Fig. 2.1 – Arduino Board

The components of Arduino UNO board are shown below:

Fig.2.2: Components of Arduino Board

3
Components of Arduino Board:

Let’s discuss each component in detail.

 ATmega328 Microcontroller- It is single chip Microcontroller of the Atmel family. The


processor code inside it is of 8-bit. It combines Memory (SRAM, EEPROM and Flash),
Analog to digital converter, SPI serial ports, I/O lines, registers, timer, external and internal
interrupts, and oscillator.

 ICSP pin - The In-Circuit Serial Programming pin allows the user to program using the
firmware of the Arduino board.
 Power LED Indicator- The ON status of LED shows the power is activated. When the
power is OFF, the LED will not light up.
 Digital I/O pins- The digital pins have the value HIGH or LOW. The pins numbered from
D0 to D13 are digital pins.
 TX and RX LED's- The successful flow of data is represented by the lighting of these
LED's.
 AREF- The Analog Reference (AREF) pin is used to feed a reference voltage to the Arduino
UNO board from the external power supply.
 Reset button- It is used to add a Reset button to the connection.
 USB- It allows the board to connect to the computer. It is essential for the programming of
the Arduino UNO board.
 Crystal Oscillator- The Crystal oscillator has a frequency of 16MHz, which makes the
Arduino UNO a powerful board.
 Voltage Regulator- The voltage regulator converts the input voltage to 5V.
 GND- Ground pins. The ground pin acts as a pin with zero voltage.
 Vin- It is the input voltage.
 Analog Pins- The pins numbered from A0 to A5 are analog pins. The function of Analog
pins is to read the analog sensor used in the connection. It can also act as GPIO (General
Purpose Input Output) pins.

4
Fig.2.3- Pins Configuration of Arduino

Technical Specifications:

The technical specifications of the Arduino UNO are listed below:

 There are 20 Input/Output pins present on the Arduino UNO board. These 20 pins include 6
PWM pins, 6 analog pins, and 8 digital I/O pins.
 The PWM pins are Pulse Width Modulation capable pins.
 The crystal oscillator present in Arduino UNO comes with a frequency of 16MHz.
 It also has an Arduino integrated Wi-Fi module. Such Arduino UNO board is based on the
Integrated Wi-Fi ESP8266 Module and ATmega328P microcontroller.
 The input voltage of the UNO board varies from 7V to 20V.
 Arduino UNO automatically draws power from the external power supply. It can also draw
power from the USB.

2.2 GPS Module (Neo-6M)

The Neo-6M GPS module is a popular and reliable Global Positioning System (GPS) receiver
widely used in various applications, from navigation devices to IoT

5
(Internet of Things) projects. Developed by U-blox, a leading provider of positioning and wireless
communication technologies, the Neo-6M module provides accurate positioning information to
devices that require location data. It can track up to 22 satellites over 50 channels and achieve the
industry’s highest level of tracking sensitivity i.e., -161 dB, while consuming only 45 mA current.
Unlike other GPS modules, it can perform 5 location updates in a second with 2.5m horizontal
position accuracy. The U-blox 6 positioning engine also has a Time-To- First-Fix (TTFF) of less
than 1 second.

Fig. 2.4- GPS Module

The NEO-6M GPS module has four pins:


GND, TxD, RxD, and Vcc. The TxD and RxD pins are used to communicate with the
microcontroller.

The NEO-6M GPS module has five major parts on the board, the first major part is the NEO-6M
GPS chip in the heart of the PCB. Next, we have a rechargeable battery and a serial EEPROM
module. An EEPROM together with a battery helps retain the clock data, latest position data (GNSS
orbit data), and module configuration but it’s not meant for permanent data storage. Without the
battery, the GPS always cold-starts so the initial GPS lock takes more time. The battery is
automatically charged when power is applied and maintains data for up to two weeks without power.
Next, we have our LDO, because of the onboard LDO, the module can be powered from a 5V
supply. Finally, we have our UFL connector where we need to connect an external antenna for the
GPS to properly work.

6
Specifications:
Receiver Type 50 channels, GPS L1(1575.42Mhz)

Horizontal Position Accuracy 2.5m

Navigation Update Rate 1HZ (5Hz maximum)

Capture Time Cool start: 27sHot start: 1s

Navigation Sensitivity -161dBm

Communication Protocol NMEA, UBX Binary, RTCM

Serial Baud Rate 4800-230400 (default 9600)

Operating Temperature -40°C ~ 85°C

Operating Voltage 2.7V ~ 3.6V

Operating Current 45mA

TXD/RXD Impedance 510Ω

2.3 GSM Module (SIM900A)-

SIM900A GSM Module is the smallest and cheapest module for GPRS/GSM communication. It
is common with Arduino and microcontroller in most of embedded application. The module
offers GPRS/GSM technology for communication with the uses of a mobile sim. It uses a 900
and 1800MHz frequency band and allows users to receive/send mobile calls and SMS. The
keypad and display interface allows the developers to make the customize application with it.
Furthermore, it also has modes, command mode and data mode. In every country the
GPRS/GSM and different protocols/frequencies to operate. Command mode helps the developers
to change the default setting according to their requirements.
The Module SIM900A looks like a single chip but it has a bunch of features that can help to
build almost many commercial applications. Although, there are a total of 68 pins on SIM900A
and using these pins helps to build the applications.

7
Fig. 2.5- GSM Module

Specifications:

Power Input 3.4V to 4.5V


Operating Frequency EGSM900 and DCS1800
Transmitting Power Range 2V for EGSM900 and 1W for DCS1800
Data Transfer Link Download: 85.6kbps, Upload:42.8kbps
SMS MT, MO, CB, Text and PDU mode.
Antenna Support Available
Audio Input/output Available
Serial Port I2C and UART
Serial Debug Port Available

2.4 Vibration Sensor (SW-420)-

The vibration sensor module based on the vibration sensor SW-420 and Comparator LM393 is
used to detect vibrations. The threshold can adjust using an on-board potentiometer. During no
vibration, the sensor provides Logic Low and when the vibration is detected, the sensor provides
Logic High.

8
Fig. 2.6- Vibration Sensor

Vibration Sensor Module Features & Specifications


• Operating Voltage: 3.3V to 5V DC.
• Operating Current: 15mA.
• Using SW-420 normally closed type vibration sensor.
• LEDs indicating output and power.
• LM393 based design.
• Easy to use with Microcontrollers or even with normal Digital/Analog IC.
• With bolt holes for easy installation. Small, cheap and easily available.

2.5 Smoke Detector Module (MQ-2)-

The MQ-2 smoke sensor is sensitive to smoke and to the following flammable gases:
LPG, Butane, Propane, Methane, Alcohol, Hydrogen, etc

The resistance of the sensor is different depending on the type of the gas. The smoke sensor has a
built-in potentiometer that allows you to adjust the sensor sensitivity according to how accurate you
want to detect gas.

The voltage that the sensor outputs change accordingly to the smoke/gas level that exists in the
atmosphere. The sensor outputs a voltage that is proportional to the concentration of smoke/gas.
In other words, the relationship between voltage and gas concentration is the following:

9
 The greater the gas concentration, the greater the output voltage
 The lower the gas concentration, the lower the output voltage

The output can be an analog signal (A0) that can be read with an analog input of the Arduino or a
digital output (D0) that can be read with a digital input of the Arduino.

Fig. 2.7- Smoke Detector

Specifications:
• Operating Voltage: 5 VDC
• Analog Output Voltage: 0V to 5V
• Digital Output Voltage: 0V or 5V (TTL Logic)
• Preheat Duration: 20 sec
• Wide detecting scope
• Fast response and High sensitivity
• Stable and long life
• Simple drive circuit
• Circuit voltage: 5V±0.1
• Heating voltage: 5V±0.1
• Heater resistance: 33Ω±5%
• Heating consumption: less than 800mw
• Using Tem: -20℃-50℃
• Length: 35 mm
• Width: 20 mm
• Height: 21 mm

10
• Weight: 10 gm

2.6 Alcohol Detector Module (MQ-3)-

The MQ-3 is Alcohol Sensitive Sensor that is often used in a breath analyzer.
The MQ-3 Gas Detection Sensor Module includes four pins that may be used to extract data from
the Sensor: VCC, GND, Aout, and Dout.

The MQ-3 Alcohol Sensor Module features four pins, two of which are for VCC and GND. The
other two may simultaneously output analog and digital data, much like the other basic sensor
modules. We're utilizing the Arduino's 5V pin to power the circuit since the module's working
voltage range is 5V with a 0.1 percent tolerance. The module features two inbuilt LEDs, as seen in
the figure above. When power is connected to the board, the power LED illuminates, and the Dout
LED illuminates when the potentiometer's trigger value is achieved. This board also has an OP-Amp
comparator that converts the incoming analog signal from the gas sensor to a digital signal.

Fig. 2.8- Alcohol Detector


The MQ-3 gas sensor requires a heating element to identify Alcohol correctly. However, placing
a heating element near Alcohol might be dangerous. Thus the Sensor is built with an
antiexplosion network comprised of two thin layers of stainless steel mesh.
When we pour alcohol second and third time, the alcohol concentration increases again. The
output voltage from the sensor increases as the alcohol concentration rises. The green LED on
the module

11
illuminates when it exceeds a particular threshold (which may be controlled using the
potentiometer).

2.7 5V One Channel Relay Module-

Relay is an electromechanical device that uses an electric current to open or close the contacts of
a switch. The single-channel relay module is much more than just a plain relay, it comprises of
components that make switching and connection easier and act as indicators to show if the
module is powered and if the relay is active or not.

The Single Channel Relay Module is a convenient board which can be used to control high
voltage, high current load such as motor, solenoid valves, lamps and AC load. It is designed to
interface with microcontroller such as Arduino, PIC and etc. The relays terminal (COM, NO and
NC) is being brought out with screw terminal. It also comes with a LED to indicate the status of

relay.

Fig. 2.9- Pin configuration of the Relay

12
Single-Channel Relay Module Pin Description:

Pin Number Pin Name Description

1 Relay Trigger Input to activate the relay

2 Ground 0V reference

3 VCC Supply input for powering the relay coil

4 Normally Open Normally open terminal of the relay

5 Common Common terminal of the relay

6 Normally Closed Normally closed contact of the relay

Single-Channel Relay Module Specifications:

Supply voltage – 3.75V to 6V


Quiescent current: 2mA
Current when the relay is active: ~70mA
Relay maximum contact voltage – 250VAC or 30VDC
Relay maximum current – 10A

13
CHAPTER-3

PROJECT WORKING & IMPLEMENTATION

The circuit diagram shows how the components are wired together on a breadboard. The Arduino
UNO board is powdered by a 9V battery or an adapter. The vibration sensor, alcohol sensor and
smoke sensor are connected to analog pins A0, A1 and A2 respectively. The GPS module is
connected to digital pins 2 and 3 using software serial communication. The GSM module is
connected to digital pins 2 and 3 using software serial communication. The LCD display is
connected to digital pins 4, 5,6,9,10 and 11 using parallel communication. The buzzer is connected
to digital pin 12. A 10k ohm potentiometer is used to adjust the contrast of the LCD display.

3.1 Circuit Diagram-

14
3.2 Project Implementation-

The vehicle safety system works by monitoring the vibration sensor, alcohol detector, and smoke
detector. If any of the sensors are triggered, the system will sound the buzzer, send an SMS alert,
and stop the engine.
The GPS module is used to track the vehicle's location so that the SMS alert can include the
vehicle's coordinates. This information can be helpful to emergency responders if the vehicle is
involved in an accident.
The GSM module is used to send the SMS alert. The alert will be sent to the phone number that is
specified in the Arduino code.
The relay is used to stop the engine. If any of the sensors are triggered, the Arduino UNO will send a
low signal to the relay. This will turn off the relay, which will in turn stop the engine.

 Vibration Sensor: Detects vehicle vibrations caused by accidents or theft attempts.


 Smoke Detector: Detects the presence of smoke or fire in the vehicle.
 Alcohol Detector: Measures alcohol levels in the vicinity.
 When any of the sensors detect abnormal conditions, the system triggers an SMS alert.
 The GSM module sends an SMS to the specified number containing the GPS location and
the type of alert (vibration, smoke, or alcohol).

3.3 Project Code-

#include <SoftwareSerial.h>

// Define the pins for the


sensors and actuators const int
vibrationSensorPin = 2; const
int alcoholDetectorPin = 3;
const int smokeDetectorPin =
4; const int buzzerPin = 5;
const int relayPin = 6;

// Define the GSM module serial port

15
SoftwareSerial gsmSerial(10, 11);

// Define the GPS module serial port


SoftwareSerial gpsSerial(12, 13);

// Define the phone number to send


SMS alerts to const char*
phoneNumber = "+15555555555";

// Initialize the sensors


and actuators void
setup() {
pinMode(vibrationSensor
Pin, INPUT);
pinMode(alcoholDetecto
rPin, INPUT);
pinMode(smokeDetector
Pin, INPUT);
pinMode(buzzerPin,
OUTPUT);
pinMode(relayPin,
OUTPUT);

// Initialize the GSM module


gsmSerial.begin(9600);

// Initialize the GPS module


gpsSerial.begin(9600);

// Read the sensors and take


appropriate action void loop() {

16
// Read the vibration sensor int
vibrationSensorValue =
digitalRead(vibrationSensorPin);

// Read the alcohol detector int


alcoholDetectorValue =
digitalRead(alcoholDetectorPin);

// Read the smoke detector int


smokeDetectorValue =
digitalRead(smokeDetectorPin);

// Check if the vibration


sensor is triggered if
(vibrationSensorValue ==
HIGH) {

// Trigger the buzzer


digitalWrite(buzzerPin,
HIGH);

// Send an SMS alert


sendSmsAlert("Vehicle
accident detected!");

// Stop the engine


digitalWrite(relayPin,
LOW);

// Check if the alcohol


detector is triggered if
(alcoholDetectorValue ==
HIGH) {

17
// Trigger the buzzer
digitalWrite(buzzerPin,
HIGH);

// Send an SMS alert


sendSmsAlert("Alcohol
detected!");

// Stop the engine


digitalWrite(relayPin,
LOW);

// Check if the smoke


detector is triggered if
(smokeDetectorValue ==
HIGH) {

// Trigger the buzzer


digitalWrite(buzzerPin,

HIGH);

// Send an SMS alert


sendSmsAlert("Smoke
detected!");

// Stop the engine


digitalWrite(relayPin,
LOW);

// Delay for 1
second
delay(1000);

18
}

// Send an SMS alert


void
sendSmsAlert(String
message) {

// Send an SMS message to the specified phone number


gsmSerial.println("AT+CMGS=\"" + phoneNumber + "\""); // Wait for
the GSM module to respond delay(1000);

// Send the message


gsmSerial.println(message);

// Wait for the GSM module to send the


message delay(1000);

// Terminate the SMS message


gsmSerial.println((char)26);

19
CHAPTER-4

CONCLUSION

In the realm of vehicle safety, embedded systems have emerged as transformative tools,
revolutionizing road safety. These technologies, showcased in our exploration of "Vehicle Safety
with Embedded Systems," are not just innovations but life-saving solutions. With their real-time
obstacle detection, collision prevention, and adaptive driving assistance capabilities, embedded
systems are shaping a safer and smarter future for transportation. Their adaptability across various
vehicles and potential for continuous advancement underline their significance. As we move
forward, embracing and implementing these technologies widely is crucial. They hold the key to a
future where accidents are minimized, lives are safeguarded, and mobility is synonymous with
safety.

4.1 Future Scope-

The "Vehicle Safety with Embedded System" project has immense future potential. As technology
advances, integrating embedded systems in vehicles will redefine road safety. This project, focusing
on intelligent collision detection and adaptive cruise control, promises enhanced safety for drivers
and pedestrians alike. With the incorporation of machine learning and real-time data analysis, it not
only addresses current safety concerns but also lays the foundation for smarter, more responsive
vehicles. As the automotive industry moves towards autonomous vehicles and sustainable
transportation, this project stands at the forefront, shaping the future of vehicular safety and smart
transportation system

20
REFERENCES

1. https://www.academia.edu/36767244/Vehicle_Security_System_using_Em
bedded_and_GSM_Technology
Vehicle Security System using Embedded and GSM Technology, April 2018
2. https://partheniumprojects.com/embedded-based-vehicle-safety-system-
using-gsm-technology/
Embedded based vehicle safety system using GSM technology, January 10,
2019
3. https://arxiv.org/abs/2101.00496
Smart Car Features using Embedded Systems and IoT, January 2, 2021
4. https://www.mdpi.com/1424-8220/22/5/1907
A Novel Prototype for Safe Driving Using Embedded Smart Box System,
March 1, 2022
5. https://ieeexplore.ieee.org/document/9038294
Improved Embedded Vehicle Safety System with STM32, March 19, 2020

21

You might also like