Sie sind auf Seite 1von 44

TWO LAYER USER IDENTIFICATION AND INTRUSION

DETECTION WITH REMOTE HOME MONITORING AND ACCESS


CONTROL CAPABILITIES

MAJOR PROJECT FOR B.TECH


(ELECTRONICS AND COMMUNICATION)

PROJECT REVIEW
Submitted by:
Ankur Dhiman
Avnish Naithani
Ayush Agarwal
Hemant tyagi
CONTENTS TO COVER
• Introduction
• Work Plan
• Working of project
• Technologies used:
• Introduction to Raspberry Pi
• Raspberry PI hardware
• Operating System
• Programming language
• Interfacing raspberry with electronic components
• Remote access capabilities
• Interfacing
• Components Required
• References
Work Plan
• Project divided in 2 stages
Introduction to Raspberry Pi
• A credit card sized microcomputer

• Developed by Raspberry Pi foundation(UK), a


charity founded in 2009

• Built for the purpose of educating students on


computer science and electronics

• It has become a powerful tool for programming


and electronics and is being used in many
commercial applications
Raspberry Pi Hardware
• Broadcom BCM2836 ARMv7 Quad Core
32bit Processor, running at 900MHz
• Videocore IV GPU
• 1 GB RAM
• 4 USB ports
• 1 ethernet port
• 3.5mm jack for audio and composite video
• HDMI port
• Voltage requirement of 3.3 Volts
• Power consumption of 3 Watts
Power
3.3V micro
USB
connector

(Similar to the one on a lot of mobile phones!)


A/V (Audio/ViDeo)

HDMI Audio & Video


(works with modern TVs and DVI
monitors)
A/V (Audio/ViDeo)
RCA Video
(works with
most older
TVs)

HDMI Audio & Video


(works with modern TVs and DVI
monitors)
A/V (Audio/ViDeo)
RCA Video
3.5mm Audio
(works with
Standard
most older
headphone
TVs)
socket

HDMI Audio & Video


(works with modern TVs and DVI
monitors)
Connectivity
2 x USB 2.0
ports
Connectivity
2 x USB 2.0
ports

10/100Mb
Ethernet
Connectivity
GPIO
(General 2 x USB 2.0
Purpose ports
Input &
Output)

10/100Mb
Ethernet
Internals

SOC (System On a Chip)


Broadcom BCM2836 900Mhz & 1GB RAM
Internals

LAN
Controller

SOC (System On a Chip)


Broadcom BCM2836 900Mhz & 1 GB RAM
CSI Internals
(camera
interface)

LAN
Controller

SOC (System On a Chip)


Broadcom BCM2836 900Mhz & 1 GB RAM
CSI Internals
(camera
interface)

DSI
(display LAN
interface) Controller

SOC (System On a Chip)


Broadcom BCM2836 900Mhz & 1 GB RAM
Storage

SD Card Slot
(supports SD cards up to
32GB)
Raspberry Pi as a-
Microcomputer Embedded System

• When used for general • When used for a specific


purpose Purpose
• A mouse, keyboard and • Hardware interfacing is
display is connected to the done with various sensors
pi and it used as a proper and actuators and a
computer program is burned into the
controller
Operating Systems for
Raspberry Pi
• Based on the Linux operating system
• Linux has various distributions:

• Out of these, the Debian distribution is preferred for the Pi


• A modified version of Debian called Raspbian is used in it
Reasons for choosing Linux(Raspbian)

• Multiuser
• Multi-process
• Multiplatform
• Stable
• Efficient
• Free and Open Source
Installation of Raspbian

• Win32DiskImager.exe (Required)
• Format SD Card in FAT 32/ext2
• sudo dd bs=4m if=<name_of_image>.img of=<device
name>
• Eg: sudo dd bs=4m if=2013-02-09-wheezy-
raspbian.img of=/dev/sdb
Networking using Pi
• The Pi can be connected to network using an RJ45
Ethernet patch cable between the Pi and a switch,
router or hub
• It is possible to add Wi-Fi support to any Pi using a
USB wireless adapter. Using such a device, the Pi
can connect to a wide range of wireless networks,
including those running on the latest 802.11n high-
speed standard
• We can also access the Pi in a remote manner using
either Virtual Network Computing(VNC) or Secure
Shell(SSH)
Remotely accessing Raspberry Pi
Through VNC
• VNC is a graphical desktop sharing system that allows you to remotely
control the desktop interface of one computer from another
• It transmits the keyboard and mouse events from the controller, and
receives updates to the screen over the network from the remote host
• Steps to install VNC:-
• sudo apt-get install tightvncserver
• tightvncserver
• vncserver :0 -geometry 1920x1080 -depth 24
• sudo apt-get install xtightvncviewer
Remotely accessing Raspberry Pi
Through SSH Client
• On Windows you will need to download an SSH client. The most
commonly used one is called PuTTY
• It doesn't have an installer package, it's just a standalone .exe file. When
you run it you'll see the configuration screen below:
Remotely accessing Raspberry Pi
Through SSH Client
• Type the IP address of the Pi into the Host Name field and click
the Openbutton
• You'll now have the usual login prompt, login with the same username
and password as you would use on the Pi itself
• Login prompt:-
Interfacing Raspberry Pi with electronic
devices, sensors and actuators
• The GPIO(General Purpose Input Output) pins of the Raspberry Pi play a
major role in this interfacing
• It has 40 GPIO pins:-
Using GPIO as input and output
• Example of input:-

• Example of output: Switch


• Pulse Width Modulation can be used through GPIO to
control speed of motors and intensity of LEDs
The Batman Project
Objective: Through this project we tried to replicate the ability of bats to
find their way in dark using ultrasonic frequency pulses to find
obstacles. To realize the project we used ultrasonic sensors and utilized
the computational and media handling capabilities of Raspberry Pi to
generate a voice output of your distance from the obstacle.

We stored the output of distance measurement from the ultrasonic sensor as


text and then used the “E-speak” library to create a voice based output
from the text file.

Requirements: Raspberry Pi, Ultrasonic Sensor (HC-SR04), resistors of


different values, bread board, connecting wires, E-speak text to speech
software.

Before getting into the details of the project, we will first introduce the
ultrasonic sensor.
Ultrasonic Sensor
• Ultrasonic distance sensors are designed to measure distance between
the source and target using ultrasonic waves. We use ultrasonic waves
because they are relatively accurate across short distances and don’t
cause disturbances as they are inaudible to human ear.

• HC-SR04 is a commonly used module for non contact distance


measurement for distances from 2cm to 400cm. It uses sonar (like bats
and dolphins) to measure distance with high accuracy and stable
readings. It consist of an ultrasonic transmitter, receiver and control circuit.
The transmitter transmits short bursts which gets reflected by target and
are picked up by the receiver.
• The ultra-sonic sensor emits a pulse of frequency 40khz.
• Considering the speed of sound 340 m/sec the distance covered by
emitted pulse from transmission to reception is 2d.
• Speed=distance/time
• As speed is 340 m/sec distance is 2d, and Time being the time difference
between pulse emission and reception the sensor calculates the distance
HC-SR04 ultrasonic distance
sensor module has four pins :
 VCC – 5V, input power
 TRIG – Trigger Input
 ECHO – Echo Output
 GND – Ground
Ultrasonic Module Operation:-
• Provide trigger signal to TRIG input, it requires a HIGH signal of atleast
10μS duration.

• This enables the module to transmit eight 40KHz ultrasonic burst.

• If there is an obstacle in-front of the module, it will reflect those ultrasonic


waves

• If the signal comes back, the ECHO output of the module will be HIGH for
a duration of time taken for sending and receiving ultrasonic signals. The
pulse width ranges from 150μS to 25mS depending upon the distance of
the obstacle from the sensor and it will be about 38ms if there is no
obstacle.
Voltage Divider

The ECHO output is of 5v.


The input pin of
Raspberry Pi GPIO is
rated at 3.3v. So 5v
cannot be directly given to
the unprotected 3.3v input
pin. Therefore we use a
voltage divider circuit
using appropriate
resistors to bring down
the voltage to 3.3V.
Final Connection Diagram:-
Program
import os

import RPi.GPIO as GPIO

import time

echo=5

trig=3

def setup():

GPIO.setmode(GPIO.BOARD)

GPIO.setup(trig,GPIO.OUT)

GPIO.setup(trig,GPIO.OUT)
Program
GPIO.output(trig,0)

GPIO.setup(echo,GPIO.IN)

def trigger():

Time.sleep(0.1)

print "Triggering"

GPIO.output(trig,1)

time.sleep(.000010)

GPIO.output(trig,0)

time.sleep(.000010)
Program
def ech():

print"Begining measurement"

while(GPIO.input(echo)==0):

pass

start=time.time()

while(GPIO.input(echo)==1):

pass

stop=time.time()

distance=(stop-start)*(170)*(100)
Program
• return distance

• setup()

• while 1 :

• trigger()

• x1=ech()

• trigger()

• x2=ech()

• trigger()

• x3=ech()

• trigger()
Program
• x4=ech()

• x=(x1+x2+x3+x4)/4

• x1=str(x)

• print x1

• f=open("distance.txt","w")

• f.write(x1)

• f.close

• f=open("distance.txt","r")

• os.system('espeak -f distance.txt 2>/dev/null')

• time.sleep(5)
Real world applications of this
project

• This project can be used in many real life applications,


such as a cap for blind men that tells the distance from
various obstacles. It can also be used in indoor
tracking robots for either avoiding or detecting
obstacles.
Questions?
THANK YOU