Sei sulla pagina 1di 59

ABSTRACT

Now a day’s most of the countries are enforcing their citizen to wear helmet while riding
bike and not to ride bike when the person is under the influence of alcohol, but still rules are
being violated. In order to overcome this problem, “Accident Detection, Theft and Drive
Protection using Intelligent Wireless Safety Helmet " are developed. It consists of an
intelligent system embedded into the helmet and the vehicle. Helmet unit ensures that rider is
wearing helmet and not under influence of alcohol throughout the ride. It communicates with
vehicle unit to switch off ignition system of bike if above condition is not met. Vehicle unit
checks and intimates accident through geometric coordinates via SMS. By using geometric
coordinates, location of the injured rider can be traced using simple GPS tracking
application. Also, this system provides theft protection as helmet is also essential along with
key to start bike.

1
CHAPTER 1

INTRODUCTION

In today's era, especially in the young generation, the craze to ride bike is rapidly increasing.
The middle class families prefer to buy two-wheeler over four-wheeler because of their low
price. As the number of two-wheeler on the road are increasing, road mishaps are also
increasing day by day. In the event of an accident, lack of timely medical attention to the
injured person may lead to death. Thus, there is a need for a system which ensures safety of
rider by enforcing rider to wear helmet as per government guidelines and also assist in
providing the rider for a medical assistance in the event of an accident.

This chapter gives a brief introduction to embedded systems their characteristics and
major building blocks of an embedded system and finally concludes with some
important examples of an embedded system in real world.

1.1 INTRODUCTION TO EMBEDDED SYSTEMS:

An embedded system is a special-purpose system in which the computer is completely


encapsulated by or dedicated to the device or system it controls. Unlike a general-
purpose computer, such as a personal computer, an embedded system performs one or a
few predefined tasks, usually with very specific requirements. Since the system is
dedicated to specific tasks, design engineers can optimize it, reducing the size and cost
of the product. Embedded systems are often mass- produced, benefiting from economies
of scale.

Personal digital assistants (PDAs) or handheld computers are generally considered


embedded devices because of the nature of their hardware design, even though they are
more expandable in software terms. This line of definition continues to blur as devices
expand. With the introduction of the OQO Model 2 with the Windows XP operating
system and ports such as a USB port both features usually belong to "general purpose
computers", the line of nomenclature blurs even more.

2
Physically, embedded systems range from portable devices such as digital watches and
MP3 players, to large stationary installations like traffic lights, factory controllers, or the
systems controlling nuclear power plants.

In terms of complexity embedded systems can range from very simple with a single
microcontroller chip, to very complex with multiple units, peripherals and networks
mounted inside a large chassis or enclosure. The examples of embedded system board is
shown in below fig:1.1.

Figure 1.1 Examples of Embedded Systems board.

1. Avionics, such as inertial guidance systems, flight control hardware/software.


2. Cellular telephones and telephone switches.
3. Engine controllers and antilock brake controllers for automobiles.
4. Home automation products, such as thermostats, air conditioners, sprinklers
5. Handheld calculators, computers.
6. Household appliances, including microwave ovens, washing machines, television.
7. Medical equipment.
8. Personal digital assistant.
9. Videogame consoles.
10. Computer peripherals such as routers and printers.
11. Industrial controllers for remote machine operation.

3
CHAPTER-2
LITERATURE SURVEY

The road accident is one of the major problems all over the world. The recent report says that
the annual average road accident is estimated to be about 7, 00,000 of which 10 percentage
occur in India which has overtaken China. The annual statistics revealed by the World Health
Organization (WHO) in its Global status report on road safety says that around 80,000 people
are killed on Indian roads due to rush driving, drunken driving and less usage of helmets.
Also, most of the countries are forcing the motor riders to wear the helmet and not to use the
vehicles when the person is in drunken condition. To overcome problem, a system called
Accident Detection, Theft and Drive Protection using intelligent Wireless Safety Helmet is
introduced.

There has been a sharp rise in the total number of deaths that occur due to road accidents in
the past few years. Reckless driving, ignorance of traffic rules and absence of a protective
shield have been some of the most important reasons for these deaths. The driver must have a
line of defense in case an accident occurs. A survey performed in India confirmed that there
were a total of 1,34,513 deaths due to road accidents in India in the year 2011. The number
increased to 1, 42,485 in the year 2014. Figure 2.1 gives a graphical analyses of the road
accidents, injuries and deaths in India from 2002- 2011 [1]. Most of the accident occurs due
to drinking and then driving bikes and death caused due to neglecting helmet. Government
adopted few measures like helmet and alcohol checking by traffic police but are hardly
useful.

4
Figure 2.1: Accident statistics

5
CHAPTER-3
EXISTING SYSTEM

Disadvantage of current technology is due to negligence of rider and difficulty of


implementation of traffic rules by traffic police. Following are the main drawbacks of
existing technology:
1. Rider do not wear helmet in regions where traffic checking is not done.
2. There is a tendency of the driver to wear helmet only where they anticipate checking may
take place, else they do not wear helmet where no checking is done.
3. The vehicle can be turned on and stolen by bypassing the ignition switch.
4. Testing alcohol content present in blood in each individual rider in a big countries like
India is almost impossible.

6
CHAPTER-4
PROPOSED SYSTEM

In our today situation wearing the helmet is the most important thing. Because wearing
helmet while driving a bike will avoid from accidents. But most of them are not wearing
helmets today because many of them are forgotten to wear that and they do not like that to
wear.

Helmet
Helmets attempt to protect the user's head by absorbing mechanical energy and protecting
against penetration. Structure and protective capacity of helmet shown in Figure are altered
in high energy impacts. Besides, its energy-absorption capability and volume and weight are
also important issues, since higher volume and weight increase the injury risk for the user's
head and neck.

Breath Analyzer
Breath analyzer is used for Blood Alcohol Content test (BAC) but Breath analyzer do not
directly measure blood alcohol content or concentration, which requires the analysis of a
blood sample. Instead, Breath analyzer showed in Figure estimate BAC indirectly by
measuring the amount of alcohol in one's breath. Mainly, traffic police use to check driver on
highway. If alcohol content found to be more than 0.08 mg/L then driver is fined.

The Arduino is an extremely easy to use gadget which can be effortlessly interfaced with any
sensors or modules and is extremely minimal in size. Now all are clear that the Arduino will
send an affirmation to the bike for an ignition request.

7
CHAPTER-5

BLOCK DIAGRAM AND DISCRIPTION

HELMET SECTION:

POWER
SUPPLY LCD
DISPLAY
ARDUINO (16*2 LINES)
UNO
IR SENSOR

ALCOHOL
ZIGBEE
SENSOR

HELMET
SWITCH

BIKE SECTION:

POWER LCD DISPLAY


(16*2 LINES)
SUPPLY

ARDUINO
IGNITION UNO ZIGBEE
KEY

SIM 800 MOTOR


GSM

BUZZER
GPS
NEO 6M

8
Power Supply:
In this project we required operating voltage for ARM controller board is 12V. Hence
the 12V D.C. power supply is needed for the ARM board. This regulated 12V is
generated by stepping down the voltage from 230V to 18V now the step downed a.c
voltage is being rectified by the Bridge Rectifier using 1N4007 diodes. The rectified a.c
voltage is now filtered using a ‘C’ filter. Now the rectified, filtered D.C. voltage is fed to
the Voltage Regulator.

LCD Display Section:


This section is basically meant to show up the status of the project. This project makes
use of Liquid Crystal Display to display / prompt for necessary information.

Buzzer:
This section consists of a Buzzer. The buzzer is used to alert / indicate the completion of
process. It is sometimes used to indicate the start of the embedded system by alerting
during start-up.

Zigbee:
Zigbee is an IEEE 802.15.4-based specification for a suite of high-level communication
protocols used to create personal area networks with small, low-power digital radios, such as
for home automation, medical device data collection, and other low-power low-bandwidth
needs, designed for small scale projects which need wireless connection. Hence, Zigbee is a
low-power, low data rate, and close proximity (i.e., personal area) wireless ad hoc network.

Ardiuno Uno:
Arduino is an open-source hardware and software company, project and user community that
designs and manufactures single-board microcontrollers and microcontroller kits for building
digital devices and interactive objects that can sense and control both physically and
digitally. Its products are licensed under the GNU Lesser General Public License (LGPL) or
the GNU General Public License(GPL), permitting the manufacture of Arduino boards and
software distribution by anyone. Arduino boards are available commercially in preassembled
form or as do-it-yourself (DIY) kits.

9
IR sensor:
An infrared sensor is an electronic device, which emits in order to sense some aspects of the
surroundings. An IR sensor can measure the heat of an object as well as detects the motion.
These types of sensors measures only infrared radiation, rather than emitting it that is called
as a passive IR sensor.

Alcohol sensor:
This module is made using Alcohol Gas Sensor MQ3. It is a low cost semiconductor sensor
which can detect the presence of alcohol gases at concentrations from 0.05 mg/L to 10 mg/L.
The sensitive material used for this sensor is SnO2, whose conductivity is lower in clean air.
Its conductivity increases as the concentration of alcohol gases increases. It has high
sensitivity to alcohol and has a good resistance to disturbances due to smoke, vapor and
gasoline. This module provides both digital and analog outputs. MQ3 alcohol sensor module
can be easily interfaced with Microcontrollers, Arduino Boards, and Raspberry Pi etc.

Ignition key:
An ignition switch, starter switch or start switch is a switch in the control system of a motor
vehicle that activates the main electrical systems for the vehicle, including "accessories"
(radio, power windows, etc.). In vehicles powered by internal combustion engines, the switch
provides power to the starter solenoid and the ignition system components (including
the engine control unit and ignition coil), and is frequently combined with the starter switch
which activates the starter motor.

GSM modem section:


This section includes a gsm modem. the modem will speak with microcontroller the use of
serial verbal exchange. the modem is interfaced to microcontroller using max 232, a serial
motive force.

DC Motor:
DC motor is an output for this venture. And dc motor is hooked up to microcontroller. And
this motor managed by means of the microcontroller with the respective inputs given with the
aid of us. Its velocity will be numerous in keeping with the speed set by means of the
switches.

1
0
1.4 Schematic Diagram:

1.5 Schematic Explanation:

In this project we required operating voltage for ARDIUNO UNO controller board is 5.
Hence the 5V D.C. power supply is needed for the ARDIUNO UNO board. This
regulated 5V is generated by stepping down the voltage from 230V to 18V now the step
downed a.c voltage is being rectified by the Bridge Rectifier using 1N4007 diodes. The
rectified a.c voltage is now filtered using a ‘C’ filter. Now the rectified, filtered D.C.
voltage is fed to the Voltage Regulator. This voltage regulator provides/allows us to have
a Regulated constant Voltage which is of +5V.

ARDUINO UNO:
The Arduino Uno is a microcontroller board based on the ATmega328 (datasheet). It has 14
digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16
MHz ceramic resonator, a USB connection, a power jack, an ICSP header, and a reset button.
It contains everything needed to support the microcontroller; simply connect it to a computer
with a USB cable or power it with a AC-to-DC adapter or battery to get started.
The Uno differs from all preceding boards in that it does not use the FTDI USB-to-serial
driver chip. Instead, it features the Atmega16U2 (Atmega8U2 up to version R2) programmed
as a USB-to-serial converter.
Revision 2 of the Uno board has a resistor pulling the 8U2 HWB line to ground, making it
easier to put into DFU mode.
Revision 3 of the board has the following new features:

 1.0 pinout: added SDA and SCL pins that are near to the AREF pin and two other
new pins placed near to the RESET pin, the IOREF that allow the shields to adapt to the
voltage provided from the board. In future, shields will be compatible both with the board
that use the AVR, which operate with 5V and with the Arduino Due that operate with 3.3V.
The second one is a not connected pin, that is reserved for future purposes.

1
1
 Stronger RESET circuit.
 Atmega 16U2 replace the 8U2.

"Uno" means one in Italian and is named to mark the upcoming release of Arduino 1.0. The
Uno and version 1.0 will be the reference versions of Arduino, moving forward. The Uno is
the latest in a series of USB Arduino boards, and the reference model for the Arduino
platform; for a comparison with previous versions, see the index of Arduino boards.

Summary:
Microcontroller ATmega328
Operating Voltage 5V
Input Voltage (recommended) 7-12V
Input Voltage (limits) 6-20V
Digital I/O Pins 14 (of which 6 provide PWM output)
Analog Input Pins 6
DC Current per I/O Pin 40 mA
DC Current for 3.3V Pin 50 mA
Flash Memory 32 KB (ATmega328) of which 0.5 KB used by bootloader
SRAM 2 KB (ATmega328)
EEPROM 1 KB (ATmega328)
Clock Speed 16 MHz

Schematic & Reference Design:


EAGLE files: arduino-uno-Rev3-reference-design.zip (NOTE: works with Eagle 6.0 and
newer) Schematic: arduino-uno-Rev3-schematic.pdf
Note: The Arduino reference design can use an Atmega8, 168, or 328, Current models use an
ATmega328, but an Atmega8 is shown in the schematic for reference. The pin configuration
is identical on all three processors.

Power;
The Arduino Uno can be powered via the USB connection or with an external power supply.
The power source is selected automatically.
External (non-USB) power can come either from an AC-to-DC adapter (wall-wart) or
battery. The adapter can be connected by plugging a 2.1mm center-positive plug into the
board's power jack. Leads from a battery can be inserted in the Gnd and Vin pin headers of
the POWER connector.

The board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V,
however, the 5V pin may supply less than five volts and the board may be unstable. If using
more than 12V, the voltage regulator may overheat and damage the board. The recommended
range is 7 to 12 volts.

The power pins are as follows:


 VIN. The input voltage to the Arduino board when it's using an external power
source (as opposed to 5 volts from the USB connection or other regulated power source).
You can supply voltage through this pin, or, if supplying voltage via the power jack, access it
through this pin.
 5V.This pin outputs a regulated 5V from the regulator on the board. The board can
be supplied with power either from the DC power jack (7 - 12V), the USB connector (5V), or
the VIN pin of the board (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses the
regulator, and can damage your board. We don't advise it.
 3V3. A 3.3 volt supply generated by the on-board regulator. Maximum current
draw is 50 mA.
 GND. Ground pins.

Memory:
The ATmega328 has 32 KB (with 0.5 KB used for the bootloader). It also has 2 KB of
SRAM and 1 KB of EEPROM (which can be read and written with the EEPROM library).

Input and Output


Each of the 14 digital pins on the Uno can be used as an input or output, using pinMode(),
digitalWrite(), and digitalRead() functions. They operate at 5 volts. Each pin can provide or
receive a maximum of 40 mA and has an internal pull-up resistor (disconnected by default)
of 20-50 kOhms. In addition, some pins have specialized functions:
 Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial
data. These pins are connected to the corresponding pins of the ATmega8U2 USB-to-TTL
Serial chip.
 External Interrupts: 2 and 3. These pins can be configured to trigger an interrupt
on a low value, a rising or falling edge, or a change in value. See the attachInterrupt()
function for details.
 PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analogWrite()
function.

 SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI


communication using the SPI library.
 LED: 13. There is a built-in LED connected to digital pin 13. When the pin is
HIGH value, the LED is on, when the pin is LOW, it's off.

The Uno has 6 analog inputs, labeled A0 through A5, each of which provide 10 bits of
resolution (i.e. 1024 different values). By default they measure from ground to 5 volts,
though is it possible to change the upper end of their range using the AREF pin and the
analogReference() function. Additionally, some pins have specialized functionality:
 TWI: A4 or SDA pin and A5 or SCL pin. Support TWI communication using the
Wire library.

There are a couple of other pins on the board:


 AREF. Reference voltage for the analog inputs. Used with analogReference().
 Reset. Bring this line LOW to reset the microcontroller. Typically used to add a
reset button to shields which block the one on the board.
See also the mapping between Arduino pins and ATmega328 ports. The mapping for the
Atmega8, 168, and 328 is identical.

Communication
The Arduino Uno has a number of facilities for communicating with a computer, another
Arduino, or other microcontrollers. The ATmega328 provides UART TTL (5V) serial
communication, which is available on digital pins 0 (RX) and 1 (TX). An ATmega16U2 on
the board channels this serial communication over USB and appears as a virtual com port to
software on the computer. The '16U2 firmware uses the standard USB COM drivers, and no
external driver is needed. However, on Windows, a .inf file is required. The Arduino
software includes a serial monitor which allows simple textual data to be sent to and from the
Arduino board. The RX and TX LEDs on the board will flash when data is being transmitted
via the USB-to-serial chip and USB connection to the computer (but not for serial
communication on pins 0 and 1).
A SoftwareSerial library allows for serial communication on any of the Uno's digital pins.
The ATmega328 also supports I2C (TWI) and SPI communication. The Arduino software
includes a Wire library to simplify use of the I2C bus; see the documentation for details. For
SPI communication, use the SPI library.

Programming
The Arduino Uno can be programmed with the Arduino software (download). Select
"Arduino Uno from the Tools > Board menu (according to the microcontroller on your
board). For details, see the reference and tutorials.
The ATmega328 on the Arduino Uno comes preburned with a bootloader that allows you to
upload new code to it without the use of an external hardware programmer. It communicates
using the original STK500 protocol (reference, C header files).

You can also bypass the bootloader and program the microcontroller through the ICSP (In-
Circuit Serial Programming) header; see these instructions for details.
The ATmega16U2 (or 8U2 in the rev1 and rev2 boards) firmware source code is available .
The ATmega16U2/8U2 is loaded with a DFU bootloader, which can be activated by:

 On Rev1 boards: connecting the solder jumper on the back of the board (near the
map of Italy) and then resetting the 8U2.
 On Rev2 or later boards: there is a resistor that pulling the 8U2/16U2 HWB line to
ground, making it easier to put into DFU mode.

You can then use Atmel's FLIP software (Windows) or the DFU programmer (Mac OS X
and Linux) to load a new firmware. Or you can use the ISP header with an external
programmer (overwriting the DFU bootloader). See this user-contributed tutorial for more
information.
Automatic (Software) Reset:

Rather than requiring a physical press of the reset button before an upload, the Arduino Uno
is designed in a way that allows it to be reset by software running on a connected computer.
One of the hardware flow control lines (DTR) of the ATmega8U2/16U2 is connected to the
reset line of the ATmega328 via a 100 nanofarad capacitor. When this line is asserted (taken
low), the reset line drops long enough to reset the chip. The Arduino software uses this
capability to allow you to upload code by simply pressing the upload button in the Arduino
environment. This means that the bootloader can have a shorter timeout, as the lowering of
DTR can be well-coordinated with the start of the upload.
This setup has other implications. When the Uno is connected to either a computer running
Mac OS X or Linux, it resets each time a connection is made to it from software (via USB).
For the following half- second or so, the bootloader is running on the Uno. While it is
programmed to ignore malformed data (i.e. anything besides an upload of new code), it will
intercept the first few bytes of data sent to the board after a connection is opened. If a sketch
running on the board receives one-time configuration or other data when it first starts, make
sure that the software with which it communicates waits a second after opening the
connection and before sending this data.
The Uno contains a trace that can be cut to disable the auto-reset. The pads on either side of
the trace can be soldered together to re-enable it. It's labeled "RESET-EN". You may also be
able to disable the auto-reset by connecting a 110 ohm resistor from 5V to the reset line; see
this forum thread for details.

USB Overcurrent Protection:


The Arduino Uno has a resettable polyfuse that protects your computer's USB ports from
shorts and overcurrent. Although most computers provide their own internal protection, the
fuse provides an extra layer of protection. If more than 500 mA is applied to the USB port,
the fuse will automatically break the connection until the short or overload is removed.

Physical Characteristics:
The maximum length and width of the Uno PCB are 2.7 and 2.1 inches respectively, with the
USB connector and power jack extending beyond the former dimension. Four screw holes
allow the board to be attached to a surface or case. Note that the distance between digital pins
7 and 8 is 160 mil (0.16"), not an even multiple of the 100 mil spacing of the other pins.
Pin Description:

Pin Category Pin Name Details

Power Vin, 3.3V, 5V, Vin: Input voltage to Arduino when using an
GND external power source.

5V: Regulated power supply used to power


microcontroller and other components on the
board.

3.3V: 3.3V supply generated by on-board voltage


regulator. Maximum current draw is 50mA.

GND: ground pins.

Reset Reset Resets the microcontroller.

Analog Pins A0 – A5 Used to provide analog input in the range of 0-5V

Input/Output Digital Pins 0 - Can be used as input or output pins.


Pins 13

Serial 0(Rx), 1(Tx) Used to receive and transmit TTL serial data.

External 2, 3 To trigger an interrupt.


Interrupts

PWM 3, 5, 6, 9, 11 Provides 8-bit PWM output.

SPI 10 (SS), 11 Used for SPI communication.


(MOSI), 12
(MISO) and 13
(SCK)

Inbuilt LED 13 To turn on the inbuilt LED.


TWI A4 (SDA), A5 Used for TWI communication.
(SCA)

AREF AREF To provide reference voltage for input voltage.

Microcontroller ATmega328P – 8 bit AVR family microcontroller

Operating Voltage 5V

Recommended Input 7-12V


Voltage

Input Voltage Limits 6-20V

Analog Input Pins 6 (A0 – A5)

Digital I/O Pins 14 (Out of which 6 provide PWM output)

DC Current on I/O 40 mA
Pins

DC Current on 3.3V 50 mA
Pin

Flash Memory 32 KB (0.5 KB is used for Bootloader)

SRAM 2 KB

EEPROM 1 KB

Frequency (Clock 16 MHz


Speed)
Arduino Boards:

Arduino Nano, Arduino Pro Mini, Arduino Mega, Arduino Due, Arduino Leonardo

Overview:

Arduino Uno is a microcontroller board based on 8-bit ATmega328P microcontroller. Along


with ATmega328P, it consists other components such as crystal oscillator, serial
communication, voltage regulator, etc. to support the microcontroller. Arduino Uno has 14
digital input/output pins (out of which 6 can be used as PWM outputs), 6 analog input pins, a
USB connection, A Power barrel jack, an ICSP header and a reset button.

How to use Arduino Board:

The 14 digital input/output pins can be used as input or output pins by using pinMode(),
digitalRead() and digitalWrite() functions in arduino programming. Each pin operate at 5V
and can provide or receive a maximum of 40mA current, and has an internal pull-up resistor
of 20-50 KOhms which are disconnected by default. Out of these 14 pins, some pins have
specific functions as listed below:

 Serial Pins 0 (Rx) and 1 (Tx): Rx and Tx pins are used to receive and transmit TTL
serial data. They are connected with the corresponding ATmega328P USB to TTL serial
chip.
 External Interrupt Pins 2 and 3: These pins can be configured to trigger an interrupt
on a low value, a rising or falling edge, or a change in value.
 PWM Pins 3, 5, 6, 9 and 11: These pins provide an 8-bit PWM output by using
analogWrite() function.
 SPI Pins 10 (SS), 11 (MOSI), 12 (MISO) and 13 (SCK): These pins are used for SPI
communication.
 In-built LED Pin 13: This pin is connected with an built-in LED, when pin 13 is
HIGH – LED is on and when pin 13 is LOW, its off.

Along with 14 Digital pins, there are 6 analog input pins, each of which provide 10 bits of
resolution, i.e. 1024 different values. They measure from 0 to 5 volts but this limit can be
increased by using AREF pin with analog Reference() function.

 Analog pin 4 (SDA) and pin 5 (SCA) also used for TWI communication using Wire
library.
Arduino Uno has a couple of other pins as explained below:

 AREF: Used to provide reference voltage for analog inputs with analogReference()
function.
 Reset Pin: Making this pin LOW, resets the microcontroller.

Communication:

Arduino can be used to communicate with a computer, another Arduino board or other
microcontrollers. The ATmega328P microcontroller provides UART TTL (5V) serial
communication which can be done using digital pin 0 (Rx) and digital pin 1 (Tx). An
ATmega16U2 on the board channels this serial communication over USB and appears as a
virtual com port to software on the computer. The ATmega16U2 firmware uses the standard
USB COM drivers, and no external driver is needed. However, on Windows, a .inf file is
required. The Arduino software includes a serial monitor which allows simple textual data to
be sent to and from the Arduino board. There are two RX and TX LEDs on the arduino board
which will flash when data is being transmitted via the USB-to-serial chip and USB
connection to the computer (not for serial communication on pins 0 and 1). A SoftwareSerial
library allows for serial communication on any of the Uno's digital pins. The ATmega328P
also supports I2C (TWI) and SPI communication. The Arduino software includes a Wire
library to simplify use of the I2C bus.

Arduino Uno to ATmega328 Pin Mapping:

When ATmega328 chip is used in place of Arduino Uno, or vice versa, the image below
shows the pin mapping between the two.
POWER SUPPLY SYSTEM:
The power supply is designed to convert high voltage AC mains electricity to a suitable
low voltage supply for electronics circuits and other devices. A power supply can by
broken down into a series of blocks, each of which performs a particular function. A d.c
power supply which maintains the output voltage constant irrespective of a.c mains
fluctuations or load variations is known as “Regulated D.C Power Supply”. The
functional block diagram of power supply is shown in below fig
For example a 5V regulated power supply system as shown below:

Figure: Functional Block Diagram of Power supply.

Transformer:

A transformer is an electrical device which is used to convert electrical power from one
electrical circuit to another without change in frequency.

Transformers convert AC electricity from one voltage to another with little loss of
power. Transformers work only with AC and this is one of the reasons why mains
electricity is AC.

Step-up transformers increase in output voltage, step-down transformers decrease in


output voltage. Most power supplies use a step-down transformer to reduce the
dangerously high mains voltage to a safer low voltage. The input coil is called the
primary and the output coil is called the secondary. There is no electrical connection
between the two coils; instead they are linked by an alternating magnetic field created in
the soft-iron core of the transformer. The two lines in the middle of the circuit symbol
represent the core. The an electrical transformer is shown in below fig . Transformers
waste very little power so the power out is (almost) equal to the power in. Note that as

31
voltage is stepped down current is stepped up. The ratio of the number of turns on each
coil, called the turn’s ratio, determines the ratio of the voltages. A step-down transformer
has a large number of turns on its primary (input) coil which is connected to the high
voltage mains supply, and a small number of turns on its secondary (output) coil to give
a low output voltage.

Figure: An Electrical Transformer.

Turns ratio = VP/ VS = Np/NS. Power Out= Power In.


VS X IS=VP X IP.

Vp = primary (input) voltage.

Np = number of turns on primary coil. Ip = primary (input) current.

RECTIFIER:

A circuit, which is used to convert a.c to dc, is known as RECTIFIER. The process of
conversion a.c to d.c is called “rectification”.

TYPES OF RECTIFIERS:

• Half wave Rectifier.

• Full wave rectifier.

1. Center tap full wave rectifier.

2. Bridge type full bridge rectifier.

32
Comparison of rectifier circuits:
Type of Rectifier

Half wave Full wave Bridge


Number of diodes
1 2 3
PIV of diodes
Vm 2Vm Vm

D.C output Vm/ 2Vm/ 2Vm/


voltage

Vdc, at no-load 0.318Vm 0.636Vm 0.636Vm

Ripple factor 1.21 0.482 0.482


Ripple

Frequency f 2f 2f

Rectification

Efficiency 0.406 0.812 0.812

Transformer

Utilization 0.287 0.693 0.812

Factor(TUF)
RMS voltage Vrms Vm/2 Vm/√2 Vm/√2

Table Comparison of rectifier circuits.

Full-wave Rectifier and Bridge Rectifier:


Full-wave Rectifier:

From the above comparisons we came to know that full wave bridge rectifier as more
advantages than the other two rectifiers. So, in our project we are using full wave bridge
rectifier circuit.

33
Bridge Rectifier: A bridge rectifier makes use of four diodes in a bridge arrangement to
achieve full-wave rectification. This is a widely used configuration, both with individual
diodes wired as shown and with single component bridges where the diode bridge is
wired internally. The bridge rectifier circuit diagram is shown in below fig

A bridge rectifier makes use of four diodes in a bridge arrangement to achieve full-wave
rectification. This is a widely used configuration, both with individual diodes wired with
single component bridges where the diode bridge is wired internally.

Figure Bridge Rectifier circuit diagram.

Operation:

During positive half cycle of secondary, the diodes D2 and D3 are in forward biased
while D1 and D4 are in reverse biased. The current flow direction is with dotted arrows.
The operation of forward biased Bridge Rectifier is shown in below fig

Figure Operation of forward biased Bridge Rectifier.

During negative half cycle of secondary voltage, the diodes D1 and D4 are in forward
biased while D2 and D3 are in reverse biased. The current flow direction is with dotted
arrows. The Operation of reverse biased Bridge Rectifier is shown in below fig

34
Figure Operation of reverse biased Bridge Rectifier.

Filter:

A Filter is a device, which removes the a.c component of rectifier output but allows the
d.c component to reach the load.

Capacitor Filter:

We have seen that the ripple content in the rectified output of half wave rectifier is
1.21% or that of full-wave or bridge rectifier or bridge rectifier is 48% such high
percentages of ripples is not acceptable for most of the applications. Ripples can be
removed by one of the following methods of filtering:


A capacitor, in parallel to the load, provides an easier by pass for the ripples
voltage though it due to low impedance. At ripple frequency and leave the d.c.to appears
the load.

An inductor, in series with the load, prevents the passage of the ripple current
(due to high impedance at ripple frequency) while allowing the d.c (due to low resistance
to d.c).

35
Various combinations of capacitor and inductor, such as L-section filter section filter,
multiple section filter etc. which make use of both the properties mentioned. Two cases
of capacitor filter, one applied on half wave rectifier and another with full wave rectifier.

Filtering is performed by a large value electrolytic capacitor connected across the DC


supply to act as a reservoir, supplying current to the output when the varying DC voltage
from the rectifier is falling. The capacitor charges quickly near the peak of the varying
DC, and then discharges as it supplies current to the output. Filtering significantly
increases the average DC voltage to almost the peak value (1.4 × RMS value).

To calculate the value of capacitor(C),

C = ¼*√3*f*r*RL
Where,
f = supply frequency, r = ripple factor,
RL = load resistance,

Note: In our circuit we are using 1000microfarads.

Regulator:
Voltage regulator ICs is available with fixed (typically 5, 12 and 15V) or variable output
voltages. The maximum current they can pass also rates them. Negative voltage
regulators are available, mainly for use in dual supplies. Most regulators include some
automatic protection from excessive current ('overload protection') and overheating
('thermal protection'). Many of the fixed voltage regulator ICs has 3 leads and look like
power transistors, such as the 7805 +5V 1A regulator shown on the right. The A 3
terminal voltage regulator is shown in below fig

The LM7805 is simple to use. You simply connect the positive lead of your unregulated
DC power supply (anything from 9VDC to 24VDC) to the Input pin, connect the
negative lead to the Common pin and then when you turn on the power, you get a 5 volt
supply from the output pin.

36
Figure A Three Terminal Voltage Regulator.

78XX:

The Bay Linear LM78XX is integrated linear positive regulator with three terminals.
The LM78XX offer several fixed output voltages making them useful in wide range of
applications. When used as a zener diode/resistor combination replacement, the
LM78XX usually results in an effective output impedance improvement of two orders of
magnitude, lower quiescent current.

Features:
• Output Current of 1.5A.

• Output Voltage Tolerance of 5%.

• Internal thermal overload protection.

• Internal Short-Circuit Limited.

• No External Component.

• Output Voltage 5.0V, 6V, 8V, 9V, 10V, 12V, 15V, 18V, 24V.

• Offer in plastic TO-252, TO-220 & TO-263.

• Direct Replacement for LM78XX.

BUZZER:
The "Piezoelectric sound components" introduced herein operate on an innovative
principle utilizing natural oscillation of piezoelectric ceramics. These buzzers are offered
in lightweight compact sizes from the smallest diameter of 12mm to large Piezo electric
sounders. Today, piezoelectric sound components are used in many ways such as home
appliances, OA equipment, audio equipment telephones, etc. And they are applied
widely, for example, in alarms, speakers, telephone ringers, receivers, transmitters, beep

37
sounds, etc. The types of buzzers is show in below fig

Figure Types of Buzzers.

Oscillating System:
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.

The oscillating system of a piezoelectric diaphragm. 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 Oscillating System is shown in below fig

Figure Oscillating System.

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

DESIGN PROCEDURES:
In general, man's audible frequency range is about 20 Hz to 20 kHz. Frequency ranges of
2 kHz to 4 kHz are most easily heard. For this reason, most piezoelectric sound
components are used in this frequency range, and the resonant frequency (f0) is
generally selected in the same range too. As the resonant frequency depends on methods
used to support the piezoelectric diaphragm. If piezoelectric diaphragms are of the same
shape, their values will become smaller in the order of (a),
(b) and (c). The design procedures is shown in below fig

Figure: DESIGN PROCEDURES.

In general, the piezoelectric diaphragm is installed in a cavity to produce high sound


pressure. The resonant frequency (fcav) of the cavity in is obtained from Formula (1)
(Helmholtz's Formula). Since the piezoelectric diaphragm and cavity have proper
resonant frequencies, (f0) and (fcav) respectively, sound pressure in specific frequencies
can be increased and a specific bandwidth can be provided by controlling both positions.

39
CIRCUIT DESCRIPTION:

The power supply (3.3.v) for the Ardiuno is produced by using the power supply circuit
which consists of mainly four components. 1. Transformer 2.Rectifier
3. Filter and 4.Regulator.The conversion AC to DC supply which includes four most
basic steps, first voltage is step downed by using transformer, (2) rectifier for converting
AC to dc (here we are not obtaining pure dc voltage), (3) so in the filter circuit, capacitor
bypasses the AC to ground and it blocks dc voltage. (4) The obtained pure dc voltage is
supplied to regulator for getting the required voltage which we need to give for the
Ardiuno.

Know we can put our finger in the finger print module if it is valid means it will
displayed in the displayed in the LCD to enter the password know we can enter our
password 111 then we can press the enter key. After that it displayed in the LCD is clear
or display, if we want to clear means we can press the enter key, suppose we want to
display means we can press the display key. When we are press the display key at that
time it displayed in the LCD the number candidates (c1, c2, c3, c4) names how many
votes they got.

GSM:

GSM (Global System for Mobile communications) is a standard developed by the European
Telecommunications Standards Institute (ETSI) to describe the protocols for second-
generation (2G) digital cellular networks used by mobile devices such as mobile
phones and tablets. It was first deployed in Finland in December 1991.[2] As of 2014, it has
become the global standard for mobile communications – with over 90% market share,
operating in over 193 countries and territories.

2G networks developed as a replacement for first generation (1G) analog cellular networks,
and the GSM standard originally described a digital, circuit-switched network optimized
for full duplex voice telephony. This expanded over time to include data communications,
first by circuit-switched transport, then by packet data transport via GPRS (General Packet
Radio Services) and EDGE (Enhanced Data rates for GSM Evolution, or EGPRS).

Subsequently, the 3GPP developed third-generation (3G) UMTS standards, followed by


fourth-generation (4G) LTE Advanced standards, which do not form part of the ETSI GSM

56
standard."GSM" is a trademark owned by the GSM Association. It may also refer to the
(initially) most common voice codec used, Full Rate.

LIQUID CRYSTAL DISPLAY:

Liquid crystal displays (LCDs) have materials, which combine the properties of both
liquids and crystals. Rather than having a melting point, they have a temperature range
within which the molecules are almost as mobile as they would be in a liquid, but are
grouped together in an ordered form similar to a crystal.

An LCD consists of two glass panels, with the liquid crystal material sand witched in
between them. The inner surface of the glass plates are coated with transparent
electrodes which define the character, symbols or patterns to be displayed polymeric
layers are present in between the electrodes and the liquid crystal, which makes the
liquid crystal molecules to maintain a defined orientation angle.
One each polarisers are pasted outside the two glass panels. These polarisers would
rotate the light rays passing through them to a definite angle, in a particular direction.
When the LCD is in the off state, light rays are rotated by the two polarisers and the
liquid crystal, such that the light rays come out of the LCD without any orientation, and
hence the LCD appears transparent.
When sufficient voltage is applied to the electrodes, the liquid crystal molecules would
be aligned in a specific direction. The light rays passing through the LCD would be
rotated by the polarisers, which would result in activating/ highlighting the desired
characters.
The LCD’s are lightweight with only a few millimeters thickness. Since the LCD’s
consume less power, they are compatible with low power electronic circuits, and can be
powered for long durations.

LCD Operation and LCD Pin description:


LCD Operation:

In recent years the LCD is finding widespread use replacing LEDs (seven- segment
LEDs or other multi segment LEDs).This is due to the following reasons:
• The declining prices of LCDs.

57
• The ability to display numbers, characters and graphics. This is in
Contract to LEDs, which are limited to numbers and a few characters.
• Incorporation of a refreshing controller into the LCD.

• Ease of programming for characters and graphics.


LCD Pin Description :

The LCD discussed in this section has 14 pins. The function of each pin is given in table.
Pin Description for LCD:
Pin symbol I/ODescription

1 Vss -- Ground

2 Vcc -- +5V power supply

3 VEE -- Power supply to control contrast

4 RS I RS=0 to select command register RS=1 to select data

register

5 R/W I R/W=0 for write R/W=1 for read

6 E I/O Enable

7 DB0 I/O The 8-bit data bus

8 DB1 I/O The 8-bit data bus

9 DB2 I/O The 8-bit data bus

10 DB3 I/O The 8-bit data bus

11 DB4 I/O The 8-bit data bus

12 DB5 I/O The 8-bit data bus

13 DB6 I/O The 8-bit data bus

14 DB7 I/O The 8-bit data bus

Table 5.1 Pin Description for LCD.

58
LCD Command Codes:

Code (hex) Command to LCD Instruction

Register

1 Clear display screen


2 Return home
4 Decrement cursor
6 Increment cursor
5 Shift display right
7 Shift display left
8 Display off, cursor off
A Display off, cursor on
C Display on, cursor off
E Display on, cursor on
F Display on, cursor blinking
10 Shift cursor position to left
14 Shift cursor position to right
18 Shift the entire display to the left
1C Shift the entire display to the right

80 Force cursor to beginning of 1st line

C0 Force cursor to beginning of 2nd line


38 2 lines and 5x7 matrix

Table 5.2 LCD Command Codes.

Uses and LCD interfacing: Uses:


The LCDs used exclusively in watches, calculators and measuring instruments are the
simple seven-segment displays, having a limited amount of numeric data. These have
resulted in the LCDs being extensively used in telecommunications and entertainment
electronics. The LCDs have even started replacing the cathode ray tubes (CRTs) used for
the display of text and graphics, and also in small TV applications. The interfacing of
LCD to a micro controller is shown in below fig

59
LCD interfacing:

Sending commands and data to LCDs with a time delay:

Figure 5.4 Interfacing of LCD to a micro controller.


To send any command from table 2 to the LCD, make pin RS=0.

For data, make RS=1.Then sends a high to low pulse to the E pin to enable the internal latch
of the LCD.

Zigbee:

Zigbee is an IEEE 802.15.4-based specification for a suite of high-level communication


protocols used to create personal area networks with small, low-power digital radios, such as
for home automation, medical device data collection, and other low-power low-bandwidth
needs, designed for small scale projects which need wireless connection. Hence, Zigbee is a
low-power, low data rate, and close proximity (i.e., personal area) wireless ad hoc network.

The technology defined by the Zigbee specification is intended to be simpler and less
expensive than other wireless personal area networks (WPANs), such as Bluetooth or more

60
general wireless networking such as Wi-Fi. Applications include wireless light
switches, home energy monitors, traffic management systems, and other consumer and
industrial equipment that requires short-range low-rate wireless data transfer.

Its low power consumption limits transmission distances to 10–100 meters line-of-sight,
depending on power output and environmental characteristics. Zigbee devices can transmit
data over long distances by passing data through a mesh network of intermediate devices to
reach more distant ones. Zigbee is typically used in low data rate applications that require
long battery life and secure networking (Zigbee networks are secured by 128 bit symmetric
encryption keys.) Zigbee has a defined rate of 250 kbit/s, best suited for intermittent data
transmissions from a sensor or input device.

Zigbee was conceived in 1998, standardized in 2003, and revised in 2006. The name refers to
the waggle dance of honey bees after their return to the beehive.

DC MOTOR:
DC automobiles are configured in lots of kinds and sizes, together with brush less, servo, and
tools motor types. A motor consists of a rotor and a permanent magnetic discipline stator.The
magnetic area is maintained the usage of both everlasting magnets or electromagnetic
windings. DC vehicles are maximum commonly utilized in variable pace and torque.

Movement and controls cowl a huge variety of components that during some manner are
used to generate and/or manage movement. areas inside this class encompass bearings and
bushings, clutches and brakes, controls and drives, force additives, encoders and resolves,
incorporated motion manage, limit switches, linear actuators, linear and rotary motion
components, linear position sensing, motors (both ac and dc cars), orientation position
sensing, pneumatics and pneumatic components, positioning levels, slides and courses,
energy transmission (mechanical), seals, slip jewelry, solenoids, springs.

61
Motors are the devices that offer the actual speed and torque in a force machine. this circle
of relatives includes ac motor types (unmarried and multiphase vehicles, well-known, servo
automobiles, induction, synchronous, and gear motor) and dc motors (brush less, servo
motor, and equipment motor) as well as linear, stepper and air automobiles, and motor
contactors and starters.
In any electric powered motor, operation is primarily based on simple electromagnetism. a
modern-sporting conductor generates a magnetic subject; when that is then placed in an
outside magnetic discipline, it will revel in a force proportional to the current in the
conductor, and to the energy of the outside magnetic area. as you're properly aware of from
gambling with magnets as a kid, opposite (north and south) polarities appeal to, at the same
time as like polarities (north and north, south and south) repel. the internal configuration of a
dc motor is designed to harness the magnetic interaction between a present day-sporting
conductor and an outside magnetic field to generate rotational motion.
Let's begin by way of looking at a easy 2-pole dc electric motor (here pink represents a
magnet or winding with a "north" polarization, whilst green represents a magnet or winding
with "south" polarization).

Fig: Block Diagram of the DC motor

Each dc motor has six fundamental components -- axle, rotor (a.k.a., armature), stator,
commutator, field magnet(s), and brushes. in most not unusual dc automobiles (and all that
beamers will see), the external magnetic area is produced by means of excessive-strength
permanent magnets1. The stator is the stationary a part of the motor -- this consists of the
motor casing, in addition to two or extra permanent magnet pole pieces. The rotor (together
with the axle and connected commutator) rotates with appreciate to the stator. The rotor
consists of windings (typically on a center), the windings being electrically linked to the
commutator. The above diagram shows a commonplace motor layout -- with the rotor inside
the stator (subject) magnets.

62
The geometry of the brushes, commutator contacts, and rotor windings are such that when
power is carried out, the polarities of the energized winding and the stator magnet(s) are
misaligned, and the rotor will rotate till it is almost aligned with the stator's discipline
magnets. as the rotor reaches alignment, the brushes flow to the next commutator contacts,
and energize the next winding. Given our example -pole motor, the rotation reverses the
route of modern via the rotor winding, main to a "turn" of the rotor's magnetic discipline, and
using it to maintain rotating.

In real life, even though, dc automobiles will constantly have greater than two poles (three is
a very commonplace variety). especially, this avoids "useless spots" in the commutator. you
can believe how with our instance two-pole motor, if the rotor is exactly at the middle of its
rotation (perfectly aligned with the sector magnets), it'll get "stuck" there. in the meantime,
with a two-pole motor, there's a moment where the commutator shorts out the electricity
supply (i.e., both brushes touch each commutator contacts concurrently). this will be awful
for the electricity deliver, waste power, and harm motor additives as well. yet any other
drawback of this kind of simple motor is that it might exhibit a high amount of torque”
ripple" (the quantity of torque it may produce is cyclic with the position of the rotor).

Fig: Block Diagram of the DC motor having two poles only

So since most small DC motors are of a three-pole design, let's tinker with the workings of
one via an interactive animation (JavaScript required):

Fig: Block Diagram of the DC motor having Three poles

63
You may notice some things from this -- specifically, one pole is absolutely energized at a
time (however two others are "partially" energized). as each brush transitions from one
commutator contact to the subsequent, one coil's subject will hastily fall apart, as the
following coil's field will hastily charge up (this happens inside a few microsecond). we're
going to see extra approximately the results of this later, however in the interim you could
see that that is an instantaneous end result of the coil windings' collection wiring:

Fig: Internal Block Diagram of the Three pole DC motor

There is likely no better manner to look how a median dc motor is prepare, than by simply
beginning one up. Unluckily that is tedious work, as well as requiring the destruction of a
superbly precise motor. This is a primary three-pole dc motor, with 2 brushes and three
commutator contacts.

IR SENSOR:

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

64
IR Sensor Circuit Diagram and Working Principle

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

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

65
ALCOHOL SENSOR:
This module is made using Alcohol Gas Sensor MQ3. It is a low cost semiconductor sensor
which can detect the presence of alcohol gases at concentrations from 0.05 mg/L to 10 mg/L.
The sensitive material used for this sensor is SnO2, whose conductivity is lower in clean air.
It’s conductivity increases as the concentration of alcohol gases increases. It has high
sensitivity to alcohol and has a good resistance to disturbances due to smoke, vapor and
gasoline. This module provides both digital and analog outputs. MQ3 alcohol sensor module
can be easily interfaced with Microcontrollers, Arduino Boards, Raspberry Pi etc.

This alcohol sensor is suitable for detecting alcohol concentration on your breath, just like
your common breathalyzer. It has a high sensitivity and fast response time. Sensor provides
an analog resistive output based on alcohol concentration. The drive circuit is very simple, all
it needs is one resistor. A simple interface could be a 0-3.3V ADC.

Please review the datasheet for conversions to ppm then

Board Schematic

66
Features

 5V operation
 Simple to use
 LEDs for output and power
 Output sensitivity adjustable
 Analog output 0V to 5V
 Digital output 0V or 5V
 Low Cost
 Fast Response
 Stable and Long Life
 Good Sensitivity to Alcohol Gas
 Both Digital and Analog Outputs
 On-board LED Indicator

Technical Data

 Concentration : 0.05 mg/L ~ 10 mg/L Alcohol


 Operating Voltage : 5V ±0.1
 Current Consumption : 150mA
 Operation Temperature : -10°C ~ 70°C

Pin Out

 VCC – Input Power Supply


 GND – Supply Ground
 DO – Digital Output
 AO – Analog Output

Applications

 Vehicle Alcohol Detector


 Portable Alcohol Detector

67
IGNITIONKEY:

An ignition switch, starter switch or start switch is a switch in the control system of a motor
vehicle that activates the main electrical systems for the vehicle, including "accessories"
(radio, power windows, etc.). In vehicles powered by internal combustion engines, the switch
provides power to the starter solenoid and the ignition system components (including
the engine control unit and ignition coil), and is frequently combined with the starter switch
which activates the starter motor.

Historically, ignition switches were key switches that requires the proper key to be inserted
in order for the switch functions to be unlocked. These mechanical switches remain
ubiquitous in modern vehicles, further combined with an immobiliser to only activate the
switch functions when a transponder signal in the key is detected. However, many new
vehicles have been equipped with so-called "keyless" systems, which replace the key switch
with a push button. The ignition locking system may be sometimes bypassed by
disconnecting the wiring to the switch and manipulating it directly; this is known
as hotwiring.

68
CHAPTER – 6

SOFTWARE DESCRIPTION

Arduino first and foremost is an open-source computer hardware and software company.
The Arduino Community refers to the project and user community that designs and
utilizes microcontroller-based development boards. These development boards are
known as Arduino Modules, which are open-source prototyping platforms. The
simplified microcontroller board comes in a variety of development board packages.

(From left to right) Lilypad, Sparkfun Pro Micro, Arduino Mega


The most common programming approach is to use the Arduino IDE, which utilizes the
C programming language. This gives you access to an enormous Arduino Library that is
constantly growing thanks to open-source community.
Arduino IDE is not: AVR Studio (Yes, we know you loved EE 346, but unfortunately you
won’t be utilizing Assembly Language)

Arduino Uno dev. board (Fritzing part graphic)


ARDUINO IDE: INITIALSETUP:

Download Arduino Integrated Design Environment (IDE) here (Most recent version:
1.6.5): https://www.arduino.cc/en/Main/Software

This is the Arduino IDE once it’s been opened. It opens into a blank sketch where you
can start programming immediately. First, we should configure the board and port
settings to allow us to upload code. Connect your Arduino board to the PC via the USB
cable.

Arduino IDE Default Window


IDE: BOARDSETUP:

You have to tell the Arduino IDE what board you are uploading to. Select the Tools
pulldown menu and go to Board. This list is populated by default with the currently
available Arduino Boards that are developed by Arduino. If you are using an Uno or an
Uno-Compatible Clone (ex. Funduino, SainSmart, IEIK, etc.), select Arduino Uno. If
you are using another board/clone, select that board.

Arduino IDE: Board Setup Procedure

IDE: COM PortSetup

If you downloaded the Arduino IDE before plugging in your Arduino board, when you
plugged in the board, the USB drivers should have installed automatically. The most
recent Arduino IDE should recognize connected boards and label them with which COM
port they are using. Select the Tools pulldown menu and then Port. Here it should list all
open COM ports, and if there is a recognized Arduino Board, it will also give it’s name.
Select the Arduino board that you have connected to the PC. If the setup was successful,
in the bottom right of the Arduino IDE, you should see the board type and COM number
of the board you plan to program. Note: the Arduino Uno occupies the next available
COM port; it will not always be COM3.

Arduino IDE: COM Port Setup

At this point, your board should be set up for programming, and you can begin writing
and uploading code.
Testing Your Settings: Uploading Blink

One common procedure to test whether the board you are using is properly set up is to
upload the “Blink” sketch. This sketch is included with all Arduino IDE releases and can
be accessed by the File pull-down menu and going to Examples, 01.Basics, and then
select Blink. Standard Arduino Boards include a surface-mounted LED labeled “L” or
“LED” next to the “RX” and “TX” LEDs, that is connected to digital pin
13. This sketch will blink the LED at a regular interval, and is an easy way to confirm if
your board is set up properly and you were successful in uploading code. Open the
“Blink” sketch and press the “Upload” button in the upper-left corner to upload “Blink”
to the board.

Upload Button:

Arduino IDE: Loading Blink Sketch


Arduino IDE: Uploading Blink
Guide Summary:

1. Download and install Arduino IDE (https://www.arduino.cc/en/Main/Software)


2. Plug in your Arduino Board
3. Select the proper board in the IDE (Tools>Boards>Arduino Uno)
4. Select the proper COM port (Tools>Port>COMx (Arduino Uno))
5. Open the “Blink” sketch (File>Examples>Basics>01.Blink)
6. Press the Upload button to upload the program to the board
7. Confirm that your board is working as expected by observing LED

Troubleshooting UploadingErrors:

Arduino has lots of community support and documentation. Your best bet when running
into unexpected problems is to search online for help. You should be able to find a
forum where someone had the same problem you are having, and someone helped them
fix it. If you don’t find results, try modifying your search, or post on the Arduino forums.

● My board isn’t listed under devices and is not recognized by IDE:


○ Most likely, this means that the ATMega328p chip is not programmed
with the Arduino firmware. If you have a separate working Uno available, you can
program the unprogrammed chip using this guide and a few jumper cables:
https://www.arduino.cc/en/Tutorial/ArduinoISP
○ If you don’t have a separate Arduino available, let me know and I can use
an Atmel Programmer to upload the firmware.
○ There may be hardware damage if you had the board plugged into USB
and external power at the same time. You may have to replace the chip if this is the case.

● Error Message: avrdude: stk500_recv(): programmer is not responding


○ Double-check that you are using the correct COM port.
○ Make sure that your Arduino Board is plugged into the computer.

● The IDE says “Uploading…” after pressing the upload button, but nothing is
happening.
○ Double-check that you have the correct board selected in the Tools menu.
○ Depending on the size of your program, it may take a few seconds to
upload. If you feel like it is taking too long, it may be encountering an error and you can
try unplugging and plugging in the Arduino board.

CHAPTER 7
RESULT

CHAPTER-8
APPLICATIONS

APPLICATION:
1. It can be used in real time safety system.
2. We can implement the whole circuit into small module later.
3. Less power consuming safety system.
4. This safety system technology can further be enhanced in car and also by replacing the
helmet with seat belt.

CHAPTER-09

66
CONCLUSION

The developed system efficiently ensures:


1. Rider is wearing helmet throughout the ride.
2. Rider should not be under influence of alcohol.
3. Theft prevention
By implementing this system a safe two wheeler journey is possible which would decrease
the head injuries during accidents and also reduce the accident rate due to driving bike after
consuming alcohol.
A helmet may not be a 100% foolproof but is definitely the first line of defense for the rider
in case of an accident to prevent fatal brain injuries. The proposed approach makes it
mandatory for the rider to use this protective guard in order to drive a two-wheeler vehicle
and ensures the safety of the human brain and therefore reduces the risks of brain injuries and
deaths in case of an accident. Besides, the developed system prevents theft of the two-
wheeler.

CHAPTER-10

36
FUTURE SCOPE

In future this intelligent system can be fabricated in a compact size so that it is globally
acceptable to notify No entry and No parking areas. Government must enforce laws to install
such system in every two wheeler. By implementing such mechanism in two wheelers,
deaths due to driving under influence of alcohol and other road fatalities can be minimized to
large extent.

CHAPTER-12

37
REFERENCE

[1]. Safety measures for “Two wheelers by Smart Helmet and Four wheelers by Vehicular
Communication” Manjesh N 1, Prof. Sudarshan raju C H 2 M Tech, ECEDSCE, JNTUA,
Hindupur Email: manjesh405@gmail.com HOD & Asst. Prof. BIT-IT, Hindupur
International Journal of Engineering Research and Applications (IJERA) ISSN: 2248-9622
NATIONAL CONFERENCE on Developments, Advances & Trends in Engineering
Sciences (NCDATES09th & 10th January 2015)

[2]. Smart Helmet with Sensors for Accident Prevention Mohd Khairul Afiq Mohd Rasli,
Nina Korlina Madzhi, Juliana Johari Faculty of Electrical Engineering University Tecnology
MARA40450 Shah Alam Selangor, MALAYSIAjulia893@salam.uitm.edu.my)

[3]. A Solar Powered Smart Helmet With Multifeatures Mr.P.Dileep Kumar1,


Dr.G.N.Kodanda Ramaiah2 Mr.A.Subramanyam3, Mrs.M.Dharani4 International Journal of
Engineering Inventions e-ISSN: 2278-7461, pISSN: 2319-6491 Volume 4, Issue 10 [June
2015] PP: 06- 11) [4]. A Smart Safety Helmet using IMU and EEG sensors for worker
fatigue detection Ping Li, Ramy Meziane, Martin J.-D. Otis, Hassan Ezzaidi, REPARTI
Center, University of Quebec at Chicoutimi Chicoutimi, Canada Email:
Martin_Otis@uqac.ca Philippe Cardou REPARTI Center, Laval University Quebec, Canada
Email: pcardou@gmc.ulaval.ca)
[5]. ISSN 2319 – 2518 www.ijeetc.comVol. 4, No. 2, April 2015© 2015 IJEETC.

[6]. Sudarsan K and Kumaraguru Diderot P (2014), “Helmet for Road Hazard Warning with
Wireless Bike Authentication and Traffic Adaptive Mp3 Playback”, International Journal of
Science andResearch (IJSR), Vol. 3, No. 3, ISSN (Online): 2319-7064.
[7]. Vijay J, Saritha B, Priyadharshini B,Deepeka S and Laxmi R (2011), “Drunken Drive
Protection System”, International Journal of Scientific & Engineering Research, Vol. 2, No.
12, ISSN: 2229-5518.
[8]. Harish Chandra Mohanta, Rajat Kumar Mahapatra and Jyotirmayee Muduli(2014)”,
Anti-Theft Mechanism System with Accidental Avoidance and Cabin Safety System for
Automobiles”, International Refereed Journal of Engineering and Science (IRJES), Vol. 3,
No. 4, pp. 56- 62.

38
ABBRIVATIONS

Symbol Name

39
MAM Memory accelerometer module

VIC Vectored interrupt controller

FIQ Fast interrupt request

PWM Pulse width modulation

GPIO General purpose input/output

UART Universal asynchronous receiver/transmitter

DLAB Data latch access bit

LCR Line control register

LSR Line status register

RDR Receiver data ready

SPI Serial peripheral interface

ADC Analog to digital converter

DAC Digital to analog converter

SSP Synchronous serial port

MOSI Master out slave in

RTC Real time clock

EINT External interrupt

DTR Data terminal ready

AHB Advanced high performance

ATLE Auto transfer length extraction

CTS Clear to send

RTS Request to send

40
DSR Data set ready

RI Ring indicator

41

Potrebbero piacerti anche