Chapter 1

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 37

An Optimal Driving System Using Smart Helmet 2018-2019

CHAPTER-1

INTRODUCTION
There is an alarming increase in the morbidity and mortality due to two wheeler road
traffic accidents. This has been a matter of great concern globally. In India, it is estimated that
one accident takes place every 2 minutes. Data from the National Crime Records Bureau
indicates that deaths and injuries related to road traffic accident has increased two and four
fold respectively during the period of 1991–2005. Reportedly, 98,254 persons were killed in
2005 on Indian roads . The occupants and riders of two wheeler vehicles are among the
majority to be affected in road traffic accidents. Two wheeler accidents have also been shown
to have maximum case fatality in accidents.

An accident is an unexpected and unintended event. The avoidance of Traffic Rule and
carelessness of driver are the major factors for occurrence of Vehicle accidents, which cause
harm to human being as well the environment. Nowadays most of the countries are making it
mandatory to wear helmet. Despite of the safety rules made by the government, many riders
fail to abide by them. The riders in India often bypass the prime rule of wearing the helmet
while riding bike. This leads to fatal injuries to the rider in case of accidents. Apart from
manual checking, there needs to be a system that could enforce this rule upon the riders and
hence prevent them from bypassing it.

1.1 Problem Formulation

In the young generation, the craze to ride bike is rapidly increasing. As the number of two-
wheeler on the road are increasing, road mishaps are also increasing day by day. Though
the government has laid stringent laws to ensure that the two-wheeler riders wear the helmet,
the citizens are reluctant to wear helmet. Riders who do not wear helmets are at higher risk of
suffering a traumatic brain injury if they are in an accident. Because of the fatal risk of
traumatic brain injury is so high, it is crucial for motorcyclists to take action to protect
themselves while riding.

Department of ECE, RRIT Page 1


An Optimal Driving System Using Smart Helmet 2018-2019

1.2 OBJECTIVE OF THE PROJECT

This project aims to develop an embedded system, which ensures that a bike rider wears
helmet and prevent igniting the engine if the rider is not wearing the helmet. The primary aim
of this helmet is to protect the rider’s head during impact, thus preventing or reducing the head
injury and saving the rider’s life. With this helmet, we can also control headlight, horn, and
indicator through voice module, which is mounted on the helmet by reducing manual
interaction with the bike looking away from the road. Data from the helmet are received
wirelessly through Bluetooth and it activates the bike automations. Incorporate distance-
sensing methodologies to detect objects from a far. The Smart Helmet is easily operable by
many types of users with little to no training required.

1.3 MOTIVATIONS

According to the report “Road Accidents in India – 2017” which was published by
Ministry of Road Transport & Highways. A total of 4,64,910 road accidents have been
reported by States and Union Territories (UTs) in the calendar year 2017, claiming 1,47,913
lives and causing injuries to 4,70,975 persons. Among vehicle categories involved in road
accidents, two-wheelers accounted for the highest share (33.9%) in total accidents and fatalities
(29.8%) in 2017. In terms of road-user categories, the share of two-wheeler riders in total
fatality has been highest (33%) in 2017. Fatal road accident victims largely constitute young
people in the productive age groups. Young adults in the age group of 18 - 45 years accounted
for 72.1 per cent of victims during 2017. The number of persons killed in road accident has
been highest in Uttar Pradesh. Major States that achieved significant reduction in road
accidents and fatalities in 2017 are Tamil Nadu, Maharashtra, Gujarat and West Bengal. Uttar
Pradesh and Bihar were the worst performers recording large increase in the number of road
accidents and fatalities in 2017 as compared to 2016. Smart Helmet’s goal is to reduce
motorcycle related injuries and deaths by a method of prevention. If we are able to raise the
motorcyclist’s awareness of the dangers surrounding them, we will be able to make an impact
on reducing accidents involving motorcycles. The challenges that our target demographic
brings us involve convincing Indian riders that this new technology indeed improves safety
without a high cost and without obscuring a rider’s vision.

Department of ECE, RRIT Page 2


An Optimal Driving System Using Smart Helmet 2018-2019

CHAPTER-2

LITERATURE SURVEY
There are over 230 million registered vehicles in India and the number has been
growing at almost 10 per cent between 2006 and 2016. The level of vulnerability of road-users
to accidents is high as the same road space is shared among wide variety of motorized and non-
motorized vehicles and pedestrians. Among motorized vehicles, two-wheelers constitute 73.5
per cent and light motor vehicles comprising of cars, jeeps and taxis constitute 13.1 per cent.
Non-motorized vehicles on the roads include cycles, cycle rickshaws, hand-drawn carts,
animal drawn carts highest share in total road accidents (33.9%) followed by the combined
cars, jeeps and taxis category of vehicles (24.5%), then the combined vehicle category
comprising trucks, lorries, tempos, tractors and other articulated

Figure 2.1 Share of different vehicle types in accident

Department of ECE, RRIT Page 3


An Optimal Driving System Using Smart Helmet 2018-2019

vehicles (20.0%), buses (6.9%) and auto-rickshaws (6.3%). In case of fatality, 88.0 per cent
of deaths in road accidents during 2017 involved motorized vehicles against 93.6 per cent in
2016. The number and percentage share of accidents, persons killed and injured during 2016

Number of Accidents Number of Persons Accident


Year Total Fatal Killed Injured Severity*
2005 4,39,255 83,491 (19.0) 94,968 465282 21.6
2006 4,60,920 93,917 (20.4) 105,749 496,481 22.9
2007 4,79,216 1,01,161 (21.1) 114,444 513,340 23.9
2008 4,84,704 1,06,591 (22.0) 119,860 523,193 24.7
2009 4,86,384 1,10,993 (22.8) 125,660 515,458 25.8
2010 4,99,628 1,19,558 (23.9) 134,513 527,512 26.9
2011 4,97,686 1,21,618 (24.4) 1,42,485 5,11,394 28.6
2012 4,90,383 1,23,093 (25.1) 1,38,258 5,09,667 28.2
2013 4,86,476 1,22,589 (25.2) 1,37,572 4,94,893 28.3
2014 4,89,400 1,25,828 (25.7) 1,39,671 4,93,474 28.5
2015 5,01,423 1,31,726 (26.3) 1,46,133 5,00,279 29.1
2016 4,80,652 1,36,071 (28.3) 1,50,785 4,94,624 31.4
2017 4,64,910 1,34,796 (29.0) 1,47,913 4,70,975 31.8

Table 2.5: Long-run trend of major parameters of road accident statistics

and 2017 based on vehicle type involved is at Table 1 .Motorized vehicles accounted for 91.6
per cent of the total road accidents during the calendar year 2017 as against 95.5 per cent in
2016. Within motorized vehicle categories, category involved in accident are related to the
respective shares in total registered vehicles, it becomes evident that it is, in fact, larger
vehicles which are relatively more accident prone than two-wheelers.

Department of ECE, RRIT Page 4


An Optimal Driving System Using Smart Helmet 2018-2019

Chapter-3

SYSTEM DESIGN AND IMPLEMENTATION


In this proposed system, we have used a wireless communication between bike to helmet and
bike to traffic signal and speed breaker. The system will be comprised of a helmet module
including stereo speakers and microphone, and a bike mounted base unit. The system will make
use of different ZigBee wireless communication protocol with the intent to eliminate all
physical connections between the rider and the motorcycle.

The system consists of two modules:

1. Helmet module: - The helmet system has microphone & a wireless communication
device. By using this system rider can communicate with the bike wirelessly.

2. Bike module: Data from the helmet is received through ZigBee and it activates the
bike automations like indicators, horn, head light accordingly. Infrared sensor is
placed in front end side of the bike, which will continuously monitor the road.

Department of ECE, RRIT Page 5


An Optimal Driving System Using Smart Helmet 2018-2019

3.1 HELMET MODULE


This Smart Helmet automatically checks whether the person is wearing the helmet. It
has a transmitter at the helmet and the receiver at the bike. There is a infrared sensor to make
sure the rider is wearing the helmet. The data to be transferred is communicated using ZigBee
communication module. The receiver at the bike receives the data and decodes. The engine
will not ignite if the rider is not wearing helmet. The Arduino controls the engine through a
relay and a relay interfacing circuit.

Power Arduino ZigBee


Supply controller

Voice Recognition
Microphone
Unit

Figure 3.1 Helmet Section

Department of ECE, RRIT Page 6


An Optimal Driving System Using Smart Helmet 2018-2019

3.2 BIKE MODULE

LCD Display

ZigBee Infrared
ARM LPC2148
sensor

Indicator
Control

Figure 3.2 Bike Module

Regulated Power
ZigBee
Supply

Figure 3.3 Traffic signal section

Data from the helmet are received wirelessly through ZigBee and it activates the bike
automations like indicators, horn, head light accordingly. Infrared sensor is placed in front end
side of the bike, which will continuously monitor the road. It is used indicate the rider,
whenever there is any obstacles present. Using ZigBee module nearest signal status can be
intimated depending on the signal status the rider can driver faster or slower.

Department of ECE, RRIT Page 7


An Optimal Driving System Using Smart Helmet 2018-2019

CHAPTER-4

HARDWARE AND SOFTWARE DESCRIPTION

4.1 Circuit Diagram of Helmet Section

Department of ECE, RRIT Page 8


An Optimal Driving System Using Smart Helmet 2018-2019

4.2 Circuit Diagram of the Bike Section

Department of ECE, RRIT Page 9


An Optimal Driving System Using Smart Helmet 2018-2019

4.3 FLOW CHART

START

Initialize all the port

Infrared sensor No
is high

Start Ignition

Wait for the


command

Is Command right,
left, head light

Department of ECE, RRIT Page 10


An Optimal Driving System Using Smart Helmet 2018-2019

If command Turn Right Indicator

‘right” “ON”

If command Turn Right Indicator

“left” “ON”

If command Turn Head Light

“head light” “ON”

No
STOP

Figure 4.3 Flow Chart

Department of ECE, RRIT Page 11


An Optimal Driving System Using Smart Helmet 2018-2019

4.4 ARM LPC2148


The LPC2148 microcontrollers are based on a 16-bit/32-bit ARM7TDMI-S CPU with
real-time emulation and embedded trace support, that combine the microcontroller with
embedded high-speed flash memory ranging from 32 kB to 512 kB. A 128-bit wide memory
interface and a unique accelerator architecture enable 32-bit code execution at the maximum
clock rate.

Figure 4.4 Pin diagram of ARM LPC2148

Department of ECE, RRIT Page 12


An Optimal Driving System Using Smart Helmet 2018-2019

4.4.1 Features of LPC2148:

1) 16-bit/32-bit ARM7TDMI-S microcontroller in a tiny LQFP64 package.

2) 8 kB to 40 kB of on-chip static RAM and 32 kB to 512 kB of on-chip flash memory. 128-


bit wide interface/accelerator enables high-speed 60 MHz operation.

3) In-System Programming/In-Application Programming (ISP/IAP) via on-chip boot loader


software. Single flash sector or full chip erase in 400 ms and programming of 256 B in 1 ms.

4) EmbeddedICE RT and Embedded Trace interfaces offer real-time debugging with the on-
chip RealMonitor software and high-speed tracing of instruction execution.

5) USB 2.0 Full-speed compliant device controller with 2 kB of endpoint RAM. In addition,
the LPC2146/48 provides 8 kB of on-chip RAM accessible to USB by DMA.

6) 10-bit ADCs provide a total of 6/14 analog inputs, with conversion times as low as 2.44
microseconds per channel.

7) Single 10-bit DAC provides variable analog output.

8) Two 32-bit timers/external event counters (with four capture and four compare channels
each), PWM unit (six outputs) and watchdog.

9) Low power Real-Time Clock (RTC) with independent power and 32 kHz clock input.
Multiple serial interfaces including two UARTs (16C550), two Fast I2C-bus (400 kbit/s), SPI
and SSP with buffering and variable data length capabilities.

10) Vectored Interrupt Controller (VIC) with configurable priorities and vector addresses.

11) Up to 45 of 5 V tolerant fast general purpose I/O pins in a tiny LQFP64 package.

12) Up to 21 external interrupt pins available.

13) 60 MHz maximum CPU clock available from programmable on-chip PLL with settling
time of 100 s.

14) On-chip integrated oscillator operates with an external crystal from 1 MHz to 25 MHz.

15) Power saving modes include Idle and Power-down.

Department of ECE, RRIT Page 13


An Optimal Driving System Using Smart Helmet 2018-2019

4.3.2 Architectural overview:

The ARM7TDMI-S is a general purpose 32-bit microprocessor, which offers high performance
and very low power consumption. The ARM architecture is based on Reduced Instruction Set
Computer (RISC) principles, and the instruction set and related decode mechanism are much
simpler than those of microprogrammed Complex Instruction Set Computers (CISC).

The Thumb set’s 16-bit instruction length allows it to approach twice the density of standard
ARM code while retaining most of the ARM’s performance advantage over a traditional 16-
bit processor using 16-bit registers. This is possible because Thumb code operates on the same
32-bit register set as ARM code.

On-chip flash program memory

The LPC2148 incorporate a 512 kB flash memory system respectively. This memory may be
used for both code and data storage. Programming of the flash memory may be accomplished
in several ways. It may be programmed In System via the serial port. The LPC2148 flash
memory provides a minimum of 100000 erase/write cycles and 20 years of data-retention.

On-chip static RAM:

On-chip static RAM used for code and/or data storage. The SRAM may be accessed as 8-bit,
16-bit, and 32-bit. The LP2148 provide 32 kB of static RAM. Use an 8 kB SRAM block
intended to be utilized mainly by the USB can also as a general purpose RAM for data storage
and code storage and execution.

Interrupt controller

The Vectored Interrupt Controller (VIC) accepts all of the interrupt request inputs and
categorizes them as Fast Interrupt reQuest (FIQ), vectored Interrupt ReQuest (IRQ), and non-
vectored IRQ as defined by programmable settings. The programmable assignment scheme
means that priorities of interrupts from the various peripherals can be dynamically assigned
and adjusted.

Interrupt sources: Each peripheral device has one interrupt line connected to the Vectored
Interrupt Controller, but may have several internal interrupt flags. Individual interrupt flags
may also represent more than one interrupt source.

Department of ECE, RRIT Page 14


An Optimal Driving System Using Smart Helmet 2018-2019

General Purpose Parallel I/O (GPIO)

Device pins that are not connected to a specific peripheral function are controlled by the GPIO
registers. Pins may be dynamically configured as inputs or outputs. The value of the output
register may be read back, as well as the current state of the port pins. GPIO registers are
relocated to the ARM local bus for the fastest possible I/O timing. Mask registers allow treating
sets of port bits as a group, leaving other bits unchanged. All GPIO registers are byte
addressable. Entire port value can be written in one instruction.

10-bit ADC

The LPC2148 contain two analog to digital converters. These converters are single 10-bit
successive approximation analog to digital converters. While ADC0 has six channels, ADC1
has eight channels. Therefore, total number of available ADC for LPC2148 is 14.

10-bit DAC

The DAC enables the LPC2141/42/44/46/48 to generate a variable analog output. The
maximum DAC output voltage is the VREF voltage.Features of 10-bit DAC 1) Buffered
output. 2) Power-down mode available.

USB 2.0 device controller

The USB is a 4-wire serial bus that supports communication between a host and a
number of peripherals. The host controller allocates the USB bandwidth to attached devices
through a token-based protocol. The LPC2148 is equipped with a USB device controller that
enables 12 Mbit/s data exchange with a USB host controller. It consists of a register interface,
serial interface engine, endpoint buffer memory and DMA controller. The serial interface
engine decodes the USB data stream and writes data to the appropriate end point buffer
memory. The status of a completed USB transfer is indicated via status registers.

UARTs

The LPC2148 each contain two UARTs. In addition to standard transmit and receive
data lines, the LPC2148 UART1 also provides a full modem control handshake interface.
UARTs in LPC2148 introduce a fractional baud rate generator for both UARTs, enabling these
microcontrollers to achieve standard baud rates such as 115200 with any crystal frequency

Department of ECE, RRIT Page 15


An Optimal Driving System Using Smart Helmet 2018-2019

above 2 MHz. In addition, auto-CTS/RTS flow-control functions are fully implemented in


hardware.

I²C-bus serial I/O controller

The LPC2148 contains two I²C-bus controllers. The I²C-bus is bidirectional, for inter-
IC control using only two wires: a Serial Clock Line (SCL) and a Serial Data line (SDA). Each
device is recognized by a unique address and can operate as either a receiver-only device.. The
I²C-bus is a multi-master bus, it can be controlled by more than one bus master connected to
it.The I²C-bus implemented in LPC2148 supports bit rates up to 400 kbit/s.

SPI serial I/O controller

The LPC2148 each contain one SPI controller. The SPI is a full duplex serial interface,
designed to handle multiple masters and slaves connected to a given bus. Only a single master
and a single slave can communicate on the interface during a given data transfer. During a data
transfer the master always sends a byte of data to the slave, and the slave always sends a byte
of data to the master.

SSP serial I/O controller

The LPC2148 each contain one Serial Synchronous Port controller (SSP). The SSP
controller is capable of operation on a SPI, 4-wire SSI, or Microwire bus. It can interact with
multiple masters and slaves on the bus. However, only a single master and a single slave can
communicate on the bus during a given data transfer. The SSP supports full duplex transfers,
with data frames of 4 bits to 16 bits of data flowing from the master to the slave and from the
slave to the master. Often only one of these data flows carries meaningful data.

General-purpose timers/external event counters

The Timer/Counter is designed to count cycles of the peripheral clock (PCLK) or an


externally supplied clock and optionally generate interrupts or perform other actions at
specified timer values, based on four match registers. It also includes four capture inputs to
trap the timer value when an input signal transitions, optionally generating an interrupt.
Multiple pins can be selected to perform a single capture or match function, providing an
application with ‘or’ and ‘and’, as well as ‘broadcast’ functions among them.

Department of ECE, RRIT Page 16


An Optimal Driving System Using Smart Helmet 2018-2019

Watchdog Timer

The purpose of the watchdog is to reset the microcontroller within a reasonable amount
of time if it enters an erroneous state. When enabled, the watchdog will generate a system reset
if the user program fails to ‘feed’ (or reload) the watchdog within a predetermined amount of
time.

Real-time clock

The RTC is designed to provide a set of counters to measure time when normal or idle
operating mode is selected. The RTC has been designed to use little power, making it suitable
for battery powered systems where the CPU is not running continuously (Idle mode).

Pulse width modulator

The PWM is based on the standard timer block and inherits all of its features, although
only the PWM function is pinned out on the LPC2141/42/44/46/48. The timer is designed to
count cycles of the peripheral clock (PCLK) and optionally generate interrupts or perform other
actions when specified timer values occur, based on seven match registers. The PWM function
is also based on match register events. Its features are

Crystal oscillator

On-chip integrated oscillator operates with external crystal in range of 1 MHz to 25


MHz. The oscillator output frequency is called fosc and the ARM processor clock frequency
is referred to as CCLK for purposes of rate equations, etc. fosc and CCLK are the same value
unless the PLL is running and connected.

PLL

The PLL accepts an input clock frequency in the range of 10 MHz to 25 MHz. The
input frequency is multiplied up into the range of 10 MHz to 60 MHz with a Current Controlled
Oscillator (CCO). The multiplier can be an integer value from 1 to 32. The CCO operates in
the range of 156 MHz to 320 MHz, so there is an additional divider in the loop to keep the
CCO within its frequency range while the PLL is providing the desired output frequency. Since
the minimum output divider value is 2, it is insured that the PLL output has a 50 % duty cycle.

Department of ECE, RRIT Page 17


An Optimal Driving System Using Smart Helmet 2018-2019

The program must configure and activate the PLL, wait for the PLL to Lock, then connect to
the PLL as a clock source. The PLL settling time is 100 microseconds.

Reset and wake-up timer

The RESET pin is a Schmitt trigger input pin with an additional glitch filter. Assertion
of chip reset by any source starts the Wake-up Timer, causing the internal chip reset to remain
asserted until the external reset is de-asserted, the oscillator is running, a fixed number of
clocks have passed, and the on-chip flash controller has completed its initialization.

When the internal reset is removed, the processor begins executing at address 0, which
is the reset vector. At that point, all of the processor and peripheral registers have been
initialized to predetermined values.The Wake-up Timer ensures that the oscillator and other
analog functions required for chip operation are fully functional before the processor is allowed
to execute instructions. Since the oscillator and other functions are turned off during Power-
down mode, any wake-up of the processor from Power-down mode makes use of the Wake-
up Timer.

External interrupt inputs

The LPC2148 include up to nine edge or level sensitive External Interrupt Inputs as selectable
pin functions. When the pins are combined, external events can be processed as four
independent interrupt signals. The External Interrupt Inputs can optionally be used to wake-up
the processor from Power-down mode. Additionally capture input pins can also be used as
external interrupts without the option to wake the device up from Power-down mode.

Memory mapping control

The Memory Mapping Control alters the mapping of the interrupt vectors that appear
beginning at address 0x0000 0000. Vectors may be mapped to the bottom of the on-chip flash
memory, or to the on-chip static RAM. This allows code running in different memory spaces
to have control of the interrupts.

EmbeddedICE

Standard ARM EmbeddedICE logic provides on-chip debug support. The debugging of the
target system requires a host computer running the debugger software and an Embedded ICE

Department of ECE, RRIT Page 18


An Optimal Driving System Using Smart Helmet 2018-2019

protocol convertor. Embedded ICE protocol convertor converts the remote debug protocol
commands to the JTAG data needed to access the ARM core.

The ARM core has a Debug Communication Channel (DCC) function built-in. The DCC
allows a program running on the target to communicate with the host debugger or another
separate host without stopping the program flow or even entering the debug state. The DCC is
accessed as a co-processor 14 by the program running on the ARM7TDMI-S core.

RealMonitor

RealMonitor is a configurable software module, developed by ARM Inc., which enables real-
time debug. A lightweight debug monitor runs in the background while users debug their
foreground application. It communicates with the host using the DCC, which is present in the
Embedded ICE logic. The LPC2148 contain a specific configuration of RealMonitor software
programmed into the on-chip flash memory.

4.5 Arduino Uno R3


Arduino Uno R3 is one kind of ATmega328P based microcontroller board. It includes the
whole thing required to hold up the microcontroller; just attach it to a PC with the help of a
USB cable, and give the supply using AC-DC adapter or a battery to get started. The term Uno
means “one” in the language of “Italian” and was selected for marking the release of Arduino’s
IDE 1.0 software. The R3 Arduino Uno is the third as well as most recent modification of the
Arduino Uno. Arduino board and IDE software are the reference versions of Arduino and
currently progressed to new releases.

The Arduino Uno R3 board includes the following specifications.

1) The Operating Voltage of the Arduino is 5V

2) The recommended input voltage ranges from 7V to 12V

3) The input voltage (limit) is 6V to 20V

4) Digital input and output pins-14

Department of ECE, RRIT Page 19


An Optimal Driving System Using Smart Helmet 2018-2019

5) Digital input & output pins (PWM)-6

6) Analog input pins are 6

7) DC Current for each I/O Pin is 20 mA

8) DC Current used for 3.3V Pin is 50 mA

9) Flash Memory -32 KB, and 0.5 KB memory is used by the boot loader

10) It has SRAM of 2 KB and EEPROM is 1 KB

12) The speed of the CLK is 16 MHz

Fig Arduino UNO R3

Power Supply

The power supply of the Arduino can be done with the help of an exterior power supply
otherwise USB connection. The exterior power supply (6 to 20 volts) mainly includes a battery
Department of ECE, RRIT Page 20
An Optimal Driving System Using Smart Helmet 2018-2019

or an AC to DC adapter. The connection of an adapter can be done by plugging a center-


positive plug (2.1mm) into the power jack on the board. The battery terminals can be placed
in the pins of Vin as well as GND. The power pins of an Arduino board include the following.

Vin: The input voltage or Vin to the Arduino while it is using an exterior power supply
opposite to volts from the connection of USB . By using this pin, one can supply the voltage.

5 Volts: The RPS can be used to give the power supply to the microcontroller as well as
components, which are used on the Arduino board. This can approach from the input voltage
through a regulator.

3.3V: A 3.3 supply voltage can be generated with the onboard regulator, and the highest draw
current will be 50 mA.

GND: GND (ground) pins

Memory

The memory of an ATmega328 microcontroller includes 32 KB and 0.5 KB memory is utilized


for the Boot loader), and also it includes SRAM-2 KB as well as EEPROM-1KB.

Input and Output

We know that an arguing Uno R3 includes 14-digital pins which can be used as an input
otherwise output by using the functions like pin Mode (), digital Read(), and digital Write().
These pins can operate with 5V, and every digital pin can give or receive 20mA, & includes a
20k to 50k ohm pull up resistor. The maximum current on any pin is 40mA that cannot surpass
for avoiding the microcontroller from the damage. Additionally, some of the pins of an
Arduino include specific functions.

Serial Pins

The serial pins of an Arduino board are TX (1) and RX (0) pins and these pins can be used to
transfer the TTL serial data. The connection of these pins can be done with the equivalent pins
of the ATmega8 U2 USB to TTL chip.

Department of ECE, RRIT Page 21


An Optimal Driving System Using Smart Helmet 2018-2019

External Interrupt Pins

The external interrupt pins of the board are 2 & 3, and these pins can be arranged to activate
an interrupt on a rising otherwise falling edge, a low-value otherwise a modify in value

PWM Pins

The PWM pins of an Arduino are 3, 5, 6, 9, 10, & 11, and gives an output of an 8-bit PWM
with the function analog Write.

SPI (Serial Peripheral Interface) Pins

The SPI pins are 10, 11, 12, 13 namely SS, MOSI, MISO, SCK, and these will maintain the SPI
communication with the help of the SPI library.

LED Pin

An arguing board is inbuilt with a LED using digital pin-13. Whenever the digital pin is high,
the LED will glow otherwise it will not glow.

TWI (2-Wire Interface) Pins

The TWI pins are SDA or A4, & SCL or A5, which can support the communication of TWI
with the help of Wire library.

AREF (Analog Reference) Pin

An analog reference pin is the reference voltage to the inputs of an analog inputs using the
function like analog Reference.

Reset (RST) Pin

This pin brings a low line for resetting the microcontroller, and it is very useful for using an
RST button toward shields which can block the one over the Arduino R3 board.

Communication

The communication protocols of an Arduino Uno include SPI, I2C, and UART serial
communication.

Department of ECE, RRIT Page 22


An Optimal Driving System Using Smart Helmet 2018-2019

UART

An Arduino Uno uses the two functions like the transmitter digital pin1 and the receiver digital
pin0. These pins are mainly used in UART TTL serial communication.

I²C

An Arduino UNO board employs SDA pin otherwise A4 pin & A5 pin otherwise SCL pin is
used for I2C communication with wire library. In this, both the SCL and SDA are CLK signal
and data signal.

SPI Pins

The SPI communication includes MOSI, MISO, and SCK.

MOSI (Pin11)

This is the master out slave in the pin, used to transmit the data to the devices

MISO (Pin12)

This pin is a serial CLK, and the CLK pulse will synchronize the transmission of which is
produced by the master.

SCK (Pin13)

The CLK pulse synchronizes data transmission that is generated by the master. Equivalent pins
with the SPI library is employed for the communication of SPI. ICSP (in-circuit serial
programming) headers can be utilized for programming ATmega microcontroller directly with
the boot loader.

4.6 Voice Recognition Module V3


Voice Recognition Module is a compact and easy-control speaking recognition board is a
speaker-dependent voice recognition module. It supports up to 80 voice commands in all. Max
7 voice commands could work at the same time. Any sound could be trained as command.
Users need to train the module first before let it recognizing any voice command. This board
has 2 controlling ways: Serial Port (full function), General Input Pins (part of function).
Department of ECE, RRIT Page 23
An Optimal Driving System Using Smart Helmet 2018-2019

General Output Pins on the board could generate several kinds of waves while corresponding
voice command was recognized. On V3, voice commands are stored in one large group like a
library. Any 7 voice commands in the library could be imported into recognizer. It means 7
commands are effective at the same time.

Parameters

1) Its operating voltage and current are respectively 4.5-5.5V and <40mA

2) Digital Interface: 5V TTL level for UART interface and GPIO

3) Analog Interface: 3.5mm mono-channel microphone connector + microphone pin interface

4) Size: 31mm x 50mmRecognition

Fig. Voice Recognition Unit

Training Voice Recognition System

1) Open vr_sample_train (File -> Examples -> VoiceRecognitionV3 -> vr_sample_train)

2) Choose right Arduino board(Tool -> Board, UNO recommended), Choose right serial port.

3) Click Upload button, wait until Arduino is uploaded.

4) Open Serial Monitor. Set baud rate 115200, set send with Newline or Both NL & CR.

Department of ECE, RRIT Page 24


An Optimal Driving System Using Smart Helmet 2018-2019

5) Send command settings (case insensitive) to check Voice Recognition Module settings.
Input settings, and hit Enter to send.

6) Train Voice Recognition Module. Send sigtrain 0 On command to train record 0 with
signature "On". When Serial Monitor prints "Speak now", you need speak your voice (can be
any word, meaningful word recommended, may be 'On' here), and when Serial Monitor prints,
"Speak again", you need repeat your voice again. If these two voice are matched, Serial
Monitor prints "Success", and "record 0" is trained, or if are not matched, repeat speaking until
success.

What is a signature? Signature is a piece of text description for the voice command. For
example, if your 4 voice command are “1, 2, 3, 4”, you could train in the following way:

sigtrain 0 one

sigtrain 1 two

sigtrain 2 three

sigtrain 3 four

The signature could be displayed if its command was called. When training, the two led on the
Voice Recognition Module can indicate your training process. After sending the training
command, the SYS_LED (yellow) is blinking fast which remind you to get ready. Speak your
voice command as soon as the STATUS_LED (red) light lights on. The recording process ends
once when the STATUS_LED (red) lights off. Then the SYS_LED is blinking again, get ready
for next recording process. When the training process ends successful, SYS_LED and
STATUS_LED blink together. If the training fails, SYS_LED and STATUS_LED blink
together, but quickly.

7) Train another record. Send sigtrain 1 Off command to train record 1 with signature
"Off". Choose your favorite words to train (it can be any word, meaningful word
recommended, may be 'Off' here).

8) Send load 0 or 1 command to load voice. And say your word to see if the Voice Recognition
Module can recognize your words. If the voice is recognized, you can see.

Department of ECE, RRIT Page 25


An Optimal Driving System Using Smart Helmet 2018-2019

9) Train finish. Train sample also support several other commands.

4.7 ZigBee
The first is relying on a very reliable, low-range wireless technology, the IEEE
802.15.4Specification. This specification is a very modern, robust radio technology built on
over 40 years of experience by IEEE. It uses what is called Offset-Quadrature Phase-Shift
Keying (O-QPSK) and Direct Sequence Spread Spectrum (DSSS), a combination of
technologies that provides excellent performance in low signal-to-noise ratio environments.

ZigBee uses what is called Carrier Sense Multiple Access Collision Avoidance (CSMACA) to
increase reliability. Before transmitting, ZigBee listens to the channel. When the channel is
clear, ZigBee begins to transmit. This prevents radios from talking over one another, causing
corrupted data. CSMA-CA is similar to what people do in conversations. (Or at least should!)
They wait for the other speaker to finish, and then talk.

ZigBee uses a 16-bit CRC on each packet, called a Frame Checksum (FCS). This ensures that
the data bits are correct. Each packet is retried up to three times (for a total of four
transmissions). If the packet cannot get through after the fourth transmission, ZigBee informs
the sending node so something can be done about it.

Features of ZigBee

1) Low battery consumption. A ZigBee end device can operate for months or even years
without needing its battery replaced.

2) Low cost.

3) Low data rate. The maximum data rate for a ZigBee device is 250Kbps.

4) Supports up to 65,000 nodes connected in a network.

5) ZigBee can automatically establish its network, ZigBee uses small packets compared with
WiFi and Bluetooth.

Department of ECE, RRIT Page 26


An Optimal Driving System Using Smart Helmet 2018-2019

4.8 LIQUID CRYSTAL DISPLAY


The most commonly used Character based LCDs are based on Hitachi’s HD44780 controller
or other which are compatible with HD44580. The most commonly used LCDs found in the
market today are 1 line, 2 line or 4 line LCDS which have only 1 controller and support at most
of 80 characters, whereas LCDs supporting more than 80 characters make use of 2 HD44780
controllers. Most LCDs with 1 controller has 14 pins and LCDs with 2 controller has 16 pins.

LCD Description:

Before using the LCD for display purpose, LCD has to be initialized either by the internal reset
circuit or sending set of commands to initialize the LCD. It is the user who has to decide
whether an LCD has to be initialized by instructions or by internal reset circuit.

For a 8-bit data bus, the display requires a +5V supply plus 11 I/O lines. For a 4-bit data bus it
only requires the supply lines plus seven extra lines. When the LCD display is not enabled,data
lines are tri-state which means they are in a state of high impedence and this means they do
not interfere with the operation of the microcontroller when the display is not being addressed.

The LCD also requires 3 “control” lines from the microcontroller:

Enable (E): This line allows access to the display through R/W and RS lines. When the line is
low, the LCD is displayed and ignores signals from R/W and RS. When (E) line is high,the
LCD checks the state of the control lines and responds accordingly.

Department of ECE, RRIT Page 27


An Optimal Driving System Using Smart Helmet 2018-2019

Read/Write(R/W): This line determines the direction of data between the LCD and
microcontroller. When it is low, data is written to the LCD. When it is high, data is read from
the LCD.

Register select(RS): With the help of this line, the LCD interprets the type of data on data lines.
When it is low, an instruction is being written to the LCD. When it is high, a character is being
written to the LCD.

LOGIC status on control lines:

E : 0 Access to LCD displayed,

1 Access to LCD enabled.

R/W : 0 Writing data to LCD,

1 reading data from LCD.

RS : 0 Instruction,

1 Character.

4.9 POWER SUPPLY

A power supply is an electrical device that supplies electric power to an electrical load. The
primary function of a power supply is to convert electric current from a source to the
correct voltage, current, and frequency to power the load. As a result, power supplies are
sometimes referred to as electric power converters. Some power supplies are separate
standalone pieces of equipment, while others are built into the load appliances that they power.

The microcontroller based circuits are generally the 5V DC regulated power supply (RPS)
circuits, which can be designed with the help of different method for changing the power from
230V AC to 5V DC.

Finally voltage regulator regulates the voltage to 5V and finally, a blocking diode is used for
taking the pulsating waveform.

Department of ECE, RRIT Page 28


An Optimal Driving System Using Smart Helmet 2018-2019

Fig Block diagram of power supply

4.9.1 Transformer

The transformer will step down the power supply voltage 0-230V to 0-6V level. Then the
secondary of the potential transformer will be connected to the precision rectifier, which is
constructed with the help of op-amp. The advantages of using precision rectifier are it give
peak voltage output as DC; rest of the circuits will give only RMS output.

4.9.2 Bridge Rectifier

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

During the Positive half cyclic of the input AC waveform diodes D1 and D2 are forward biased
and D3 and D4 are reverse biased. When the voltage, more than the threshold level of the
diodes D1 and D2, starts conducting – the load current starts flowing through it, as shown as
red lines path in the diagram below.

During the negative half cycle of the input AC waveform, the diodes D3 and D4 are forward
biased, and D1 and D2 are reverse biased. Load current starts flowing through the D3 and D4
diodes when these diodes starts conducting as shown in the figure.

Department of ECE, RRIT Page 29


An Optimal Driving System Using Smart Helmet 2018-2019

Fig Bridge Wave Rectifier

One advantage of a bridge rectifier over a conventional full wave rectifier is that with a given
transformer the brige rectifier produces a voltage output that is nearly twice that of the
conventional full-wave circuit.

The maximum efficiency and ripple factor of the bridge rectifier is 81.2%and 0.482,
respectively.

Department of ECE, RRIT Page 30


An Optimal Driving System Using Smart Helmet 2018-2019

4.10 SOFTWARE DESCRIPTION


The voice processing application is implemented through ELECHOUSE Voice
Recognition Module. The main program for this system is written by using the Embedded C
programming language. The main program was developed in the KEIL Integrated
Development Environment. KEIL µVision is the name of a software dedicated to the
development and testing of a family of microcontrollers based on 8051 technology.

The .C program was converted into .HEX file in this IDE and dumped into the ROM part of
ATmega328 and LPC2148.

Department of ECE, RRIT Page 31


An Optimal Driving System Using Smart Helmet 2018-2019

CHAPTER -5

EXPERIMENTAL RESULTS AND DISCUSSION


The prototype of the system has been developed and tested. Figure shows the Helmet Module.
Figure shows the Bike Module.

Department of ECE, RRIT Page 32


An Optimal Driving System Using Smart Helmet 2018-2019

Speech processing unit is trained with voice commands, when the speech commands to control
the specific functions are said to the microphone such as “right-ON”, the Right Indicator is
turned on, thus by saying the prestored speech commands, certain functions can be controlled
and status of each functions are displayed on the LCD display. When the command is not
recognized correctly, the system ignores the command and does not transmit any signal to the
bike module. The accuracy of the recognition can be affected by background noise, speed of
the speaker and the clarity of the spoken accent. At the traffic section, the condition of the
traffic section is received through ZigBee in the bike module and is displayed in the LCD
display.

Voice Command Functions Condition of the functions


Right Right Indicator ON
Left Left Indicator ON
Head Light Head Light ON

Department of ECE, RRIT Page 33


An Optimal Driving System Using Smart Helmet 2018-2019

CONLUSION AND FUTURE WORKS


In this project implementation of an add-on interaction system for a vehicle-to driver,
vehicle-to-speed breaker and vehicle to traffic signal, based on ZigBee wireless
communication. This Helmet ensures the safety of the rider, by making it necessary to wear
helmet. If any of these prime safety rules are violated, the system will prevent the biker from
starting the bike. The prototype developed can control certain functions reducing manual
interaction with the bike. By using this system we can reduce the accident and its impact.

Future work will entail:

Integrating GSM and GPS with this system we can report the accident and sending the
location to the concerned authorities through a text message. In the Same Circuit Design we
can add digital fuel measurement unit and Mileage detector to make the system more secured
and Efficient.

Department of ECE, RRIT Page 34


An Optimal Driving System Using Smart Helmet 2018-2019

REFERENCES
[1] M. Pieve, F. Tesauri, and A. Spadoni, “Mitigation accident risk in powered two wheelers
domain: Improving effectiveness of human machine interface collision avoidance system in
two wheelers,” in Proc. 2nd. Conf. Human Syst. Interact., Catania, Italy, May 21–23,

2009, pp. 603–607.

[2] E.D.Bekiaris,A.Spadoni,and S.I.Nikolaou, “SAFERIDER project: New safety and comfort


in powered two wheelers,” in Proc. 2nd Conf. Human Syst. Interact., Catania, Italy, May 21–
23, 2009, pp. 600–602.

[3] A.Barón and P.Green, Safety and Usability of Speech Interfaces for In-Vehicle Tasks
While Driving: A Brief Literature Review Tech. Rep. UMTRI- 2006-5, 2006.

[4] M.Cellario,“Human-centered intelligent vehicles: Toward multimodal interface


integration,” IEEE Intell. Syst., vol. 16, no. 4, p. 78, Jul. 2001.

[5] F.Bellotti, “COMUNICAR: Designing a multimedia, context-aware human-machine


interface for cars,” Cogn., Technol. Work, vol. 7, p. 36, 2005.

[6] G.Costagliola, S.D.Martino, F.Ferrucci, G.Oliviero, U. Montemurro, and A.Paliotti,


“Handy: A new interaction device for vehicular information systems,” in Proc. Mobile Human-
Comput. Interact., Glasgow,U.K., 2004, pp. 545–547.

[7] A.W.Gellatly,“The Use of Speech Recognition Technology in Automotive


Applications,”Ph.D. dissertation, Virginia Polytech. Inst., Blacksburg, VA, 1997.

[8] K. Komiya, “Guidance of a Wheelchair by Voice,” Human Interface, vol. 1999, pp. 277–
280, 2000.

[9] Bluetooth SIG, 2005, Specification of the Bluetooth System. Core,Version1:2005-10.

Department of ECE, RRIT Page 35


An Optimal Driving System Using Smart Helmet 2018-2019

APPENDIX

FIGURE BLOCK DIAGRAM OF ARM LPC2148

Department of ECE, RRIT Page 36


An Optimal Driving System Using Smart Helmet 2018-2019

Department of ECE, RRIT Page 37

You might also like