Professional Documents
Culture Documents
"Smart Helmet": A Project Report ON
"Smart Helmet": A Project Report ON
A
PROJECT REPORT
ON
“SMART HELMET”
1
ASET
ABSTRACT
A smart helmet is a type of protective headgear used by the rider which makes bike driving safer
than before. The main purpose of this smart helmet to provide safety for rider . This implement by
using advance feature like alcohol detection, accident identification, location tracking, use as a
hands free device, solar powered, fall detection. This makes not only smart helmet but also feature
of smart bike. Its compulsory to wear helmet, without helmet ignition switch cannot ON. A RF
Module as wireless link which able to communicate between transmitter and receiver. If rider
getting drunk it gets automatically ignition switch is locked, and send message automatically to
their register number with their current location. So when accident occurs, it will send message by
GSM to register numbers with their current location by GPS module. It can use to receive call
while driving. The distinctive utility of project is fall detection, if the bike rider fall from bike it
will send message automatically.
2
ASET
DECLARATION
I hereby declare that the project entitled “Smart Helmet” submitted for the partial
fulfillment of B. Tech Degree is my original work and the project has not formed the basis for the
award of any degree, associate ship, fellowship or any other similar titles.
Shweta Sumra
Harshita Chittlangia
Ajay Badsara
Date: 17-05-2017
3
ASET
ACKNOWLEDGEMENT
It is indeed a great pleasure and matter of immense satisfaction for us to express our deep sense
profound gratitude towards all the people who have helped, inspired us in our project work.
First we would like to give our gratitude to Ms. Rekha Chaturvedi (Assistant Professor, ASET) for
the effort taken by her right from the selection of the project to its completion. She spent her
precious time whenever we were in need of guidance.
Moreover we would like to thank (Director, ASET), who was always there whenever we needed
any support and was a constant source of inspiration for accomplishment of this project.
Harshita Chittlangia
Shweta Sumra
Ajay Badsara
4
ASET
Table Of Contents
Title page 1
Abstract 2
Declaration 3
Acknowledgement 4
List of figures
List of Contents
1 Introduction 9
2 Project Description 15
3. Microcontroller 18
4. Power Supply 25
4.1 Transformer 25
4.2 Rectifier 26
5. Sensors 31
5
ASET
5.1 IR Sensor 31
8.1 RS-232 41
8.2.1 Description 42
8.2.2 Features 43
8.2.3 Application 43
9 GSM Module 46
9.1 Introduction 47
10 Programming 50
11.1 Benefits 57
11.2 Application 57
7
ASET
List Of Figures
Sr.No. Fig. No. Figure Title Pg No.
1. 2.1 Block Diagram for Smart Helmet Monitoring System 15
2. 2.2 Simulation Diagram 16
3. 3.2 Pin Diagram Of Atmega 328 IC 21
4. 4.1 Transformer 25
5. 4.2.1 Half Wave Rectifier 26
6. 4.2.2 Full Wave Rectifier 27
7. 4.2.3 Full Wave Rectifier with Certer Tapped Transformer 28
8. 4.3.2 Switching Regulator 29
9. 4.3.3 Circuit Diagram of Switching Regulator 29
10. 5.1 IR Sensor 30
11. 5.2 LDR Sensor 32
12. 5.4 Accelerometer ADLX345 33
13. 6.1 Pin Diagram of ADC0804 35
14. 6.2 ADC Interface with Microcontroller 37
15. 7.1 LCD Screen 39
16. 7.3 LCD Interfacing with ATMEGA 328 40
17. 8.1 RS232 42
18. 8.2 Max 232 45
19. 9.1 GSM Modem 46
20. 9.5 GSM Modem Circuit 49
8
ASET
CHAPTER 1
INTRODUCTION
In recent times accidents in India have increased year by year. As per Section129 of Motor
Vehicles Act, 1988 makes it required for every single riding a two-wheeler to wear protective
headgear following to standards of the BIS (Bureau of Indian Standards).In India drunken drive
case is a criminal offence . Which states that the bike rider will get punish. In existence bike rider
easily get escaped from law. These are the three main issues which motivates us for developing this
project. The first step is to identify the helmet is wear or not. If helmet is wear then ignition will
start otherwise it will remains off till helmet is not wear. For these we use FSR sensor. The second
step is alcohol detection. Alcohol sensor is use as breath analyzer which detect the presence of
alcohol in rider breathe if it is exceeds permissible range ignition cannot start. It will send the
message to register number. MQ-3 sensor is used for these. When these two conditions are satisfied
then ignition will start. The third main issue is accident and late medical help. If the rider met
accident with him he cannot receive medical help instantly, its big reason for deaths. Around every
second people die due to late medical help or the accident place is unmanned. In fall detection, we
place accelerometer at the bike unit. Due to these mechanism we detect the accident occurs or not.
The aim of this project is to make a protection system in a helmet for a good safety of bike rider.
The smart helmet that we made is fixed with sensors which act as to detect wear helmet or not.
There are two different microcontroller is used in this project. Each unit has used a separate
microcontroller, for bike unit we use Arduino Lilypad and for helmet unit we use ARM7 lpc2148.
Signal transmission between the helmet unit and bike unit is using a RF concept. 2
A smart helmet is a type of protective headgear used by the rider which makes bike driving
safer than before. The main purpose of this smart helmet to provide safety for rider . This
implement by using advance feature like alcohol detection, accident identification, location
tracking, use as a hands free device, solar powered, fall detection. This makes not only smart
helmet but also feature of smart bike.
9
ASET
If rider getting drunk it gets automatically ignition switch is locked, and send message
automatically to their register number with their current location. So when accident occurs, it will
send message by GSM to register numbers with their current location by GPS module. It can use to
receive call while driving. The distinctive utility of project is fall detection, if the bike rider fall
from bike it will send message automatically
The software application and the hardware implementation help the microcontroller read
the output of the sensors and send these values to the registered mobile number. The measure of
efficiency is based on how fast the microcontroller can read the sensor output values and send a
message . The system is totally designed using LCD and embedded systems technology.
The Controlling unit has an application program to allow the microcontroller read the
sensor output values and send them to the user mobile whenever he sends a request to the
controlling unit. The performance of the design is maintained by controlling unit.
14
ASET
CHAPTER 2
PROJECT DESCRIPTION
The block diagram of the design is as shown in Fig 2.1. It consists of power supply unit,
microcontroller, GSM modem, Serial communication unit, sensor module. The brief description of
each unit is explained as follows.
15
ASET
We divide a project in two units namely helmet and bike. In helmet unit, the force sensing
resister is placed on inside upper part of the helmet where actually head was touched with sensor
surface. And alcohol sensor is placed on in front of rider’s mouth. It can sense easily. Solar panels
are mounted on upper side of helmet which is in direct sunlight. And the battery and regular
circuits was fixed inside the helmet. Secondary controller and RF transmitter circuit was also
placed on inside the helmet, antenna are located outside the helmet. If helmet is wear
then ignition will start otherwise it will remains off till helmet is not wear. For these we use FSR
sensor. The second step is alcohol detection. Alcohol sensor is use as breath analyzer which detect
the presence of alcohol in rider breathe if it is exceeds permissible
16
ASET
range ignition cannot start. It will send the message to register number. MQ-3 sensor is used for
these. When these two conditions are satisfied then ignition will start. The third main issue is
accident and late medical help. If the rider met accident with him he cannot receive medical help
instantly, its big reason for deaths. Around every second people die due to late medical help or the
accident place is unmanned. In fall detection, we place accelerometer at the bike unit. Due to these
mechanism we detect the accident occurs or not.
17
ASET
CHAPTER 3
MICROCONTROLLER
The Atmel 8-bit AVR RISC-based microcontroller combines 32 kB ISP flash memory with read-
while-write capabilities, 1 kB EEPROM, 2 kB SRAM, 23 general purpose I/O lines, 32 general
purpose working registers, three flexible timer/counters with compare modes, internal and
external interrupts, serial programmable USART, a byte-oriented 2-wire serial interface, SPI serial
port, 6-channel 10-bit A/D converter (8-channels in TQFP and QFN/MLF packages),
programmable watchdog timer with internal oscillator, and five software selectable power saving
modes. The device operates between 1.8-5.5 volts. The device achieves throughput approaching
1 MIPS per MHz.
Key parameters
Parameter Value
Flash memory 32 Kb
SRAM 2 Kb
EEPROM 1 Kb
18
ASET
frequency
Hardware QTouch
No
Acquisition
External interrupts 2
USB Interface No
USB Speed –
Series alternatives
A common alternative to the ATmega328 is the "picoPower" ATmega328P. A comprehensive list
of all other member of the megaAVR series can be found on the Atmel website.
Applications
As of 2013 the ATmega328 is commonly used in many projects and autonomous systems where a
simple, low-powered, low-cost micro-controller is needed. Perhaps the most common
implementation of this chip is on the popular Arduino development platform, namely the Arduino
Uno and Arduino Nano models.
Programming
Programming
Pin Name I/O Function
signal
19
ASET
Programming mode is entered when PAGEL (PD7), XA1 (PD6), XA0 (PD5), BS1 (PD4) is set to
zero. RESET pin to 0V and VCC to 0V. VCC is set to 4.5 - 5.5V. Wait 60 μs, and RESET is set to
11.5 - 12.5 V. Wait more than 310 μs.Set XA1:XA0:BS1:DATA = 100 1000 0000, pulse XTAL1
for at least 150 ns, pulse WR to zero. This starts the Chip Erase. Wait until RDY/BSY (PD1) goes
high. XA1:XA0:BS1:DATA = 100 0001 0000, XTAL1 pulse, pulse WR to zero. This is the Flash
write command.And so on..
20
ASET
Serial Programming[2]
Serial data to the MCU is clocked on the rising edge and data from the MCU is clocked on the
falling edge. Power is applied to VCC while RESET and SCK are set to zero. Wait for at least 20 ms
and then the Programming Enable serial instruction 0xAC, 0x53, 0x00, 0x00 is sent to the MOSI
pin. The second byte (0x53) will be echoed back by the MCU.
21
ASET
The table below gives a description for each of the pins, along with their function.
As stated before, 20 of the pins function as I/O ports. This means they can function as an input to
the circuit or as output. Whether they are input or output is set in the software. 14 of the pins are
digital pins, of which 6 can function to give PWM output. 6 of the pins are for analog input/output.
2 of the pins are for the crystal oscillator. This is to provide a clock pulse for the Atmega chip. A
clock pulse is needed for synchronization so that communication can occur in synchrony between
the Atmega chip and a device that it is connected to.
The chip needs power so 2 of the pins, Vcc and GND, provide it power so that it can operate. The
Atmega328 is a low-power chip, so it only needs between 1.8-5.5V of power to operate.
The Atmega328 chip has an analog-to-digital converter (ADC) inside of it. This must be or else the
Atmega328 wouldn't be capable of interpreting analog signals. Because there is an ADC, the chip
can interpret analog input, which is why the chip has 6 pins for analog input. The ADC has 3 pins
set aside for it to function- AVCC, AREF, and GND. AVCC is the power supply, positive voltage,
that for the ADC. The ADC needs its own power supply in order to work. GND is the power
supply ground. AREF is the reference voltage that the ADC uses to convert an analog signal to its
corresponding digital value. Analog voltages higher than the reference voltage will be assigned to a
digital value of 1, while analog voltages below the reference voltage will be assigned the digital
value of 0. Since the ADC for the Atmega328 is a 10-bit ADC, meaning it produces a 10-bit digital
value, it converts an analog signal to its digital value, with the AREF value being a reference for
which digital values are high or low. Thus, a portrait of an analog signal is shown by this digital
value; thus, it is its digital correspondent value.
"Uno" means one in Italian and was chosen to mark the release of Arduino Software (IDE) 1.0. The
Uno board and version 1.0 of Arduino Software (IDE) were the reference versions of Arduino, now
evolved to newer releases. The Uno board is the first in a series of USB Arduino boards, and the
23
ASET
reference model for the Arduino platform; for an extensive list of current, past or outdated boards
see the Arduino index of boards.
24
ASET
CHAPTER 4
POWER SUPPLY
All digital circuits require regulated power supply. In this article we are going to learn how to get a
regulated positive supply from the mains supply.
Figure shows the basic block diagram of a fixed regulated power supply. Let us go through each
block.
4.1 TRANSFORMER
A transformer consists of two coils also called as “WINDINGS” namely PRIMARY &
SECONDARY. They are linked together through inductively coupled electrical conductors also
called as CORE. A changing current in the primary causes a change in the Magnetic Field in the
core & this in turn induces an alternating voltage in the secondary coil. If load is applied to the
secondary then an alternating current will flow through the load. If we consider an ideal condition
then all the energy from the primary circuit will be transferred to the secondary circuit through the
magnetic field.
25
ASET
So
The secondary voltage of the transformer depends on the number of turns in the Primary as well as
in the secondary.
4.2 RECTIFIER
A rectifier is a device that converts an AC signal into DC signal. For rectification purpose we use a
diode, a diode is a device that allows current to pass only in one direction i.e. when the anode of the
diode is positive with respect to the cathode also called as forward biased condition & blocks
current in the reversed biased condition.
Rectifier can be classified as follows:
This is the simplest type of rectifier as you can see in the diagram a half wave rectifier consists of
only one diode. When an AC signal is applied to it during the positive half cycle the diode is
forward biased & current flows through it. But during the negative half cycle diode is reverse
biased & no current flows through it. Since only one half of the input reaches the output, it is very
inefficient to be used in power supplies.
26
ASET
Half wave rectifier is quite simple but it is very inefficient, for greater efficiency we would like to
use both the half cycles of the AC signal. This can be achieved by using a center tapped
transformer i.e. we would have to double the size of secondary winding & provide connection to
the center. So during the positive half cycle diode D1 conducts & D2 is in reverse biased condition.
During the negative half cycle diode D2 conducts & D1 is reverse biased. Thus we get both the half
cycles across the load.
One of the disadvantages of Full Wave Rectifier design is the necessity of using a center tapped
transformer, thus increasing the size & cost of the circuit. This can be avoided by using the Full
Wave Bridge Rectifier.
27
ASET
As the name suggests it converts the full wave i.e. both the positive & the negative half cycle into
DC thus it is much more efficient than Half Wave Rectifier & that too without using a center
tapped transformer thus much more cost effective than Full Wave Rectifier. Full Bridge Wave
Rectifier consists of four diodes namely D1, D2, D3 and D4. During the positive half cycle diodes
D1 & D4 conduct whereas in the negative half cycle diodes D2 & D3 conduct thus the diodes keep
switching the transformer connections so we get positive half cycles in the output.
If we use a center tapped transformer for a bridge rectifier we can get both positive & negative half
cycles which can thus be used for generating fixed positive & fixed negative voltages.
28
ASET
The most commonly available Linear Positive Voltage Regulators are the 78XX series where the
XX indicates the output voltage. And 79XX series is for Negative Voltage Regulators.
After filtering the rectifier output the signal is given to a voltage regulator. The maximum input
voltage that can be applied at the input is 35V.Normally there is a 2-3 Volts drop across the
regulator so the input voltage should be at least 2-3 Volts higher than the output voltage. If the
input voltage gets below the Vmin of the regulator due to the ripple voltage or due to any other
reason the voltage regulator will not be able to produce the correct regulated voltage.
IC 7805:
7805 is an integrated three-terminal positive fixed linear voltage regulator. It supports an input
voltage of 10 volts to 35 volts and output voltage of 5 volts. It has a current rating of 1 amp
although lower current models are available. Its output voltage is fixed at 5.0V. The 7805 also has
a built-in current limiter as a safety feature. 7805 is manufactured by many companies, including
National Semiconductors and Fairchild Semiconductors.
The 7805 will automatically reduce output current if it gets too hot.The last two digits represent the
voltage; for instance, the 7812 is a 12-volt regulator. The 78xx series of regulators is designed to
work in complement with the 79xx series of negative voltage regulators in systems that provide
both positive and negative regulated voltages, since the 78xx series can't regulate negative voltages
in such a system.
29
ASET
The 7805 & 78 is one of the most common and well-known of the 78xx series regulators, as it's
small component count and medium-power regulated 5V make it useful for powering TTL devices.
SPECIFICATIONS IC 7805
Vout 5V
Output Imax 1A
This arrangement allows the processor to detect the disk's direction of rotation. There is a piece
of plastic with a small, precisely located hole that sits between the encoder disk and each
infrared sensor. This piece of plastic provides a window through which the infrared sensor can
"see." The window on one side of the disk is located slightly higher than it is on the other -- one-
half the height of one of the holes in the encoder disk, to be exact. That difference causes the two
infrared sensors to see pulses of light at slightly different times. There are times when one of the
sensors will see a pulse of light when the other does not, and vice versa.
The aim was to design a new generation of multi sensory lightweight robots. The new sensor and
actuator generation does not only show up a high degree of electronic and processor integration
but also fully modular hardware and software structures. Analog conditioning, power supply and
digital pre-processing are typical subsystems modules of this kind. The 20 kHz lines connecting
all sensor and actuator systems in a galvanically decoupled way
30
ASET
CHAPTER 5
SENSOR
The sensors used in this project are IR sensor. The output sensor is given to the ADC so as to
convert the analog value into digital data and then give it to the microcontroller. The Smart helmet
sensor used is basically a LED and LDR arrangement.
5.1 IR SENSOR
The Smart helmet sensor used in this project is basically a LED and LDR
arrangement. The LED used in this arrangement is a high intensity LED.
Heart beat is sensed by using a high intensity type LED and LDR. The finger is
placed between the LED and LDR. As sensor, a photo diode or a photo transistor can be used. The
skin may be illuminated with visible (red) using transmitted or reflected light for detection. The
very small changes in reflectivity or in transmittance caused by the varying blood content of human
30
ASET
tissue are almost invisible. Various noise sources may produce disturbance signals with amplitudes
equal or even higher than the amplitude of the pulse signal. Valid pulse measurement therefore
requires extensive preprocessing of the raw signal.
The setup described here uses a red LED for transmitted light illumination and a LDR as detector.
With only slight changes in the preamplifier circuit the same hardware and software could be used
with other illumination and detection concepts. These values are sent to the ADC for conversion of
analog to digital and then sent to the microcontroller.
An LDR or light dependent resistor is also known as photo resistor, photocell, photoconductor.It is
a one type of resistor whose resistance varies depending on the amount of light falling on its
surface. When the light falls on the resistor, then the resistance changes. These resistors are often
used in many circuits where it is required to sense the presence of light. These resistors have a
variety of functions and resistance. For instance, when the LDR is in darkness, then it can be used
to turn ON a light or to turn OFF a light when it is in the light. A typical light dependent resistor
has a resistance in the darkness of 1MOhm, and in the brightness a resistance of a couple of KOhm
This resistor works on the principle of photo conductivity. It is nothing but, when the light falls on
its surface, then the material conductivity reduces and also the electrons in the valence band of the
device are excited to the conduction band. These photons in the incident light must have energy
greater than the band gap of the semiconductor material.This makes the electrons to jump from the
valence band to conduction.
31
ASET
These devices depend on the light, when light falls on the LDR then the resistance decreases, and
increases in the dark.When a LDR is kept in the dark place, its resistance is high and, when the
LDR is kept in the light its resistance will decrease.
MQ-3 gas sensor is right for identifying the alcohol content from breath. It can be positioned just
front of the face. The sensor is responds to various gases. It determines by helmet unit that weather
the rider is drunk or not. MQ-3 sensor has potentiometer to adjusting different concentration of
gasses. We calibrate the detector for 0.4mg/L of Alcohol concentration in air and use value of
resistance is 200 KΩ. MQ-3 has supports for both analog and digital. MQ-3 has a 4 pin namely
GND, VCC, Aout, Dout. Here we use digital output of this sensor which is gives output in terms of
high or low. It decided by our helmet unit weather rider is drunk.
32
ASET
The ADXL345 is tinny, tri axial accelerometer with resolution of 13 bit. The output of
accelerometer is digital and use 16 bit 2’s complement data. It is access to connect via Serial
Peripheral Interface (SPI 3-4 wire) or I2C interface. ADLX 345 is used for both measurement of
static and dynamic acceleration. In this project we use accelerometer measures the static
acceleration of gravity. Free-fall sensing notices if the bike is falling. And Bike unit take decision
that accident is occurs or not. In this project we interfaced ADXL345 by using I2C digital interface
technique. The CS connected to high to VDD I/O, the ADXL345 is requiring 2- wire connection.
The minimal operational voltage of this device cannot greater than VDD I/O that is 0.3 V. For the
proper working condition, we use two external pull up resister. The value of pull up resister is 3.3
kilo ohm.
33
ASET
CHAPTER 6
Analog-to-digital converters are among the most widely used devices for data acquisition.
Digital systems use binary values, but in the physical world everything is continuous i.e., analog
values. Temperature, pressure (wind or liquid), humidity and velocity are the physical analog
quantities. These physical quantities are to be converted into digital values for further processing.
One such device to convert these physical quantities into electrical signals is sensor. Sensors for
temperature, pressure, humidity, light and many other natural quantities produce an output that is
voltage or current.
ADC0804:
The ADC chip that is used in this project is ADC0804. The ADC0804 IC is an 8-bit parallel ADC
in the family of the ADC0800 series from National Semiconductor. It works with +5 volts and has
a resolution of 8 bits. In the ADC0804, the conversion time varies depending on the clocking
signals applied to the CLK IN pin, but it cannot be faster than 110µs.
34
ASET
CS (Chip select)
Chip select is an active low input used to activate the ADC0804 chip. To access the ADC0804, this
pin must be low.
RD (read)
This is an input signal and is active low. ADC converts the analog input to its binary equivalent and
holds it in an internal register. RD is used to get the data out of ADC0804 chip. When CS=0, if a
high-to-low pulse is applied to the RD pin, the 8-bit digital output shows up at the D0-D7 data pins.
WR (write)
This is an active low input used to inform the ADC0804 to start the conversion process. If CS=0
when WR makes a low-to-high transition, the ADC0804 starts converting the analog input value
Vin to an 8-bit digital value. The amount of time it takes to convert varies depending on the CLK
IN and CLK R values.
CLK IN is an input pin connected to an external clock source when an external clock is used for
timing. However, the 804 has an internal clock generator. To use the internal clock generator of the
ADC0804, the CLK IN and CLK R are connected to a capacitor and a resistor. In that case, the
clock frequency is determined by the equation: f = 1/ (1.1RC) Typical values are R=10K ohms and
35
ASET
C= 150 pf. Substituting in the above equation, the frequency is calculated as 606 kHz. Thus, the
conversion time is 110µs.
INTR
This is an output pin and is active low. It is a normally high pin and when the conversion is
finished, it goes low to signal the CPU that the converted data is ready to be picked up. After INTR
goes low, the CS pin is made low i.e., CS=0 and send a high-to-low pulse to the RD pin to get the
data out of the ADC0804 chip.
These are the differential analog inputs where Vin=Vin(+) – Vin(-). The Vin(-) pin is connected to
ground and the Vin(+) pin is used as the analog input to be converted to digital.
Vcc
This is the +5 volt power supply. It is also used as a reference voltage when the Vref/2 input (pin 9)
is open.
Vref/2
Pin 9 is an input voltage used for the reference voltage. If this pin is open, the analog input voltage
for the ADC0804 is in the range of 0 to 5 volts.Vref/2 is used to implement analog input voltages
other than 0.5V. i.e., if the analog input range needs to be 0 to 4 volts, Vref/2 is connected to 2
volts.
D0-D7
D0-D7 (D7 is the MSB) are the digital data output pins since ADC0804 is a parallel ADC chip. To
calculate the output voltage, the below equation is used: Dout = Vin/ (step size), where Dout =
digital data output pins (in decimal) and Vin = analog input value
36
ASET
These are the input pins providing the ground for both the analog signal and the digital signal.
Analog ground is connected to the ground of the analog Vin while digital ground is connected to
the ground of the Vcc pin.
The speed at which an analog input is converted to the digital output depends on the speed of the
CLK input. According to the ADC0804 datasheets, the typical operating frequency is
approximately 640 kHz at 5 volts.
Three-dimensional graphical user interfaces are common in science fiction literature and movies,
such as in Jurassic Park, which features Silicon Graphics' three-dimensional file manager, "File
system navigator", an actual file manager that never got much widespread use as the user interface
for a Unix computer.
In science fiction, three-dimensional user interfaces are often immersible environments like
William Gibson's Cyberspace or Neal Stephenson's Metaverse. Three-dimensional graphics are
currently mostly used in computer games, art and computer-aided design (CAD). There have been
several attempts at making three-dimensional desktop environments like Sun's Project Looking
Glass or SphereXP from Sphere Inc. A three-dimensional computing environment could possibly
be used for collaborative work.
37
ASET
CHAPTER 7
LCD stands for Liquid Crystal Display. LCD is finding wide spread use replacing LEDs (seven
segment LEDs or other multi segment LEDs) because of the following reasons:
LCD screen 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).
38
ASET
Depending on how many lines are used for connection to the microcontroller, there are 8-bit and 4-
bit LCD modes. The appropriate mode is determined at the beginning of the process in a phase
called “initialization”. In the first case, the data are transferred through outputs D0-D7 as it has
been already explained. In case of 4-bit LED mode, for the sake of saving valuable I/O pins of the
microcontroller, there are only 4 higher bits (D4-D7) used for communication, while other may be
left unconnected.
Consequently, each data is sent to LCD in two steps: four higher bits are sent first (that normally
would be sent through lines D4-D7), four lower bits are sent afterwards. With the help of
initialization, LCD will correctly connect and interpret each data received.
Besides, with regards to the fact that data are rarely read from LCD (data mainly are transferred
from microcontroller to LCD) one more I/O pin may be saved by simple connecting R/W pin to the
Ground. Such saving has its price.
Even though message displaying will be normally performed, it will not be possible to read from
busy flag since it is not possible to read from display.
39
ASET
40
ASET
CHAPTER-8
RS-232 AND MAX-232
8.1 RS 232:
RS-232 is simple, universal, well understood and supported but it has some serious
shortcomings as a data interface. The standards to 256kbps or less and line lengths of 15M (50 ft)
or less but today we see high speed ports on our home PC running very high speeds and with high
quality cable maxim distance has increased greatly. The rule of thumb for the length a data cable
depends on speed of the data, quality of the cable.
.
Sub-D15 Male Sub-D15 Female
This is a standard 9 to 25 pin cable layout for async data on a PC AT serial cable
41
ASET
8.2.1 DESCRIPTION:
The MAX232 device is a dual driver/receiver that includes a capacitive voltage generator to
supply EIA-232 voltage levels from a single 5-V supply. Each receiver converts EIA-232 inputs to
5-V TTL/CMOS levels. These receivers have a typical threshold of 1.3 V and a typical hysteresis
42
ASET
of 0.5 V, and can accept 30-V inputs. Each driver converts TTL/CMOS input levels into EIA-232
levels. The driver, receiver, and voltage-generator functions are available as cells in the Texas.
8.2.2 FEATURES:
8.2.3 APPLICATIONS:
TIA/EIA-232-F
Battery-Powered Systems
Terminals
Modems
Computers
ESD Protection Exceeds 2000 V Per
MIL-STD-883, Method 3015
Package Options Include Plastic
Small-Outline (D, DW) Packages and
Standard Plastic (N) DIPs
43
ASET
Stresses beyond those listed under “absolute maximum ratings” may cause permanent
damage to the device. These are stress ratings only, and functional operation of the device at these
or any other conditions beyond those indicated under “recommended operating conditions” is not
44
ASET
implied. Exposure to absolute-maximum-rated conditions for extended periods may affect device
reliability. NOTE 1: All voltage values are with respect
to network ground terminal.2. The package thermal impedance is calculated in accordance with
JESD 51, except for through-hole packages, which use a trace length of zero description
45
ASET
CHAPTER 9
GSM MODULE
GSM is a mobile communication modem; it is stands for global system for mobile
communication (GSM). The idea of GSM was developed at Bell Laboratories in 1970. It is widely
used mobile communication system in the world. GSM is an open and digital cellular technology
used for transmitting mobile voice and data services operates at the 850MHz, 900MHz, 1800MHz
and 1900MHz frequency bands.
GSM system was developed as a digital system using time division multiple access (TDMA)
technique for communication purpose. A GSM digitizes and reduces the data, then sends it down
through a channel with two different streams of client data, each in its own particular time slot. The
digital system has an ability to carry 64 kbps to 120 Mbps of data rates.
There are various cell sizes in a GSM system such as macro, micro, pico and umbrella cells. Each
cell varies as per the implementation domain. There are five different cell sizes in a GSM network
macro, micro, pico and umbrella cells. The coverage area of each cell varies according to the
implementation environment.
46
ASET
TDMA technique relies on assigning different time slots to each user on the same frequency. It can
easily adapt to data transmission and voice communication and can carry 64kbps to 120Mbps of
data rate.
A Mobile Station: It is the mobile phone which consists of the transceiver, the display and the
processor and is controlled by a SIM card operating over the network.
Base Station Subsystem: It acts as an interface between the mobile station and the network
subsystem. It consists of the Base Transceiver Station which contains the radio transceivers and
handles the protocols for communication with mobiles. It also consists of the Base Station
Controller which controls the Base Transceiver station and acts as a interface between the
mobile station and mobile switching centre.
Network Subsystem: It provides the basic network connection to the mobile stations. The
basic part of the Network Subsystem is the Mobile Service Switching Centre which provides
access to different networks like ISDN, PSTN etc. It also consists of the Home Location
Register and the Visitor Location Register which provides the call routing and roaming
capabilities of GSM. It also contains the Equipment Identity Register which maintains an
account of all the mobile equipments wherein each mobile is identified by its own IMEI
number. IMEI stands for International Mobile Equipment Identity.
47
ASET
A GSM modem is a device which can be either a mobile phone or a modem device which can be
used to make a computer or any other processor communicate over a network. A GSM modem
requires a SIM card to be operated and operates over a network range subscribed by the network
operator. It can be connected to a computer through serial, USB or Bluetooth connection.
A GSM modem can also be a standard GSM mobile phone with the appropriate cable and software
driver to connect to a serial port or USB port on your computer. GSM modem is usually preferable
to a GSM mobile phone. The GSM modem has wide range of applications in transaction terminals,
supply chain management, security applications, weather stations and GPRS mode remote data
logging.
From the below circuit, a GSM modem duly interfaced to the MC through the level shifter IC
Max232. The SIM card mounted GSM modem upon receiving digit command by SMS from any
cell phone send that data to the MC through serial communication. While the program is executed,
the GSM modem receives command ‘STOP’ to develop an output at the MC, the contact point of
which are used to disable the ignition switch. The command so sent by the user is based on an
intimation received by him through the GSM modem ‘ALERT’ a programmed message only if the
input is driven low. The complete operation is displayed over 16×2 LCD display.
48
ASET
In these days, the GSM mobile terminal has become one of the items that are constantly with us.
Just like our wallet/purse, keys or watch, the GSM mobile terminal provides us a communication
channel that enables us to communicate with the world. The requirement for a person to be
reachable or to call anyone at any time is very appealing.
In this project, as the name says project is based on GSM network technology for transmission of
SMS from sender to receiver. SMS sending and receiving is used for ubiquitous access of
appliances and allowing breach control at home. The system proposes two sub-systems. Appliance
control subsystem enables the user to control home appliances remotely and the security alert
subsystem gives the automatic security monitoring.
The system is capable enough to instruct user via SMS from a specific cell number to change the
condition of the home appliance according to the user’s needs and requirements. The second aspect
is that of security alert which is achieved in a way that on the detection of intrusion, the system
allows automatic generation of SMS thus alerting the user against security risk.
49
ASET
CHAPTER 10
PROGRAMMING
int b1=1,b2=1,b3=1,b4=1;
const int m1 = 3;
//const int m2 = 2;
void setup()
//pinMode(led, OUTPUT);
pinMode(sw1,INPUT);
pinMode(sw2,INPUT);
pinMode(sw3,INPUT);
50
ASET
pinMode(sw4,INPUT);
pinMode(m1,OUTPUT);
//pinMode(m2,OUTPUT);
digitalWrite(sw1,HIGH);
digitalWrite(sw2,HIGH);
digitalWrite(sw3,HIGH);
digitalWrite(sw4,HIGH);
lcd.begin(16, 2);
lcd.print("Smart Helmet");
lcd.setCursor(0, 1);
lcd.print("System ");
Serial.begin(2400); //Baud rate of the GSM/GPRS Module //sim 900A Modem connected
Serial.print("\r");
delay(1000);//1 sec
Serial.print("AT+CMGF=1\r");
delay(1000);
delay(1000);
delay(1000);
Serial.write(0x1A);//ctrl+z
51
ASET
delay(1000);
//pinMode(led, OUTPUT);
//Serial.begin(9600);
delay(100);
void loop()
b1 = digitalRead(sw1);
b2 = digitalRead(sw2);
b3 = digitalRead(sw3);
b4 = digitalRead(sw4);
if(b2==LOW)
lcd.setCursor(0,1);
digitalWrite(m1,HIGH);
// digitalWrite(m2,LOW);
52
ASET
delay(1000);
lcd.setCursor(0,1);
lcd.print("ALCOHOL DETECTED");
digitalWrite(m2,HIGH);
Serial.print("\r");
delay(1000);
Serial.print("AT+CMGF=1\r");
delay(1000);
delay(1000);
delay(1000);
Serial.write(0x1A);
delay(1000);
delay(1000);
}
53
ASET
lcd.setCursor(0,1);
Serial.print("\r");
delay(1000);
Serial.print("AT+CMGF=1\r");
delay(1000);
delay(1000);
delay(1000);
Serial.write(0x1A);
delay(1000);
delay(1000);
54
ASET
delay(3000);
Serial.print("\r");
delay(1000);
Serial.print("AT+CMGF=1\r");
delay(1000);
delay(1000);
delay(1000);
Serial.write(0x1A);
delay(1000);
label:
lcd.setCursor(0,1);
digitalWrite(m1,LOW);
delay(1000);
goto label;
55
ASET
else
lcd.setCursor(0,1);
digitalWrite(m1,LOW);//motor
//digitalWrite(m2,HIGH);
56
ASET
CHAPTER 11
11.1 Benefits:
Detection of accident in remote area can be easily detected and medical services provided in short
time.
Simply avoiding drunken drive by using alcohol detector. it will reduces the probability of accident
Operates on solar as well as battery supply.
If helmet was stolen then we can start the bike by the password
11.2 Application:
57
ASET
58
ASET
59