Iot Based Accident Prevention System Using Eye Blink Sensor-2

You might also like

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

NAAN MUDHALVAN

EMBEDDED SYSTEM DESIGN FOR


INDUSTRIAL APPLICATION
P.T.Lee. Chengalvaraya Naicker College
of Engineering & Technology
TITLE: IOT BASED DOOR ALARM USING ULTRASONIC SENSOR

DEPARTMENT OF MECHANICAL ENGINEERING

1. 511520114306 K.JAGANATH SAH


2. 511520114308 R.KARTHIKAYEN
3. 511520114305 D.SAKTHIVEL
4. 511520114702 S.ASWIN
5.511520114011 D.ROHITH
6.511520114012 SELVENDHRAN

COURSE COURSE HEAD OF


INSTRUCTOR COORDINATOR DEPARTMENT

1
TABLE OF CONTENT

CHAPTER NO. TITLE PAGE NO

ABSTRACT 3

1 INTRODUCTION

1.1 Introduction 5

1.2 Objectives 6

2 COMPONENTS REQUIRED 7
2.1Arduino Nano
2.2 Ultrasonic Sensor
2.3 Buzzer
2.4 breadboard
2.5 jump wires
3 Circuit diagram 14
4 Flow chart 16
5 Working 17
6 APPENDEX 18
7 Advantages 20
8 Disadvantages 21
9 conclusion 22

2
ABSTRACT

In an age of globalization today's advanced technology


development appears rapidly.This was evident in the electronics
world is increasingly widespread due to the educational world
that has begun to peel and conduct various tests, so that it can
be a reference This electronic. This paper trying to introduce
something a door alarm which in applying this tool to use
component - components are known or frequently used include
ultrasonic transducers, transmitters, and receiver. This tool can
be installed in front of the fence or at the door with a concealed
position in order not easy to know other people

3
4
1. INTRODUCATION
1.1 INDRODUCTION
In Security has always been a major concern for all of us and there are
many Hi tech and IoT based security and surveillance system are available
in the market. Intruder or Burglar Alarm is one of the classic and popular
project among the Electronics students and hobbyists. We have also built
many Burglar Alarms based on various technologies.

Today we are adding one more Security Alarm in our list which
is based on Ultrasonic Sensor. This Arduino Controlled Door alarm can be
installed near the door to detect the presence of anybody at the door.
Whenever somebody comes in the range of Ultrasonic sensor, buzzer
starts beeping. You can adjust the sensor detection range according to
your door. This system can also serve the purpose of Motion
Detector.Ultrasonic sensor HC-SR04 is used here to detect the presences
of any person at the door. The sensor module consists of ultrasonic
transmitter, receiver and the control circuit. Ultrasonic Sensor consists of
two circular eyes out of which one is used to transmit the ultrasonic wave
and the other to receive it

5
1.1OBJECTIVES
 Reducing incident rates by maintaining safe and
healthy conditions and standards.
 Reducing property loss.
 Administering training program that increase
awareness of safety and health on a regular basics.

6
2.COMPONENTS REQUIRED
SNO
COMPONENTS QTY
1 Arduino nano 1
2 Ultrasonic sensor 1
3 Buzzer 1
4 Breaadboard 1
5 Jumper wires 1

7
2.1 ARDUINO NANO

The Arduino Nano is a small, complete, and breadboard-


friendly board based on the ATmega328 (Arduino Nano 3.x).It has
more or less the same functionality of the Arduino Duemilanove,
but in a different package.It lacks only a DC power jack, and works
with a Mini-B USB cable instead of a standard one. The Arduino
Nano is equipped with 30 male I/O headers, in a DIP-30-like
configuration, which can be programmed using the Arduino
Software integrated development environment(IDE), which is
common to all Arduino boards and running both online and offline.

The Arduino Nano has a number of facilities for


communicating with a computer, another Arduino, or other
microcontrollers. The ATmega328 provides UARTN TTL serial(5V)
communication, which is available on digital pins 0 (RX) and 1 (TX).

8
2.2 Ultasonic sensor

As the name indicates, ultrasonic sensors measure distance by using


ultrasonic waves.The sensor head emits an ultrasonic wave and receives
the wave reflected back from the target. Ultrasonic Sensors measure the
distance to the target by measuring the time between the emission An
optical sensor has a transmitter and receiver, whereas an ultrasonic
sensor uses a single ultrasonic element for both emission and reception.
In a reflective model ultrasonic sensor, a single oscillator emits and
receives ultrasonic waves alternately. This enables miniaturization of the
sensor head and reception.

9
2.3 BUZZER

The "Piezoelectric Sound Modules" presented here work


on the concept of conversion using natural piezoelectric
ceramic oscillation. These buzzers are available in lightweight,
portable sizes ranging from a small diameter of 12 mm to large
electrical outlets from peizo. The one shown in fig 6 below is a
simple word that when enabled makes a continuous beep. To
alert the driver when he first falls sleepy, the buzzer will be
connected to the Eye-Blink Sensor.

10
2.4 Breaadboard

A breadboard is a rectangular plastic board with a bunch of tiny holes in


it. These holes let you easily insert electronic components
to prototype (meaning to build and test an early version of) an electronic
circuit, like this one with a battery, switch, resistor, and an LED (light-
emitting diode). To learn more about individual electronic components,
see our Electronics Primer

11
2.5 LED
LED is an semiconductor light source. LED is a separate
diode form and has certain electrical features of the PN
junction diode. The LED therefore allows the current to flow
forward and blocks the energy flowing in the opposite
direction. The LED takes up less than 1 mm in the field. LED
technology used to perform various electrical and computer
function

12
3.CIRCUIT DIAGRAM

The hardware part of this project is very east to put together


First of all, make the connections for the ultrasonic sensor with the
Arduino. The connections for the ultrasonic sensor with the Arduino are
as follows

 Connect VCC on the ultrasonic sensor to the 5V pin on the Arduino


 Connect the Trig pin on the ultrasonic sensor to pin 2 on the
Arduino.
 Connect the Echo pin on the ultrasonic sensor to pin 3 on the
Arduino.
 Connect the GND on the ultrasonic sensor to GND on the Arduino.

After that, make the connections for the buzzer and the Arduino.
Connect the positive pin on the buzzer with pin 10 on the Arduino and
the buzzer's negative pin with the GND pin on the Arduino

13
14
4.FLOW CHART

15
5.WORKING
The ultrasonic sensor emits an ultrasonic wave from the trigger
which comes back after hitting the object and it is received by the echo.
The echo will then tell us the distance traveled in microseconds. To send
an ultrasonic wave from the trigger, we will have to set the trigger high
for 10us. This will send an 8 cycle sonic burst at 40 kHz which will hit the
object and is then received by the echo.

We have got the time in microseconds but we need to calculate the


distance. So, we will use the equation below.

S=v*t

We have the value of t and we know that the speed of a sound wave is
340m/s. We have to convert the speed of sound into cm/us to calculate
the distance. The speed of sound in cm/us is 0.034cm/us. The equation
now will become .

S = (0.034 * t)

We will divide this equation by 2 because we only require the distance it


takes to hit the object and not the distance it takes to hit the object and
come back. So, the final equation will be

S = (0.035 * t)/2

We will get the distance value using the equation above and after that,
we will set a value which will help us make the buzzer high or low.

16
6.APPENDEX
PROGRAM:

int trigger_pin = 2;
int echo_pin = 3;
int buzzer_pin = 10;
int time;
int distance;

void setup ( ) {
Serial.begin (9600);
pinMode (trigger_pin, OUTPUT);
pinMode (echo_pin, INPUT);
pinMode (buzzer_pin, OUTPUT);

void loop ( ) {
digitalWrite (trigger_pin, HIGH);
delayMicroseconds (10);
digitalWrite (trigger_pin, LOW);
time = pulseIn (echo_pin, HIGH);
17
distance = (time * 0.034) / 2;

if (distance <= 50)


{
Serial.println (" Door Open ");
Serial.print (" Distance= ");
Serial.println (distance);
digitalWrite (buzzer_pin, LOW);
delay (500);
}
else {
Serial.println (" Door closed ");
Serial.print (" Distance= ");
Serial.println (distance);
digitalWrite (buzzer_pin, HIGH);
delay (500);
}
}

18
7.ADVANTAGES
 It can be used in wireless technology
 Detection without physical contact
 Compact size and low cost
 High sensitivity
 Large measuring range

19
8.DISADVANTAGES
 Atmospheric movements
 Low angular measurement
 Difficult to manipulate acoustic beams
 Slow reaction
 Temperature changes sensing accuracy

20
9.CONCLUSION
People are increasingly exposed to dangers today. Therefore,
we need to take action against this as an engineer and have the
solution we need. Any automation is designed to protect a
person. Working the Arduino door alarm is very easy.
Whenever anyone comes in the range of ultrasonic sensor.
Microcontroller detects the distance of object from the sensor
and if the object is I defined range, it sends the high signal to
the buzzer and buzzer starts beeping

21
22

You might also like