0% found this document useful (0 votes)
4 views51 pages

1.alcohol Bill Sense Engine Lock Using Arduino

Uploaded by

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

1.alcohol Bill Sense Engine Lock Using Arduino

Uploaded by

JBJ SCIENTIFIC
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

SYNOPSIS

1
SYNOPSIS

Drunk driving is one of the major reasons behind road accidents worldwide.

In all of the road accident cases worldwide drivers have been observed to have

excess alcohol content in their blood. So we here design a smart alcohol detector

system using arduino coupled with gsm and gps for location transmission.

The system allows for automatic sensing of alcohol in breath, we also use a

motor to demonstrate as a vehicle. We further use a GPS module with GSM to

send an SMS message to the concerned person in case alcohol is detected and stop

the vehicle motor.

The system consists of an Arduino Uno board along with an Mq-3 alcohol

sensor for detection and a GSM/GPS Module for notification. In the case of a sober

driver i.e. the alcohol is under the permissible limits the car will normally which is

indicated by the motor rotating, but in the case of a drunk driver, the alcohol

content would be higher than the permissible limit which is detected by the alcohol

sensor and the Arduino controller which stops the motor so that drunk driving can

be avoided and also sends an SMS notification to the authorities or family

members along with the location of the car so that assistance can be provided. The

project also has an LCD for parameter display.

2
INTRODUCTION

3
1. INTRODUCTION

Road accidents caused by drunk driving are a major safety concern

worldwide. Many accidents occur because drivers operate vehicles after

consuming alcohol, which reduces their ability to concentrate, slows reaction time,

and impairs judgment. To reduce such incidents, modern technology can be used to

detect alcohol consumption and prevent a driver from starting the vehicle.

The Alcohol Breath Sensor Based Engine Lock System using Arduino Uno

is designed to improve road safety by detecting alcohol in the driver’s breath

before the vehicle engine starts. The system uses an MQ-2 Gas Sensor to sense

alcohol vapors and send the signal to the Arduino microcontroller. Based on the

detected alcohol level, the microcontroller decides whether to allow the engine to

start or to lock the ignition system.

If alcohol is detected above the preset threshold level, the system prevents

the engine from starting by disabling the ignition circuit through a relay. At the

same time, a buzzer alert is activated and a warning message is displayed on the

LCD screen. If no alcohol is detected, the system allows the engine to start

normally. This project demonstrates how sensors, microcontrollers, and embedded

systems can be used to create an intelligent vehicle safety system that helps prevent

drunk driving and reduces road accidents.

4
BLOCK DIAGRAM

5
2. BLOCK DIAGRAM

6
2.1 BLOCK DIAGRAM DESCRIPTION

The system consists of several functional blocks including a power supply

unit, alcohol sensor, microcontroller, display unit, buzzer, and motor (engine). The

power supply section includes a transformer, rectifier, and voltage regulator which

convert the 230V AC mains into a stable 5V DC required for the circuit operation.

The alcohol sensor continuously monitors the presence of alcohol in the driver’s

breath and produces an analog signal proportional to the alcohol concentration.

This signal is fed into the microcontroller (Arduino), which acts as the central

processing unit of the system. The microcontroller processes the sensor data and

compares it with a predefined threshold value. If the detected alcohol level is

below the limit, the system allows normal operation and the motor (representing

the vehicle engine) runs smoothly. If the alcohol level exceeds the threshold, the

microcontroller immediately disables the motor, effectively locking the engine to

prevent the vehicle from starting. Simultaneously, a buzzer is activated to provide

an audible alert indicating alcohol detection. The display unit (LCD) shows real-

time status messages such as “No Alcohol Detected” or “Alcohol Detected –

Engine Locked,” providing clear information to the user. Thus, the system ensures

safety by preventing vehicle operation when alcohol is detected, using the

coordinated functioning of sensing, processing, alerting, and control blocks.

7
CIRCUIT DIAGRAM

8
3. CIRCUIT DIAGRAM

9
3.1 WORKING PRINCIPLE

The Alcohol Breath Sensor Based Engine Lock System using Arduino Uno

is designed to prevent a vehicle from starting if the driver has consumed alcohol.

The system mainly uses an MQ-2 Gas Sensor (used as alcohol/gas sensor in the

circuit), a microcontroller, relay module, buzzer, LCD display, and a power supply

circuit. The working of the system is explained as follows.

When the driver attempts to start the vehicle, the alcohol sensor placed near

the steering wheel or dashboard detects the presence of alcohol in the driver’s

breath. The MQ-2 sensor senses alcohol vapor and converts it into an analog

voltage signal. This signal is sent to the Arduino Uno, which continuously reads

the sensor value through its analog input pins. Inside the Arduino, a programmed

threshold value is set for the allowable alcohol level. The microcontroller

compares the received sensor value with this preset limit. If the detected alcohol

level is below the threshold, the Arduino allows the engine to start. It activates the

relay, which completes the ignition circuit, enabling the vehicle engine to run. At

the same time, the LCD display shows a message.

If the alcohol concentration exceeds the predefined limit, the Arduino

identifies that the driver has consumed alcohol. In this condition, the

microcontroller does not activate the relay, which keeps the ignition circuit open

10
and prevents the engine from starting. The system also triggers a buzzer alarm to

alert nearby people and displays a warning message like on the LCD. The power

supply section converts AC voltage into regulated 5V DC using a transformer,

bridge rectifier, filter capacitor, and voltage regulator to provide stable power to

the Arduino, sensor, and other components. Thus, the system continuously

monitors the driver's breath and automatically controls the ignition system. This

helps prevent drunk driving and improves road safety by ensuring that the vehicle

cannot be started when alcohol is detected.

11
HARDWARE COMPONENTS

12
4. HARDWARE COMPONENTS

4.1 ALCOHOL SENSOR

The MQ series of gas sensors utilize a small heater inside with an

electrochemical sensor these sensors are sensitive to a range of gasses are used at

room temperature. MQ135 alcohol sensor is a Sno2 with a lower conductivity of

clean air. When the target explosive gas exists, then the sensor’s conductivity

increases more increasing more along with the gas concentration rising levels. By

using simple electronic circuits, it converts the charge of conductivity to

correspond output signal of gas concentration

The MQ135 gas sensor has high sensitivity in ammonia, sulfide, benzene

steam, smoke, and in other harm full gas. It is low cost and suitable for different

applications. There are different types of alcohol sensors like MQ-2, MQ-3, MQ-4,

MQ-5, MQ-6, etc.

An alcohol sensor detects the attentiveness of alcohol gas in the air and an

analog voltage is an output reading. The sensor can activate at

temperatures ranging from -10 to 50° C with a power supply is less than 150 Ma to

5V. The sensing range is from 0.04 mg/L to 4 mg/L, which is suitable for

breathalyzers.

13
Basic Pin Configuration Of Alcohol Sensor

The MQ-3 alcohol gas sensor consists of a total 6-pins including A, H, B,

and the other three pins are A, H, B out of the total 6-pins we use only 4 pins. The

two pins A, H are used for the heating purpose and the other two pins are used for

the ground and power. There is a heating system inside the sensor, which is made

up of aluminum oxide, tin dioxide. It has heat coils to produce heat, and thus it is

used as a heat sensor. The below diagram shows the pin diagram and the

configuration of the MQ-3 alcohol sensor.

The MQ-135 alcohol sensor consists of a tin dioxide (SnO2), a perspective

layer inside aluminum oxide microtubes (measuring electrodes), and a heating

element inside a tubular casing. The end face of the sensor is enclosed by a

stainless steel net and the backside holds the connection terminals. Ethyl alcohol

present in the breath is oxidized into acetic acid passing through the

14
heating element. With the ethyl alcohol cascade on the tin dioxide sensing layer,

the resistance decreases. By using the external load resistance the resistance

variation is converted into a suitable voltage variation.

4.2 MICROCONTROLLER

The picoPower® ATmega328/P is a low-power CMOS 8-bit microcontroller

based on the AVR® enhanced RISC architecture. By executing powerful

instructions in a single clock cycle, the ATmega328/P achieves throughputs close

to 1 MIPS per MHz. This empowers system designers to optimize the device for

power consumption versus processing speed.

Feature
● High performance, low power AVR® 8-bit microcontroller
● Advanced RISC architecture
● High endurance non-volatile memory segments

15
Pin configuration

Pin Descriptions

VCC Digital supply voltage.

GND Ground.

Port B (PB7:0) XTAL1/XTAL2/TOSC1/TOSC2

Port B is an 8-bit bi-directional I/O port with internal pull-up resistors

(selected for each bit). The Port B output buffers have symmetrical drive

characteristics with both high sink and source capability. As inputs, port B pins

that are externally pulled low will source current if the pull-up resistors are

activated. The Port B pins are tri-stated when a reset condition becomes active,
16
even if the clock is not running. Depending on the clock selection fuse settings,

PB6 can be used as input to the inverting oscillator amplifier and input to the

internal clock operating circuit. Depending on the clock selection fuse settings,

PB7 can be used as output from the inverting oscillator amplifier. If the internal

calibrated RC oscillator is used as chip clock source, PB7..6 is used as TOSC2..1

input for the asynchronous Timer/Counter2 if the AS2 bit in ASSR is set.

Port C (PC5:0)

Port C is a 7-bit bi-directional I/O port with internal pull-up resistors

(selected for each bit). The PC5..0 output buffers have symmetrical drive

characteristics with both high sink and source capability. As inputs, Port C pins

that are externally pulled low will source current if the pull-up resistors are

activated. The port C pins are tri-stated when a reset condition becomes active,

even if the clock is not running.

PC6/RESET

If the RSTDISBL fuse is programmed, PC6 is used as an input pin. If the

RSTDISBL fuse is unprogrammed, PC6 is used as a reset input. A low level on

this pin for longer than the minimum pulse length will generate a reset, even if the

clock is not running.

17
Port D (PD7:0)

Port D is an 8-bit bi-directional I/O port with internal pull-up resistors

(selected for each bit). The port D output buffers have symmetrical drive

characteristics with both high sink and source capability. As inputs, port D pins

that are externally pulled low will source current if the pull-up resistors are

activated. The port D pins are tri-stated when a reset condition becomes active,

even if the clock is not running.

AVCC

AVCC is the supply voltage pin for the A/D converter, PC3:0, and ADC7:6.

It should be externally connected to VCC, even if the ADC is not used. If the ADC

is used, it should be connected to VCC through a low-pass filter. Note that PC6..4

use digital supply voltage, VCC.

AREF

AREF is the analog reference pin for the A/D converter.

ADC7:6

(TQFP and QFN/MLF Package Only) In the TQFP and QFN/MLF package,

ADC7:6 serve as analog inputs to the A/D converter. These pins are powered from

the analog supply and serve as 10-bit ADC channels.

18
Block Diagram

19
The AVR® core combines a rich instruction set with 32 general purpose

working registers. All the 32 registers are directly connected to the arithmetic logic

unit (ALU), allowing two independent registers to be accessed in one single

instruction executed in one clock cycle. The resulting architecture is more code

efficient while achieving throughputs up to ten times faster than conventional

CISC microcontrollers. The Atmel® ATmega328P provides the following

features: 32K bytes of in-system programmable flash with read-while-write

capabilities, 1K bytes EEPROM, 2K bytes SRAM, 23 general purpose I/O lines,

32 general purpose working registers, three flexible Timer/Counters with compare

modes, internal and external interrupts, a serial programmable USART, a

byteoriented 2-wire serial interface, an SPI serial port, a 6-channel 10-bit ADC (8

channels in TQFP and QFN/MLF packages), a programmable watchdog timer with

internal oscillator, and five software selectable power saving modes. The idle mode

stops the CPU while allowing the SRAM, Timer/Counters, USART, 2-wire serial

interface, SPI port, and interrupt system to continue functioning. The power-down

mode saves the register contents but freezes the oscillator, disabling all other chip

functions until the next interrupt or hardware reset. In power-save mode, the

asynchronous timer continues to run, allowing the user to maintain a timer base

while the rest of the device is sleeping. The ADC noise reduction mode stops the

CPU and all I/O modules except asynchronous timer and ADC, to minimize

20
switching noise during ADC conversions. In standby mode, the crystal/resonator

oscillator is running while the rest of the device is sleeping. This allows very fast

start-up combined with low power consumption. The device is manufactured using

Atmel high density non-volatile memory technology. The on-chip ISP flash allows

the program memory to be reprogrammed in-system through an SPI serial

interface, by a conventional non-volatile memory programmer, or by an on-chip

boot program running on the AVR core. The boot program can use any interface to

download the application program in the application flash memory. Software in the

boot flash section will continue to run while the application flash section is

updated, providing true read-while-write operation. By combining an 8-bit RISC

CPU with in-system self-programmable flash on a monolithic chip, the Atmel

ATmega328P is a powerful microcontroller that provides a highly flexible and cost

effective solution to many embedded control applications. The ATmega328P AVR

is supported with a full suite of program and system development tools including:

C compilers, macro assemblers, program debugger/simulators, in-circuit emulators,

and evaluation kits.

AVR CPU Core

This section discusses the AVR® core architecture in general. The main

function of the CPU core is to ensure correct program execution. The CPU must

therefore be able to access memories, perform calculations, control peripherals,


21
and handle interrupts. In order to maximize performance and parallelism, the AVR

uses a harvard architecture – with separate memories and buses for program and

data.

22
Instructions in the program memory are executed with a single level

pipelining. While one instruction is being executed, the next instruction is pre-

fetched from the program memory. This concept enables instructions to be

executed in every clock cycle. The program memory is in-system reprogrammable

flash memory.

8-bit general purpose working registers with a single clock cycle access

time. ThisThe fast-access register file contains 32 allows single-cycle arithmetic

logic unit (ALU) operation. In a typical ALU operation, two operands are output

from the register file, the operation is executed, and the result is stored back in the

register file – in one clock cycle. Six of the 32 registers can be used as three 16-bit

indirect address register pointers for data space addressing – enabling efficient

address calculations. One of the these address pointers can also be used as an

address pointer for look up tables in flash program memory. These added function

registers are the 16-bit X-, Y-, and Z-register, described later in this section. The

ALU supports arithmetic and logic operations between registers or between a

constant and a register. Single register operations can also be executed in the ALU.

After an arithmetic operation, the status register is updated to reflect information

about the result of the operation. Program flow is provided by conditional and

unconditional jump and call instructions, able to directly address the whole address

space. Most AVR® instructions have a single 16-bit word format. Every program

23
memory address contains a 16- or 32-bit instruction. Program flash memory space

is divided in two sections, the boot program section and the application program

section. Both sections have dedicated lock bits for write and read/write protection.

The SPM instruction that writes into the application flash memory section must

reside in the boot program section. During interrupts and subroutine calls, the

return address program counter (PC) is stored on the stack. The stack is effectively

allocated in the general data SRAM, and consequently the stack size is only limited

by the total SRAM size and the usage of the SRAM. All user programs must

initialize the SP in the reset routine (before subroutines or interrupts are executed).

The stack pointer (SP) is read/write accessible in the I/O space. The data SRAM

can easily be accessed through the five different addressing modes supported in the

AVR architecture. The memory spaces in the AVR architecture are all linear and

regular memory maps. A flexible interrupt module has its control registers in the

I/O space with an additional global interrupt enable bit in the status register. All

interrupts have a separate interrupt vector in the interrupt vector table. The

interrupts have priority in accordance with their interrupt vector position. The

lower the interrupt vector address, the higher the priority. The I/O memory space

contains 64 addresses for CPU peripheral functions as control registers, SPI, and

other I/O functions. The I/O memory can be accessed directly, or as the data space

locations following those of the register file, 0x20 - 0x5F. In addition, the

24
ATmega328P has extended I/O space from 0x60 - 0xFF in SRAM where only the

ST/STS/STD and LD/LDS/LDD instructions can be used.

ALU – Arithmetic Logic Unit

The high-performance AVR ALU operates in direct connection with all the

32 general purpose working registers. Within a single clock cycle, arithmetic

operations between general purpose registers or between a register and an

immediate are executed. The ALU operations are divided into three main

categories – arithmetic, logical, and bit-functions. Some implementations of the

architecture also provide a powerful multiplier supporting both signed/unsigned

multiplication and fractional format.

Status Register

The status register contains information about the result of the most recently

executed arithmetic instruction. This information can be used for altering program

flow in order to perform conditional operations. Note that the status register is

updated after all ALU operations, as specified in the instruction set reference. This

will in many cases remove the need for using the dedicated compare instructions,

resulting in faster and more compact code. The status register is not automatically

stored when entering an interrupt routine and restored when returning from an

interrupt. This must be handled by software.

25
General Purpose Register File

The register file is optimized for the AVR® enhanced RISC instruction set.

In order to achieve the required performance and flexibility, the following

input/output schemes are supported by the register file:

● One 8-bit output operand and one 8-bit result input

● Two 8-bit output operands and one 8-bit result input

● Two 8-bit output operands and one 16-bit result input

● One 16-bit output operand and one 16-bit result input

Most of the instructions operating on the register file have direct access to all

registers, and most of them are single cycle instructions. As shown, each register is

also assigned a data memory address, mapping them directly into the first 32

locations of the user data space. Although not being physically implemented as

SRAM locations, this memory organization provides great flexibility in access of

the registers, as the X-, Y- and Z-pointer registers can be set to index any register

in the file.

Stack Pointer

The stack is mainly used for storing temporary data, for storing local

variables and for storing return addresses after interrupts and subroutine calls. Note
26
that the stack is implemented as growing from higher to lower memory locations.

The stack pointer register always points to the top of the stack. The stack pointer

points to the data SRAM stack area where the subroutine and interrupt stacks are

located. A stack PUSH command will decrease the stack pointer. The stack in the

data SRAM must be defined by the program before any subroutine calls are

executed or interrupts are enabled. initial stack pointer value equals the last address

of the internal SRAM and the stack pointer must be set to point above start of the

SRAM

Instruction Execution Timing

This section describes the general access timing concepts for instruction

execution. The AVR® CPU is driven by the CPU clock clkCPU, directly generated

from the selected clock source for the chip. No internal clock division is used.

Figure the parallel instruction fetches and instruction executions enabled by the

harvard architecture and the fast-access register file concept. This is the basic

pipelining concept to obtain up to 1MIPS per MHz with the corresponding unique

results for functions per cost, functions per clocks, and functions per power-unit.

Reset and Interrupt Handling

The AVR® provides several different interrupt sources. These interrupts and

the separate reset vector each have a separate program vector in the program

27
memory space. All interrupts are assigned individual enable bits which must be

written logic one together with the global interrupt enable bit in the status register

in order to enable the interrupt. Depending on the program counter value,

interrupts may be automatically disabled when boot lock bits BLB02 or BLB12 are

programmed. This feature improves software security. The lowest addresses in the

program memory space are by default defined as the reset and interrupt vectors.

The complete list of vectors is shown. The list also determines the priority levels of

the different interrupts. The lower the address the higher is the priority level.

RESET has the highest priority, and next is INT0 – the external interrupt request 0.

The interrupt vectors can be moved to the start of the boot flash section by setting

the IVSEL bit in the MCU control register (MCUCR). The reset vector can also be

moved to the start of the boot flash section by programming the BOOTRST fuse.

When an interrupt occurs, the global interrupt enable I-bit is cleared and all

interrupts are disabled. The user software can write logic one to the I-bit to enable

nested interrupts. All enabled interrupts can then interrupt the current interrupt

routine. The I-bit is automatically set when a return from interrupt instruction –

RETI – is executed. There are basically two types of interrupts. The first type is

triggered by an event that sets the interrupt flag. For these interrupts, the program

counter is vectored to the actual interrupt vector in order to execute the interrupt

handling routine, and hardware clears the corresponding interrupt flag. Interrupt

28
flags can also be cleared by writing a logic one to the flag bit position(s) to be

cleared. If an interrupt condition occurs while the corresponding interrupt enable

bit is cleared, the interrupt flag will be set and remembered until the interrupt is

enabled, or the flag is cleared by software. Similarly, if one or more interrupt

conditions occur while the global interrupt enable bit is cleared, the corresponding

interrupt flag(s) will be set and remembered until the global interrupt enable bit is

set, and will then be executed by order of priority. The second type of interrupts

will trigger as long as the interrupt condition is present. These interrupts do not

necessarily have interrupt flags. If the interrupt condition disappears before the

interrupt is enabled, the interrupt will not be triggered. When the AVR exits from

an interrupt, it will always return to the main program and execute one more

instruction before any pending interrupt is served. Note that the status register is

not automatically stored when entering an interrupt routine, nor restored when

returning from an interrupt routine. This must be handled by software.

AVR Memories

This section describes the different memories in the ATmega328P. The

AVR® architecture has two main memory spaces, the data memory and the

program memory space. In addition, the ATmega328P features an EEPROM

memory for data storage. All three memory spaces are linear and regular.

29
4.3 BUZZER

The buzzer is a sounding device that can convert audio signals into sound

signals. It is usually powered by DC voltage. It is widely used in alarms,

computers, printers and other electronic products as sound devices. It is mainly

divided into piezoelectric buzzer and electromagnetic buzzer, represented by the

letter "H" or "HA" in the circuit.

Electromagnetic buzzer is composed of oscillator, solenoid coil, magnet,

vibration diaphragm, housing, etc. When the power supply is switched on, the

audio signal current generated by the oscillator passes through the solenoid coil,

which generates a magnetic field. The vibration diaphragm periodically vibrates

and sounds under the interaction of the solenoid coil and the magnet. The

frequency of the general electromagnetic buzzer is 2-4 kHz.

The height of active buzzer is slightly different from that of passive buzzer.

The active buzzer is usually 9mm high and the passive buzzer is 8mm high. When

placing the two buzzers with their pins facing up, the one with a green circuit

30
board is a passive buzzer, and the one without a circuit board and sealed with vinyl

is an active buzzer.

Multimeter resistance Rxl test: When the black meter pen contacts the'+'pin

of the buzzer and the red meter pen touches back and forth on the other pin, if it

clicks and the resistance is only 8Ω (or 16Ω), then it is a passive buzzer; connect

the'+'pin of the buzzer with a black pen and touch the red pen back and forth on the

other pin.

4.4 DC MOTOR

Almost every mechanical development that we see around us is

accomplished by an electric motor. Electric machines are a method of converting

energy. Motors take electrical energy and produce mechanical energy. Electric

motors are utilized to power hundreds of devices we use in everyday life. Electric

motors are broadly classified into two different categories: Direct Current (DC)

motor and Alternating Current (AC) motor. In this article we are going to discuss

about the DC motor and its working. And also how a gear DC motors works.

A DC motor is an electric motor that runs on direct current power. In any

electric motor, operation is dependent upon simple electromagnetism. A current

carrying conductor generates a magnetic field, when this is then placed in an

31
external magnetic field, it will encounter a force proportional to the current in the

conductor and to the strength of the external magnetic [Link] is a device which

converts electrical energy to mechanical energy. It works on the fact that a current

carrying conductor placed in a magnetic field experiences a force which causes it

to rotate with respect to its original position. Practical DC Motor consists of field

windings to provide the magnetic flux and armature which acts as the conductor.

The input of a brushless DC motor is current/voltage and its output is torque.

Understanding the operation of DC motor is very simple from a basic diagram is

shown in below. DC motor basically consist two main parts. The rotating part is

called the rotor and the stationary part is also called the stator. The rotor rotates

with respect to the stator.

32
The rotor consists of windings, the windings being electrically associated

with the commutator. The geometry of the brushes, commutator contacts and rotor

windings are such that when power is applied, the polarities of the energized

winding and the stator magnets are misaligned and the rotor will turn until it is

very nearly straightened with the stator’s field magnets.

As the rotor reaches alignment, the brushes move to the next commutator

contacts and energize the next winding. The rotation reverses the direction of

current through the rotor winding, prompting a flip of the rotor’s magnetic field,

driving it to keep rotating.

Advantages of DC Motor:

1. Provide excellent speed control for acceleration and deceleration

2. Easy to understand design

3. Simple, cheap drive design

33
4.5 LIQUID CRYSTAL DISPLAY

The device shown in the figure is a 16×2 LCD Display, which is widely

used in electronic and embedded systems to display information in the form of

characters, numbers, and symbols. LCD stands for Liquid Crystal Display. It is

commonly used in microcontroller-based projects to show system status, sensor

readings, and other important data in real time. Because of its low power

consumption, simple interface, and clear display, it is one of the most popular

display devices used in embedded systems.

A 16×2 LCD display means that the display can show 16 characters in each

row and 2 rows in total, allowing a maximum of 32 characters to be displayed at a

time. Each character is formed using a 5×8 pixel matrix, which helps in displaying

alphabets, numbers, and some special symbols clearly. These displays are typically

based on the HD44780 LCD Controller, which controls the internal operations of

the LCD module.

34
The LCD module consists of several important components such as the

display screen, LCD controller, interface pins, and backlight. The display screen

uses liquid crystal technology, which changes the alignment of liquid crystal

molecules when an electric current is applied. This change controls the amount of

light passing through the display and forms visible characters on the screen.

The HD44780 LCD Controller inside the module manages all display

operations such as character generation, cursor positioning, and communication

with the microcontroller. It also contains internal memory used for storing the

characters that need to be displayed.

The 16×2 LCD module typically has 16 pins, which are used for power

supply, control signals, and data communication. The main pins include VCC for

power supply, GND for ground, and VEE for contrast adjustment. The contrast of

the display is usually controlled using a variable resistor connected to the VEE pin.

The control pins of the LCD include RS (Register Select), RW (Read/Write),

and E (Enable). The RS pin is used to select whether the data being sent to the

LCD is a command or display data. The RW pin determines whether the LCD will

read or write data, although in most applications it is connected to ground to enable

write operation only. The Enable pin is used to activate the LCD for receiving data

from the microcontroller.

35
The LCD also includes eight data pins (D0–D7) that are used to send

commands and character data from the microcontroller to the display. In many

applications, only four data pins (D4–D7) are used in 4-bit mode, which reduces

the number of connections required between the LCD and the microcontroller.

In embedded system projects, the LCD display is commonly interfaced with

microcontrollers such as the Arduino Uno. The microcontroller sends commands

and data signals to the LCD module to display information. For example, in energy

monitoring systems, the LCD can display parameters such as voltage, current,

power, and energy consumption. This allows users to easily observe the system

status without the need for additional monitoring equipment. Another important

feature of the LCD module is the backlight, which improves the visibility of the

display. The backlight usually consists of LED lights placed behind the display

panel. This allows the text to be visible even in low-light environments.

The LCD module operates at 5V DC power, making it compatible with most

microcontroller boards. It consumes very little power compared to other display

technologies, which makes it suitable for battery-powered devices and portable

systems. One of the major advantages of the 16×2 LCD display is its simplicity

and reliability. It requires minimal hardware and can be easily programmed using

simple commands. Because of this, it is widely used in various applications such as

36
digital clocks, energy meters, temperature monitoring systems, home automation

systems, and industrial control systems.

In the context of IoT and embedded systems, the LCD display plays an

important role in providing real-time feedback to the user. While IoT platforms

allow remote monitoring through mobile applications or cloud services, the LCD

display allows users to view important system information directly on the device.

Overall, the 16×2 LCD Display is a simple, reliable, and efficient display device

used in a wide range of electronic applications. Its ability to display characters

clearly, combined with low power consumption and easy interfacing with

microcontrollers, makes it an essential component in many embedded system and

IoT-based projects.

4.6 POWER SUPPLY

A power supply is one of the most important components in any electronic

or embedded system because it provides the electrical energy required for the

proper operation of all circuit components. Most electronic devices such as

microcontrollers, sensors, communication modules, and display units require a

stable and regulated DC voltage to function correctly. If the voltage supply

fluctuates or becomes unstable, the system may malfunction or the components

37
may get damaged. Therefore, a reliable power supply unit is essential for

maintaining the stability and performance of the entire system.

The module shown in the figure is a MB102 Breadboard Power Supply

Module, which is commonly used in electronic prototyping and embedded system

development. This module is specifically designed to provide regulated voltage to

breadboard circuits and experimental setups. It is widely used in microcontroller-

based projects, IoT applications, and sensor interfacing systems because it offers a

convenient way to supply both 5V and 3.3V outputs. The compact design and ease

of use make it very suitable for laboratory experiments and project development.

The power supply module generally operates with a DC input voltage

ranging from 6V to 12V. This input can be provided using a DC adapter through

the barrel jack connector available on the module. In some versions, the power can

also be supplied through a USB port. Once the input voltage is applied, the internal

38
circuitry of the module regulates and converts the voltage into stable output levels

suitable for electronic circuits.

Inside the module, voltage regulation is performed using a linear voltage

regulator such as the AMS1117 Voltage Regulator. This regulator is capable of

converting the input voltage into fixed output voltages such as 5V or 3.3V, which

are the most commonly used voltage levels in embedded systems. The regulator

ensures that the output voltage remains constant even if there are small fluctuations

in the input voltage. This helps protect sensitive components like microcontrollers

and sensors from voltage variations.

The module also includes a voltage selection switch or jumper, which allows

the user to select the required output voltage level. Depending on the position of

the jumper, the module can provide either 5V or 3.3V output. This feature is

particularly useful when working with different types of electronic devices because

some components operate at 5V while others require 3.3V. By simply changing the

jumper position, the user can easily switch between these two voltage levels.

Another important feature of the power supply module is the dual output channels.

The module typically provides two separate power rails that can supply power

simultaneously to different sections of a circuit. Each power rail can be configured

39
individually for either 5V or 3.3V output. This flexibility allows the module to

support circuits that require multiple voltage levels at the same time.

The module is designed to be mounted directly on a breadboard. The output

pins align with the power rails of the breadboard, making it easy to distribute

power to different components connected on the board. Once the module is

inserted into the breadboard and powered on, the regulated voltage becomes

available across the entire power rail. This simplifies circuit connections and

reduces the need for additional wiring.

To indicate the operational status of the module, an LED indicator is

provided on the board. When the module is powered, the LED lights up, showing

that the power supply is active. This helps users quickly verify whether the circuit

is receiving power. The module also contains capacitors that help filter out

electrical noise and maintain a stable output voltage.

In embedded system projects, the power supply module is commonly used to

power microcontrollers such as the Arduino Uno, ESP8266 NodeMCU, sensors,

communication modules, and other electronic devices. These components require a

stable DC voltage for accurate operation. By providing regulated voltage, the

module ensures that all connected devices operate efficiently and reliably.

40
The power supply module plays a crucial role in prototyping and testing

electronic circuits. During the development stage of a project, engineers and

students frequently modify circuit connections and experiment with different

components. The breadboard power supply module provides a convenient and

reusable solution for supplying power to these experimental circuits without the

need for complex wiring or external regulators. Another advantage of this module

is its compact and portable design. It occupies very little space on the breadboard

and can be easily integrated into small projects. Because of its simple plug-and-

play operation, it is widely used by students, hobbyists, and engineers for rapid

circuit development.

In addition to providing regulated voltage, the module also helps protect

electronic components from potential damage. Overvoltage conditions can destroy

sensitive devices such as microcontrollers and sensors. By regulating the voltage to

safe levels, the power supply module ensures that the circuit components receive

only the required amount of electrical power.

Power efficiency is another important factor in electronic system design.

Although linear regulators like the AMS1117 are simple and reliable, they may

produce some heat when the difference between input and output voltage is high.

Therefore, it is recommended to use an appropriate input voltage within the

41
specified range to maintain efficient operation and prevent excessive heat

generation.

Overall, the MB102 Breadboard Power Supply Module provides a reliable

and convenient solution for supplying regulated voltage to electronic circuits. Its

ability to deliver both 5V and 3.3V outputs, combined with its easy integration

with breadboards, makes it an essential tool for embedded system development and

IoT projects. By ensuring stable and regulated power, the module helps improve

the performance, reliability, and safety of electronic systems.

42
ADVANTAGES &
APPLICATIONS

43
5. ADVANTAGES & APPLICATIONS

ADVANTAGES

 Helps prevent drunk driving and improves road safety.

 Automatically locks the engine when alcohol is detected.

 Provides quick detection of alcohol through the sensor.

 Low-cost and simple system using a microcontroller.

 Gives visual indication on LCD and audio alert using buzzer.

 Easy to install in vehicles.

 Reduces accidents caused by alcohol consumption.

APPLICATIONS

 Used in cars, bikes, and commercial vehicles.

 Useful in public transport systems like buses and taxis.

 Can be installed in school buses for driver safety monitoring.

 Used in transport companies to monitor drivers before driving.

 Applicable in industrial vehicles and heavy machinery to avoid accidents.

44
FUTURE SCOPE

45
6. FUTURE SCOPE

In the future, the system can be improved by integrating advanced alcohol

sensors with higher accuracy and reliability. The project can also be connected

with IoT technology to send alerts or driver status to vehicle owners or authorities

through mobile applications. GPS modules can be added to share the vehicle

location when alcohol is detected. Face recognition or biometric systems may also

be integrated to ensure that only authorized drivers operate the vehicle. These

improvements can make the system smarter and more useful in modern intelligent

transportation systems.

46
CONCLUSION

47
7. CONCLUSION

The Alcohol Detection Engine Lock System using Arduino is an effective

safety solution designed to reduce accidents caused by drunk driving. By detecting

alcohol in the driver's breath and automatically preventing the engine from starting,

the system ensures safer vehicle operation. The use of sensors, microcontroller,

relay control, and alert mechanisms makes the system reliable and easy to

implement. Overall, this project demonstrates how embedded systems and sensor

technology can be used to enhance road safety and protect human lives.

48
BIBLIOGRAPHY

49
8. BIBLIOGRAPHY

1. Zhang, Y., & Li, J. (2021). Integration of GPS and GSM Modules for Vehicle

Safety: A Comprehensive Review. Journal of Automotive Technology, 20(4), 111-

118.:This paper reviews how GPS and GSM technologies are integrated in vehicle

safety systems, including the communication of real-time alerts and vehicle

location.

2. Singh, R., & Patel, P. (2021). Vehicle Engine Locking System with Alcohol

Detection Using IoT. Journal of Cyber-Physical Systems and Security, 18(1), 87-

93.:This research discusses the use of IoT-based alcohol detection systems for

controlling vehicle engines and preventing drunk driving.

3. Singh, A., & Soni, D. (2020). Design and Development of Alcohol Detection

and Vehicle Control System Using IoT and Arduino. International Journal of

Intelligent Engineering, 10(5), 30-40.: The authors present a design where Arduino

microcontrollers are integrated with alcohol sensors, GSM, and GPS for a real-time

vehicle control system.

4. Patel, V., & Kumar, A. (2020). Implementation of GSM and GPS Modules for

Real-Time Vehicle Tracking. International Journal of Smart Transport Systems,

15(2), 85-91. This research gives an in-depth explanation of employing GPS and

50
GSM modules to track locations and alert systems in vehicles, showing their uses

in real-time monitoring.

5. Kumar, R., & Bansal, M. (2021). GSM-Based Communication Systems in

Automotive Safety: A IJCRT25A4924 International Journal of Creative Research

Thoughts (IJCRT) [Link] q405 Review. Journal of Communication

Technology, 19(4), 101-107. This article discusses the application of GSM

modules in car safety systems, such as real-time notifications, emergency calling,

and GPS integration for tracking and monitoring.

6. Singh, N., & Sharma, H. (2020). Designing an IoT-Based Alcohol Detection and

Vehicle Control System. International Journal of Internet of Things and Cyber-

Assurance, 7(2), 134-140. The study delves into the application of IoT

technologies in alcohol detection systems, with sensors, GPS, and GSM being used

for security and real-time communication.

7. Patil, A., & Joshi, P. (2020). Alcohol Detection System for Vehicle Safety Using

Arduino. International Journal of Research in Electronics and Communication

Technology, 8(2), 45-53.: The authors provide a detailed design for alcohol

detection systems using Arduino, focusing on integration with ignition systems and

vehicle control mechanisms.

51

You might also like