Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Major Project

Download as pdf or txt
Download as pdf or txt
You are on page 1of 39

A

Major Project Report


on

Vehicle Safety with Embedded System

Submitted for the partial fulfilment of the requirements for the degree of

BACHELOR OF ENGINEERING
in
ELECTRICAL ENGINEERING

Department of Electrical Engineering


M.B.M. University, Jodhpur
2023 - 24

Guided By: SUBMITTED BY:

Ms. Santosh Kumari Meena SARANSH SHARMA


(Assistant Professor) SHIVAM SINGH
VIPIN BARJATYA
VISHAL MALAV
ROHIT MEENA
M.B.M. University
Department of Electrical Engineering

CERTIFICATE
This is to declare project report, entitled “Vehicle Safety with Embedded System”, being
submitted for the partial fulfilment of the requirements of the Degree of B.E. (Electrical
Engineering) from the Department of Electrical Engineering M.B.M. University, Jodhpur, is a
record of the project work carried out by us under the supervision of Ms. Santosh Kumari Meena
(Assistant Professor). To the best of our knowledge, this project report has not been submitted
earlier for the award of any degree / diploma by us or any other students.

Saransh Sharma 21UELE6027


Shivam Singh 21UELE6028

Vipin Barjatya 21UELE6029


Vishal Malav 21UELE6030

Rohit Meena 21UELE6026

This is to clarify that these students have put in the necessary effort to understand and learn the
topic under my supervision.

Counter signed by

Ms. Santosh Kumari Meena


Dr. Akhil Ranjan Garg (Assistant Professor & Guide)
(Professor & Head)

Department of Electrical Engineering


MBM University, Jodhpur
ACKNOWLEDGEMENT
We wish to express our deep sense of gratitude to our guide Ms. Santosh Kumari Meena
(Assistant Professor), whose critical analysis from time to time have led us to develop this project
report and able guidance gave the direction of study and was eager enough to quench our thirst of
answering to the smallest of the queries.

We are highly obliged towards all the lectures of department of Electrical Engineering for their
invaluable guidance, consistent helps & support throughout our project period.

We are also grateful to Dr. Akhil Ranjan Garg, Professor & Head, Department of Electrical
Engineering, M.B.M. University, Jodhpur for his kind cooperation and encouragement which
helped in completion of project.

Last but not the least: we would like to thank all those who helped us in completing the work.
ABSTRACT

This project aims to develop a vehicle safety system using an Arduino UNO, GPS, GSM,
vibration sensor, alcohol detector, and smoke detector. The system will monitor the vehicle for
accidents, alcohol intoxication, and smoke, and 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.
The system is relatively easy to build and can be customized to meet the specific needs of the
user. It is also relatively inexpensive to build, making it a viable option for individuals and
businesses alike.
TABLE OF CONTENTS

CHAPTER 1: INTRODUCTION Page No.

CHAPTER 2: COMPONENTS USED Page No.

CHAPTER 3: PROJECT WORK Page No.

CHAPTER 4: CONCLUSION Page No.

REFERENCES
LIST OF FIGURES

Fig. No. Title Page No.

1. Arduino Board

2. Components of Arduino

3. Pins’ Configuration of Arduino

4. GPS Module

5. GSM Module

6. Vibration Sensor

7. Smoke Detector

8. Alcohol Detector

9. Relay Module
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.
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

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:

Fig. 1 – Arduino Board

The components of Arduino UNO board are shown below:

Fig. 2- Components of Arduino


Components of Arduino Board-
Let's discuss each component in detail.

 ATmega328 Microcontroller- It is a single chip Microcontroller of the ATmel family.


o 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.
Fig. 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 a 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.
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 (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. 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.

Specification

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Ω


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

Fig GSM Module


Specification
FEATURES DETAIL
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

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.

Fig 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

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 changes 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:
 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 Smoke Detector

Features/Specs:
 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
 Weight: 10 gm
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 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 anti-
explosion 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 illuminates when it exceeds a particular threshold (which may be controlled using the
potentiometer)
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.

Fig. 7- Relay Module


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. 8- Pin configuration of the Relay

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
CHAPTER-3

PROJECT WORK

The circuit diagram shows how the components are wired together on a breadboard. The Arduino
Uno board is powered 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 7 and 8 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.

Circuit Diagram
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)
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


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(vibrationSensorPin, INPUT);
pinMode(alcoholDetectorPin, INPUT);
pinMode(smokeDetectorPin, 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() {
// 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) {
// 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);
}

// 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);
}
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

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 systems.
REFERENCES
 Improved Water Supply Forecasts Using Soil Moisture Data / Bellingham, B. K.,
Lea, J. / Fourth International Symposium on Soil Water Measurements Using
Capacitance, Impedance and Time Domain, Montreal, Quebec, Canada

 Measurement of Soil Water Content with a 50-MHz Soil Dielectric


Sensor / Siegfried, M. S. and M. D. Murdock. 2004 / Soil Sci. Soc. Am. J.

Review of research progress on soil moisture sensor technology, Limin Yu, Wanlin Gao,
Redmond R. Shamshir, Sha Tao, Yinzhou Ren, Yanjun Zhang, Guillain Su
https://en.wikipedia.org/wiki/Arduino_Uno
https://en.wikipedia.org/wiki/Soil_moisture_sensor

D. Gupta, “Capacitive v/s resistive soil moisture sensor,” 2018. [Online]. Available:
https://www.hackster.io/devashish-gupta/ capacitive-v-s-resistive-soil-moisture-sensor-
e241f2

SoilScout, “Soil moisture sensor.” [Online]. Available: https://soilscout.com/


solution/wireless-soil-moisture-sensor
 https://dronebotworkshop.com/soil-moisture/
 https://youtu.be/pgGpuws7f9o?t=3141
Soil Moisture Sensor working principle and applications
https:/ /www.nandantechnicals.com/2021/03/soil-moisture-sensor-working-principle.html

You might also like