Mini Proj

Download as pdf or txt
Download as pdf or txt
You are on page 1of 42

CHAPTER 1

INTRODUCTION

The objective of the smart helmet is to provide a means and apparatus for detecting and
reporting accidents. Sensors, Wi-Fi enabled processor, and cloud computing infrastructures are
utilised for building the system. The accident detection system communicates the accelerometer
values to the processor which continuously monitors for erratic variations. When an accident occurs,
the related details are sent to the emergency contacts by utilizing a cloud based service. The vehicle
location is obtained by making use of the global positioning system. The system promises a reliable
and quick delivery of information relating to the accident in real time and is appropriately named
Konnect. Thus, by making use of the ubiquitous connectivity which is a salient feature for the smart
cities, a smart helmet for accident detection is built.

Now a day's every system is automated in order to face new challenges. In the present days
Automated systems have less manual operations, flexibility, reliability and accurate. Due to this
demand every field prefers automated control systems. Especially in the field of electronics automated
systems are giving good performance. The project “Alcohol detector” itself indicates that whenever
there is any alcoholic content has been detected using alcoholic sensor then the system automatically
controls the motor of the vehicle. In this project we are using the alcoholic sensor that finds the
alcoholic content and fed as input to the microcontroller. This project is designed around a
microcontroller which forms the control unit of the project. The microcontroller gets the information
regarding the alcohol through the alcohol sensor which is interfaced to the ignition of the vehicle
receives the data and controls the vehicle using DC motor. By this way we can take the prevention
steps before occur the major accidents and we can avoid the human losses and financial losses. An
embedded system is a combination of software and hardware to perform a dedicated task. Some of the
main devices used in embedded products are Microprocessors and Microcontrollers.
Microprocessors are commonly referred to as general purpose processors as they simply accept the
inputs, process it and give the output. In contrast, a microcontroller not only accepts the data as inputs
but also manipulates it, interfaces the data with various devices, controls the data and thus finally
gives the result. The project “smart helmet” using NODEMCU microcontroller is an exclusive project
which is used to detects the alcohol and it gives message alert to the predefined numberA traffic
accident is defined as any vehicle accident occurring on public highway roads .The thought of
developing this project comes to do some good things towards the society. Two wheeler accidents are
1
increasing day by day and lead to loss of many lives. The main aim of our project is to build a safety
system which is integrated with the smart helmet and intelligent bike to reduce the probability of two-
wheeler accidents. If any accident occurs no persons at place where to give information to the
ambulance or parents. This is a situation we observe our day to day life, a thought of finding some
solution to resolve this problem come up with this idea of giving the information about accident as
soon as possible and in time. Smart helmet focusing on three major applications which are helpful in
our day to day life. At first and most one is the ignition of the bike will not on if we are not wearing
the helmet. Secondly alcoholic driving is not possible by using this smart helmet. If the rider is
alcoholic, the bike will not start. Third application is accident detection. If person met with an
accident, no one is there to help him and simply leaving or ignoring the person, In such situation
informing to ambulance or family members through mobile to rescue him for an extent.

2
CHAPTER 2

LITERATURE SURVEY

The Global status report on road safety 2015, reflecting information from 180 countries, indicates that
close to 1.25 million people die every year as a result of road accidents.Close to one fourth of the
people involved in accidents are motorcyclists. The main cause of death in two-wheeler drivers is over
speeding and careless driving. Numerous lives could have been saved if emergency medical service
could get accident information and reach in time to the scene.Up to 75% of all deaths occur within the
first one hour of impact. Thus, in this crucial phase of time, if proper aid reaches the victims,
mortality rates can be reduced. This project aims to build an Internet of Things (IoT) application that
leverages on ubiquitous connectivity, sensing and data analytics that are the basis of IoT applications.
The IoT is comprised of smart machines interacting and communicating with other machines, objects,
environments and infrastructures. The huge volumes of data thus generated, is processed into useful
actions that can “command and control” things, to make our lives much easier and safer. IoT
applications introduce numerous benefits like the capability to remotely monitor, manage and control
devices, and to get new insights and useful information from massive streams of real-time data. The
foundation however lies on the intelligence of the embedded processor. In order to realise the full
potential of the cloud computing and the ubiquitous sensing, a combined framework of both is
important. Thus, IoT application-specific framework should be able to provide support for the
following : 1) Reading data streams from sensors directly 2) Transparent and scalable processing of
the data 3) When events of interest are detected, the predetermined set of actions has to be triggered
by utilizing the various cloud computing applications. IoT and accident management are two areas in
which fast progress is being made. White et al. focussed on using the smart phone for accident
detection and notification. Zhao outlines the implications of location awareness on cellular devices,
and utilising this for smarter accident monitoring systems in cars. However, cars are usually designed
to reduce the force on the driver. Thus, the force experienced by a smartphone may not be
proportional to the force experienced by in-vehicle sensors that are mounted insides the car. This may
result in inaccurate detection of an accident. Moreover, power consumed by the GPS receiver in a
smartphone is high, rendering the battery life to be reduced at a fast rate. Numerous papers have dealt
with the transmission of accident information.There have been many advances in the development of
communication between vehicles (V2V technologies), also known as vehicular ad hoc networks
3
(VANETs). The 802.11p working group approved the IEEE 802.11p standard, providing a viable
solution for inter-vehicular security applications. The U.S. Department of Transportation (DOT) has
developed projects to improve traffic safety through the use of vehicular communication, based on
testing the effectiveness and safety benefits of the wireless connected vehicle technology in realworld,
multimodal driving conditions.These experiments only include V2V communications. The monitoring
system proposed by Jung et. al. includes non-intrusive active electrodes installed on the seats of the
vehicle. The data collected is sent through a wireless PAN and data is processed to identify if the
driver is stressed or not. However it can be seen that these approaches are too limited because of the
very short communication range. However, most of the existing technology has been designed for 4-
wheeled vehicles and are limited in perspective in terms of its reach and cost. As the network of such
systems expands, maintenance also becomes expensive. Thus, there is a need for an intelligent
vehicular safety system that ensures affordable safety and can be availed by all. Thus, we present a
simple design and implementation of a low cost and secure Internet-based smart helmet.

This is a report about a smart helmet which makes motorcycle driving safer than before. The aim of
this project is to give information at accident to ambulance N family members. This is implemented
using NodeMCU. This smart helmet was implemented by placing vibrations sensors in different
places of helmet where the probability of hitting is more which are connected to arguing board. When
the date exceeds minimum stress limit then the GSM module sends message to family members
automatically. The hardware used in this system is NodeMCU board, Bluetooth module, vibration
sensor and mobile phone. 2.2 Smart Helmet for Indian Bike Rider : This paper presents the smart
helmet that makes sure that the rider cannot start the bike without wearing it. This helmet replaces the
cable connections for wirelessly switching on a bike, so that the bike would not start without both the
key and the helmet. A LED indicator is used to demonstrate the working of the model. The system is a
simple telemetry system, which is activated with the help of a pressure that is applied to the inner side
of the helmet when the rider wears it. The framework model uses a DPDT electromechanical relay
and hence there is some time lag in wearing the helmet and switching on of the circuit. 2.3 Smart
Helmet Using GSM & GPS Technology for Accident Detection and Reporting System: A smart
helmet is an innovative concept which makes motorcycle driving safer than before. It uses the GPS
and GSM as its core technologies. The mechanism of this smart helmet is very simple, vibration
sensors are placed in different sections of helmet where the chances of hitting is more which are
connected to microcontroller board. So when the rider crashes and the helmet hit the ground, these
sensors sense and provide it to the microcontroller board, then controller extract GPS data using the

4
GPS module that is integrated to it. When the data goes below the minimum stress limit then GSM
module automatically sends alerting message to ambulance or family members. The hardware used in
this system is alcohol sensor, GSM, GPS, microcontroller, pressure sensor and vibration sensor. 2.4
Alcohol Detection Using Smart Helmet System : The system automatically checks whether the person
is wearing the helmet and has non- alcoholic breath while driving. There is a transmitter at the helmet
and a receiver at the bike. There is a switch used to sure the wearing of helmet on the head. The data
to be transferred is coded with RF encoder and transmitted through radio frequency transmitter. The
receiver at the bike collects the data and decodes it through RF decoder. MCU controls the function of
relay and thus the ignition; it controls the engine through a relay and a relay interfacing circuit.
SMART HELMET is a system which aims to make all motorcyclists in Malaysia aware and
compulsory to wear helmet whether the travel distance is in I 00 meter radius or long distance. The
system will use ~ee technology which will connect from the transmitter at helmet to the receiver at
motorcycle. Many type of switches being used such as temperature heat switch, clipped switch, and
signal as a switch to make sure the motorcyclist not cheating to their self. If the system identified that
the riders or user not wearing their helmet properly (clipped), the signalwon't be send to the receiver
at motorcycle which will cause the motorcycle cannot start and being ride by motorcyclist.The scope
of the study will be using others studies and statistics from Malaysia government agencies in term of
Road Safety; fatal motorcyclist accident causes and focus on the helmet wearing attitude and
behavior.

5
CHAPTER 3

EXISTING SYSTEM

The road accidents are very dreadful such that in India there are nearly 146 thousands of
people losing their lives because of the road accidents. From these we can see that 36% belongs to
that of those who are driving the motorcycles and from that 23% are losing their lives. It is very easy
that we can blame simply that the 98.6% are those who does not wear the helmet. But about the 1.4%
who doesn’t do any mistake in wearing the helmet? The reports are suggesting that they are getting
delayed in taking them to the hospital immediately.

6
CHAPTER 4

PROPOSED SYSTEM

It is a well-known fact that younger generation prefers bikes and motor cycle. Additionally,
over speeding and drunk and drive have become common issues now-a-days. There are thousands of
people who are losing their lives due to the road accidents. The main reason for this is due to the delay
in the emergency which should be provided to the victims. Smart helmet using IoT will detect the
accidents and report them to emergency contacts and near hospitals. This helmet consists of multiple
applications where used in alcohol detection, send notification whether rider wearing helmet or not
and it also gives warning alarm to wear helmet and engine gets locked until the rider wears helmet
and it also used accident detection. Here accident detection systems communicate with accelerometer
values to the processor which continuously monitors for erratic variations. When the accident
occurred then the vehicle location is obtained by the IOT and GPS module and this details are send to
the emergency contacts by using cloud. Mainly this system will provide quick and reliable
information which relates to the accident and send information in the form of messages to the
emergency contacts. So, the main aim of our paper is to provide the safety to the victims with the help
of smart helmet based on the technology of the Internet of Things.

Fig : Block diagram of smart helmet

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

This system having smoke sensor, vibration sensor when the smoke is detected automatically
helmet having front door which is provide safety for driver when he is falling. The microcontroller
gets the information regarding the alcohol through the alcohol sensor which is interfaced to the
ignition of the vehicle receives the data and controls the vehicle using DC motor.

In this smart helmet the helmet is fixed in combination with three components which are main.
Those are Alcohol Sensor, the Accident Switch and IOT and the GPS. All these components are fixed
together in the single helmet. Upto now we can observe that only Alcohol Sensor and Accident
Switch are fixed together into the one system. But now in our project we are proposing that along with
Alcohol Sensor, Accident Switch, IOT and the GPS are also fixed together within the single helmet.
The Alcohol Sensor is a device which is used for detecting if the driver who is driving has drank the
alcohol or not. If the driver consumed the alcohol then it will automatically send the alert message
when the person has taken the alcohol. Accident switch which can also be called as Bump Switch is
used in alerting by the SMS alerts to IOT server. The third on is the Button which is present inside the
helmet. If the person does not wear the helmet then the bike does not get started easily. And it starts
beeping until the person wears the helmet and displays a message that “Helmet Not Weared” . Once,
if the person wears the helmet and his top touches to the button it will stop beeping and also displays
the message that “Helmet Weared”.

8
CHAPTER 5

EMBEDDED SYSTEMS

5.1 Embedded Systems:

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


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

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

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

Fig : A modern example of embedded system

9
5.2 Need For Embedded Systems:

The uses of embedded systems are virtually limitless, because every day new products
are introduced to the market that utilizes embedded computers in novel ways. In recent years,
hardware such as microprocessors, microcontrollers, and FPGA chips have become much cheaper. So
when implementing a new form of control, it's wiser to just buy the generic chip and write your own
custom software for it. Producing a custom-made chip to handle a particular task or set of tasks costs
far more time and money. Many embedded computers even come with extensive libraries, so that
"writing your own software" becomes a very trivial task indeed. From an implementation viewpoint,
there is a major difference between a computer and an embedded system. Embedded systems are often
required to provide Real-Time response. The main elements that make embedded systems unique are
its reliability and ease in debugging.
Explanation of Embedded Systems:
Software Architecture:

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

➢ Simple Control Loop:

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

➢ Interrupt Controlled System:

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

➢ Cooperative Multitasking:

A non-preemptive multitasking system is very similar to the simple control loop scheme,
except that the loop is hidden in an API. The programmer defines a series of tasks, and each task gets
its own environment to “run” in. When a task is idle, it calls an idle routine, usually called “pause”,
“wait”, “yield”, “nop” (stands for no operation), etc.The advantages and disadvantages are very

10
similar to the control loop, except that adding new software is easier, by simply writing a new task, or
adding to the queue-interpreter.

➢ Primitive Multitasking:

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

➢ Microkernels And Exokernels:

A microkernel is a logical step up from a real-time OS. The usual arrangement is that the
operating system kernel allocates memory and switches the CPU to different threads of execution.
User mode processes implement major functions such as file systems, network interfaces, etc.

Stand Alone Embedded System:

These systems takes the input in the form of electrical signals from transducers or commands
from human beings such as pressing of a button etc.., process them and produces desired output. This
entire process of taking input, processing it and giving output is done in standalone mode. Such
embedded systems comes under stand alone embedded systems

Eg: microwave oven, air conditioner etc..

5.3 Real-time embedded systems:

Embedded systems which are used to perform a specific task or operation in a specific time
period those systems are called as real-time embedded systems. There are two types of real-time
embedded systems.

• Hard Real-time embedded systems:

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

• Soft Real Time embedded systems:

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

A wide range network interfacing communication is provided by using embedded systems.

Eg:

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

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

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

Fig : Network communication embedded systems

Different types of processing units:

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

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

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

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

5.4 APPLICATIONS OF EMBEDDED SYSTEMS:

• Consumer applications

• Office automation
• Industrial automation

• Computer networking

• Tele communications

13
CHAPTER 6
HARDWARE DESCRIPTION

6.1 ESP8266 NodeMCU:

Fig 5.1 NodeMCU

The ESP8266 is the name of a micro controller designed by Espressif Systems. The ESP8266
itself is a self-contained WiFi networking solution offering as a bridge from existing micro controller
to WiFi and is also capable of running self-contained applications. This module comes with a built in
USB connector and a rich assortment of pin-outs. With a micro USB cable, you can connect
NodeMCU devkit to your laptop and flash it without any trouble, just like Arduino. It is also
immediately breadboard friendly.

14
The most basic way to use the ESP8266 module is to use serial commands, as the chip is basically a
WiFi/Serial transceiver. However, this is not convenient. What we recommend is using the very cool
Arduino ESP8266 project, which is a modified version of the Arduino IDE that you need to install on
your computer.

SPECIFICATIONS:

• Voltage:3.3V.
• Wi-Fi Direct (P2P), soft-AP.
• Current consumption: 10uA~170mA.
• Flash memory attachable: 16MB max (512K normal).
• Integrated TCP/IP protocol stack.
• Processor: Tensilica L106 32-bit.
• Processor speed: 80~160MHz.
• RAM: 32K + 80K.
• GPIOs: 17 (multiplexed with other functions).
• Analog to Digital: 1 input with 1024 step resolution.
• +19.5dBm output power in 802.11b mode
• 802.11 support: b/g/n.
• Maximum concurrent TCP connections

Block Diagram:

Fig : Regulated Power Supply

The basic circuit diagram of a regulated power supply (DC O/P) with led connected as load.
15
Fig : 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)

6.2 ALCOHOL SENSOR:

Fig : Alcohol Sensor

16
Sensitive material of MQ-3 gas sensor is SnO2, which with lower conductivity in clean air. When the
target alcohol gas exist, The sensor’s conductivity is more higher along with the gas concentration
rising. Please use simple electrocircuit, Convert change of conductivity to correspond output signal of
gas concentration.

MQ-3 gas sensor has high sensitity to Alcohol, and has good resistance to disturb of gasoline, smoke
and vapor. The sensor could be used to detect alcohol with different concentration, it is with low cost
and suitable for different application.

Application

* Vehicel alcohol detector

* Portable alcohol detector

6.3 Buzzer

Basically, the sound source of a piezoelectric sound component is a piezoelectric diaphragm. A


piezoelectric diaphragm consists of a piezoelectric ceramic plate which has electrodes on both sides and a metal
plate (brass or stainless steel, etc.). A piezoelectric ceramic plate is attached to a metal plate with adhesives.
Applying D.C. voltage between electrodes of a piezoelectric diaphragm causes mechanical distortion due to the
piezoelectric effect. For a misshaped piezoelectric element, the distortion of the piezoelectric element expands
in a radial direction. And the piezoelectric diaphragm bends toward the direction. The metal plate bonded to the
piezoelectric element does not expand. Conversely, when the piezoelectric element shrinks, the piezoelectric
diaphragm bends in the direction Thus, when AC voltage is applied across electrodes, the bending is repeated,
producing sound waves in the air.

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

To switch on buzzer -high 1

To switch off buzzer -low 1

17
Fig: Picture of buzzer

6.4 LCD DISPLAY

One of the most common devices attached to a micro controller is an LCD display. Some of
the most common LCD’s connected to the many microcontrollers are 16x2 and 20x2 displays. This
means 16 characters per line by 2 lines and 20 characters per line by 2 lines, respectively.

Figure : LCD Pin diagram

Pin description:

Pin No. Name Description


Pin no. 1 VSS Power supply (GND)
Pin no. 2 VCC Power supply (+5V)
Pin no. 3 VEE Contrast adjust
Pin no. 4 RS 0 = Instruction input

18
1 = Data input
0 = Write to LCD module
Pin no. 5 R/W
1 = Read from LCD module
Pin no. 6 EN Enable signal
Pin no. 7 D0 Data bus line 0 (LSB)
Pin no. 8 D1 Data bus line 1
Pin no. 9 D2 Data bus line 2
Pin no. 10 D3 Data bus line 3
Pin no. 11 D4 Data bus line 4
Pin no. 12 D5 Data bus line 5
Pin no. 13 D6 Data bus line 6
Pin no. 14 D7 Data bus line 7 (MSB)

Table 1: Character LCD pins with Microcontroller

The LCD requires 3 control lines as well as either 4 or 8 I/O lines for the data bus. The user
may select whether the LCD is to operate with a 4-bit data bus or an 8-bit data bus. If a 4-bit data bus
is used the LCD will require a total of 7 data lines (3 control lines plus the 4 lines for the data bus). If
an 8-bit data bus is used the LCD will require a total of 11 data lines (3 control lines plus the 8 lines
for the data bus).

The three control lines are referred to as EN, RS, and RW.

The EN line is called "Enable." This control line is used to tell the LCD that we are sending it
data. To send data to the LCD, our program should make sure this line is low (0) and then set the
other two control lines and/or put data on the data bus. When the other lines are completely ready,
bring EN high (1) and wait for the minimum amount of time required by the LCD datasheet (this
varies from LCD to LCD), and end by bringing it low (0) again.

The RS line is the "Register Select" line. When RS is low (0), the data is to be treated as a
command or special instruction (such as clear screen, position cursor, etc.). When RS is high (1), the
data being sent is text data which should be displayed on the screen. For example, to display the letter
"T" on the screen we would set RS high.
19
The RW line is the "Read/Write" control line. When RW is low (0), the information on the data
bus is being written to the LCD. When RW is high (1), the program is effectively querying (or
reading) the LCD. Only one instruction ("Get LCD status") is a read command. All others are write
commands--so RW will almost always be low.

Finally, the data bus consists of 4 or 8 lines (depending on the mode of operation selected by
the user). In the case of an 8-bit data bus, the lines are referred to as DB0, DB1, DB2, DB3, DB4,
DB5, DB6, and DB7.

6.5 D.C. Motor:

A dc motor uses electrical energy to produce mechanical energy, very typically through the
interaction of magnetic fields and current-carrying conductors. The reverse process, producing
electrical energy from mechanical energy, is accomplished by an alternator, generator or dynamo.
Many types of electric motors can be run as generators, and vice versa. The input of a DC motor is
current/voltage and its output is torque (speed).

Fig : DC Motor

The DC motor has two basic parts: the rotating part that is called the armature and the
stationary part that includes coils of wire called the field coils. The stationary part is also called
the stator. Figure shows a picture of a typical DC motor, Figure shows a picture of a DC armature,
and Fig shows a picture of a typical stator. From the picture you can see the armature is made of coils
of wire wrapped around the core, and the core has an extended shaft that rotates on bearings. You
should also notice that the ends of each coil of wire on the armature are terminated at one end of the
armature. The termination points are called the commutator, and this is where the brushes make
electrical contact to bring electrical current from the stationary part to the rotating part of the machine.

20
Operation:
The DC motor you will find in modem industrial applications operates very similarly to the
simple DC motor described earlier in this chapter. Figure 12-9 shows an electrical diagram of a
simple DC motor. Notice that the DC voltage is applied directly to the field winding and the brushes.
The armature and the field are both shown as a coil of wire. In later diagrams, a field resistor will be
added in series with the field to control the motor speed.

When voltage is applied to the motor, current begins to flow through the field coil from the
negative terminal to the positive terminal. This sets up a strong magnetic field in the field winding.
Current also begins to flow through the brushes into a commutator segment and then through an
armature coil. The current continues to flow through the coil back to the brush that is attached to
other end of the coil and returns to the DC power source. The current flowing in the armature coil
sets up a strong magnetic field in the armature.

Fig : Simple electrical diagram of DC motor

Fig : Operation of a DC Motor

21
6.6 HELMET SWITCH:

A push-button (also spelled pushbutton) (press-button in the UK) or simply button is a simple
switch mechanism for controlling some aspect of a machine or a process. Buttons are typically made
out of hard material, usually plastic or metal. The surface is usually flat or shaped to accommodate the
human finger or hand, so as to be easily depressed or pushed. Buttons are most often biased switches,
though even many un-biased buttons (due to their physical nature) require a spring to return to their
un-pushed state. Different people use different terms for the "pushing" of the button, such as press,
depress, mash, and punch.

Fig : Helmet Switch

6.7 IOT ESP8266 MODULE

Introduction

Espressif Systems’ Smart Connectivity Platform (ESCP) of high performance wireless SOCs,
for mobile platform designers, provides unsurpassed ability to embed Wi-Fi capabilities within other
systems, at the lowest cost with the greatest functionality

Technology Overview

ESP8266 offers a complete and self-contained Wi-Fi networking solution, allowing it to either
host the application or to offload all Wi-Fi networking functions from another application processor.

When ESP8266 hosts the application, and when it is the only application processor in the
device, it is able to boot up directly from an external flash. It has integrated cache to improve the
performance of the system in such applications, and to minimize the memory requirements.

Alternately, serving as a Wi-Fi adapter, wireless internet access can be added to any
microcontroller-based design with simple connectivity through UART interface or the CPU AHB
bridge interface.
22
Features

• 802.11 b/g/n protocol

• Wi-Fi Direct (P2P), soft-AP

• Integrated TCP/IP protocol stack

• Integrated TR switch, balun, LNA, power amplifier and matching network

• Integrated PLL, regulators, and power management units

• +19.5dBm output power in 802.11b mode

• Integrated temperature sensor

• Supports antenna diversity

• Power down leakage current of < 10uA

• Integrated low power 32-bit CPU could be used as application processor

CPU, Memory and Interfaces

CPU

This chip embeds an ultra low power Micro 32-bit CPU, with 16-bit thumb mode. This CPU can be
interfaced using:

• code RAM/ROM interface (iBus) that goes to the memory controller, that can also be used to
access external flash memory,

• data RAM interface (dBus), that also goes to the memory controller

• AHB interface, for register access, and

• JTAG interface for debugging

23
Memory Controller

The memory controller contains ROM, and SRAM. It is accessed by the CPU using the iBus, dBus
and AHB interface. Any of these interfaces can request access to the ROM or RAM modules, and the
memory controller arbiters serve these 3 interfaces on a first-come-first-serve basis.

Interfaces

The ESP8266 contains several analog and digital interfaces described in the following sections.

Master SI / SPI Control (Optional)

The master serial interface (SI) can operate in two, three or four-wire bus configurations to control the
EEPROM or other I2C/SPI devices. Multiple I2C devices with different device addresses are
supported by sharing the 2-wire bus.

Multiple SPI devices are supported by sharing the clock and data signals, using separate software
controlled GPIO pins as chip selects.

The SPI can be used for controlling external devices such as serial flash memories, audio CODECs, or
other slave devices. It is set up as a standard master SPI device with 3 different enable pins:

• SPI_EN0,

• SPI_EN1,

• SPI_EN2.

General Purpose IO

There are up to 16 GPIO pins. They can be assigned to various functions by the firmware. Each GPIO
can be configured with internal pull-up/down, input available for sampling by a software register,
input triggering an edge or level CPU interrupt, input triggering a level wakeup interrupt, open-drain
or push-pull output driver, or output source from a software register, or a sigma-delta PWM DAC.

These pins are multiplexed with other functions such as host interface, UART, SI, Bluetooth
coexistence, etc.

24
Digital IO Pads

The digital IO pads are bidirectional, non-inverting and tri-state. It includes input and an output buffer
with tristate control inputs. Besides this, for low power operations, the IO can also be set to hold. For
instance, when we power down the chip, all output enable signals can be set to hold low. Optional
hold functionality can be built into the IO if requested. When the IO is not driven by the internal or
external circuitry, the hold functionality can be used to hold the state to the last used state.

Applications

• Wi-Fi Smart Hardware Converted from UART Serial Ports

• Sensor

• Smart Light

• Smart Plug

Wi-Fi (Short for Wireless Fidelity) is a wireless technology that uses radio frequency to transmit data
through the air. Wi-Fi has initial speeds of 1mbps to 2mbps. Wi-Fi transmits data in the frequency
band of 2.4 GHz. It implements the concept of frequency division multiplexing technology. Range of
Wi-Fi technology is 40-300 feet.

Fig : Wi-Fi Module

25
6.8 Wi-fi module

ESP8266 offers a complete and self-contained Wi-Fi networking solution, allowing it to either
host the application or to offload all Wi-Fi networking functions from another application processor.

When ESP8266 hosts the application, and when it is the only application processor in the
device, it is able to boot up directly from an external flash. It has integrated cache to improve the
performance of the system in such applications, and to minimize the memory requirements.

Alternately, serving as a Wi-Fi adapter, wireless internet access can be added to any
microcontroller-based design with simple connectivity through UART interface or the CPU AHB
bridge interface.

ESP8266 on-board processing and storage capabilities allow it to be integrated with the
sensors and other application specific devices through its GPIOs with minimal development up-front
and minimal loading during runtime. With its high degree of on-chip integration, which includes the
antenna switch balun, power management converters, it requires minimal external circuitry, and the
entire solution, including front-end module, is designed to occupy minimal PCB area.

FEATURES

• 802.11 b/g/n protocol

• Wi-Fi Direct (P2P), soft-AP

• Integrated TCP/IP protocol stack

• Integrated TR switch, balun, LNA, power amplifier and matching network

• Integrated PLL, regulators, and power management units

• +19.5dBm output power in 802.11b mode

• Integrated temperature sensor

• Supports antenna diversity

• Power down leakage current of < 10uA

• Integrated low power 32-bit CPU could be used as application processor

26
ESP8266 APPLICATIONS

• Smart power plugs

• Home automation

• Mesh network

• Industrial wireless control

• Baby monitors

• IP Cameras

• Sensor networks

• Wearable electronics

• Wi-Fi location-aware devices

• Security ID tags

• Wi-Fi position system beacons

27
CHAPTER 7

SOFTWARE DESCRIPTION

This project is implemented using following software’s:


• Express PCB – for designing circuit
• Arduino IDE compiler - for compilation part

7.1 Express PCB:

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

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

Preparing Express PCB for First Use:

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

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

The Interface:

When a project is first started you will be greeted with a yellow outline. This yellow
outline is the dimension of the PCB. Typically after positioning of parts and traces, move them to

28
their final position and then crop the PCB to the correct size. However, in designing a board with a
certain size constraint, crop the PCB to the correct size before starting.

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

Fig 4.1: Tool bar necessary for the interface

Design Considerations:

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

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

7.2 Arduino compiling

29
In next step download library

As Arduino doesn’t recognize the directory name, please rename it

Launch Arduino by double click “arduino” below

30
One example

Select the target board as “Arduino Uno”:

31
Click Sketch-> Verify/Compile:

32
CHAPTER 8

CODE

#include <LiquidCrystal.h>
#include <stdio.h>
#include <SoftwareSerial.h>

SoftwareSerial mySerial(8, 9);

LiquidCrystal lcd(6, 7, 5, 4, 3, 2);


// defines pins numbers
//New GPS GY-NE06MV2

int relay = 10;


int mq3 = 12;
int hel = A0;
int buzzer = 13;

int dist1,dist2,dist3,sts1=0;

long duration;
int distanceCm, distanceInch;

int memsx=0,memsy=0;

int hbtc=0,hbtc1=0,rtrl=0;

int sti=0;
unsigned char rcv,count,gchr='x',gchr1='x',robos='s';

char rcvmsg[10],pastnumber[11];
//char pastnumber1[11],pastnumber2[11];//pastnumber3[11];

char gpsval[50];
// char dataread[100] = "";
// char lt[15],ln[15];

int i=0,k=0,lop=0;
int gps_status=0;
33
float latitude=0;
float logitude=0;
String Speed="";
String gpsString="";
char *test="$GPRMC";

//int hbtc=0,hbtc1=0,rtrl=0;

unsigned char gv=0,msg1[10],msg2[11];


float lati=0,longi=0;
unsigned int lati1=0,longi1=0;
unsigned char flat[5],flong[5];
unsigned char finallat[8],finallong[9];

int ii=0,rchkr=0;

float tempc=0,weight=0;
float vout=0;

String inputString = ""; // a string to hold incoming data


boolean stringComplete = false; // whether the string is complete

void okcheck()
{
unsigned char rcr;
do{
rcr = Serial.read();
}while(rcr != 'K');
}

void gps_send()
{
Serial.write("AT+CIPSEND=0,21\r\n"); delay(2000);
Serial.write("GPS:");
for(ii=0;ii<=6;ii++) Serial.write(finallat[ii]);
for(ii=0;ii<=7;ii++) Serial.write(finallong[ii]);
Serial.write("\r\n"); delay(3000);
}

34
void setup()
{
Serial.begin(9600);//serialEvent();
mySerial.begin(9600);

pinMode(relay, OUTPUT);
pinMode(buzzer, OUTPUT);
pinMode(vib, INPUT);
pinMode(mq3, INPUT);
pinMode(hel, INPUT);

digitalWrite(hel, HIGH);
digitalWrite(relay, LOW);
digitalWrite(buzzer, HIGH);
digitalWrite(vib, HIGH);

lcd.begin(16, 2);lcd.cursor();
lcd.print("IOT Smart Helmet");

delay(2000);

get_gps();
gps_convert();

lcd.clear();
lcd.setCursor(0,0);
for(ii=0;ii<=6;ii++) lcd.write(finallat[ii]);

lcd.setCursor(0,1);
for(ii=0;ii<=7;ii++) lcd.write(finallong[ii]);

//delay(3000);

lcd.setCursor(0,2);
lcd.write("Lat:");
for(ii=0;ii<=6;ii++) lcd.write(finallat[ii]);

lcd.setCursor(0,3);
lcd.write("Long:");
for(ii=0;ii<=7;ii++) lcd.write(finallong[ii]);

delay(1500);
35
Serial.write("AT\r\n"); delay(2500);// okcheck();
Serial.write("ATE0\r\n"); okcheck();
Serial.write("AT+CWMODE=3\r\n");delay(2500);// okcheck();
Serial.write("AT+CIPMUX=1\r\n");delay(2500);// okcheck();
Serial.write("AT+CIPSERVER=1,23\r\n");delay(2500);// okcheck();

lcd.clear();
lcd.print("Waiting For");
lcd.setCursor(0,1);
lcd.print(" Connection ");
do{
rcv = Serial.read();
}while(rcv != 'C');

lcd.clear();lcd.print("Connected");

//gsminit();

delay(1500);

lcd.clear();
lcd.print("Hel:");//4-5-6-7,0
lcd.setCursor(8,0);
lcd.print("Alc:");//12,0

lcd.setCursor(0,1);
lcd.print("Vib:");//4-5-6-7,1

void loop()
{
if(digitalRead(hel) == LOW)
{
lcd.setCursor(4,0);lcd.print("Wear");
}
if(digitalRead(hel) == HIGH)
{
lcd.setCursor(4,0);lcd.print("N.W ");
digitalWrite(relay, LOW);
digitalWrite(buzzer, LOW);
Serial.write("AT+CIPSEND=0,16\r\n");delay(2000);
36
Serial.write("Helmet No-Wear\r\n");delay(2500);

delay(1000);
Serial.write("AT+CIPSEND=0,21\r\n");delay(2000);
Serial.write("GPS:");
for(ii=0;ii<=6;ii++) Serial.write(finallat[ii]);
for(ii=0;ii<=7;ii++) Serial.write(finallong[ii]);
Serial.write("\r\n");delay(2500);

digitalWrite(buzzer, HIGH);
}

if(digitalRead(mq3) == LOW)
{
lcd.setCursor(12,0);lcd.print("ON ");
digitalWrite(relay, LOW);
digitalWrite(buzzer, LOW);
Serial.write("AT+CIPSEND=0,8\r\n");delay(2000);
Serial.write("Alc Detected\r\n");delay(2500);

delay(1000);
Serial.write("AT+CIPSEND=0,21\r\n");delay(2000);
Serial.write("GPS:");
for(ii=0;ii<=6;ii++) Serial.write(finallat[ii]);
for(ii=0;ii<=7;ii++) Serial.write(finallong[ii]);
Serial.write("\r\n");delay(2500);

digitalWrite(buzzer, HIGH);
}
if(digitalRead(mq3) == HIGH)
{
lcd.setCursor(12,0);lcd.print("OFF");
}

if(digitalRead(vib) == LOW)
{
lcd.setCursor(4,1);lcd.print("ON ");
digitalWrite(relay, LOW);
digitalWrite(buzzer, LOW);
Serial.write("AT+CIPSEND=0,8\r\n");delay(2000);
Serial.write("Accident detected\r\n");delay(2500);
37
delay(1000);
Serial.write("AT+CIPSEND=0,21\r\n");delay(2000);
Serial.write("GPS:");
for(ii=0;ii<=6;ii++) Serial.write(finallat[ii]);
for(ii=0;ii<=7;ii++) Serial.write(finallong[ii]);
Serial.write("\r\n");delay(2500);

digitalWrite(buzzer, HIGH);
}
if(digitalRead(vib) == HIGH)
{
lcd.setCursor(4,1);lcd.print("OFF");
}

if(digitalRead(hel) == LOW && digitalRead(mq3) == HIGH && digitalRead(vib) == HIGH)


{
digitalWrite(relay, HIGH);
}

delay(100);
}

38
ADVANTAGES AND DISADVANTAGES

Advantages

1. High sensitivity alcohol sensor


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

Disadvantages:

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

Applications:

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

39
CHAPTER 9
RESULTS

40
CHAPTER 10
CONCLUSION :

We contrasted smart hemet with alcohol, helmet switch,GPS,IOT, vibration sensor. We


implemented the protection system for driver by using arduino micro controller.Integrating features of
all the hardware components used have been developed in it. Presence of every module has been
reasoned out and placed carefully, thus contributing to the best working of the unit. Secondly, using
highly advanced IC’s with the help of growing technology, the project has been successfully
implemented. Thus the project has been successfully designed and tested.

FUTURE SCOPE :

Our project “G.S.M based alcohol detection” is mainly intended to design such that to avoid
accidents for drunken people using alcohol detection sensor. And it sends S.M.S to the predefined
number and it also shows on L.C.D regarding alcohol detection.
The project “Alcohol detector” itself indicates that whenever there is any alcoholic content has
been detected using alcoholic sensor .when alcohol detects relay gets turn ON. And this information
shows on LCD like alcohol detection occurs and also sends S.M.S to the predefined number using
G.S.M technology. In this project we are using the alcoholic sensor that finds the alcoholic content
and fed as input to the microcontroller. This project is designed around a microcontroller which forms
the control unit of the project.

This project can be extended by using GPRS technology .By using this technology alcohol
detection information will displays in predefined websites

41
CHAPTER 11

REFERENCES

[1] S. Chandran, S. Chandrashekhar, E. Elizabeth N, “Konnect: An Internet of Things (IoT) based


Smart Helmet for Accident Detection and Notification”, India Conference (INDICON), 2016 IEEE
Annual.
[2] Jennifer William, Kaustubh Padwal, Nexon Samuel, Akshay Bawkar, Smita Rukhande
“intelligent Helmet” International Journals of Scietific & Engineering Research, volume 7, issue 3,
March-2016.
[3] Shoeb Ahmed Shabbeer, Merin Melleet “Smart helmet for accident detection and notification“
2nd IEEE international conference on computational systems and information technology 2017.
[4] Syan Tapadar, Arnab Kumar Saha, Dr. Himadri Nath Saha, Shinjini Ray, Robin Karlose
“Accident and Alcohol detection in Bluetooth enabled Smart Helmets for motor bikes”.
[5] Nitin Agarwal, Anshul Kumar Singh, Pushpender Pratap Singh, Rajesh Sahani, “SMART
HELMET”, International Research Journal of Engineering and Technology, Volume 2, issue 2, May
2015.
[6] Professor Chitte P.P., Salunke Akshay S., Thorat Aniruddha, N Bhosale, “Smart Helmet &
Intelligent Bike System”, International Research Journal of Engineering and Technology (IRJET)
Volume: 03 Issue: 05, May2016.
[7] Harish Chandra Mohanta, Rajat Kumar Mahapatra andJyotirmayee Muduli(2014)”, Anti-Theft
MechanismSystem with Accidental Avoidance and Cabin SafetySystem for Automobiles”,
International Refereed Journalof Engineering and Science (IRJES), Vol. 3, No. 4, pp. 56-62.
[8] SudharsanaVijayan, Vineed T Govind, Merin Mathews, SimnaSurendran, Muhammed Sabah,
”Alcohol detection using smart helmet system”, IJETCSE, Volume 8 Issue 1 – APRIL 2014.
[9] Mohd Khairul Afiq Mohd Rasli, Nina Korlina madzhi, Juliana Johari “SMART HELMET WITH
SENSORS FOR ACCIDENT PREVENTION”, University Technology MARA,2017.
[10] Nitin Agarwal, Anshul Kumar Singh, Pushpender Pratap Singh, Rajesh Sahani, “SMART
HELMET”, International Research Journal of Engineering and Technology, Volume 2, issue 2, May
2015.
[11] Mohamad Nizam Mustafa, “OVERVIEW OF CURRENT ROAD SAFETY SITUATION IN
MALAYSIA” highway planning unit road safety section ministry of works, 2010
[12] Professor Chitte, Mr. Salunke, Akshay S., Mr. Bhosale Nilesh T., “Smart helmet and intelligent
bike system”, International Research Journal of Engineering and Technology(IRJET), Vol 5,Issue 5,
May-2016.
[13] Chitte P.P., Salunke Akshay S., Thorat Aniruddha, N Bhosale, “Smart Helmet & Intelligent Bike
System”, International ResearchJournal of Engineering and Technology (IRJET) Volume: 03 Issue:
05, May-2016.
[14] Vijay J, Saritha B, Priyadharshini and Laxmi R, “Drunken Drive Protection System”,
International Journal of Scientific & Engineering Research(IJSER), Vol. 2, No. 12,December2011,
ISSN: 2229-5518.

42

You might also like