Professional Documents
Culture Documents
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
10/100Mb
Ethernet
Connectivity
GPIO
(General 2 x USB 2.0
Purpose ports
Input &
Output)
10/100Mb
Ethernet
Internals
LAN
Controller
LAN
Controller
DSI
(display LAN
interface) Controller
SD Card Slot
(supports SD cards up to
32GB)
Raspberry Pi as a-
Microcomputer Embedded System
• 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:-
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.
• 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
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")
• time.sleep(5)
Real world applications of this
project