You are on page 1of 78

ALCOHOL SENSING ALERT WITH ENGINE LOCKING

SYSTEM
A main project Submitted in partial fulfilment of the requirements
for the award of the degree of

BACHELOR OF TECHNOLOGY
IN
ELECTRICAL AND ELECTRONICS ENGINEERING

Submitted by

B.TEJA ( 14091A02D2)

D.VANNUR BABU ( 14091A02E0)

K.S.SURYA ( 14091A02D1)

Under the Esteemed Guidance of

S.ASWAK HUSSAINM.Tech

ASSITANT PROFESSOR, Dept. of E.E.E

(ESTD-1995)
DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

RAJEEV GANDHI MEMORIAL COLLEGE OF ENGINEERING & TECHNOLOGY


(AUTONOMOUS)
(Approved by AICTE New Delhi, Accredited by NAAC-A Grade,
Accredited by NBA, Affiliated to J.N.T. University Ananthapur)
Nandyal-518501, Kurnool Dist., A.P
RAJEEV GANDHI MEMORIAL COLLEGE OF ENGINEERING & TECHNOLOGY
(AUTONOMOUS)
(Approved by AICTE New Delhi, Accredited by NAAC-A Grade,
Accredited by NBA, Affiliated to J.N.T. University Ananthapur)
Nandyal-518501, Kurnool Dist., A.P

(ESTD-1995)
DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

CERTIFICATE

This is to certify that the thesis entitled “ALCOHOL SENSING ALERT WITH ENGINE
LOCKING SYSTEM” that is being submitted by B.TEJA ( 14091A02D2 ), D. VANNUR
BABU ( 14091A02E0 ), K.S.SURYA ( 14091A02D1) have carried out the main project for the
fulfilment of the award of Bachelor of Technology in Electrical and Electronics Engineering in
Rajeev Gandhi Memorial college of Engineering & technology(Autonomous) and this is a
record of bonafied record of the work done by them during 2014-2018. The results embodied in
this project work have not been submitted to any other university or institute for the award of
any degree.

Head of the Department Project Guide

Dr.V. Naga Bhaskar Reddy Ph.D, MISTE S.ASWAK HUSSAIN M.Tech


Professor Assistant professor
Dept. of EEE, RGMCET Dept. of EEE, RGMCET

Signature of External Examiner:

Date:
ACKNOWLEDGEMENT

We earnestly take the responsibility to acknowledge the following distinguished


personalities who graciously allowed us to carry out our project work successfully.

First we express our thanks to MR. S. ASWAK HUSSAINM.Tech of the Electrical and
Electronics Engineering department, as a project guide with whose skilful concomitance the
excellence has been exemplified in bringing out this mini project work with artistry and for
the encouragement which contributed to the successful completion of the mini project.

We would like to thank our electrical department for giving us permission to do the
mini project. At the outset we thank our honourable chairman
Dr. M. SANTHI RAMUDU garu, for providing us with good faculty and for his moral
support throughout the course.

We are perspicuous to divulge our sincere thanks to our principal,


Dr. T. JAYA CHANDRA PRASAD garu, who has been observed posing violence in
abundance forwards our individuality to our mini project work tendentiously.

We manifest our capabilities and heartier thankfulness pertaining to our Head Of


Department Dr.V. Naga Bhaskar Reddy, with whose adroit concomitance the excellence
has been exemplified in bringing out this mini project work with artistry.

A heart full and sincere gratitude to our beloved parents for their tremendous
motivation and moral support. Finally we express our gratitude to our friends and others who
have helped us directly and indirectly in carrying our project work successfully.

Project Associates

B.TEJA ( 14091A02D2)

D.VANNUR BABU ( 14091A02E0)

K.S.SURYA ( 14091A02D1)
ABSTRACT

In modern world mainly the youth of the nation come across drink and driving cases
where drunk drivers crash their cars under the influence of alcohol causing damage to
property and life. So now here want to propose an innovative system to eliminate such cases.
Hence our proposed system would be constantly monitoring the driver breath by placing it on
the driver steering wheel or somewhere the drivers breath can be constantly monitored by it.
So if a driver is drunk and tries to drive the system it detects alcohol presence in his/her
breathe and locks the engine so that the vehicle fails to start.

In another case if the driver is not drunk while he starts the vehicle and engine is
started but he/she drinks while driving the sensor still detects alcohol in his breath and stops
the engine so that the car would not accelerate any further and driver can steer it to roadside.
In this system we use an AVR family microcontroller interfaced with an alcohol sensor along
with an LCD screen and a dc motor to demonstrate the concept. So here the alcohol sensor is
used to monitor users breath and constantly sends signals to the microcontroller.

The microcontroller on encountering high alcohol signal from the alcohol sensor displays
alcohol detection note on LCD screen and also stops the dc motor to demonstrate as engine
locking. The system needs a push button to start the engine. If alcohol is detected at the time
of starting the engine the engine does not start at all. If alcohol is detected after engine
starting, the system locks the engine at that time.
CONTENTS
Page No.

List of figures i

List of figures ii

CHAPTER 1: INTRODUCTION 1

1.1 Introduction 2

1.2 Project overview 2

1.3 Thesis 3

CHAPTER 2: EMBEDDED SYSTEMS 4

2.1 Introduction to embedded systems 5

2.2 Explanation of embedded systems 6

2.2.1 Software Architecture 6

2.2.2 Real-time embedded systems 8

2.2.3 Network communication embedded systems 9

2.2.4 Different types of processing units 10

2.3 APPLICATIONS OF EMBEDDED SYSTEMS 10

2.3.1 Consumer applications 10

2.3.2 Office automation 10

2.3.3. Industrial automation 11

2.3.4 Computer networking 11

2.3.5 Tele communications 12

CHAPTER 3: HARDWARE DESCRIPTION 13

3.1 Introduction with block diagram 14

3.2 Microcontroller 15

3.3 Regulated power supply 26


3.3.1 Introduction 26

3.3.2 Block Diagram 27

3.4 LED indicator 38

3.5 Alcohol Sensor 41

3.5.1 Introduction 41

3.5.2 Working procedure 41

3.5.3 Description 42

3.5.4 Advantages 45

3.6 Buzzer 45

CHAPTER 4: SOFTWARE DESCRIPTION 48

4.1 Express PCB 49

4.1.1 The Interface 50

4.1.2 Design Consideration 51

4.2 PIC C Compiler 52

4.3 Proteus software 52

4.4 Procedural steps for compilation, simulation and dumping 53

CHAPTER 5: ADVANTAGES AND DISADVANTAGES 63


5.1 Advantages 64

5.2 Disadvantages 64

5.3 Applications 64

CHAPTER 6: RESULTS, CONCLUSION, FUTURE SCOPE 65


REFERENCES 68
LIST OF FIGURES
Page
Fig 2.1:A modern example of embedded system 6

Fig 2.2: Network communication embedded systems 9

Fig2.3: Automatic coffee makes equipment 10

Fig2.4: Fax machine 11

Fig2.5: Printing machine 11

Fig2.6: Robot 11

Fig2.7: Computer networking 11

Fig2.8: Cell Phone 12

Fig2.9: Web camera 12

Fig 3.1 : The block diagram of the project and design 14

Fig: 3.2 Microcontrollers 15

Fig 3.3: Harvard vs. Von Neuman Block Architectures 17

Fig 3.4: Clock/instruction Cylce 20

Fig 3.5: pin diagram of PIC16F72 21

Fig 3.6: Port B and Tris B 24

Fig 3.7: Port A and Tris A 25

Fig 3.8 Regulated Power Supply 27

Fig 3.9 Circuit diagram of Regulated Power Supply with Led

Connection 27
Fig 3.10: Step-Down Transformer 29

Fig 3.11: Hi-Watt 9V Battery 30

Fig 3.12 : Pencil Battery of 1.5V 31

Fig 3.13 : Bridge rectifier: a full-wave rectifier using 4 diodes 32

Fig 3.13 : DB107 33

Fig 3.14 :Construction Of a Capacitor 34

Fig 3.15 :Electrolytic Capaticor 34

Fig 3.16: Voltage Regulator 37

Fig 3.17 : Resistor 38


Fig 3.18 : Color Bands In Resistor 38

Fig 3.19 : Inside a LED 39

Fig 3.20: Parts of a LED 39

Fig 3.21: Electrical symbol & polarities of LED 40

Fig 3.22 : Alcohol detector sensor 42

Fig 3.23: Configuration figure of Alcohol detector sensor 42

Fig 3.24 : Picture of buzzer 47

Fig 4.1: Tool bar necessary for the interface 50

Fig 4.2: Picture of opening a new file using PIC C compiler 53


Fig 4.3: Picture of compiling a new file using PIC C compiler 54
Fig 4.4: Picture of compiling a project. c file using PIC C compiler 54
Fig 4.5: Picture of checking errors and warnings using PIC C compiler 55
Fig 4.6: Picture of .hex file existing using PIC C compiler 56
Fig 4.7: Picture of program dumper window 57
Fig 4.8: Picture of checking communications before dumping
program into microcontroller 58
Fig 4.9: Picture after connecting the dumper to microcontroller 59
Fig 4.10: Picture of dumper recognition to microcontroller 60
Fig 4.11: Picture of program importing into the microcontroller 61
Fig 4.12: Picture after program dumped into the microcontroller 62
Chapter 1 Introduction

CHAPTER-1
INTRODUCTION

Dept. of EEE, RGMCET Page 1


Chapter 1 Introduction

1. INRODUCTION
1.1 Introduction:
Now a day's every system is automated in order to face new challenges. In the present
days Automated systems have less manual operations, flexibility, reliability and accurate.
Due to this demand every field prefers automated control systems. Especially in the field of
electronics automated systems are giving good performance.

The project “Alcohol detector” itself indicates that whenever there is any alcoholic
content has been detected using alcoholic sensor then the system automatically controls the
motor of the vehicle. In this project we are using the alcoholic sensor that finds the alcoholic
content and fed as input to the microcontroller. This project is designed around a
microcontroller which forms the control unit of the project.

The microcontroller gets the information regarding the alcohol through the alcohol
sensor which is interfaced to the ignition of the vehicle receives the data and controls the
vehicle using DC motor. By this way we can take the prevention steps before occur the major
accidents and we can avoid the human losses and financial losses.

This project Features are:

1. High sensitivity alcohol sensor


2. Fast response
3. Wide detection range
4. Stable performance and long life
5. Simple drive circuit
1.2 Project Overview:

An embedded system is a combination of software and hardware to


perform a dedicated task. Some of the main devices used in embedded products are
Microprocessors and Microcontrollers.
Microprocessors are commonly referred to as general purpose processors
as they simply accept the inputs, process it and give the output. In contrast, a microcontroller
not only accepts the data as inputs but also manipulates it, interfaces the data with various
devices, controls the data and thus finally gives the result.
The project “Alcohol sensing alert with engine locking system “ using
PIC16F72 microcontroller is an exclusive project which is used to detects the alcohol and it
gives message alert to the predefined number

Dept. of EEE, RGMCET Page 2


Chapter 1 Introduction

1.3 Thesis:

The thesis explains the implementation of “Alcohol sensing alert with engine
locking system” using PIC16F72 microcontroller. The organization of the thesis is explained
here with:

Chapter 1 Presents introduction to the overall thesis and the overview of the project. In the
project overview a brief introduction of, alcohol sensor and its applications are discussed.

Chapter 2 Presents the topic embedded systems. It explains the about what is embedded
systems, need for embedded systems, explanation of it along with its applications.

Chapter 3 Presents the hardware description. It deals with the block diagram of the project
and explains the purpose of each block. In the same chapter the explanation of
microcontrollers, power supplies, alcohol sensor, and Relay with driver are considered.

Chapter 4 Presents the software description. It explains the implementation of the project
using PIC C Compiler software.

Chapter 5 Presents the project description along with, and alcohol sensor interfacing to
microcontroller.

Chapter 6 Presents the advantages, disadvantages and applications of the project.

Chapter 7 Presents the results, conclusion and future scope of the project.

Dept. of EEE, RGMCET Page 3


Chapter 2 Embedded systems

CHAPTER-2

EMBEDDED SYSTEMS

Dept. of EEE RGMCET 4| P a g e


Chapter 2 Embedded systems

EMBEDDED SYSTEMS

2.1 Embedded Systems:

An embedded system is a computer system designed to perform one or a few


dedicated functions often with real-time computing constraints. It is embedded as part of a
complete device often including hardware and mechanical parts. By contrast, a general-
purpose computer, such as a personal computer (PC), is designed to be flexible and to meet a
wide range of end-user needs. Embedded systems control many devices in common use
today.

Embedded systems are controlled by one or more main processing cores that
are typically either microcontrollers or digital signal processors (DSP). The key
characteristic, however, is being dedicated to handle a particular task, which may require very
powerful processors. For example, air traffic control systems may usefully be viewed as
embedded, even though they involve mainframe computers and dedicated regional and
national networks between airports and radar sites. (Each radar probably includes one or
more embedded systems of its own.)

Since the embedded system is dedicated to specific tasks, design engineers can
optimize it to reduce the size and cost of the product and increase the reliability and
performance. Some embedded systems are mass-produced, benefiting from economies of
scale.

Physically embedded systems range from portable devices such as digital


watches and MP3 players, to large stationary installations like traffic lights, factory
controllers, or the systems controlling nuclear power plants. Complexity varies from low,
with a single microcontroller chip, to very high with multiple units, peripherals and networks
mounted inside a large chassis or enclosure.

In general, "embedded system" is not a strictly definable term, as most systems


have some element of extensibility or programmability. For example, handheld computers
share some elements with embedded systems such as the operating systems and
microprocessors which power them, but they allow different applications to be loaded and
peripherals to be connected. Moreover, even systems which don't expose programmability as
a primary feature generally need to support software updates. On a continuum from "general

Dept. of EEE RGMCET 5| P a g e


Chapter 2 Embedded systems

purpose" to "embedded", large application systems will have subcomponents at most points
even if the system as a whole is "designed to perform one or a few dedicated functions", and
is thus appropriate to call "embedded". A modern example of embedded system is shown in
fig: 2.1.

Fig 2.1:A modern example of embedded system

Labeled parts include microprocessor (4), RAM (6), flash memory


(7).Embedded systems programming is not like normal PC programming. In many ways,
programming for an embedded system is like programming PC 15 years ago. The hardware
for the system is usually chosen to make the device as cheap as possible. Spending an extra
dollar a unit in order to make things easier to program can cost millions. Hiring a
programmer for an extra month is cheap in comparison. This means the programmer must
make do with slow processors and low memory, while at the same time battling a need for
efficiency not seen in most PC applications. Below is a list of issues specific to the embedded
field..

2.2 Explanation of Embedded Systems:

2.2.1 Software Architecture:

There are several different types of software architecture in common use.

 Simple Control Loop:

Dept. of EEE RGMCET 6| P a g e


Chapter 2 Embedded systems

In this design, the software simply has a loop. The loop calls subroutines, each
of which manages a part of the hardware or software.

 Interrupt Controlled System:

Some embedded systems are predominantly interrupting controlled. This


means that tasks performed by the system are triggered by different kinds of events. An
interrupt could be generated for example by a timer in a predefined frequency, or by a serial
port controller receiving a byte. These kinds of systems are used if event handlers need low
latency and the event handlers are short and simple.

Usually these kinds of systems run a simple task in a main loop also, but this
task is not very sensitive to unexpected delays. Sometimes the interrupt handler will add
longer tasks to a queue structure. Later, after the interrupt handler has finished, these tasks are
executed by the main loop. This method brings the system close to a multitasking kernel with
discrete processes.

 Cooperative Multitasking:

A non-preemptive multitasking system is very similar to the simple control


loop scheme, except that the loop is hidden in an API. The programmer defines a series of
tasks, and each task gets its own environment to “run” in. When a task is idle, it calls an idle
routine, usually called “pause”, “wait”, “yield”, “nop” (stands for no operation), etc.The
advantages and disadvantages are very similar to the control loop, except that adding new
software is easier, by simply writing a new task, or adding to the queue-interpreter.

 Primitive Multitasking:

In this type of system, a low-level piece of code switches between tasks or


threads based on a timer (connected to an interrupt). This is the level at which the system is
generally considered to have an "operating system" kernel. Depending on how much
functionality is required, it introduces more or less of the complexities of managing multiple
tasks running conceptually in parallel.

As any code can potentially damage the data of another task (except in larger
systems using an MMU) programs must be carefully designed and tested, and access to
shared data must be controlled by some synchronization strategy, such as message queues,
semaphores or a non-blocking synchronization scheme.

Dept. of EEE RGMCET 7| P a g e


Chapter 2 Embedded systems

Because of these complexities, it is common for organizations to buy a real-


time operating system, allowing the application programmers to concentrate on device
functionality rather than operating system services, at least for large systems; smaller systems
often cannot afford the overhead associated with a generic real time system, due to
limitations regarding memory size, performance, and/or battery life.

 Microkernels And Exokernels:

A microkernel is a logical step up from a real-time OS. The usual arrangement


is that the operating system kernel allocates memory and switches the CPU to different
threads of execution. User mode processes implement major functions such as file systems,
network interfaces, etc.

In general, microkernels succeed when the task switching and intertask


communication is fast, and fail when they are slow. Exokernels communicate efficiently by
normal subroutine calls. The hardware and all the software in the system are available to, and
extensible by application programmers. Based on performance, functionality, requirement
the embedded systems are divided into three categories:

2.2.2 Real-time embedded systems:

Embedded systems which are used to perform a specific task or operation in a


specific time period those systems are called as real-time embedded systems. There are two
types of real-time embedded systems.

 Hard Real-time embedded systems:

These embedded systems follow an absolute dead line time period i.e.., if the
tasking is not done in a particular time period then there is a cause of damage to the entire
equipment.

Eg: consider a system in which we have to open a valve within 30 milliseconds. If this
valve is not opened in 30 ms this may cause damage to the entire equipment. So in such cases
we use embedded systems for doing automatic operations.

 Soft Real Time embedded systems:

These embedded systems follow a relative dead line time period i.e.., if the task is not
done in a particular time that will not cause damage to the equipment.

Dept. of EEE RGMCET 8| P a g e


Chapter 2 Embedded systems

Eg: Consider a TV remote control system , if the remote control takes a few milliseconds
delay it will not cause damage either to the TV or to the remote control. These systems which will not
cause damage when they are not operated at considerable time period those systems comes under soft
real-time embedded systems.

2.2.3 Network communication embedded systems:

A wide range network interfacing communication is provided by using embedded


systems.

Eg:

 Consider a web camera that is connected to the computer with internet can be
used to spread communication like sending pictures, images, videos etc.., to
another computer with internet connection throughout anywhere in the world.

 Consider a web camera that is connected at the door lock.

Fig 2.2: Network communication embedded systems

Whenever a person comes near the door, it captures the image of a person and sends to the
desktop of your computer which is connected to internet. This gives an alerting message with
image on to the desktop of your computer, and then you can open the door lock just by
clicking the mouse. Fig: 2.2 show the network communications in embedded systems.

Dept. of EEE RGMCET 9| P a g e


Chapter 2 Embedded systems

2.2.4 Different types of processing units:

The central processing unit (c.p.u) can be any one of the following
microprocessor, microcontroller, digital signal processing.

 Among these Microcontroller is of low cost processor and one of the main advantage
of microcontrollers is, the components such as memory, serial communication
interfaces, analog to digital converters etc.., all these are built on a single chip. The
numbers of external components that are connected to it are very less according to the
application.

 Microprocessors are more powerful than microcontrollers. They are used in major
applications with a number of tasking requirements. But the microprocessor requires
many external components like memory, serial communication, hard disk, input
output ports etc.., so the power consumption is also very high when compared to
microcontrollers.

 Digital signal processing is used mainly for the applications that particularly involved
with processing of signals

2.3 APPLICATIONS OF EMBEDDED SYSTEMS:

2.3.1 Consumer applications:

At home we use a number of embedded systems which include microwave


oven, remote control, vcd players, dvd players, camera etc….

Fig2.3: Automatic coffee makes equipment

2.3.2 Office automation:

We use systems like fax machine, modem, printer etc…

Dept. of EEE RGMCET 10| P a g e


Chapter 2 Embedded systems

Fig2.4: Fax machine Fig2.5: Printing machine

2.3.3. Industrial automation:

Today a lot of industries are using embedded systems for process control. In
industries we design the embedded systems to perform a specific operation like monitoring
temperature, pressure, humidity ,voltage, current etc.., and basing on these monitored levels
we do control other devices, we can send information to a centralized monitoring station.

Fig2.6: Robot

In critical industries where human presence is avoided there we can use robots
which are programmed to do a specific operation.

2.3.4 Computer networking:

Embedded systems are used as bridges routers etc..

Dept. of EEE RGMCET 11| P a g e


Chapter 2 Embedded systems

Fig2.7: Computer networking

2.3.5 Tele communications:

Cell phones, web cameras etc.

Fig2.8: Cell Phone Fig2.9: Web camera

Dept. of EEE RGMCET 12| P a g e


Chapter 3Hardware description

CHAPTER 3
HARDWARE DESCRIPTION

Dept. of EEE, RMCCET 13 | P a g e


Chapter 3Hardware description

HARDWARE DESCRIPTION

3.1 Introduction with BLOCK DIAGRAM


In this chapter the block diagram of the project and design aspect of
independent modules are considered. Block diagram is shown in fig: 3.1:

Fig 3.1 : The block diagram of the project and design

The main blocks of this project are:

1. Micro controller (16F72)

2. Crystal oscillator

3. Regulated power supply (RPS)

4. LED Indicator

Dept. of EEE, RMCCET 14 | P a g e


Chapter 3Hardware description

5. Alcohol sensor

6. Dc motor

3.2 Micro controller:

Fig: 3.2 Microcontrollers

The PIC16F72 CMOS FLASH-based 8-bit microcontroller is upward compatible with


PIC16C72/72A and PIC16F872devices. It features 200 ns instruction execution, self
programming, an ICD, 2 Comparators, 5 channels of 8-bit Analog-to-Digital (A/D)
converter, 2 capture/compare/PWM functions, a synchronous serial port that can be
configured as either 3-wire SPI or 2-wire I2C bus, a USART, and a Parallel Slave Port.

• High performance RISC CPU

• Only 35 single word instructions to learn

• All single cycle instructions except for program branches which are two-cycle

• Operating speed: DC - 20 MHz clock input DC - 200 ns instruction cycle

• 2K x 14 words of Program Memory

128 x 8 bytes of Data Memory (RAM)

• Pin out compatible to the PIC16C72/72A and PIC16F872

• Interrupt capability

• Eight level deep hardware stack

• Direct, Indirect and Relative Addressing modes

Dept. of EEE, RMCCET 15 | P a g e


Chapter 3Hardware description

Peripheral Features

• Timer0: 8-bit timer/counter with 8-bit prescaler

• Timer1: 16-bit timer/counter with prescaler, can be incremented during SLEEP via external
crystal/clock

• Timer2: 8-bit timer/counter with 8-bit period register, prescaler and postscaler

• Capture, Compare, PWM (CCP) module

- Capture is 16-bit, max resolution is 12.5 ns

- Compare is 16-bit, max resolution is 200 ns

- PWM max resolution is 10-bit

• 8-bit, 5-channel Analog-to-Digital converter

• Synchronous Serial Port (SSP) with SPI (Master mode) and I2C (Slave)

• Heat sink/Source Current: 25 mA

• Brown-out detection circuitry for Brown-out Reset (BOR)

CMOS Technology:

• Low power, high speed CMOS FLASH technology

• Fully static design

• Wide operating voltage range: 2.0V to 5.5V

• Industrial temperature range

• Low power consumption:

- < 0.6 mA typical @ 3V, 4 MHz

- 20 μA typical @ 3V, 32 kHz

- < 1 μA typical standby current

Dept. of EEE, RMCCET 16 | P a g e


Chapter 3Hardware description

Following are the major blocks of PIC Microcontroller. Program memory (FLASH) is used
for storing a written program. Since memory made in FLASH technology can be
programmed and cleared more than once, it makes this microcontroller suitable for device
development.

EEPROM - data memory that needs to be saved when there is no supply.


It is usually used for storing important data that must not be lost if power supply suddenly
stops. For instance, one such data is an assigned temperature in temperature regulators. If
during a loss of power supply this data was lost, we would have to make the adjustment once
again upon return of supply. Thus our device looses on self-reliance.

RAM - Data memory used by a program during its execution.


In RAM are stored all inter-results or temporary data during run-time.

PORTS are physical connections between the microcontroller and the outside world.
PIC16F72 has 22 I/O.

FREE-RUN TIMER is an 8-bit register inside a microcontroller that works independently of


the program. On every fourth clock of the oscillator it increments its value until it reaches the
maximum (255), and then it starts counting over again from zero. As we know the exact
timing between each two increments of the timer contents, timer can be used for measuring
time which is very useful with some devices.
CENTRAL PROCESSING UNIT has a role of connective element between other blocks in
the microcontroller. It coordinates the work of other blocks and executes the user program.

Fig 3.3: Harvard vs. Von Neuman Block Architectures

Dept. of EEE, RMCCET 17 | P a g e


Chapter 3Hardware description

CISC, RISC

It has already been said that PIC16F72 has RISC architecture. This term is often found in
computer literature, and it needs to be explained here in more detail. Harvard architecture is a
newer concept than von-Neumann. It rose out of the need to speed up the work of a
microcontroller. In Harvard architecture, data bus and address bus are separate. Thus a
greater flow of data is possible through the central processing unit, and of course, a greater
speed of work. Separating a program from data memory makes it further possible for
instructions not to have to be 8-bit words. PIC16F72 uses 14 bits for instructions, which
allows for all instructions to be one-word instructions. It is also typical for Harvard
architecture to have fewer instructions than von-Neumann's, and to have instructions usually
executed in one cycle.
Microcontrollers with Harvard architecture are also called "RISC microcontrollers". RISC
stands for Reduced Instruction Set Computer. Microcontrollers with von-Neumann's
architecture are called 'CISC microcontrollers'. Title CISC stands for Complex Instruction Set
Computer.

Since PIC16F72 is a RISC microcontroller, that means that it has a reduced set of
instructions, more precisely 35 instructions. (Ex. Intel's and Motorola's microcontrollers have
over hundred instructions) All of these instructions are executed in one cycle except for jump
and branch instructions. According to what its maker says, PIC16F72 usually reaches results
of 2:1 in code compression and 4:1 in speed in relation to other 8-bit microcontrollers in its
class.

Crystal oscillator:

The crystal oscillator speed that can be connected to the PIC microcontroller range
from DC to 20Mhz. Using the CCS C compiler normally 20Mhz oscillator will be used and
the price is very cheap. The 20 MHz crystal oscillator should be connected with about 22pF
capacitor. Please refer to my circuit schematic.

There are 5 input/output ports on PIC microcontroller namely port A, port B, port C,
port D and port E. Each port has different function. Most of them can be used as I/O port.

Dept. of EEE, RMCCET 18 | P a g e


Chapter 3Hardware description

Applications

PIC16F72 perfectly fits many uses, from automotive industries and controlling home
appliances to industrial instruments, remote sensors, electrical door locks and safety devices.
It is also ideal for smart cards as well as for battery supplied devices because of its low
consumption.

EEPROM memory makes it easier to apply microcontrollers to devices where permanent


storage of various parameters is needed (codes for transmitters, motor speed, receiver
frequencies, etc.). Low cost, low consumption, easy handling and flexibility make PIC16F72
applicable even in areas where microcontrollers had not previously been considered
(example: timer functions, interface replacement in larger systems, coprocessor applications,
etc.).

In System Programmability of this chip (along with using only two pins in data transfer)
makes possible the flexibility of a product, after assembling and testing have been completed.
This capability can be used to create assembly-line production, to store calibration data
available only after final testing, or it can be used to improve programs on finished products.

Clock / instruction cycle

Clock is microcontroller's main starter, and is obtained from an external component called an
"oscillator". If we want to compare a microcontroller with a time clock, our "clock" would
then be a ticking sound we hear from the time clock. In that case, oscillator could be
compared to a spring that is wound so time clock can run. Also, force used to wind the time
clock can be compared to an electrical supply.

Clock from the oscillator enters a microcontroller via OSC1 pin where internal circuit of a
microcontroller divides the clock into four even clocks Q1, Q2, Q3, and Q4 which do not
overlap. These four clocks make up one instruction cycle (also called machine cycle) during
which one instruction is executed.

Execution of instruction starts by calling an instruction that is next in string. Instruction is


called from program memory on every Q1 and is written in instruction register on Q4.
Decoding and execution of instruction are done between the next Q1 and Q4 cycles. On the

Dept. of EEE, RMCCET 19 | P a g e


Chapter 3Hardware description

following diagram we can see the relationship between instruction cycle and clock of the
oscillator (OSC1) as well as that of internal clocks Q1-Q4. Program counter (PC) holds
information about the address of the next instruction.

Fig 3.4: Clock/instruction Cylce

Pipelining

Instruction cycle consists of cycles Q1, Q2, Q3 and Q4. Cycles of calling and executing
instructions are connected in such a way that in order to make a call, one instruction cycle is
needed, and one more is needed for decoding and execution. However, due to pipelining,
each instruction is effectively executed in one cycle. If instruction causes a change on
program counter, and PC doesn't point to the following but to some other address (which can
be the case with jumps or with calling subprograms), two cycles are needed for executing an
instruction. This is so because instruction must be processed again, but this time from the
right address. Cycle of calling begins with Q1 clock, by writing into instruction register (IR).
Decoding and executing begins with Q2, Q3 and Q4 clocks.

Dept. of EEE, RMCCET 20 | P a g e


Chapter 3Hardware description

Pin description

PIC16F72 has a total of 28 pins. It is most frequently found in a DIP28 type of case but can
also be found in SMD case which is smaller from a DIP. DIP is an abbreviation for Dual In
Package. SMD is an abbreviation for Surface Mount Devices suggesting that holes for pins to
go through when mounting aren't necessary in soldering this type of a component.

Fig 3.5: pin diagram of PIC16F72

Pins on PIC16F72 microcontroller have the following meaning:

There are 28 pins on PIC16F72. Most of them can be used as an IO pin. Others are already
for specific functions. These are the pin functions.
1. MCLR – to reset the PIC
2. RA0 – port A pin 0
3. RA1 – port A pin 1
4. RA2 – port A pin 2
5. RA3 – port A pin 3
6. RA4 – port A pin 4
7. RA5 – port A pin 5
8. VSS – ground

Dept. of EEE, RMCCET 21 | P a g e


Chapter 3Hardware description

9. OSC1 – connect to oscillator


10. OSC2 – connect to oscillator
11. RC0 – port C pin 0 VDD – power supply
12. RC1 – port C pin 1
13. RC2 – port C pin 2
14. RC3 – port C pin 3
15. RC4 - port C pin 4
16. RC5 - port C pin 5
17. RC6 - port C pin 6
18. RC7 - port C pin 7
19. VSS - ground
20. VDD – power supply
21. RB0 - port B pin 0
22. RB1 - port B pin 1
23. RB2 - port B pin 2
24. RB3 - port B pin 3
25. RB4 - port B pin 4
26. RB5 - port B pin 5
27. RB6 - port B pin 6
28. RB7 - port B pin 7

By utilizing all of this pin so many application can be done such as:
1. LCD – connect to Port B pin.
2. LED – connect to any pin declared as output.
3. Relay and Motor - connect to any pin declared as output.
4. External EEPROM – connect to I2C interface pin – RC3 and RC4 (SCL and SDA)
5. LDR, Potentiometer and sensor – connect to analogue input pin such as RA0.
6. GSM modem dial up modem – connect to RC6 and RC7 – the serial communication
interface using RS232 protocol.

For more detail function for each specific pin please refer to the device datasheet from
Microchip.

Dept. of EEE, RMCCET 22 | P a g e


Chapter 3Hardware description

Ports

Term "port" refers to a group of pins on a microcontroller which can be accessed


simultaneously, or on which we can set the desired combination of zeros and ones, or read
from them an existing status. Physically, port is a register inside a microcontroller which is
connected by wires to the pins of a microcontroller. Ports represent physical connection of
Central Processing Unit with an outside world. Microcontroller uses them in order to monitor
or control other components or devices. Due to functionality, some pins have twofold roles
like PA4/TOCKI for instance, which is in the same time the fourth bit of port A and an
external input for free-run counter. Selection of one of these two pin functions is done in one
of the configuration registers. An illustration of this is the fifth bit T0CS in OPTION register.
By selecting one of the functions the other one is disabled.

All port pins can be designated as input or output, according to the needs of a device that's
being developed. In order to define a pin as input or output pin, the right combination of
zeros and ones must be written in TRIS register. If the appropriate bit of TRIS register
contains logical "1", then that pin is an input pin, and if the opposite is true, it's an output pin.
Every port has its proper TRIS register. Thus, port A has TRISA, and port B has TRISB. Pin
direction can be changed during the course of work which is particularly fitting for one-line
communication where data flow constantly changes direction. PORTA and PORTB state
registers are located in bank 0, while TRISA and TRISB pin direction registers are located in
bank 1.

PORTB and TRISB


PORTB have adjoined 8 pins. The appropriate register for data direction is TRISB. Setting a
bit in TRISB register defines the corresponding port pin as input, and resetting a bit in TRISB
register defines the corresponding port pin as output.

Each PORTB pin has a weak internal pull-up resistor (resistor which defines a line to logic
one) which can be activated by resetting the seventh bit RBPU in OPTION register. These
'pull-up' resistors are automatically being turned off when port pin is configured as an output.
When a microcontroller is started, pull-ups are disabled.

Dept. of EEE, RMCCET 23 | P a g e


Chapter 3Hardware description

Fig 3.6: Port B and Tris B


Four pins PORTB, RB7:RB4 can cause an interrupt which occurs when their status changes
from logical one into logical zero and opposite. Only pins configured as input can cause this
interrupt to occur (if any RB7:RB4 pin is configured as an output, an interrupt won't be
generated at the change of status.) This interrupt option along with internal pull-up resistors
makes it easier to solve common problems we find in practice like for instance that of matrix
keyboard. If rows on the keyboard are connected to these pins, each push on a key will then
cause an interrupt. A microcontroller will determine which key is at hand while processing an
interrupt It is not recommended to refer to port B at the same time that interrupt is being
processed.

PORT A and TRIS A


PORTA have 5 adjoining pins. The corresponding register for data direction is TRISA at
address 85h. Like with port B, setting a bit in TRISA register defines also the corresponding
port pin as input, and clearing a bit in TRISA register defines the corresponding port pin as
output.

It is important to note that PORTA pin RA4 can be input only. On that pin is also situated an
external input for timer TMR0. Whether RA4 will be a standard input or an input for a
counter depends on T0CS bit (TMR0 Clock Source Select bit). This pin enables the timer

Dept. of EEE, RMCCET 24 | P a g e


Chapter 3Hardware description

TMR0 to increment either from internal oscillator or via external impulses on RA4/T0CKI
pin.

Example shows how pins 0, 1, 2, 3, and 4 are designated input, and pins 5, 6, and 7 outputs.
After this, it is possible to read the pins RA2, RA3, RA4, and to set logical zero or one to pins
RA0 and RA1.

Fig 3.7: Port A and Tris A

Memory organization

PIC16F72 has two separate memory blocks, one for data and the other for program.
EEPROM memory with GPR and SFR registers in RAM memory make up the data block,
while FLASH memory makes up the program block.

Program memory

Program memory has been carried out in FLASH technology which makes it possible to
program a microcontroller many times before it's installed into a device, and even after its
installment if eventual changes in program or process parameters should occur. The size of

Dept. of EEE, RMCCET 25 | P a g e


Chapter 3Hardware description

program memory is 1024 locations with 14 bits width where locations zero and four are
reserved for reset and interrupt vector.

Data memory
Data memory consists of EEPROM and RAM memories. EEPROM memory
consists of 256 eight bit locations whose contents are not lost during loosing of power supply.
EEPROM is not directly addressable, but is accessed indirectly through EEADR and
EEDATA registers. As EEPROM memory usually serves for storing important parameters
(for example, of a given temperature in temperature regulators) , there is a strict procedure for
writing in EEPROM which must be followed in order to avoid accidental writing. RAM
memory for data occupies space on a memory map from location 0x0C to 0x4F which comes
to 68 locations. Locations of RAM memory are also called GPR registers which is an
abbreviation for General Purpose Registers. GPR registers can be accessed regardless of
which bank is selected at the moment.

3.3 REGULATED POWER SUPPLY:

3.3.1 Introduction:

Power supply is a supply of electrical power. A device or system that


supplies electrical or other types of energy to an output load or group of loads is called a power
supply unit or PSU. The term is most commonly applied to electrical energy supplies, less
often to mechanical ones, and rarely to others.

A power supply may include a power distribution system as well as primary or


secondary sources of energy such as

 Conversion of one form of electrical power to another desired form and voltage, typically
involving converting AC line voltage to a well-regulated lower-voltage DC for electronic
devices. Low voltage, low power DC power supply units are commonly integrated with
the devices they supply, such as computers and household electronics.
 Batteries.
 Chemical fuel cells and other forms of energy storage systems.
 Solar power.
 Generators or alternators.

Dept. of EEE, RMCCET 26 | P a g e


Chapter 3Hardware description

3.3.2 Block Diagram:

Fig 3.8 Regulated Power Supply

The basic circuit diagram of a regulated power supply (DC O/P) with led
connected as load is shown in fig: 3.3.3.

Fig 3.9 Circuit diagram of Regulated Power Supply with Led connection

The components mainly used in above figure are

 230V AC MAINS
 TRANSFORMER
 BRIDGE RECTIFIER(DIODES)
 CAPACITOR
 VOLTAGE REGULATOR(IC 7805)

Dept. of EEE, RMCCET 27 | P a g e


Chapter 3Hardware description

 RESISTOR
 LED(LIGHT EMITTING DIODE)
The detailed explanation of each and every component mentioned above is as follows:

Transformation: The process of transforming energy from one device to another is


called transformation. For transforming energy we use transformers.

Transformers:

A transformer is a device that transfers electrical energy from one circuit to


another through inductively coupled conductors without changing its frequency. A
varying current in the first or primary winding creates a varying magnetic flux in the
transformer's core, and thus a varying magnetic field through the secondary winding. This
varying magnetic field induces a varying electromotive force (EMF) or "voltage" in the
secondary winding. This effect is called mutual induction.

If a load is connected to the secondary, an electric current will flow in the


secondary winding and electrical energy will be transferred from the primary circuit through
the transformer to the load. This field is made up from lines of force and has the same shape
as a bar magnet.

If the current is increased, the lines of force move outwards from the coil. If
the current is reduced, the lines of force move inwards.

If another coil is placed adjacent to the first coil then, as the field moves out or
in, the moving lines of force will "cut" the turns of the second coil. As it does this, a voltage
is induced in the second coil. With the 50 Hz AC mains supply, this will happen 50 times a
second. This is called MUTUAL INDUCTION and forms the basis of the transformer.

The input coil is called the PRIMARY WINDING; the output coil is the
SECONDARY WINDING. Fig: 3.3.4 shows step-down transformer.

Dept. of EEE, RMCCET 28 | P a g e


Chapter 3Hardware description

Fig 3.10 : Step-Down Transformer

The voltage induced in the secondary is determined by the TURNS RATIO.

For example, if the secondary has half the primary turns; the secondary will
have half the primary voltage.

Another example is if the primary has 5000 turns and the secondary has 500
turns, then the turn’s ratio is 10:1.

If the primary voltage is 240 volts then the secondary voltage will be x 10
smaller = 24 volts. Assuming a perfect transformer, the power provided by the primary must
equal the power taken by a load on the secondary. If a 24-watt lamp is connected across a 24
volt secondary, then the primary must supply 24 watts.

To aid magnetic coupling between primary and secondary, the coils are wound
on a metal CORE. Since the primary would induce power, called EDDY CURRENTS, into
this core, the core is LAMINATED. This means that it is made up from metal sheets
insulated from each other. Transformers to work at higher frequencies have an iron dust core
or no core at all.

Note that the transformer only works on AC, which has a constantly changing
current and moving field. DC has a steady current and therefore a steady field and there
would be no induction.

Some transformers have an electrostatic screen between primary and


secondary. This is to prevent some types of interference being fed from the equipment down

Dept. of EEE, RMCCET 29 | P a g e


Chapter 3Hardware description

into the mains supply, or in the other direction. Transformers are sometimes used for
IMPEDANCE MATCHING.

We can use the transformers as step up or step down.

Step Up transformer:

In case of step up transformer, primary windings are every less compared to


secondary winding. Because of having more turns secondary winding accepts more energy,
and it releases more voltage at the output side.

Step down transformer:

Incase of step down transformer, Primary winding induces more flux than the
secondary winding, and secondary winding is having less number of turns because of that it
accepts less number of flux, and releases less amount of voltage.

Battery power supply:

A battery is a type of linear power supply that offers benefits that traditional
line-operated power supplies lack: mobility, portability and reliability. A battery consists of
multiple electrochemical cells connected to provide the voltage desired. Fig: 3.3.5 shows Hi-
Watt 9V battery

Fig 3.11: Hi-Watt 9V Battery

The most commonly used dry-cell battery is the carbon-zinc dry cell
battery. Dry-cell batteries are made by stacking a carbon plate, a layer of electrolyte paste,
and a zinc plate alternately until the desired total voltage is achieved. The most common dry-
cell batteries have one of the following voltages: 1.5, 3, 6, 9, 22.5, 45, and 90. During the
discharge of a carbon-zinc battery, the zinc metal is converted to a zinc salt in the electrolyte,

Dept. of EEE, RMCCET 30 | P a g e


Chapter 3Hardware description

and magnesium dioxide is reduced at the carbon electrode. These actions establish a voltage
of approximately 1.5 V.

The lead-acid storage battery may be used. This battery is rechargeable; it


consists of lead and lead/dioxide electrodes which are immersed in sulfuric acid. When fully
charged, this type of battery has a 2.06-2.14 V potential (A 12 volt car battery uses 6 cells in
series). During discharge, the lead is converted to lead sulfate and the sulfuric acid is
converted to water. When the battery is charging, the lead sulfate is converted back to lead
and lead dioxide A nickel-cadmium battery has become more popular in recent years. This
battery cell is completely sealed and rechargeable. The electrolyte is not involved in the
electrode reaction, making the voltage constant over the span of the batteries long service life.
During the charging process, nickel oxide is oxidized to its higher oxidation state and
cadmium oxide is reduced. The nickel-cadmium batteries have many benefits. They can be
stored both charged and uncharged. They have a long service life, high current availabilities,
constant voltage, and the ability to be recharged. Fig: 3.3.6 shows pencil battery of 1.5V.

Fig 3.12 : Pencil Battery of 1.5V

RECTIFICATION:

The process of converting an alternating current to a pulsating direct current is


called as rectification. For rectification purpose we use rectifiers.

Rectifiers:

A rectifier is an electrical device that converts alternating current (AC) to


direct current (DC), a process known as rectification. Rectifiers have many uses including as
components of power supplies and as detectors of radio signals. Rectifiers may be made of
solid-state diodes, vacuum tube diodes, mercury arc valves, and other components.

Dept. of EEE, RMCCET 31 | P a g e


Chapter 3Hardware description

A device that it can perform the opposite function (converting DC to AC) is


known as an inverter. When only one diode is used to rectify AC (by blocking the negative or
positive portion of the waveform), the difference between the term diode and the term
rectifier is merely one of usage, i.e., the term rectifier describes a diode that is being used to
convert AC to DC. Almost all rectifiers comprise a number of diodes in a specific
arrangement for more efficiently converting AC to DC than is possible with only one diode.
Before the development of silicon semiconductor rectifiers, vacuum tube diodes and copper
(I) oxide or selenium rectifier stacks were used.

Bridge full wave rectifier:

The Bridge rectifier circuit is shown in fig:3.8, which converts an ac voltage to


dc voltage using both half cycles of the input ac voltage. The Bridge rectifier circuit is shown
in the figure. The circuit has four diodes connected to form a bridge. The ac input voltage is
applied to the diagonally opposite ends of the bridge. The load resistance is connected
between the other two ends of the bridge.

For the negative half cycle of the input ac voltage, diodes D2 and D4 conduct
whereas, D1 and D3 remain OFF. The conducting diodes D2 and D4 will be in series with the
load resistance RL and hence the current flows through RL in the same direction as in the
previous half cycle. Thus a bi-directional wave is converted into a unidirectional wave.

Input Output

Fig 3.13 : Bridge rectifier: a full-wave rectifier using 4 diodes

Dept. of EEE, RMCCET 32 | P a g e


Chapter 3Hardware description

DB107:

Now -a -days Bridge rectifier is available in IC with a number of DB107. In


our project we are using an IC in place of bridge rectifier. The picture of DB 107 is shown in
fig: 3.3.8.

Features:

 Good for automation insertion


 Surge overload rating - 30 amperes peak
 Ideal for printed circuit board
 Reliable low cost construction utilizing molded
 Glass passivated device
 Polarity symbols molded on body
 Mounting position: Any
 Weight: 1.0 gram

Fig 3.13 : DB107

Filtration:

The process of converting a pulsating direct current to a pure direct current


using filters is called as filtration.

Filters:

Electronic filters are electronic circuits, which perform signal-processing


functions, specifically to remove unwanted frequency components from the signal, to
enhance wanted ones.

Dept. of EEE, RMCCET 33 | P a g e


Chapter 3Hardware description

Introduction to Capacitors:

The Capacitor or sometimes referred to as a Condenser is a passive device,


and one which stores energy in the form of an electrostatic field which produces a potential
(static voltage) across its plates. In its basic form a capacitor consists of two parallel
conductive plates that are not connected but are electrically separated either by air or by an
insulating material called the Dielectric. When a voltage is applied to these plates, a current
flows charging up the plates with electrons giving one plate a positive charge and the other
plate an equal and opposite negative charge this flow of electrons to the plates is known as
the Charging Current and continues to flow until the voltage across the plates (and hence the
capacitor) is equal to the applied voltage Vcc. At this point the capacitor is said to be fully
charged and this is illustrated below. The construction of capacitor and an electrolytic
capacitor are shown in figures 3.3.9 and 3.3.10 respectively.

Fig 3.14 :Construction Of a Capacitor Fig 3.15 :Electrolytic Capaticor

Units of Capacitance:

Microfarad (μF) 1μF = 1/1,000,000 = 0.000001 = 10-6 F

Nanofarad (nF) 1nF = 1/1,000,000,000 = 0.000000001 = 10-9 F

Pico farad (pF) 1pF = 1/1,000,000,000,000 = 0.000000000001 = 10-12 F

Dept. of EEE, RMCCET 34 | P a g e


Chapter 3Hardware description

Operation of Capacitor:

Think of water flowing through a pipe. If we imagine a capacitor as being a


storage tank with an inlet and an outlet pipe, it is possible to show approximately how an
electronic capacitor works.

First, let's consider the case of a "coupling capacitor" where the capacitor is
used to connect a signal from one part of a circuit to another but without allowing any direct
current to flow.

If the current flow is alternating between zero and a


maximum, our "storage tank" capacitor will allow the
current waves to pass through.

However, if there is a steady current, only the initial


short burst will flow until the "floating ball valve" closes
and stops further flow.

So a coupling capacitor allows "alternating current" to pass through because


the ball valve doesn't get a chance to close as the waves go up and down. However, a steady
current quickly fills the tank so that all flow stops.

A capacitor will pass alternating current but (apart from an initial surge) it will
not pass d.c.

Dept. of EEE, RMCCET 35 | P a g e


Chapter 3Hardware description

Where a capacitor is used to decouple a circuit, the effect


is to "smooth out ripples". Any ripples, waves or pulses
of current are passed to ground while d.c. Flows
smoothly.

Regulation:

The process of converting a varying voltage to a constant regulated voltage is


called as regulation. For the process of regulation we use voltage regulators.

Voltage Regulator:

A voltage regulator (also called a ‘regulator’) with only three terminals


appears to be a simple device, but it is in fact a very complex integrated circuit. It converts a
varying input voltage into a constant ‘regulated’ output voltage. Voltage Regulators are
available in a variety of outputs like 5V, 6V, 9V, 12V and 15V. The LM78XX series of
voltage regulators are designed for positive input. For applications requiring negative input,
the LM79XX series is used. Using a pair of ‘voltage-divider’ resistors can increase the output
voltage of a regulator circuit.

It is not possible to obtain a voltage lower than the stated rating. You cannot
use a 12V regulator to make a 5V power supply. Voltage regulators are very robust. These
can withstand over-current draw due to short circuits and also over-heating. In both cases, the
regulator will cut off before any damage occurs. The only way to destroy a regulator is to
apply reverse voltage to its input. Reverse polarity destroys the regulator almost instantly.
Fig: 3.3.11 shows voltage regulator.

Dept. of EEE, RMCCET 36 | P a g e


Chapter 3Hardware description

Fig 3.16: Voltage Regulator

Resistors:

A resistor is a two-terminal electronic component that produces a voltage across its


terminals that is proportional to the electric current passing through it in accordance with
Ohm's law:

V = IR

Resistors are elements of electrical networks and electronic circuits and are ubiquitous
in most electronic equipment. Practical resistors can be made of various compounds and
films, as well as resistance wire (wire made of a high-resistivity alloy, such as
nickel/chrome).

The primary characteristics of a resistor are the resistance, the tolerance, maximum
working voltage and the power rating. Other characteristics include temperature coefficient,
noise, and inductance. Less well-known is critical resistance, the value below which power
dissipation limits the maximum permitted current flow, and above which the limit is applied
voltage. Critical resistance is determined by the design, materials and dimensions of the
resistor.

Resistors can be made to control the flow of current, to work as Voltage


dividers, to dissipate power and it can shape electrical waves when used in combination of
other components. Basic unit is ohms.

Dept. of EEE, RMCCET 37 | P a g e


Chapter 3Hardware description

Theory of operation:

Ohm's law:

The behavior of an ideal resistor is dictated by the relationship specified in


Ohm's law:

V = IR

Ohm's law states that the voltage (V) across a resistor is proportional to the
current (I) through it where the constant of proportionality is the resistance (R).

Power dissipation:

The power dissipated by a resistor (or the equivalent resistance of a resistor


network) is calculated using the following:

Fig 3.17 : Resistor Fig 3.18 : Color Bands In Resistor

3.4. LED:

A light-emitting diode (LED) is a semiconductor light source. LED’s are used


as indicator lamps in many devices, and are increasingly used for lighting. Introduced as a
practical electronic component in 1962, early LED’s emitted low-intensity red light, but
modern versions are available across the visible, ultraviolet and infrared wavelengths, with

Dept. of EEE, RMCCET 38 | P a g e


Chapter 3Hardware description

very high brightness. The internal structure and parts of a led are shown in figures 3.4.1 and
3.4.2 respectively.

Fig 3.19 : Inside a LED Fig 3.20: Parts of a LED

Working:

The structure of the LED light is completely different than that of the light
bulb. Amazingly, the LED has a simple and strong structure. The light-emitting
semiconductor material is what determines the LED's color. The LED is based on the
semiconductor diode.

When a diode is forward biased (switched on), electrons are able to recombine
with holes within the device, releasing energy in the form of photons. This effect is called
electroluminescence and the color of the light (corresponding to the energy of the photon) is
determined by the energy gap of the semiconductor. An LED is usually small in area (less
than 1 mm2), and integrated optical components are used to shape its radiation pattern and
assist in reflection. LED’s present many advantages over incandescent light sources including
lower energy consumption, longer lifetime, improved robustness, smaller size, faster
switching, and greater durability and reliability. However, they are relatively expensive and
require more precise current and heat management than traditional light sources. Current
LED products for general lighting are more expensive to buy than fluorescent lamp sources
of comparable output. They also enjoy use in applications as diverse as replacements for
traditional light sources in automotive lighting (particularly indicators) and in traffic signals.

Dept. of EEE, RMCCET 39 | P a g e


Chapter 3Hardware description

The compact size of LED’s has allowed new text and video displays and sensors to be
developed, while their high switching rates are useful in advanced communications
technology. The electrical symbol and polarities of led are shown in fig: 3.4.3.

Fig 3.21 : Electrical Symbol & Polarities of LED

LED lights have a variety of advantages over other light sources:

 High-levels of brightness and intensity


 High-efficiency
 Low-voltage and current requirements
 Low radiated heat
 High reliability (resistant to shock and vibration)
 No UV Rays
 Long source life
 Can be easily controlled and programmed

Applications of LED fall into three major categories:

 Visual signal application where the light goes more or less directly from the LED to
the human eye, to convey a message or meaning.
 Illumination where LED light is reflected from object to give visual response of these
objects.
 Generate light for measuring and interacting with processes that do not involve the
human visual system.

Dept. of EEE, RMCCET 40 | P a g e


Chapter 3Hardware description

3.5 Alcohol detector Sensor


3.5.1 Introduction:
Alcohol detector sensors need to be calibrated and periodically checked to ensure
sensor accuracy and system integrity. MQ303A is semiconductor sensor is for Alcohol
detection. It has good sensitivity and fast response to alcohol, suitable for portable alcohol
detector.
You could get of MQ303A, it reflects change from voltage change on fixed or
adjustable relations between resistance and gas load resistance. Normally, it will take several
concentration, resistance of the sensor minutes preheating for sensor enter into stable reduce
when gas concentration increases working after electrified; or you could give 2.2±0.2V high
voltage for 5-10secs before test, which make sensor easily stable.
3.5.2 Working procedure:

Indium Tin Oxide (ITO: In2O3 + 17% SnO2) thin films grown on alumina substrate
at 648 K temperatures using direct evaporation method with two gold pads deposited on the
top for electrical contacts were exposed to ethanol vapors (200–2500 ppm).

This sensor when exposed to alcohol the resistance varies this input is captured and
given to micro controller for further process.

It is important to install stationary sensors in locations where the calibration can be


performed easily. The intervals between calibrations can be different from sensor to sensor.
Generally, the manufacturer of the sensor will recommend a time interval between
calibrations. However, it is good general practice to check the sensor more closely during the
first 30 days after installation. During this period, it is possible to observe how well the
sensor is adapting to its new environment. Also, factors that were not accounted for in the
design of the system might surface and can affect the sensor’s performance. If the sensor
functions properly for 30 continuous days, this provides a good degree of confidence about
the installation. Any possible problems can be identified and corrected during this time.
Experience indicates that a sensor surviving 30 days after the initial installation will have a
good chance of performing its function for the duration expected. Most problems—such as an
inappropriate sensor location, interference from other Alcohol detectors, or the loss of
sensitivity—will surface during this time.

Dept. of EEE, RMCCET 41 | P a g e


Chapter 3Hardware description

Fig 3.22 : Alcohol detector sensor

MQ303A is semiconductor sensor is for Alcohol detection, it has good sensitivity and fast
response to alcohol, suitable for portable alcohol detector.

Fig 3.23: Configuration figure of Alcohol detector sensor

3.5.3 Description:

Sensing element of the semiconductor sensor is a micro-ball, heater and metal


electrode are inside, and the sensing element is installed in anti-explosion double 100 mesh
metal case. During the first 30 days, the sensor should be checked weekly. Afterward, a
maintenance schedule, Hazardous Alcohol detector Monitors including calibration intervals,
should be established. Normally, a monthly calibration is adequate to ensure the effectiveness
and sensibility of each sensor; this monthly check will also afford you the opportunity to

Dept. of EEE, RMCCET 42 | P a g e


Chapter 3Hardware description

maintain the system’s accuracy. The method and procedure for calibrating the sensors should
be established immediately. The calibration procedure should be simple, straightforward, and
easily executed by regular personnel. Calibration here is simply a safety check, unlike
laboratory analyzers that require a high degree of accuracy. For area air quality and safety
Alcohol detector monitors, the requirements need to be simple, repeatable, and economical.
The procedure should be consistent and traceable. The calibration will be performed in the
field where sensors are installed so it can occur in any type environment. Calibration of the
Alcohol detector sensor involves two steps. First the “zero” must be set and then the “span”
must be calibrated.
The sensing material in TGS Alcohol detector sensors is metal oxide, most typically
SnO2. When a metal oxide Crystal such as SnO2 is heated at a certain high temperature in
air, oxygen is adsorbed on the crystal surface with a negative charge. Then donor electrons in
the crystal surface are transferred to the adsorbed oxygen, resulting in leaving positive
charges in a space charge layer. Thus, surface potential is formed to serve as a potential
barrier against electron flow.
Inside the sensor, electric current flows through the conjunction parts (grain
boundary) of SnO2 micro crystals. At grain boundaries, adsorbed oxygen forms a potential
barrier which prevents carriers from moving freely. The electrical resistance of the sensor is
attributed to this potential barrier. In the presence of a deoxidizing Alcohol detector, the
surface density of the negatively charged oxygen decreases, so the barrier height in the grain
boundary is reduced. The reduced barrier height decreases sensor resistance.
Sensor resistance will drop very quickly when exposed to Alcohol detector, and when
removed from Alcohol detector its resistance will recover to its original value after a short
time. The speed of response and reversibility will vary according to the model of sensor and
the Alcohol detector involved.

Following conditions must be prohibited

1.1 Exposed to organic silicon steam


Organic silicon steam cause sensors invalid, sensors must be avoid exposing to silicon bond,
fixature, silicon latex, putty or plastic contain silicon environment
1.2 High Corrosive gas

Dept. of EEE, RMCCET 43 | P a g e


Chapter 3Hardware description

If the sensors exposed to high concentration corrosive gas (such as H2Sz, SOX,Cl2,HCl
etc), it will not only result in corrosion of sensors structure, also it cause sincere sensitivity
attenuation.
1.3 Alkali, Alkali metals salt, halogen pollution
The sensors performance will be changed badly if sensors be sprayed polluted by alkali
metals salt especially brine, or be exposed to halogen such as fluorin.
1.4 Touch water
Sensitivity of the sensors will be reduced when spattered or dipped in water.
1.5 Freezing
Do avoid icing on sensor’ surface, otherwise sensor would lose sensitivity.
1.6 Applied voltage higher
Applied voltage on sensor should not be higher than stipulated value, otherwise it cause
down-line or heater damaged, and bring on sensors’ sensitivity characteristic changed badly.
1.7 Voltage on wrong pins
For 6 pins sensor, if apply voltage on 1、3 pins or 4、6 pins, it will make lead broken, and
without signal when apply on 2、4 pins

Following conditions must be avoided


2.1 Water Condensation
Indoor conditions, slight water condensation will effect sensors performance lightly.
However, if water condensation on sensors surface and keep a certain period, sensor’
sensitivity will be decreased.
2.2 Used in high gas concentration
No matter the sensor is electrified or not, if long time placed in high gas concentration, if will
affect sensors characteristic.
2.3 Long time storage
The sensors resistance produce reversible drift if it’s stored for long time without electrify,
this drift is related with storage conditions. Sensors should be stored in airproof without
silicon gel bag with clean air. For the sensors with long time storage but no electrify, they
need long aging time for stability before using.
2.4 Long time exposed to adverse environment

Dept. of EEE, RMCCET 44 | P a g e


Chapter 3Hardware description

No matter the sensors electrified or not, if exposed to adverse environment for long time,
such as high humidity, high temperature, or high pollution etc, it will effect the sensors
performance badly.
2.5 Vibration
Continual vibration will result in sensors down-lead response then repture. In transportation
or assembling line, pneumatic screwdriver/ultrasonic welding machine can lead this
vibration.
2.6 Concussion
If sensors meet strong concussion, it may lead its lead wire disconnected.
2.7 Usage
For sensor, handmade welding is optimal way. If use wave crest welding should meet the
conditions:
2.7.1 Soldering flux: Rosin soldering flux contains least chlorine
2.7.2 Speed: 1-2 Meter/ Minute
2.7.3 Warm-up temperature:100±20℃
2.7.4 Welding temperature:250±10℃
2.7.5 1 time pass wave crest welding machine
If disobey the above using terms, sensors sensitivity will be reduced.
3.5.4 Advantages:

* High sensitivity
* Fast response and resume
* Long life and low cost
* Mini Size
3.6 Buzzer

Buzzer

Basically, the sound source of a piezoelectric sound component is a piezoelectric


diaphragm. A piezoelectric diaphragm consists of a piezoelectric ceramic plate which has
electrodes on both sides and a metal plate (brass or stainless steel, etc.). A piezoelectric
ceramic plate is attached to a metal plate with adhesives. Applying D.C. voltage between
electrodes of a piezoelectric diaphragm causes mechanical distortion due to the piezoelectric
effect. For a misshaped piezoelectric element, the distortion of the piezoelectric element

Dept. of EEE, RMCCET 45 | P a g e


Chapter 3Hardware description

expands in a radial direction. And the piezoelectric diaphragm bends toward the direction.
The metal plate bonded to the piezoelectric element does not expand. Conversely, when the
piezoelectric element shrinks, the piezoelectric diaphragm bends in the direction Thus, when
AC voltage is applied across electrodes, the bending is repeated, producing sound waves in
the air.

To interface a buzzer the standard transistor interfacing circuit is used. Note that if a
different power supply is used for the buzzer, the 0V rails of each power supply must be
connected to provide a common reference.

If a battery is used as the power supply, it is worth remembering that piezo sounders
draw much less current than buzzers. Buzzers also just have one ‘tone’, whereas a
piezo sounder is able to create sounds of many different tones.

To switch on buzzer -high 1

To switch off buzzer -low 1

Notice (Handling) In Using Self Drive Method

1) When the piezoelectric buzzer is set to produce intermittent sounds, sound may be heard
continuously even when the self drive circuit is turned ON / OFF at the "X" point shown in
Fig. 9. This is because of the failure of turning off the feedback voltage.

2) Build a circuit of the piezoelectric sounder exactly as per the recommended circuit shown
in the catalog. Hfe of the transistor and circuit constants are designed to ensure stable
oscillation of the piezoelectric sounder.

3) Design switching which ensures direct power switching.

4) The self drive circuit is already contained in the piezoelectric buzzer. So there is no need to
prepare another circuit to drive the piezoelectric buzzer.

5) Rated voltage (3.0 to 20Vdc) must be maintained. Products which can operate with voltage
higher than 20Vdc are also available.

Dept. of EEE, RMCCET 46 | P a g e


Chapter 3Hardware description

6) Do not place resistors in series with the power source, as this may cause abnormal
oscillation. If a resistor is essential to adjust sound pressure, place a capacitor (about 1μF) in
parallel with the piezo buzzer.

7) Do not close the sound emitting hole on the front side of casing.

8) Carefully install the piezo buzzer so that no obstacle is placed within 15mm from the
sound release hole on the front side of the casing.

Fig 3.24 : Picture of buzzer

Dept. of EEE, RMCCET 47 | P a g e


Chapter 4 Software Description

CHAPTER 4
SOFTWARE DESCRIPTION

Dept. of EEE, RGMCET 48 | P a g e


Chapter 4 Software Description

SOFTWARE DESCRIPTION

This project is implemented using following software’s:


 Express PCB – for designing circuit
 PIC C compiler - for compilation part
 Proteus 7 (Embedded C) – for simulation part

4.1 Express PCB:

Breadboards are great for prototyping equipment as it allows great flexibility


to modify a design when needed; however the final product of a project, ideally should have a
neat PCB, few cables, and survive a shake test. Not only is a proper PCB neater but it is also
more durable as there are no cables which can yank loose.

Express PCB is a software tool to design PCBs specifically for manufacture by


the company Express PCB (no other PCB maker accepts Express PCB files). It is very easy
to use, but it does have several limitations.

It can be likened to more of a toy then a professional CAD program.

It has a poor part library (which we can work around)

It cannot import or export files in different formats

It cannot be used to make prepare boards for DIY production

Express PCB has been used to design many PCBs (some layered and with
surface-mount parts. Print out PCB patterns and use the toner transfer method with an Etch
Resistant Pen to make boards. However, Express PCB does not have a nice print layout. Here
is the procedure to design in Express PCB and clean up the patterns so they print nicely.

Preparing Express PCB for First Use:

Express PCB comes with a less then exciting list of parts. So before any project
is started head over to Audio logic and grab the additional parts by morsel, ppl, and tangent,
and extract them into your Express PCB directory. At this point start the program and get
ready to setup the workspace to suit your style.

Dept. of EEE, RGMCET 49 | P a g e


Chapter 4 Software Description

Click View -> Options. In this menu, setup the units for “mm” or “in” depending
on how you think, and click “see through the top copper layer” at the bottom. The standard
color scheme of red and green is generally used but it is not as pleasing as red and blue.

4.1.1 The Interface:

When a project is first started you will be greeted with a yellow outline. This
yellow outline is the dimension of the PCB. Typically after positioning of parts and traces,
move them to their final position and then crop the PCB to the correct size. However, in
designing a board with a certain size constraint, crop the PCB to the correct size before
starting.

Fig: 4.1 show the toolbar in which the each button has the following functions:

Fig 4.1: Tool bar necessary for the interface

 The select tool: It is fairly obvious what this does. It allows you to move and
manipulate parts. When this tool is selected the top toolbar will show buttons to move
traces to the top / bottom copper layer, and rotate buttons.
 The zoom to selection tool: does just that.
 The place pad: button allows you to place small soldier pads which are useful for
board connections or if a part is not in the part library but the part dimensions are
available. When this tool is selected the top toolbar will give you a large selection of
round holes, square holes and surface mount pads.
 The place component: tool allows you to select a component from the top toolbar and
then by clicking in the workspace places that component in the orientation chosen
using the buttons next to the component list. The components can always be rotated
afterwards with the select tool if the orientation is wrong.
 The place trace: tool allows you to place a solid trace on the board of varying
thicknesses. The top toolbar allows you to select the top or bottom layer to place the
trace on.

Dept. of EEE, RGMCET 50 | P a g e


Chapter 4 Software Description

 The Insert Corner in trace: button does exactly what it says. When this tool is
selected, clicking on a trace will insert a corner which can be moved to route around
components and other traces.
 The remove a trace button is not very important since the delete key will achieve the
same result.

4.1.2 Design Considerations:

Before starting a project there are several ways to design a PCB and one must
be chosen to suit the project’s needs.

Single sided, or double sided?

When making a PCB you have the option of making a single sided board, or a
double sided board. Single sided boards are cheaper to produce and easier to etch, but much
harder to design for large projects. If a lot of parts are being used in a small space it may be
difficult to make a single sided board without jumper over traces with a cable. While
there’s technically nothing wrong with this, it should be avoided if the signal travelling over
the traces is sensitive (e.g. audio signals).

A double sided board is more expensive to produce professionally, more


difficult to etch on a DIY board, but makes the layout of components a lot smaller and
easier. It should be noted that if a trace is running on the top layer, check with the
components to make sure you can get to its pins with a soldering iron. Large capacitors,
relays, and similar parts which don’t have axial leads can NOT have traces on top unless
boards are plated professionally.

Ground-plane or other special purposes for one side

When using a double sided board you must consider which traces should be on
what side of the board. Generally, put power traces on the top of the board, jumping only to
the bottom if a part cannot be soldiered onto the top plane (like a relay), and vice- versa.

Some projects like power supplies or amps can benefit from having a solid
plane to use for ground. In power supplies this can reduce noise, and in amps it minimizes
the distance between parts and their ground connections, and keeps the ground signal as

Dept. of EEE, RGMCET 51 | P a g e


Chapter 4 Software Description

simple as possible. However, care must be taken with stubborn chips such as the TPA6120
amplifier from TI. The TPA6120 datasheet specifies not to run a ground plane under the
pins or signal traces of this chip as the capacitance generated could effect performance
negatively.

4.2 PIC Compiler:


PIC compiler is software used where the machine language code is written and
compiled. After compilation, the machine source code is converted into hex code which is to
be dumped into the microcontroller for further processing. PIC compiler also supports C
language code.
It’s important that you know C language for microcontroller which is
commonly known as Embedded C. As we are going to use PIC Compiler, hence we also call
it PIC C. The PCB, PCM, and PCH are separate compilers. PCB is for 12-bit opcodes, PCM
is for 14-bitopcodes, and PCH is for 16-bit opcode PIC microcontrollers. Due to many
similarities, all three compilers are covered in this reference manual. Features and limitations
that apply to only specific microcontrollers are indicated within. These compilers are
specifically designed to meet the unique needs of the PIC microcontroller.
PIC C is not much different from a normal C program. If you know assembly,
writing a C program is not a crisis. In PIC, we will have a main function, in which all your
application specific work will be defined. In case of embedded C, you do not have any
operating system running in there. So you have to make sure that your program or main file
should never exit. This can be done with the help of simple while (1) or for (;;) loop as they
are going to run infinitely.

We have to add header file for controller you are using, otherwise you will
not be able to access registers related to peripherals.

#include <16F72.h> // header file for PIC 16F72//

4.3 Proteus:

Proteus is software which accepts only hex files. Once the machine code is
converted into hex code, that hex code has to be dumped into the microcontroller and this is
done by the Proteus. Proteus is a programmer which itself contains a microcontroller in it
other than the one which is to be programmed. This microcontroller has a program in it

Dept. of EEE, RGMCET 52 | P a g e


Chapter 4 Software Description

written in such a way that it accepts the hex file from the pic compiler and dumps this hex file
into the microcontroller which is to be programmed. As the Proteus programmer requires
power supply to be operated, this power supply is given from the power supply circuit
designed and connected to the microcontroller in proteus. The program which is to be
dumped in to the microcontroller is edited in proteus and is compiled and executed to check
any errors and hence after the successful compilation of the program the program is dumped
in to the microcontroller using a dumper.

4.4 Procedural steps for compilation, simulation and dumping:

Compilation and simulation steps:

For PIC microcontroller, PIC C compiler is used for compilation. The


compilation steps are as follows:

 Open PIC C compiler.


 You will be prompted to choose a name for the new project, so create a separate
folder where all the files of your project will be stored, choose a name and click save.

Fig 4.2: Picture of opening a new file using PIC C compiler

Dept. of EEE, RGMCET 53 | P a g e


Chapter 4 Software Description

 Click Project, New, and something the box named 'Text1' is where your code should
be written later.
 Now you have to click 'File, Save as' and choose a file name for your source code
ending with the letter '.c'. You can name as 'project.c' for example and click save.
Then you have to add this file to your project work.

Fig 4.3: Picture of compiling a new file using PIC C compiler

Fig 4.4: Picture of compiling a project.c file using PIC C compiler

Dept. of EEE, RGMCET 54 | P a g e


Chapter 4 Software Description

 You can then start to write the source code in the window titled 'project.c' then before
testing your source code; you have to compile your source code, and correct eventual
syntax errors.

Fig 4.5: Picture of checking errors and warnings using PIC C compiler

 By clicking on compile option .hex file is generated automatically.


 This is how we compile a program for checking errors and hence the compiled
program is saved in the file where we initiated the program.

Dept. of EEE, RGMCET 55 | P a g e


Chapter 4 Software Description

Fig 4.6: Picture of .hex file existing using PIC C compiler

After compilation, next step is simulation. Here first circuit is designed in


Express PCB using Proteus 7 software and then simulation takes place followed by dumping.
The simulation steps are as follows:
 Open Proteus 7 and click on IS1S6.
 Now it displays PCB where circuit is designed using microcontroller. To design
circuit components are required. So click on component option.
10. Now click on letter ’p’, then under that select PIC16F72 ,other components related to the
project and click OK. The PIC 16F72 will be called your “'Target device”, which is the final
destination of your source code.

Dumping steps:
The steps involved in dumping the program edited in proteus 7 to
microcontroller are shown below:
1. Initially before connecting the program dumper to the microcontroller kit the window
is appeared as shown below.

Dept. of EEE, RGMCET 56 | P a g e


Chapter 4 Software Description

Fig 4.7: Picture of program dumper window

2. Select Tools option and click on Check Communication for establishing a connection
as shown in below window

Dept. of EEE, RGMCET 57 | P a g e


Chapter 4 Software Description

Fig 4.8: Picture of checking communications before dumping program


into microcontroller

3. After connecting the dumper properly to the microcontroller kit the window is appeared as
shown below.

Dept. of EEE, RGMCET 58 | P a g e


Chapter 4 Software Description

Fig 4.9: Picture after connecting the dumper to microcontroller

4. Again by selecting the Tools option and clicking on Check Communication the
microcontroller gets recognized by the dumper and hence the window is as shown below.

Dept. of EEE, RGMCET 59 | P a g e


Chapter 4 Software Description

Fig 4.10: Picture of dumper recognition to microcontroller

5. Import the program which is ‘.hex’ file from the saved location by selecting File option
and clicking on ‘Import Hex’ as shown in below window.

Dept. of EEE, RGMCET 60 | P a g e


Chapter 4 Software Description

Fig 4.11: Picture of program importing into the microcontroller

6. After clicking on ‘Import Hex’ option we need to browse the location of our program and
click the ‘prog.hex’ and click on ‘open’ for dumping the program into the microcontroller.

Dept. of EEE, RGMCET 61 | P a g e


Chapter 4 Software Description

7. After the successful dumping of program the window is as shown below.

Fig 4.12: Picture after program dumped into the microcontroller

Dept. of EEE, RGMCET 62 | P a g e


Chapter 5 Advantages and disadvantages

CHAPTER 5
ADVANTAGES AND DISADVANTAGES

Dept. of EEE, RGMCET 63 | P a g e


Chapter 5 Advantages and disadvantages

ADVANTAGES AND DISADVANTAGES

5.1 Advantages:

1. High sensitivity alcohol sensor


2. Fast response
3. Wide detection range
4. Stable performance and long life
5. Simple drive circuit
6. Efficient and low cost design.
7. Low power consumption.
8. Easily operable.

5.2 Disadvantages:

1. Modem should be properly installed for proper working of the system.

5.3 Applications:

• This system can be implemented in vehicles in real time to avoid accidents.

• This can be implemented in industries to detect whether the employee consumed


alcohol or not.

Dept. of EEE, RGMCET 64 | P a g e


Chapter 6 Results

CHAPTER 6
RESULTS

Dept. of EEE, RGMCET 65 | P a g e


Chapter 6 Results

RESULTS

6.1 Result:
The project “Alcohol sensing alert with engine locking system” was designed such
that to avoid accidents for drunken people using alcohol detection sensor. And it controls the
vehicle. By using this method we can eliminate the drunk and drive cases, which results in
saving the life of an alcohol consumption. The project” Alcohol detector” itself indicates that
whenever there is any alcohol content has been detected using alcoholic sensor then the
system automatically controls the motor of the vehicle. In this project we are using the
alcohol sensor that finds the alcoholic content and fed as input to the microcontroller. This
project is designed around a microcontroller which forms the control unit of the project. The
microcontroller gets the information regarding the alcohol through the alcoholic sensor which
is interfaced to the ignition of the vehicle receives the date and control vehicle using DC
motor. By this way we can take the prevention steps before occuring the major accidents and
we can avoid human losses and financial losses.

6.2 Conclusion:

In this project we have developed a real time model that can automatically lock
the engine when a drunken driver tries to drive a vehicle. Now-a-days car accidents are
mostly seen. By fitting this alcohol sensor into the car we can save guard the life of the driver
and also the remaining passengers. It is very simple application. The life time of the project is
high. It has low or zero maintenance cost and of course low power consumption.

Dept. of EEE, RGMCET 66 | P a g e


Chapter 6 Results

This is a developed design to efficiently check drunken driving. By implementing


the design of a safe car journey if possible decreasing the accident rate due to drinking. By
implementing this design drunken drivers can be controlled so are the accidents due to
drunken driving. Government must enforce laws to install such circuit in every car and must
regulate all car companies to preinstall such mechanism while manufacturing the car itself. If
this is achieved the deaths due to drunken drivers can be brought to minimum level. In this
type of system, future scope can be safely landing of car aside without disturbing other
vehicles.

Future Scope:

• This can be implemented in industries to detect whether the employee consumed


alcohol or not.

• This system can be equipped with a camera so that whenever the alcohol contents is
detected then it takes photo of that person and sends to nearest police station.

• GPS technology can be implemented to find out the location of vehicle.

Our project “G.S.M based alcohol detection” is mainly intended to design such that to
avoid accidents for drunken people using alcohol detection sensor and it sends S.M.S to the
predefined number and it also shows on L.C.D regarding alcohol detection.

Dept. of EEE, RGMCET 67 | P a g e


References

REFERENCES

Dept. of EEE, RGMCET 68 | P a g e


References

REFERENCES

The sites which were used while doing this project:

1. www.wikipedia.com

2. www.allaboutcircuits.com

3. www.microchip.com

4. www.howstuffworks.com

Books referred:

1. Raj kamal –Microcontrollers Architecture, Programming, Interfacing and System Design.

2. Mazidi and Mazidi –Embedded Systems.

3. PCB Design Tutorial –David.L.Jones.

4. PIC Microcontroller Manual – Microchip..

5. Embedded C –Michael.J.Pont.

Dept. of EEE, RGMCET 69 | P a g e

You might also like