Sunteți pe pagina 1din 71

SMART HELMET

A Main Project Report Submitted in the Partial Fulfillment of the


Requirements for the Award of the Degree of

BACHELOR OF TECHNOLOGY
In
ELECTRONICS & COMMUNICATION ENGINEERING

Submitted
By

N. Tejaswini - 13K81A0442
P. Akhil - 13K81A0444
D. Akarsh Reddy - 13K81A0416

Under the Supervision of

Mr. K. Yadaiah
Associate Professor, ECE

Department of Electronics and Communication Engineering


St. MARTINS ENGINEERING COLLEGE
Dhulapally, Secunderabad, R.R Dist, Telangana, India-500041

April, 2017

i
St. MARTINS ENGINEERING COLLEGE
Department of Electronics and Communication Engineering

CERTIFICATE

This is to certify that the project work embodies in this dissertation entitled Smart Helmet
being submitted by N.Tejaswini-13K81A0442, P.Akhil-13K81A0444, D.Akarsh Reddy-
13K81A0416 for partial fulfillment of the requirement for the award of Bachelor of
Technology in Electronics and Communications Engineering discipline to St. Martins
Engineering College during the academic year 2013-17 is a record of bonafide piece of work,
undertaken by the supervision of the undersigned.

Supervised by Head of the Department


Mr.K.YADAIAH Mr.K.YADAIAH
M.Tech(Ph.D) M.Tech(Ph.D)
Department of E.C.E Department of E.C.E.
Associate Professor Associate Professor

EXTERNAL EXAMINER

ACKNOWLEDGEMENT
ii
We are happy to express my deep sense of gratitude to the principal of the college Dr. S P
VENU MADHAVA RAO, B.E, M.Tech, PhD, Professor for having provided us with adequate
facilities to pursue our project.
We would like to thank Mr. K.YADAIAH, Assoc. Professor and Head of the Department
of Electronics and Communication Engineering, St. Martins Engineering College, for having
provided the freedom to use all the facilities available in the department, especially the
laboratories and the library.
We would like to thank all our Project Review Committee members Mr. S. GOPI
KRISHNA, M.Tech, PhD, Asst. Professor, Mr. VENKANNA MOOD, M.Tech, PhD, Assoc.
Professor Mr. K. NISHAKAR, M.Tech, Assoc. Professor for helping us throughout our project
work.
We are very grateful to my guide Mr. K.YADAIAH, Associate Professor in the Department
of Electronics and Communication Engineering, St. Martins Engineering College, for his
extensive patience and guidance throughout my project work.
We sincerely thank all the teaching and non-teaching staff of the Department of Electronics
and Communication for their timely suggestions, healthy criticism and motivation during the
course of this work.
We would also like to thank my classmates for always being there whenever we needed
help or moral support. With great respect and obedience, We thank our parents who were the
backbone behind our deeds.
Finally, we express my immense gratitude with pleasure to the other individuals who have
either directly or indirectly contributed to my need at right time for the development and success
of this work.

N. Tejaswini P. Akhil D. Akarsh Reddy


13K81A0442 13K81A0444 13K81A0416

St. MARTINS ENGINEERING COLLEGE


iii
Department of Electronics and Communication Engineering

DECLARATION

We N.Tejaswini, P.Akhil, D.Akarsh Reddy, are the students of Bachelor of


Technology in Department of Electronics and Communications Engineering, session: 2013 -
17, St. Martins engineering College, hereby declare that the work presented in this Project
Work entitled Smart Helmet is the outcome of our own bonafide work and is correct to the best
of our knowledge and this work has been undertaken taking care of Engineering Ethics. The
result embodied in this project report has not been submitted in any university for award of any
degree

N. Tejaswini P. Akhil D. Akarsh Reddy


(13K81A0442) (13K81A0444) (13K81A0416)

ABSTRACT OF PROJECT WORK

iv
An accident is a specific, unexpected, unusual and unintended external action which
occurs in a particular time and place, with no apparent and deliberate cause but with marked
effects. Carelessness of the driver is the major factor of such accidents. The traffic authorities
give a lot of instructions to the vehicle operators. But many of them do not obey the rules.
Nowadays most of the countries are forcing the motor riders to wear the helmet and not to use the
vehicles when the person is in drunken condition. But still the rules are being violated by the
users. In order to overcome this we introduces an intelligent system, Smart Helmet, which
automatically checks whether the person is wearing the helmet and has non- alcoholic breath
while driving. Here we have a transmitter at the helmet and the receiver at the bike. There is a
switch used to sure the wearing of helmet on the head. The ON condition of the switch ensures
the placing of the helmet in proper manner. An alcohol sensor is placed near to the mouth of the
driver in the helmet to detect the presence of alcohol.The engine should not ON if any of the two
conditions is violated.When the rider crashes and the helmet hits the ground, the sensors sense
and gives to controller board, the controller extract GPS data using GPS module that is intefaced
to it. When the data exceeds the minimum stress limit then GSM module automatically sends
message to ambulance or family members.

LIST OF CONTENTS
Topic Name PAGE NO

v
Certificate i
Abstract ii
List of figures v
List of tables vi

CHAPTER 1: INTRODUCTION
1.1 INTRODUCTION 1
1.2 MOTIVATION OF PROJECT 1
1.3 OBJECTIVE OF THE PROJECT 2
1.4 THESIS ORAGNISATION 3
1.5 APPLICATIONS 3
1.6 CONCLUSION 4
CHAPTER 2:DESCRIPTION OF PROJECT
2.1 INTRODUCTION 5
2.2 BLOCK DIAGRAM 5
2.3 INTRODUCTION TO ARDUINO BOARD 6
2.3.1 DIGITAL PINS 8
2.3.2 ANALOG PINS 9
2.3.3 POWER PINS 9
2.3.4 OTHER PINS 9
2.4 ATMEGA328P 10
2.4.1 PIN DIAGRAM 10
2.5 FEATURES 12
2.6 REGULATED POWER SUPPLY 13
2.6.1 INTRODUCTION 13
2.6.2 BLOCK DIAGRAM 14
2.7 LCD 15
2.8 MOTOR DRIVE AND MOTOR 18

vi
2.8.1 PRINCIPLES OF OPERATION 18
2.8.2 MOTOR DRIVER L293D 19
2.8.3 WORKING OF L293D 20
2.9 LED 20
2.10 MQ 3 SENSOR 22
2.10.1 DATA SHEET 23
2.10.2 HOW DOES IT LOOK LIKE 23
2.10.3 WORKING PROCESS 24
2.10.4 CONNECTING MQ3 WITH ARDUINO 25
2.11 IR SENSOR 25
2.11.1 CIRCUIT DIAGRAM & EXPLANATION 26
2.12 ACCELEROMETER 28
2.12.1 PRINCIPLE OF OPERATION 29
2.12.2 TYPES OF ACCELEROMETERS 29
2.12.3 OUTPUT 31
2.13 GPRS MODULE 33
2.13.1 GPRS ACCESS INTERFACE 35
2.13.2 NETWORK INTERFACE 36
2.13.3 LOGICAL ARCHITECTURE 37
2.14 BUZZER 38
2.15 POTENTIOMETER 39
2.16 RESET BUTTON 42
2.17 FLOW CHART 43
2.18 SOFTWARE REQUIREMENTS 44
2.18.1 ARDUINO IDE 44
2.19 CONCLUSION 45

vii
CHAPTER 3: TOOL FLOW
3.1 INTRODUCTION 46
3.2 ARDUINO SOFTWARE 46
3.2.1 STEPS TO OPERATE 46
3.2.2 TOOL BAR BUTTONS 49
3.2.3 MENU BAR 49
3.3 CONCLUSION 50

CHAPTER 4: SIMULATION RESULTS


4.1 INTRODUCTION 51
4.2 SIMULATION AND TEST RESULTS 51
4.3 CONCLUSION 55

CHAPTER 5: ADVANTAGES AND LIMITATIONS


5.1 INTRODUCTION 56
5.2 ADVANTAGES 56
5.3 LIMITATIONS 56
5.4 CONCLUSION 56

CHAPTER 6: FUTURE SCOPE AND CONCLUSION


6.1 INTRODUCTION 57
6.2 FUTURE SCOPE 57
6.3 CONCLUSION 57

REFERENCES 58
BIBLIOGRAPHY 59

viii
APPENDIX

LIST OF FIGURES
Name of figure Page no
2.1.1 Block diagram of SMART HELMET 5
ix
2.3.1 Structure of Arduino Board
7
2.3.2 Arduino Board 7
2.4.1 Pin configuration of Atmega 328 10
2.6.1 Regulated Power Supply 14
2.6.2 Circuit diagram of Regulated Power Supply with Led 14
Connection
2.7.1 Liquid Crystal Display
17
2.8.1 Internal structure DC motor 18
2.8.2 DC Motor 19
2.8.3 Pin diagram of L293D 19
2.9.1 Inside a LED 21
2.9.2 Parts of LED 21
2.9.3 Electrical Symbol & Polarities of LED 22
2.10.1 MQ 3 Sensor 22
2.10.2 MQ 3 Sensor Internal 23
2.10.3 MQ 3 Working 24
2.10.4 MQ 3 Sensor Behavior 24
2.10.5 MQ3 Sensor to Arduino 25
2.11.1 IR Sensor 26
2.11.2 Circuit Diagram of IR Sensor 26
2.11.3 IR Interfacing with Arduino 27
2.12.1 Accelerometer 28
2.12.2 Capacitive Accelerometer 30
2.12.3 Piezo Electric Accelerometer 30
2.12.4 Accelerometer Interfacing with Arduino 33

x
2.13.1 GPRS Module 34
2.13.2 GPRS Access Interface 36
2.13.3 GPRS Architecture 37
2.13.4 GPRS Interfacing With Arduino 37
2.14.1 Buzzer 38
2.15.1 Potentiometer Connected to Arduino 39
2.15.2 Potentiometer Construction 40
2.15.3 Types of Potentiometer 41
2.15.4 Electronic Symbol for Potentiometer 41
2.15.5 Circuit for Potentiometer 42
2.16.1 Reset Button 43
2.17.1 Flow Chart of Smart Helmet 43
2.18.1 Arduino IDE 44
3.2.1 Screen after Opening Arduino IDE 47
3.2.2 Screen after Writing the Program 47
3.2.3 Screen for Selection of Board before Compiling 48
3.2.4 Screen while Compiling Sketch 48
3.2.5 Screen while Uploading Program to Arduino Board 49
4.2.1 Initial Setup when Power is ON 51
4.2.2 Message displayed when testing GSM network 52
4.2.3 After completing network testing of GSM & GPS 52
4.2.4 Confirmation of Wearing Helmet 53
4.2.5 Alcohol Detection 53
4.2.6 Engine ON status 54
4.2.7 Accident Detection 54

LIST OF TABLES

xi
Table Name Page No.

2.7.1 Pin Function of LCD 16


2.8.1 Pin Function of L293D20 20
2.12.1 Accelerometer Values 33

xii
Chapter 1

INTRODUCTION
1.1 Introduction:

An accident is a specific, unexpected, unusual and unintended external action which


occurs in a particular time and place, with no apparent and deliberate cause but with marked
effects. Carelessness of the driver is the major factor of such accidents. The traffic authorities
give a lot of instructions to the vehicle operators. But many of them do not obey the rules.
Nowadays most of the countries are forcing the motor riders to wear the helmet and not to use the
vehicles when the person is in drunken condition. But still the rules are being violated by the
users. In order to overcome this we introduces an intelligent system, Smart Helmet, which
automatically checks whether the person is wearing the helmet and has non- alcoholic breath
while driving. Here helmet in proper manner. An alcohol sensor is placed near to the mouth of the
driver in the helmet to detect the presence of alcohol. The data to be transferred is coded with RF
encoder and transmitted we have a transmitter at the helmet and the receiver at the bike. There is
a switch used to sure the wearing of helmet on the head. The ON condition of the switch ensures
the placing of the through radio frequency transmitter. The receiver at the bike receives the data
and decodes it through RF decoder. The engine should not ON if any of the two conditions is
violated. MCU controls the function of relay and thus the ignition, it control the engine through a
relay and a relay interfacing circuit.

1.2 Motivation of the project:

The idea of developing this project comes from social responsibility towards the society.
Bike riding is a lot of fun, but accidents happen. People choose motor bikes over car as it is much
cheaper to run, easier to repair, easier to park and flexible in traffic. In India more than 37 million
people are using two wheelers. Since usage is high accident percentage of two wheelers are also
high compared to four wheelers.

Motorcycles have high rate of fatal accidents than cars or trucks and buses. This project
aims for accident avoidance, safety and security of bike rider.

1
The main purpose of the project is to encourage wearing helmet. The system will ensure
that the motorbike will not start unless the rider is wearing a helmet and has not consumed
alcohol. Thus alcohol detection is also an important part in this project. Alcohol detections done
by MQ3 sensor and helmet detections done by IR and PIR sensors.
The system will also alert the bike rider if any obstacle comes too close while riding the
bike. This is found to be useful at night or when the riders drowsy or tired. By this accidents can
be prevented.
Also GSM technology is used to inform the family members in case of an accident.
Accident detection is done using accelerometer. Wireless communication through Ask module is
done between the helmet and motorbike.

1.3 Objective of the Project:

Existing System:
The existing project basically has a wireless telecommunication, and is connected to a
smart phone. This prototype uses sensors to detect a crash or accidents and the communication
hardware is used to automatically dial a predefined emergency contact. Thus helping the victim
to reach doctors as early as possible. The other existing system is to control the speed in which
the biker is going in. The helmet is fixed with all the components and sensors that read the speed
of the bike and accordingly instruct the rider to reduce or increase the speed based on the
obstacles ahead the bike. Along with the speed limit sensors the helmet also checks if the rider is
drunk and driving.

Proposed System:
Security in travel is primary concern for every one. This Project describes a design of
effective alarm system that can monitor an automotive / vehicle / car condition in traveling. This
project is designed to inform about an accident that is occurred to a vehicle to the family members
of the traveling persons. This project uses a piezo-electric sensor which can detect the abrupt
vibration when an accident is occurred. This sends a signal to microcontroller.
This Project presents an automatic vehicle accident detection system using GPS and GSM
modems. The system can be interconnected with the car alarm system and alert the owner on his
mobile phone. This detection and messaging system is composed of a GPS receiver,
2
Microcontroller and a GSM Modem. GPS Receiver gets the location information from satellites
in the form of latitude and longitude.

1.4 Thesis Organization


The thesis explains the implementation of "Smart Helmet" using Arduino UNO
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 Smart Helmet and its applications are discussed.

Chapter 2 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 Arduino UNO, IR
sensor, Alcohol sensor, power supplies, buzzer, DC motor and LCD,LED, Potentiometer are
considered.

Chapter 3 Presents the software description. It explains the implementation of the project using
Arduino software.

Chapter 4 Presents the results obtained i.e significant messages on LCD are shown

Chapter 5 Presents the advantages and limitations of the project.

Chapter 6 Presents the conclusion and future scope of the project.

Chapter 6 Presents the references of the project.

Chapter 6 Presents the appendix.

1.5 Applications

1. The system will ensure that the motorbike will not start unless the rider is wearing a
helmet and has not consumed alcohol. Hence safety of person is ensured.

2. Also GSM technology is used to inform the family members in case of an accident. This
project could be highly developed with upcoming technologies to provide further more
safety and security to the vehicle systems.

3
1.6 Conclusion

In this chapter we have discussed about the main aspects of the project. In the next
chapter we are going to see a brief description of the project.

4
Chapter 2
DESCRIPTION OF THE PROJECT
2.1 Introduction:

In this chapter we will see the block diagram and hardware description of the project in
brief.

2.2Block Diagram

The following figure shows the independent modules which are considered in this project.

Fig 2.1: Block diagram of Smart Helmet

The main blocks of the project are

1. Arduino UNO board

2. Alcohol Sensor

3. IR Sensor

4. LCD Display

5. Accelerometer

5
6.DC motor

7.GPRS

8.Regulated Power Supply (RPS)

2.3 Introduction to Arduino Board

The Arduino is a family of microcontroller boards to simplify electronic design,


prototyping and experimenting for artists, hackers, hobbyists, but also many professionals.
People use it as brains for their robots, to build new digital music instruments, or to build a
system that lets your house plants tweet you when theyre dry. Arduinos (we use the standard
Arduino Uno) are built around an ATmega microcontroller[1] essentially a complete computer
with CPU, RAM, Flash memory, and input/output pins, all on a single chip. Unlike, say, a
Raspberry Pi, its designed to attach all kinds of sensors, LEDs, small motors and speakers,
servos, etc. directly to these pins, which can read in or output digital or analog voltages between
0 and 5 volts. The Arduino connects to your computer via USB, where you program it in a simple
language (C/C++, similar to Java) from inside the free Arduino IDE[2] by uploading your
compiled code to the board. Once programmed, the Arduino can run with the USB link back to
your computer, or stand-alone without it no keyboard or screen needed, just power.

Fig 2.3.1 Structure of Arduino UNO Board

6
Looking at the board from the top down, this is an outline of what you will see

Fig 2.3.2 Arduino UNO Board

Starting clockwise from the top center:


Analog Reference pin (orange)

Digital Ground (light green)


Digital Pins 2-13 (green)
Digital Pins 0-1/Serial In/Out - TX/RX (dark green) - These pins cannot be used for
digital i/o (Digital Read and Digital Write) if you are also using serial communication
(e.g. Serial.begin).
Reset Button - S1 (dark blue)
In-circuit Serial Programmer (blue-green)
Analog In Pins 0-5 (light blue)
Power and Ground Pins (power: orange, grounds: light orange)
External Power Supply In (9-12VDC) - X1 (pink)
Toggles External Power and USB Power (place jumper on two pins closest to desired
supply) - SV1 (purple)

USB (used for uploading sketches to the board and for serial communication between the
board and the computer; can be used to power the board) (yellow)

7
2.3.1Digital Pins
In addition to the specific functions listed below, the digital pins on an Arduino board can
be used for general purpose input and output via the pin Mode(), Digital Read(), and Digital
Write() commands. Each pin has an internal pull-up resistor which can be turned on and off using
digital Write() (w/ a value of HIGH or LOW, respectively) when the pin is configured as an input.
The maximum current per pin is 40mA.
Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data. On
the Arduino Diecimila, these pins are connected to the corresponding pins of the FTDI
USB-to-TTL Serial chip. On
the Arduino BT, they are connected to the corresponding pins of the WT11 Bluetooth
module. On the Arduino Mini and LilyPad Arduino, they are intended for use with an
external TTL serial module (e.g. the Mini-USB Adapter).
External Interrupts: 2 and 3. These pins can be configured to trigger an interrupt on a low
value, a rising or falling edge, or a change in value. See the attach Interrupt() function for
details.
PWM: 3, 5, 6, 9, 10, and 11 Provide 8-bit PWM output with the analog Write() function.
On boards with an ATmega8, PWM output is available only on pins 9, 10, and 11.
BT Reset: 7. (Arduino BT-only) Connected to the reset line of the bluetooth module.
SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI communication,
which, although provided by the underlying hardware, is not currently included in the
Arduino language.
LED: 13. On the Diecimila and LilyPad, there is a built-in LED connected to digital pin
13. When the pin is HIGH value, the LED is on, when the pin is LOW, it's off.

2.3.2 Analog Pins


In addition to the specific functions listed below, the analog input pins support 10-bit
analog-to-digital conversion (ADC) using the analog Read() function. Most of the analog inputs
can also be used as digital pins: analog input 0 as digital pin 14 through analog input 5 as digital
pin 19. Analog inputs 6 and 7 (present on the Mini and BT) cannot be used as digital pins.
I2C: 4 (SDA) and 5 (SCL). Support I2C (TWI) communication using the Wire library
(documentation on the Wiring website).

8
2.3.3 Power Pins
VIN (sometimes labeled "9V"): The input voltage to the Arduino board when it's using an
external power source (as opposed to 5 volts from the USB connection or other regulated
power source). You can supply voltage through this pin, or, if supplying voltage via the
power jack, access it through this pin. Also note that the Lily Pad has no VIN pin and
accepts only a regulated input.
5V: The regulated power supply used to power the microcontroller and other components

on the board. This can come either from VIN via an on-board regulator, or be supplied by
USB or another regulated 5V supply.
3V3 (Diecimila-only) : A 3.3 volt supply generated by the on-board FTDI chip.
GND: Ground pins.

2.3.4 Other Pins


AREF: Reference voltage for the analog inputs. Used with analog Reference().
Reset: (Diecimila-only) Bring this line LOW to reset the microcontroller. Typically used
to add a reset button to shields which block the one on the board.

2.4 Atmega328
2.4.1 Pin diagram

9
Fig 2.4.1 Pin Configuration of Atmega328

Pin Description
VCC:
Digital supply voltage.
GND:
Ground.
Port A (PA7-PA0):
Port A serves as the analog inputs to the A/D Converter. Port A also serves as an 8-bit bi-
directional I/O port, if the A/D Converter is not used. Port pins can provide internal pull-up

10
resistors (selected for each bit). The Port A output buffers have symmetrical drive characteristics
with both high sink and source capability. When pins PA0 to PA7 are used as inputs and are
externally pulled low, they will source current if the internal pull-up resistors are activated. The
Port A pins are tri-stated when a reset condition becomes active, even if the clock is not running.
Port B (PB7-PB0):
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, even if the clock is not running. Port B also serves the functions of various special
features of the ATmega32.
Port C (PC7-PC0):
Port C is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each
bit). The Port C 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. If the JTAG interface is enabled, the pull-up resistors on
pins PC5(TDI), PC3(TMS) and PC2(TCK) will be activated even if a reset occurs. The TD0 pin
is tri-stated unless TAP states that shift out data are entered. Port C also serves the functions of
the JTAG interface.
Port D (PD7-PD0):
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. Port D also serves the functions of various special
features of the ATmega32.
Reset (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. Shorter pulses are not guaranteed to generate a reset.
XTAL1:
Input to the inverting Oscillator amplifier and input to the internal clock operating circuit.

11
XTAL2:
Output from the inverting Oscillator amplifier.
AVCC:
AVCC is the supply voltage pin for Port A and the A/D Converter. 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.
AREF:
AREF is the analog reference pin for the A/D Converter.
2.5 Features
1.8-5.5V operating range
Up to 20MHz
Part: ATMEGA328P-AU
32kB Flash program memory
1kB EEPROM
2kB Internal SRAM
2 8-bit Timer/Counters
16-bit Timer/Counter
RTC with separate oscillator
6 PWM Channels
8 Channel 10-bit ADC
Serial USART
Master/Slave SPI interface
2-wire (I2C) interface
Watchdog timer
Analog comparator
23 IO lines
Data retention: 20 years at 85C/ 100 years at 25C
Digital I/O Pins are 14 (out of which 6 provide PWM output)
Analog Input Pins are 6.
DC Current per I/O is 40 mA
DC Current for 3.3V Pin is 50mA

2.6 Regulated Power Supply

2.6.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,

12
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.

2.6.2 Block Diagram:

Fig 2.6.1: 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.6

13
Figure 2.6.2: 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)

Resistor

LED(light emitting diode)

2.7 Liquid Crystal Display

LCD stands for Liquid Crystal Display. LCD is finding widespread use replacing LEDs
(seven segment LEDs or other multi segment LEDs) because of the following reasons:

1. The declining prices of LCDs.

2. The ability to display numbers, characters and graphics. This is in contrast to LEDs,
which are limited to numbers and a few characters.

3. Incorporation of a refreshing controller into the LCD, thereby relieving the CPU of the
task of refreshing the LCD. In contrast, the LED must be refreshed by the CPU to keep
displaying the data.

14
4. Ease of programming for characters and graphics.

These components are specialized for being used with the microcontrollers, which

means that they cannot be activated by standard IC circuits. They are used for writing different

messages on a miniature LCD.

A model described here is for its low price and great possibilities most frequently used in

practice. It is based on the HD44780 microcontroller (Hitachi) and can display messages in two

lines with 16 characters each . It displays all the alphabets, Greek letters, punctuation marks,

mathematical symbols etc. In addition, it is possible to display symbols that user makes up on its

own. Automatic shifting message on display (shift left and right), appearance of the pointer,

backlight etc. are considered as useful characteristics.

PINS FUNCTIONS :

There are pins along one side of the small printed board used for connection to the

microcontroller. There are total of 14 pins marked with numbers (16 in case the background light

is built in). Their function is described in the table below:

Table 2.7.1 Pin Function of LCD


Description Logic State Name Pin Number Function
0V - Vss 1 Ground
5V+ - Vdd 2 Power supply
Vdd - 0 - Vee 3 Contrast
15
D0 D7 are interpreted as
0
commands RS 4
1
D0 D7 are interpreted as data
Write data (from controller to LCD) 0
R/W 5 Control of
Read data (from LCD to controller) 1
operating
Access to LCD disabled
0
Normal operating
1 E 6
Data/commands are transferred to
From 1 to 0
LCD
Bit 0 LSB 0/1 D0 7
Bit 1 0/1 D1 8
Bit 2 0/1 D2 9
Bit 3 0/1 D3 10
Data / commands
Bit 4 0/1 D4 11
Bit 5 0/1 D5 12
Bit 6 0/1 D6 13
Bit 7 MSB 0/1 D7 14

LCD SCREEN:
LCD screen[3] consists of two lines with 16 characters each. Each character consists of
5x7 dot matrix. Contrast on display depends on the power supply voltage and whether messages
are displayed in one or two lines. For that reason, variable voltage 0-Vdd is applied on pin
marked as Vee. Trimmer potentiometer is usually used for that purpose. Some versions of
displays have built in backlight (blue or green diodes). When used during operating, a resistor for
current limitation should be used (like with any LE diode).

16
Fig:2.7.1 Liquid Crystal Display

2.8 MOTOR DRIVE & MOTOR:

Here DC Motor is used to rotate the panel in the required direction. Let us study in detail
about the DC Motor.

2.8.1 Principles of Operation


In any electric motor, operation is based on simple electromagnetism. A current-carrying
conductor generates a magnetic field; when this is then placed in an external magnetic field, it
will experience a force proportional to the current in the conductor, and to the strength of the
17
external magnetic field. The internal configuration of a DC motor is designed to harness the
magnetic interaction between a current-carrying conductor and an external magnetic field to
generate rotational motion. Let's start by looking at a simple 2-pole DC electric motor (here red
represents a magnet or winding with a "North" polarization, while green represents a magnet or
winding with a "South" polarization).

Fig 2.8.1 Internal structure DC motor


Every DC motor has six basic parts. They are axle, rotor (a.k.a., armature), stator,
commutator, field magnet(s), and brushes. In most common DC motors (and all that BEAMERS
will see), the external magnetic field is produced by high-strength permanent magnets. The stator
is the stationary part of the motor -- this includes the motor casing, as well as two or more
permanent magnet pole pieces. The rotor (together with the axle and attached commutator)
rotates with respect to the stator.
The rotor consists of windings (generally on a core), the windings being electrically
connected to the commutator. The above diagram shows a common motor layout with the rotor
inside the stator (field) magnets.
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 magnet(s) are misaligned,
and the rotor will rotate until it is almost aligned with the stator's field magnets. As the rotor
reaches alignment, the brushes move to the next commutator contacts, and energize the next
winding. Given our example two-pole motor, the rotation reverses the direction of current
through the rotor winding, leading to a "flip" of the rotor's magnetic field, driving it to continue
rotating.

18
Figure 2.8.2 DC Motor
Consider a DC motor. A DC motor[4] will have two terminals. Let the terminals are D1
and D2. If we give positive voltage to D1 and negative voltage to D2 (simply voltage at D1
should be more positive than the voltage at D2) the rotor will rotate in forward direction.
Alternatively if the voltage at D1 is negative and D2 is positive (or in other words voltage at D1
is more negative than D2) then the motor will rotate in reverse direction.

2.8.2 MOTOR DRIVER L293D

Figure 2.8.3 Pin diagram of L293D

Table 2.8.1 Pin Function of L293D


Name Function Pin

19
No
Enable 1,2 Enable pin for Motor 1;active high 1
Input 1 Input 1 for Motor 1 2
Output 1 Output 1 for Motor 1 3
Ground Ground(0V) 4
Ground Ground(0V) 5
Output 2 Output 2 for Motor 1 6
Input 2 Input 2 for Motor 1 7
Vcc2 Supply voltage for Motors;9-12V(upto 36V) 8
Enable 3,4 Enable pin for Motor 2; active high 9
Input 3 Input 1 for Motor 1 10
Otput 3 Output 1 for Motor 1 11
Ground Ground (0V) 12
Ground Ground(0V) 13
Output 4 Output 2 for Motor 1 14
Input 4 Input 2 for Motor 1 15
Vcc1 Supply voltage; 5V(upto 36V) 16

2.8.3 Working of L293D


The 4 input pins for this L293d, pin 2,7 on the left and pin 15 ,10 on the right as shown
on the pin diagram[5]. Left input pins will regulate the rotation of motor connected across left
side and right input for motor on the right hand side. The motors are rotated on the basis of the
inputs provided across the input pins as LOGIC 0 or LOGIC 1. In simple you need to provide
Logic 0 or 1 across the input pins for rotating the motor.
2.9 LED:
A light-emitting diode (LED) is a semiconductor light source. LEDs are used as
indicator lamps in many devices, and are increasingly used for lighting. Introduced as a
practical electronic component in 1962, early LEDs emitted low-intensity red light, but
modern versions are available across the visible, ultraviolet and infrared wavelengths,
with very high brightness. The internal structure and parts of a led are shown in figures
2.9.1 and 2.9.2 respectively.

20
Fig 2.9.1: Inside a LED Fig
2.9.2:Parts of 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[6] is usually small in area (less than
1 mm2), and integrated optical components are used to shape its radiation pattern and assist in
reflection. LEDs 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. The compact size of LEDs has
allowed new text and video displays and sensors to be developed, while their high switching rates

21
are useful in advanced communications technology. The electrical symbol and polarities of led
are shown in fig: 2.10.3.

Fig 2.9.3: Electrical Symbol & Polarities of LED

2.10 MQ3 Sensor:

This is an alcohol sensor from futurlec, named MQ-3[7], which detects ethanol in the air.
It is one of the straightforward gas sensors so it works almost the same way with other gas
sensors. It costs $6.90.Typically, it is used as part of the breathalyzers or breath testers for the
detection of ethanol in the human breath.

Fig 2.10.1: MQ3 Sensor

22
2.10.1 Data Sheet:

Here is a datasheet[8], only 2 pages. It shows features, applications, specifications and


configurations etc. It is a pretty simple datasheet. Since this datasheet was not prepared in
English, the translation is not very accurate.

2.10.2 How does it look like:

Basically, it has 6pins, the cover and the body. Even though it has 6 pins, you can use only
4 of them. Two of them are for the heating system, which I call H and the other 2 are for
connecting power and ground, which I called A and B.
If you look at the inside of the sensor, you will find the little tube. Basically, this tube is a heating
system that is made of aluminum oxide and tin dioxide and inside of it there are heater coils,
which practically produce the heat. And you can also find 6 pins. 2 pins that I called Pin H are
connected to the heater coils and the other ones are connected to the tube.

Fig 2.10.2: MQ3 Sensor internal

23
2.10.3 Working Process:

How does it work? The core system is the cube. As you can see in this cross-sectional
view, basically, it is an Alumina tube cover by SnO2, which is tin dioxide. And between them
there is an Aurum electrode, the black one. And also you can see how the wires are connected.
So, why do we need them? Basically, the alumina tube and the coils are the heating system, the
yellow, brown parts and the coils in the picture.

Fig 2.10.3: MQ3 Sensor working

If the coil is heated up,SnO2 ceramics will become the semi - conductor, so there are
more movable electrons, which means that it is ready to make more current flow.Then, when the
alcohol molecules in the air meet the electrode that is between alumina and tin dioxide, ethanol
burns into acetic acid then more current is produced. So the more alcohol molecules there are, the
more current we will get. Because of this current change, we get the different values from the
sensor.

Fig 2.10.4: MQ3 Sensor behaviour

2.10.4 Connecting MQ3 with Arduino:


24
When attaching your MQ-3 to the Arduino[9], it should be noted that it doesnt matter
which way the MQ-3 alcohol sensor is pressed in. Both the A pins are electronically the same as
well as the B pins. The center pins on both sides are the heater element pins. Since the circuit will
be running on +5V DC it doesnt matter which way the sensor is soldered to the board.

Fig 2.10.5: MQ3 Sensor to Arduino

2.11 IR Sensor:

An infrared sensor is an electronic device, that emits in order to sense some aspects of the
surroundings. An IR sensor can measure the heat of an object as well as detects the motion.These
types of sensors measures only infrared radiation, rather than emitting it that is called as a Passive
IR Sensor. Usually in the infrared spectrum, all the objects radiate some form of thermal
radiations. These types of radiations are invisible to our eyes, that can be detected by an infrared
sensor.The emitter is simply an IR LED (Light Emitting Diode)and the detector is simply an IR
photodiode which is sensitive to IR light of the same wavelength as that emitted by the IR LED.
When IR light falls on the photodiode, The resistances and these output voltages, change in
proportion to the magnitude of the IR light received.

25
Fig 2.11.1: IR Sensor

2.11.1 Circuit Diagram and Explanation:

An infrared sensor circuit[10] is one of the basic and popular sensor module in
an electronic device. This sensor is analogous to humans visionary senses, which can be used to
detect obstacles and it is one of the common applications in real time.This circuit comprises of
the following components
LM358 IC 2 IR transmitter and receiver pair
Resistors of the range of kilo ohms.
Variable resistors.
LED (Light Emitting Diode).

Fig 2.11.2: Circuit Diagram of IR sensor

In this project, the transmitter section includes an IR sensor, which transmits continuous
IR rays to be received by an IR receiver module. An IR output terminal of the receiver varies
depending upon its receiving of IR rays. Since this variation cannot be analyzed as such,
therefore this output can be fed to a comparator circuit. Here an operational amplifier (op-amp) of
LM 339 is used as comparator circuit.
When the IR receiver does not receive a signal, the potential at the inverting input goes

26
higher than that non-inverting input of the comparator IC (LM339). Thus the output of the
comparator goes low, but the LED does not glow. When the IR receiver module receives signal to
the potential at the inverting input goes low. Thus the output of the comparator (LM 339) goes
high and the LED starts glowing. Resistor R1 (100 ), R2 (10k ) and R3 (330) are used to ensure
that minimum 10 mA current passes through the IR LED Devices like Photodiode and normal
LEDs respectively. Resistor VR2 (preset=5k ) is used to adjust the output terminals. Resistor VR1
(preset=10k ) is used to set the sensitivity of the circuit Diagram[11].

Fig 2.11.3: IR interfacing with Arduino

2.12 Accelrometer:

One of the most common inertial sensors is the accelerometer, a dynamic sensor capable
of a vast range of sensing[11]. Accelerometers are available that can measure acceleration in one,
two, or three orthogonal axes. They are typically used in one of three modes:
As an inertial measurement of velocity and position;
As a sensor of inclination, tilt, or orientation in 2 or 3 dimensions, as referenced from the

27
acceleration of gravity (1 g = 9.8m/s2);
As a vibration or impact (shock) sensor.
There are considerable advantages to using an analog accelerometer as opposed to
an inclinometer such as a liquid tilt sensor inclinometers tend to output binary information
(indicating a state of on or off), thus it is only possible to detect when the tilt has exceeded some
thresholding angle.

Fig:2.12.1 Accelerometer

2.12.1 Principle of Operation

Most accelerometers are Micro-Electro-Mechanical Sensors (MEMS). The basic principle


of operation behind the MEMS accelerometer is the displacement of a small proof mass etched
into the silicon surface of the integrated circuit and suspended by small beams.
Consistent with Newton's second law of motion (F = ma), as an acceleration is applied to
the device, a force develops which displaces the mass. The support beams act as a spring, and the

28
fluid (usually air) trapped inside the IC acts as a damper, resulting in a second order lumped
physical system. This is the source of the limited operational bandwidth and non-uniform
frequency response of accelerometers[12].

2.12.2 Types of Accelerometers

There are several different principles upon which an analog accelerometer can be built.
Two very common types utilize capacitive sensing and the piezoelectric effect to sense the
displacement of the proof mass proportional to the applied acceleration.

Capacitive
Accelerometers that implement capacitive sensing output a voltage dependent on the
distance between two planar surfaces. One or both of these plates are charged with an electrical
current. Changing the gap between the plates changes the electrical capacity of the system, which
can be measured as a voltage output. This method of sensing is known for its high accuracy and
stability. Capacitive accelerometers[13] are also less prone to noise and variation with
temperature, typically dissipate less power, and can have larger bandwidths due to internal
feedback circuitry. (Elwenspoek 1993)

Fig:2.12.2 Capacitive Accelrometer

29
Piezoelectric
Piezoelectric sensing of acceleration is natural, as acceleration is directly proportional to
force. When certain types of crystal are compressed, charges of opposite polarity accumulate on
opposite sides of the crystal. This is known as the piezoelectric effect. In a piezoelectric
accelerometer[14], charge accumulates on the crystal and is translated and amplified into either
an output current or voltage.

Fig:2.12.3 Piezo electric Accelerometer

Piezoelectric accelerometers only respond to AC phenomenon such as vibration or shock.


They have a wide dynamic range, but can be expensive depending on their quality.
Piezo-film based accelerometers are best used to measure AC phenomenon such as vibration or
shock, rather than DC phenomenon such as the acceleration of gravity. They are inexpensive, and
respond to other phenomenon such as temperature, sound, and pressure.

2.12.3 Output:
An accelerometer output value is a scalar corresponding to the magnitude of the
acceleration vector. The most common acceleration, and one that we are constantly exposed to, is
the acceleration that is a result of the earth's gravitational pull. This is a common reference value
from which all other accelerations are measured (known as g, which is ~9.8m/s^2).

Digital output
Accelerometers with PWM output can be used in two different ways. For most accurate
results, the PWM signal can be input directly to a microcontroller where the duty cycle is read in
firmware and translated into a scaled acceleration value. (Check with the datasheet to obtain the
30
scaling factor and required output impedance.) When a microcontroller with PWM input is not
available, or when other means of digitizing the signal are being used, a simple RC
reconstruction filter can be used to obtain an analog voltage proportional to the acceleration. At
rest (50% duty-cycle) the output voltage will represent no acceleration, higher voltage values
(resulting from a higher duty cycle) will represent positive acceleration, and lower values (<50%
duty cycle) indicate negative acceleration. These voltages can then be scaled and used as one
might the output voltage of an analog output accelerometer. One disadvantage of a digital output
is that it takes a little more timing resources of the microcontroller to measure the duty cycle of
the PWM signal. Communication protocols could use I2C or SPI.
Analog output
When compared to most other industrial sensors, analog accelerometers require little
conditioning and the communication is simple by only using an Analog to Digital Converter
(ADC) on the microcontroller.
Typically, an accelerometer output signal will need an offset, amplification, and filtration.
For analog voltage output accelerometers, the signal can be a positive or negative voltage,
depending on the direction of the acceleration. Also, the signal is continuous and proportional to
the acceleration force. As with any sensor destined for an analog to digital converter, the value
must be scaled and/or amplified to maximally span the range of acquisition. Most analog to
digital converters used in musical applications acquire signals in the 0-5 V range.
The image at right depicts an amplification and offset circuit, including the on-board
operational amplifier in the adxl 105, minimizing the need for additional IC components. The
gain applied to the output is set by the ratio R2/R1. The offset is controlled by biasing the voltage
with variable resistor R4. Accelerometers output bias will drift according to ambient temperature.
The sensors are calibrated for operation at a specific temperature, typically room temperature.
However, in most short duration indoor applications the offset is relatively constant and stable,
and thus does not need adjustment. If the sensor is intended to be used in multiple environments
with differing ambient temperatures, the bias function should be sufficient for analog calibration
of the device. If the ambient temperature is subject to drastic changes over the course of a single
usage, the temperature output should be summed into the bias circuit. Smart sensors may even
take this into consideration[15].
The resolution of the data acquired is ultimately determined by the analog to digital
converter. It is possible, however, that the noise floor is above the minimum resolution of the

31
converter, reducing the resolution of your system. Assuming that the noise is equally distributed
across all frequencies, it is possible to filter the signal to only include frequencies within the
range of operation. The filter required depends upon both the type of acquisition as well as the
location of the sensor. The bandwidth is primarily influenced by the three different modes of
operation of the sensor.

Uses
The acceleration measurement has a variety of uses. The sensor can be implemented in a
system that detects velocity, position, shock, vibration, or the acceleration of gravity to determine
orientation (Doscher 2005)
A system consisting of two orthogonal sensors is capable of sensing pitch and roll. This is
useful in capturing head movements. A third orthogonal sensor can be added to the network to
obtain orientation in three dimensional space. This is appropriate for the detection of pen angles,
etc. The sensing capabilities of this network can be furthered to six degrees of spatial
measurement freedom by the addition of three orthogonal gyroscopes.
As a shock detector, an accelerometer[16] is looking for changes in acceleration. This jerk
is sensed as an overdamped vibration.
Verplaetse has outlined the bandwidths associated with various implementations of
accelerometers as an input device. These are:
Table 2.12.1 Accelerometer Values

Location Usage Frequency Acceleration

Head Tilt 0-8 Hz xx

Hand , Wrist, Finger Cont. 8-12 Hz 0.04-1.0 g

Hand, Arm, Upper Body Cont. 0-12 Hz 0.5-9.0 g

Foot, Leg Cont. 0-12 Hz 0.2-6.6 g

32
Fig:2.12.4 Accelrometer interfacing with Arduino

2.13 GPRS Module:


GPRS uses a packet-mode technique to transfer high-speed and low-speed data and
signalling in an efficient manner. GPRS optimises the use of network and radio resources. Strict
separation between the radio subsystem and network subsystem is maintained, allowing the
network subsystem to be reused with other radio access technologies. GPRS does not mandate
changes to an installed MSC base. New GPRS radio channels are defined, and the allocation of
these channels is flexible: from 1 to 8 radio interface timeslots can be allocated per TDMA frame,
timeslots are shared by the active users, and up and downlink are allocated separately. The radio
interface resources can be shared dynamically between speech and data services as a function of
service load and operator preference. Various radio channel coding schemes are specified to
allow bitrates from 9 to more than 150 kbit/s per user. Applications based on standard data
protocols are supported, and interworking is defined with IP networks and X.25 networks. GPRS
allows SMS transfer over GPRS radio channels

33
Fig:2.13.1 GPRS Module

GPRS is designed to support from intermittent and bursty data transfers through to
occasional transmission of large volumes of data. Several quality of service profiles are
supported. GPRS is designed for fast reservation to begin transmission of packets, typically 0,5 to
1 second. Charging should typically be based on the amount of data transferred. Three GPRS MS
modes of operation are supported: An MS in class-A mode of operation operates GPRS and other
GSM[17] services simultaneously. An MS in class-B mode of operation monitors control
channels for GPRS and other GSM services simultaneously, but can only operate one set of
services at one time. An MS in class-C mode of operation exclusively operates GPRS services..
GPRS introduces two new network nodes in the GSM PLMN: The Serving GPRS
Support Node (SGSN), which is at the same hierarchical level as the MSC, keeps track of the
individual MSs' location and performs security functions and access control. The SGSN is
connected to the base station system with Frame Relay. The Gateway GSN (GGSN) provides
interworking with external packet-switched networks, and is connected with SGSNs via an IP-
based GPRS backbone network. The HLR is enhanced with GPRS subscriber information, and
34
the SMS-GMSCs and SMS-IWMSCs are upgraded to support SMS transmission via the SGSN.
Optionally, the MSC/VLR can be enhanced for more-efficient co-ordination of GPRS[18] and
non-GPRS services and functionality: e.g., paging for circuit-switched calls that can be
performed more efficiently via the SGSN, and combined GPRS and non-GPRS location updates.
GPRS security functionality is equivalent to the existing GSM security. The SGSN performs
authentication and cipher setting procedures based on the same algorithms, keys, and criteria as
in existing GSM. GPRS uses a ciphering algorithm optimised for packet data transmission. A
GPRS ME can access the GPRS services with SIMs that are not GPRS-aware, and with GPRS-
aware SIMs.

2.13.1 GPRS Access Interfaces and Reference Points :


Each GPRS PLMN has two access points, the Um used for mobile access and the R
reference point used for origination or reception of messages. The R reference point for the
GPRS MSs is defined in GSM 07.60 . An interface differs from a reference point in that
an interface is defined where specific GPRS information is exchanged and needs to be fully
recognised. There is an inter-GPRS PLMN interface called Gp that connects two independent
GPRS networks for message exchange. There is also a GPRS PLMN to fixed network (typically
a packet data network) reference point called Gi. Gi is defined in GSM 09.61[19].

Fig:2.13.2 GPRS Access Interfaces

There may be more than a single GPRS network interface to several different packet data
(or other) networks. These networks may both differ in ownership as well as in communications
protocol (e.g., X.25, TCP/IP etc.). The network operator should define and negotiate interconnect
with each external (PDN or other) network.
35
2.13.2 Network Interfacing:
Network interworking is required whenever a PLMN supporting GPRS and any other
network are involved in the execution of a GPRS service request. With reference to figure 1,
interworking takes place through the Gi reference point and the Gp interface[20]. The GPRS
internal mechanism for conveying the PDP PDU through the GSM PLMN is managed by the
GSM GPRS network operator and is not apparent to the data user. The use of this GSM data
service[22] may have an impact on and increase the transfer time normally found for a message
when communicated through a fixed packet data network.

PSPDN Internetworking:
GPRS shall support interworking with PSPDN networks. The interworking may be either
direct or through a transit network (e.g., ISDN). GPRS shall support both X.121 and E.164
addresses. GPRS shall provide support for X.25 virtual circuits and X.25 fast select. X.75 or
X.75' may be used for interworking with X.25 PDNs. The GPRS TEs have addresses provided by
the GSM PLMN GPRS service operator and belong to the GPRS service domain. The PSPDN
TE sends data to the GPRS TE by use of the GSM PLMN GPRS DNIC (Data Network
Identification Code) or equivalent that uniquely identifies the GPRS network.

Internet(IP) Internetworking:
GPRS shall support interworking with networks based on the internet protocol (IP). IP is
defined in RFC 791. GPRS may provide compression of the TCP/IP header when an IP-datagram
is used within the context of a TCP connection. In a similar way to the PSPDN X.25 case, the
GSM PLMN GPRS service is an IP domain[21], and mobile terminals offered service by a GSM
service provider may be globally addressable through the network operator's addressing scheme

2.13.3 Logical Architecture:

36
Fig:2.13.3 GPRS Architecture

Fig:2.13.4 GPRS Interfacing with Arduino


37
2.14 Buzzer:
A buzzer or beeper is an audio signaling device, which may be mechanical,
electromechanical, or piezoelectric. Typical uses of buzzers and beepers include alarm devices,
timers, and confirmation of user input such as a mouse click or keystroke[23].

Fig:2.14.1 Buzzer

2.15 Potentiometer:

A potentiometer, informally a pot, is a three-terminal resistor with a sliding or rotating


contact that forms an adjustable voltage divider. If only two terminals are used, one end and the
wiper, it acts as a variable resistor or rheostat.

The measuring instrument called a potentiometer is essentially a voltage divider used for
measuring electric potential (voltage); the component is an implementation of the same principle,
hence its name.

Potentiometers are commonly used to control electrical devices such as volume controls
on audio equipment. Potentiometers operated by a mechanism can be used as position
transducers, for example, in a joystick. Potentiometers are rarely used to directly control
significant power (more than a watt), since the power dissipated in the potentiometer would be
comparable to the power in the controlled load.
38
Fig:2.15.1 Potentiometer connected to arduino

Potentiometer construction

Potentiometers consist of a resistive element, a sliding contact (wiper) that moves along
the element, making good electrical contact with one part of it, electrical terminals at each end of
the element, a mechanism that moves the wiper from one end to the other, and a housing
containing the element and wiper.

Fig:2.15.2 Potentiometer construction

Many inexpensive potentiometers are constructed with a resistive element (B) formed
into an arc of a circle usually a little less than a full turn and a wiper (C) sliding on this element
when rotated, making electrical contact. The resistive element can be flat or angled. Each end of
the resistive element is connected to a terminal (E, G) on the case. The wiper is connected to a
third terminal (F), usually between the other two. On panel potentiometers, the wiper is usually
the center terminal of three. For single-turn potentiometers, this wiper typically travels just under
39
one revolution around the contact. The only point of ingress for contamination is the narrow
space between the shaft and the housing it rotates in.

Another type is the linear slider potentiometer, which has a wiper which slides along a
linear element instead of rotating. Contamination can potentially enter anywhere along the slot
the slider moves in, making effective sealing more difficult and compromising long-term
reliability. An advantage of the slider potentiometer is that the slider position gives a visual
indication of its setting. While the setting of a rotary potentiometer can be seen by the position of
a marking on the knob, an array of sliders can give a visual impression of, for example, the effect
of a multi-band equalizer (hence the term "graphic equalizer").

The resistive element of inexpensive potentiometers is often made of graphite. Other


materials used include resistance wire, carbon particles in plastic, and a ceramic/metal mixture
called cermet. Conductive track potentiometers use conductive polymer resistor pastes that
contain hard-wearing resins and polymers, solvents, and lubricant, in addition to the carbon that
provides the conductive properties.

Fig:2.15.3 Types of potentiometer

40
Fig:2.15.4 Electronic symbol for potentiometer

Others are enclosed within the equipment and are intended to be adjusted to calibrate
equipment during manufacture or repair, and not otherwise touched. They are usually physically
much smaller than user-accessible potentiometers, and may need to be operated by a screwdriver
rather than having a knob. They are usually called "preset potentiometers" or "trim[ming] pots".
Some presets are accessible by a small screwdriver poked through a hole in the case to allow
servicing without dismantling.

Multiturn potentiometers are also operated by rotating a shaft, but by several turns rather
than less than a full turn. Some multiturn potentiometers have a linear resistive element with a
sliding contact moved by a lead screw; others have a helical resistive element and a wiper that
turns through 10, 20, or more complete revolutions, moving along the helix as it rotates.
Multiturn potentiometers, both user-accessible and preset, allow finer adjustments; rotation
through the same angle changes the setting by typically a tenth as much as for a simple rotary
potentiometer.

A string potentiometer is a multi-turn potentiometer operated by an attached reel of wire


turning against a spring, enabling it to convert linear position to a variable resistance.

User-accessible rotary potentiometers can be fitted with a switch which operates usually
at the anti-clockwise extreme of rotation. Before digital electronics became the norm such a
component was used to allow radio and television receivers and other equipment to be switched
on at minimum volume with an audible click, then the volume increased, by turning a knob[24].
Multiple resistance elements can be ganged together with their sliding contacts on the same shaft,
for example, in stereo audio amplifiers for volume control. In other applications, such as

41
domestic light dimmers, the normal usage pattern is best satisfied if the potentiometer remains set
at its current position, so the switch is operated by a push action, alternately on and off, by axial
presses of the knob.

Fig:2.15.5 Circuit for potentiometer

2.16 Reset Button:

In electronics and technology, a reset button is a button that can reset a device. On video
game consoles, the reset button restarts the game, losing the player's unsaved progress. On
personal computers, the reset button clears the memory and reboots the machine forcibly. Reset
buttons are found on circuit breakers to reset the circuit. This button can cause data corruption so
this button often doesn't exist on many machines. Usually, in computers and other electronic
devices, it is present as a small button, possibly recessed into the case or only accessible by a pin
or similar thin object, to prevent it being pressed accidentally .

Fig: 2.16.1 Reset Button

2.17 Flow Chart:

42
Fig:2.17 Flow Chart of Smart Helmet

2.18 Software Requirements:

2.18.1 Arduino IDE

The open-source Arduino Software (IDE) makes it easy to write code and upload it to the board.
It runs on Windows, Mac OS X, and Linux. This software can be used with any Arduino board.
The Arduino Integrated Development Environment - or Arduino Software (IDE) - contains a text
editor for writing code, a message area, a text console, a toolbar with buttons for common
functions and a series of menus. It connects to the Arduino and Genuino hardware to upload
programs and communicate with them. Programs written using Arduino Software (IDE) are
called sketches[25]. These sketches are written in the text editor and are saved with the file
extension .ino. The editor has features for cutting/pasting and for searching/replacing text. The
43
message area gives feedback while saving and exporting and also displays errors. The console
displays text output by the Arduino Software (IDE), including complete error messages and other
information. The bottom righthand corner of the window displays the configured board and serial
port. The toolbar buttons allow you to verify and upload programs, create, open, and save
sketches, and open the serial monitor.

Fig:2.17.1 Arduino IDE

2.19 Conclusion:

The description of the project is explained through this chapter and the various blocks which are
implemented in the project were explained.

44
Chapter 3

TOOL FLOW OF THE PROJECT

3.1 Introduction
In this chapter we will see how to operate the arduino software. This chapter will give the
step-by-step instruction with related screenshots for ease of understanding.

3.2 Arduino Software

45
The open-source Arduino Software (IDE) makes it easy to write code and upload it to the
board. It runs on Windows, Mac OS X, and Linux. This software can be used with any Arduino
board. The Arduino Integrated Development Environment - or Arduino Software (IDE) - contains
a text editor for writing code, a message area, a text console, a toolbar with buttons for common
functions and a series of menus. It connects to the Arduino and Genuino hardware to upload
programs and communicate with them. Programs written using Arduino Software (IDE) are
called sketches. These sketches are written in the text editor and are saved with the file
extension .ino. The editor has features for cutting/pasting and for searching/replacing text. The
message area gives feedback while saving and exporting and also displays errors. The console
displays text output by the Arduino Software (IDE)[26], including complete error messages and
other information. The bottom righthand corner of the window displays the configured board and
serial port. The toolbar buttons allow you to verify and upload programs, create, open, and save
sketches, and open the serial monitor.

3.2.1 Steps to operate Arduino Software:

1. Open Arduino IDE by double clicking on the icon.

46
Fig:3.2.1. Screen after opening arduino IDE

2. Write the program in the editor space.

47
Fig.3.2.2: Screen after writing the program

3. Before compiling the program go to tools board select arduino/genuine uno.

Fig.3.2.3: Screen for selection of board before compiling

4. Compile the program to know whether there are any errors in the program.

Fig:3.2.4: Screen while compiling sketch


48
5. Upload the program on to the arduino board to run the application.

Fig:3.2.5: Screen while uploading program to the arduino board

3.2.2 Tool Bar Buttons


1. VERIFY: Checks your code for errors compiling it.

SYMBOL:
2. UPLOAD: Compiles your code and uploads it to the configured board.

SYMBOL:
3. NEW: Creates a new sketch.

SYMBOL:
4. OPEN: Presents a menu of all the sketches in your sketchbook. Clicking one will open it
within the current window overwriting its content.

SYMBOL:
5. SAVE: Saves the sketch.

49
SYMBOL:
6. SERIAL MONITOR: Displays serial data being sent from the Arduino or Genuino board (USB
or serial board).

SYMBOL:

3.2.3 Menu Bar


Additional commands are found within the five menus: File, Edit, Sketch, Tools, Help.
The menus are context sensitive, which means only those items relevant to the work currently
being carried out are available.

3.3 Conclusion: In this chapter we have discussed about how to operate the arduino software
in detail.

50
Chapter 4
RESULTS AND DISCUSSION

4.1 INTRODUCTION

Snapshots of the test results are shown to get a better idea of the desired output. This
chapter deals with the design testing and simulation results. The

4.2SIMULATION AND TEST RESULTS

The below figure shows the initial setup when power is switched on

Fig:4
.2.1

Initial setup when power is ON

51
Then the network of the GSM is tested and the message is shown as follows.

Fig:4.2.2 Message displayed when testing GSM network

If GSM and GPS of GPRS module is ready and after testing the network of GSM then following
message is displayed.

Fig.4.2.3 After completing network testing of GSM & GPS

52
If the rider did'nt wear the helmet, then IR sensor sends the signals and following message is
displayed and the engine is turned OFF.

fig. 4.2.4. Confirmation of wearing helmet

If the rider is drunk and riding then the following message is displayed and engine of the bike
will be turned off.

fig 4.2.5. Alcohol Detection

53
If both the conditions i.e. the rider should wear the helmet and the rider should not consume
alcohol while riding are satisfied, then the following message is displayed. The engine is ON.

fig 4.2.6. Engine ON status

If accident occurs then accelerometer detects accident and message is sent to the registered
numbers. The status is shown as follows on LCD.

fig 4.2.7. Accident Detection

54
4.3 CONCLUSION:

In this chapter we have seen the simulation results .In the next chapter we will see the
advantages and limitations.

Chapter 5
55
ADVANTAGES AND LIMITATIONS

5.1 Introduction:
The main advantages and limitations of the Smart Helmet are discussed below.

5.2 Advantages:
1. It will help to reduce the number of road accidents which are very frequent in a country like
India where the traffic is very high.
2. It will help to create awareness about the need to wear helmet during bike riding.
3. The system will ensure that the motorbike will not start unless the rider is wearing a helmet
and has not consumed alcohol.
4. Also GSM technology is used to inform the family members in case of an accident.

5.3 Limitations:
1.The bike will not start unless we wear the helmet.
2. Miss handling of the helmet may cause unnecessarily message alert.

5.4 Conclusion:
In this chapter we have discussed the advantages and limitations of Smart Helmet.

Chapter 6

56
CONCLUSION AND FUTURE SCOPE

6.1 Introduction:

The main aim of this project is to encourage people to wear helmet and to prevent road
accidents, which is achieved. Thus road accidents can be prevented to some extent and safety of
bike riders is ensured.

6.2 Conclusion:

The designed system is highly useful to avoid accidents which happen around the night
time. It provides more than 70% safety for two wheelers. It is the fact that implementation of
system will increase cost of vehicle but it is better to have some percent safety rather than having
no percent of safety.

6.3 Future Scope:

This system could be further enhanced with future technologies to provide further more
safety and security to the vehicle systems, such as sensing the obstacles or static objects in front
of the vehicles so the accidents due to static obstacles could be avoided. The system has been
designed for a special objective that should protect not only the person riding the vehicle but also
the persons around it like pedestrians and also to prevent collision of vehicles with the other
vehicle or obstacles such as trees.

REFERENCES

57
[1].http://www.ladyada.net/learn/arduino/lesson1.html
[2].https://www.arduino.cc/en/Tutorial/BuiltInExamples
[3].http://www.microcontroller-project.com/16x2-lcd-working.html
[4].https://www.electrical4u.com/working-or-operating-principle-of-dc-motor
[5].http://www.rakeshmondal.info/L293D-Motor-Driver
[6].http://www.circuitstoday.com/how-a-led-works-light-emitting-diode-working
[7].http://sensorworkshop.blogspot.in/2008/04/sensor-report-mq3-gas-sensor.html
[8].http://www.futurlec.com/Alcohol_Sensor.shtml
[9].http://itp.nyu.edu/~ejp291/sensor_workshop/arduino.html
[10].http://www.electronicshub.org/ir-sensor/
[11].http://www.rakeshmondal.info/IR-Infrared-Sensor-Interface-lcd-Arduino-uno
[12].https://www.arduino.cc/en/Tutorial/ADXL3xx
[13].http://engineeringsciences.uniroma2.it/MENU/DOWNLOAD/TESI/2013/2013_tesi
%20NISTICO%20Andrea.pdf
[14].https://www.americanpiezo.com/piezo-theory/piezo-accelerometer.html
[15].http://www.pcb.com/TestMeasurement/Accelerometers
[16].http://www.instructables.com/id/Interfacing-ADXL335-with-ARDUINO/
[17].https://www.youtube.com/watch?v=9UEcT5GxdBk
[18].http://www.espruino.com/datasheets/SIM900_AT.pdf
[19].http://www.circuitstoday.com/interface-gsm-module-with-arduino
[20].https://learn.sparkfun.com/tutorials/gps-basics
[21].http://gpsworld.com/what-exactly-is-gps-nmea-data/
[22].http://circuitdigest.com/microcontroller-projects/vehicle-tracking-system-using-arduino-
gps-and-gsm
[23].http://www.instructables.com/id/How-to-use-a-Buzzer-Arduino-Tutorial/
[24].https://www.arduino.cc/en/tutorial/potentiometer
[25].https://www.arduino.cc/en/guide/environment
[26]. http://discuss.littlebits.cc/t/introduction-to-arduino-programming-1-the-basics/22237

BIBLIOGRAPHY
58
1) International Journal of Scientific & Engineering Research Volume 2, Issue 12,
December-2011 ISSN 2229-5518 IJSER
2) International Journal of Science and Research (IJSR)ISSN (Online): 23197064
3) Vehicle Accident Alert & Locator IJECS-IJENS Volume 11, Issue 02
4) www.academia.edu/6541133/Smart_Helmet.php
5) I(IJSR) ISSN(Online):23197064 Vijay J, Saritha B, Priyadharshini B, Deepeka S and
LaxmiR(2011),Drunken Drive Protection System, International Journal of Scientific &
Engineering Research,Vol.2,No.12,ISSN:2229-5518

59

S-ar putea să vă placă și