1. Vehicle control system using alchol
sensor
DIV:-B
GROUP:-11
1. AMEYBHAGW
A
TKAR
2. KUSHBHAKAD
3. Y
ASHBHALE
4. P
ARTHBHALERAO
5. PRASANNABHALERAO
6. Y
ASHBHALERAO
2. INTRODUCTION
• The project aims to prevent accidents caused by drunk driving by
using an MQ3 alcohol sensor with an Arduino microcontroller.
• The MQ3 sensor is a gas sensor that can detect the presence of
alcohol in the air, making it useful for detecting alcohol consumption
by drivers.
• The Arduino microcontroller can process the signals from the MQ3
sensor and provide a warning signal to the driver if alcohol is
detected.
• This project can be a useful tool in promoting road safety and
preventing accidents caused by drunk driving.
• The project can be implemented in various vehicles, making it a
versatile and cost-effective solution for accident prevention.
3. CHARACTERISTICOFTHE
PROJECT:
1.The project is designed to be a low-cost solution for accident prevention, making it
accessible to a wide range of users.
2.The MQ3 alcohol sensor has a high sensitivity and can detect alcohol
concentrations as low as 0.05 mg/L, making it an accurate and reliable tool for
detecting alcohol consumption.
3.The Arduino microcontroller is programmable and customizable, allowing users to
adjust the settings and parameters of the system to meet their specific needs.
4.The project is portable and can be easily installed in different vehicles, making it a
versatile solution for accident prevention.
5.The project is user-friendly and easy to operate, with simple instructions and
intuitive interface, making it accessible to a wide range of users.
4. NEEDFORTHEPR
OJECT
1.Drunk driving is a leading cause of road accidents, injuries, and fatalities,
making it a serious public safety concern that needs to be addressed.
2.Traditional methods for detecting alcohol consumption by drivers, such as
breathalyzers or blood tests, are often costly, time-consuming, and impractical
for routine use.
3.The project can help to fill the gap in existing solutions by providing a low-cost,
portable, and easy-to-use tool for detecting alcohol consumption by drivers in
real-time.
4.The project can be particularly useful in areas where there is a high incidence
of drunk driving or limited resources for road safety enforcement.
5.The project can contribute to the overall effort to reduce road accidents,
injuries, and fatalities caused by drunk driving, by providing an effective and
accessible solution for accident prevention.
5. Componentsused:
• resistor
• alcohol sensor MQ3
• transistor
• Addunio uno with microcontroller 8051
• connecting JUMPER wire
• dc motor
• buzzer
• Solder
• SOFTWARE USED:- ARDUNIO IDE
7. ARDUNIO UNO
• The Arduino Uno is a microcontroller board based on the
ATmega328P microcontroller, which provides a wide range of
input/output pins and other features.
• The Uno has 14 digital input/output pins, 6 analog input pins
, and various other features such as USB connectivity, a power
jack, and a reset button.
• The Uno is relatively easy to use and program, making it a
popular choice for beginners and hobbyists who are new to
electronics and programming.
• The Uno is compatible with a wide range of sensors, actuators, and
other electronic components, making it a versatile platform for
building various types of electronic projects.
• The Uno is supported by a large and active community of users
and developers, who provide a wealth of resources such as
tutorials, libraries, and forums to help users get started and
troubleshoot any issues.
8. ALCOHOL SENSOR
1.The MQ3 alcohol sensor is a gas sensor that is designed
to detect the presence of alcohol in the air.
2.The sensor works by heating a tin dioxide (SnO2)
sensing element, which changes its resistance in the
presence of alcohol vapor.
3.The change in resistance is proportional to the
concentration of alcohol in the air, allowing the sensor to
provide a measure of alcohol concentration.
4.The MQ3 sensor has a high sensitivity and can detect alcohol
concentrations ranging from 0.05 mg/L to 10 mg/L.
5.The MQ3 sensor is relatively low-cost, compact, and easy to use,
making it a popular choice for various applications that require alcohol
detection.
9. SOURCE CODE
const int alcholPin = 2;
const int motorPin = 13;
const int buzzerPin = 12;
long time;
void setup() {
pinMode(motorPin, OUTPUT);
pinMode(buzzerPin, OUTPUT);
pinMode(alcholPin, INPUT);
digitalWrite(motorPin, HIGH);
}
void loop() {
if(!digitalRead(alcholPin)){
time=millis();
while(!digitalRead(alcholPin)){
if(TimeDelay()>=2)digitalWrite(buzzerPin, LOW);
if(TimeDelay()>=0)digitalWrite(motorPin, LOW);
delay(1000);
}
}
else digitalWrite(buzzerPin,
HIGH),digitalWrite(motorPin, HIGH);
}
int TimeDelay(){
long t=millis()-time;
t=t/1000;
return t;
}
10. EXPLANATION OF CODE
1.The code defines three integer constants to represent the pins used for the alcohol
sensor, motor, and buzzer. These constants are used throughout the code to refer to
these pins.
2.In the setup() function, the code sets the pin modes for the motor, buzzer, and alcohol
sensor. The motor is also turned on by setting its pin to high.
3.The loop() function continuously runs and checks whether the alcohol sensor is
detecting alcohol. If it is, the code stores the current time in the time variable and enters
a while loop.
4.Within the while loop, the code checks the time delay since alcohol was first detected
using the TimeDelay() function. If the delay is greater than or equal to 2 seconds, the
buzzer is turned off. If the delay is greater than or equal to 0 seconds, the motor is
turned off. The code then waits for 1 second using the delay() function.
5.If the alcohol sensor stops detecting alcohol, the buzzer and motor are turned off.
6.The TimeDelay() function calculates the time delay in seconds between the current
time and the time stored in the time variable. This delay is used to control the timing of
11. WORKING
1. ONCE THE POWER SUPPLY IS ON, THE SYSTEM STARTS TO WORK (I.E.
THE MOTOR STARTS TO RUN) AND IT DETECTS THE ALCOHOL
CONTENT USING THE ALCOHOL SENSOR. I.E MQ3
2. THE MQ3 SENSOR USES A TIN DIOXIDE SEMICONDUCTOR LAYER THAT
ABSORBS OXYGEN WHEN HEATED, FORMING A POTENTIAL BARRIER
THAT PREVENTS THE FLOW OF ELECTRIC CURRENT.
3. THE PRESENCE OF ALCOHOL REDUCES THE DENSITY OF OXYGEN,
CAUSING THE POTENTIAL BARRIER TO DIMINISH AND ALLOWING
CURRENT TO FLOW THROUGH THE SENSOR, RESULTING IN A LOWER
ANALOG RESISTANCE AND AN INCREASED VOLTAGE READING.
4. IF ALCOHOL IS DETECTED THE MQ-3 SENSOR GIVES IT OUTPUT TO
THE ARDUINO WHICH ACTS AS AN INPUT FOR THE ARDUINO TO
STOP AND SYSTEM STOPS TO WORK (MOTOR STOPS TO ROTATE).
5. IF ALCOHOL IS NOT DETECTED THE SYSTEM CONTINUES TO WORK