Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Tybsc It Internet of Things Sem V

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

TYBSC IT INTERNET OF THINGS SEM V

INTERNET OF THINGS

NEDARIYA MOHAMMAD 62
Page|1
TYBSC IT INTERNET OF THINGS SEM V

Practical Journal of

INTERNET OF THINGS
Submitted By

NEDARIYA MOHAMMAD
Bachelor of Science in Information Technology Academic Year
2021-2022

NEDARIYA MOHAMMAD 62
Page|2
TYBSC IT INTERNET OF THINGS SEM V

CERTIFICATE

NAME: NEDARIYA MOHAMMAD

CLASS: TYBSCIT A ROLL NO: 62

BRANCH: Bachelor of Science in Information Technology

This is to certify the work of the student in Bachelor of Science in Information


Technology during the academic year 0f 2021-22 has been completed.

Examiner’s sign

Date: 24/09/2021

NEDARIYA MOHAMMAD 62
Page|3
TYBSC IT INTERNET OF THINGS SEM V

INDEX
Sr.
Practical Date Signature
No.

Practical 1: Starting Raspbian OS, Familiarising with


1 Raspberry Pi Components and interface, Connecting 14-07-2021
to ethernet, Monitor, USB.

Practical 2: a:Displaying different LED patterns


2 29-07-2021
with Raspberry Pi.

b: Displaying different LED patterns with Arduino


Uno using TinkerCad

3 Practical 3: Controlling Raspberry Pi with Telegram. 05-08-2021

Practical 4: Displaying Time over 4-Digit 7-


4 12-08-2021
Segment Display using Raspberry Pi

Practical 5: Visitor Monitoring with Raspberry Pi


5 12-08-2021
and Pi Camera

6 Practical 6: Raspberry Pi GPS Module Interfacing 26-08-2021

7 Practical 7: Interfacing Raspberry Pi with RFID. 02-09-2021

Practical 8: Fingerprint Sensor interfacing


8 16-09-2021
with Raspberry Pi

Practical 9: Installing Windows 10 IoT Core


9 23-09-2021
on Raspberry Pi

NEDARIYA MOHAMMAD 62
Page|4
TYBSC IT INTERNET OF THINGS SEM V

PRACTICAL NO. 1

AIM: Starting Raspbian OS,Familiarising with Raspberry Pi Components


and interface ,connecting to Ethernet,monitor,USB.
Hardware Guide:
For getting started with raspberry pi for the first time you will require the following
hardware

1. Raspberry Pi (latest Model)


2. Monitor or TV
3. HDMI cable
4. Ethernet cable
5. USB keyboard
6. USB mouse
7. Micro USB power supply
8. 8GB or larger microSD card
9. SD Card Reader

Raspberry Pi 3 Model B:
The Raspberry Pi 3 is the third generation Raspberry Pi. It replaced the Raspberry Pi 2
Model B in February 2016. Compared to
the Raspberry Pi 2 it has:

• A 1.2GHz 64-bit quad-core


ARMv8 CPU
• 802.11n Wireless LAN
• Bluetooth 4.1
• Bluetooth Low Energy (BLE)

Like the Pi 2, it also has:

• 4 USB ports
• 40 GPIO pins
• Full HDMI port

NEDARIYA MOHAMMAD 62
Page|5
TYBSC IT INTERNET OF THINGS SEM V

• Ethernet port
• Combined 3.5mm audio jack and composite video
• Camera interface (CSI)
• Display interface (DSI)
• Micro SD card slot (now push-pull rather than push-push)
• Video Core IV 3D graphics core
• The Raspberry Pi 3 has an identical form factor to the previous Pi 2 (and Pi 1 Model
B+) and has complete compatibility with Raspberry Pi 1 and 2.

Monitor or TV:
A monitor or TV with HDMI in can be used as a display with a Raspberry Pi. Most
modern television sets and monitors have an HDMI port, and are the easiest to get working
with the Raspberry Pi. You can use an HDMI cable to connect the Raspberry Pi directly to
the television or monitor.

Some older monitors have a DVI port. These work well with the Raspberry Pi,
although you'll need an HDMI-to-DVI adapter to attach to an HDMI cable, or a one-piece
HDMI-to-DVI cable. Some old monitors have a VGA port. These can be trickier to use as
you'll need an HDMI-to-VGA converter, which can change digital video to analogue video. A
simple port adapter won't work.

HDMI to HDMI Cable:


Connect Raspberry Pi to a Monitor or TV with a HDMI to HDMI cable.

Ethernet cable:
Ethernet cable will allow your Pi to connect with the internet. It is also useful for
headless setup of Raspberry Pi

USB Keyboard and Mouse:


Any standard USB keyboard and mouse can be used with the Raspberry Pi. This plug
and play devices will work without any additional driver. Simply plug them into the
Raspberry Pi and they should be recognised when it starts up.

Power Supply:
It is recommended that you use a 5V, 2A USB power supply for all models of Raspberry Pi.

NEDARIYA MOHAMMAD 62
Page|6
TYBSC IT INTERNET OF THINGS SEM V

SD Card:
The latest version of Raspbian, the default operating system recommended for the
Raspberry Pi, requires an 8GB (or larger) micro SD card. SD card will store the operating
systems as well as all the file and applications created by you.

Installation Guide:
Now since you have all the required hardware, we will now learn how to get the operating
system onto your microSD card so that you can start using software on your Raspberry Pi.

Get Raspbian OS on your microSD card:

Raspbian comes pre-installed with plenty of software for education, programming


general use. It has Python, Scratch, Sonic Pi, Java, Mathematica and more.
1. To download Raspbian log on to raspberrpi.org and click on the download, then
click on Raspbian and lastly download the RASPBIAN JESSIE WITH DESKTOP file. You
can choose either the Torrent file or ZIP file.
2. The downloaded file will be in zip format. To unzip the file, you will require an unzip
tool. You can use any unzipping tool viz. WINRAR, 7ZIP etc. After unzipping the file,
you will find a disc image file in the unzipped folder.
3. Now format the SD Card before writing the disc image file on the SD card. You can
use SD Formatter tool or any other tool of your wish.
4. To write the image file of the operating system on the SD card you will require a
Disk Imager tool. For this you can use Win32 Disk Imager tool.
5. Once the image is written on the SD Card, your untitled SD card will now have the
name boot. Your SD Card will now hold the Raspbian Operating system required for
the first-time setup.

NEDARIYA MOHAMMAD 62
Page|7
TYBSC IT INTERNET OF THINGS SEM V

Plugging in your Raspberry Pi:

1. Begin by placing your SD card into the SD card slot on the Raspberry Pi. It will only
fit one way.
2. Next, plug your keyboard and mouse into the USB ports on the Raspberry Pi.
3. Make sure that your monitor or TV is turned on, and that you have selected the
right input (e.g. HDMI 1, DVI, etc).
4. Connect your HDMI cable from your Raspberry Pi to your monitor or TV.
5. If you intend to connect your Raspberry Pi to the internet, plug an Ethernet cable
into the Ethernet port, or connect a WiFi dongle to one of the USB ports (unless you
have a Raspberry Pi 3).
6. When you're happy that you have plugged all the cables and SD card in correctly,
connect the micro USB power supply. This action will turn on and boot your
Raspberry Pi.

NEDARIYA MOHAMMAD 62
Page|8
TYBSC IT INTERNET OF THINGS SEM V

PRACTICAL NO. 2A

AIM: Displaying Different LED Patterns with Raspberry Pi.

After setting up the raspberry pi and having hands on practice with the Linux
commands, you are now familiar with raspberry pi. Now it’s time to work with the GPIO
pins of the raspberry pi to have an external interface with the raspberry pi.

Hardware Guide:
Along with the basic setup you will require the following components to get started
with the GPIO pins as follows:

1. LED
2. Resistor
3. Connecting wires
4. Breadboard

5. Keyboard

6. Mouse

Before learning this lesson, you must understand the pin numbering system of the GPIO
pins.

GPIO?
One powerful feature of the Raspberry Pi is the row of GPIO (general purpose
input/output) pins along the top edge of the board.
These pins are a physical interface between the Pi and the outside world. At the simplest
level, you can think of them as switches that you can turn on or off (input) or that the Pi
can turn on or off
(output). Of the 40 pins, 26 are GPIO pins and the others are power or ground pins (plus
two ID EEPROM pins which you should not play with unless you know your stuff!)

NEDARIYA MOHAMMAD 62
Page|9
TYBSC IT INTERNET OF THINGS SEM V

What are they for? What can we do with them?


You can program the pins to interact in amazing ways with the real world. Inputs don't have to
come from a physical switch; it could be input from a sensor or a signal from another computer
or device, for example. The output can also do anything, from turning on an LED to sending a
signal or data to another device. If the Raspberry Pi is on a network, you can control devices that
are attached to it from anywhere** and those devices can send data back. Connectivity and
control of physical devices over the internet is a powerful and exciting thing, and the Raspberry
Pi is ideal for this.

How the GPIO pins work?


Output
When we use a GPIO pin as an output. Each pin can turn on or off, or go HIGH or LOW in
computing terms. When the pin is HIGH it outputs 3.3 volts (3v3); when the pin is LOW it is off.

Input
GPIO outputs are easy; they are on or off, HIGH or LOW, 3v3 or 0v. Inputs are a bit trickier
because of the way that digital devices work. Although it might seem reasonable just to
connect a button across an input pin and a ground pin, the Pi can get confused as to whether
the button is on or off. It might work properly, it might not. It's a bit like floating about in deep
space; without a reference, it would be hard to tell if you were going up or down, or even what
up or down meant!
Therefore, you will see phrases like "pull up" and "pull down" in Raspberry Pi GPIO tutorials. It's
a way of giving the input pin a reference so it knows for certain when an input is received.

Warning: Randomly plugging wires and power sources into your Pi, however, may kill it. Bad
things can also happen if you try to connect things to your Pi that use a lot of power.

NEDARIYA MOHAMMAD 62
P a g e | 10
TYBSC IT INTERNET OF THINGS SEM V

PRACTICAL NO : 2B
AIM: Displaying Different LED Patterns with Arduino Uno using Tinkercad.

Circuit Diagram:

NEDARIYA MOHAMMAD 62
P a g e | 11
TYBSC IT INTERNET OF THINGS SEM V

Apparatus:
1.LED
2.Resistor
3.Connecting Wire
4.Breadboard Small
5.Arduino Uno R3
6.Keyboard
7.Mouse
Program:

// Performed by Mansi kinjale


Void setup()
{
pinMode(8,OUTPUT);
pinMode(9,OUTPUT);
pinMode(10,OUTPUT);
pinMode(11,OUTPUT);
}
Void loop()
{
digitalWrite(8,HIGH);
digitalWrite(9,LOW);
delay(1000);
digitalWrite(10,HIGH);
digitalWrite(11,LOW);
delay(2000);
digitalWrite(9,HIGH);
digitalWrite(8,LOW);
delay(1500);
digitalWrite(11,HIGH);
digitalWrite(10,LOW);
delay(1000);
}

NEDARIYA MOHAMMAD 62
P a g e | 12
TYBSC IT INTERNET OF THINGS SEM V

Void setup1()
{
pinMode(8,OUTPUT);
pinMode(9,OUTPUT);
pinMode(10,OUTPUT);
pinMode(11,OUTPUT);
}
Void loop1()
{
digitalWrite(8,HIGH);
digitalWrite(10,LOW);
delay(1000);
digitalWrite(10,HIGH);
digitalWrite(9,LOW);
delay(2000);
digitalWrite(9,HIGH);
digitalWrite(11,LOW);
delay(1500);
digitalWrite(11,HIGH);
digitalWrite(9,LOW);
delay(1000);
}

Void setup2()
{
pinMode(8,OUTPUT);
pinMode(9,OUTPUT);
pinMode(10,OUTPUT);
pinMode(11,OUTPUT);
}
Void loop()
{
digitalWrite(9,LOW);
digitalWrite(10,LOW);
delay(1200);
digitalWrite(11,HIGH);
NEDARIYA MOHAMMAD 62
P a g e | 13
TYBSC IT INTERNET OF THINGS SEM V

digitalWrite(8,LOW);
delay(1000);
digitalWrite(10,HIGH);
digitalWrite(11,LOW);
delay(500);
digitalWrite(10,HIGH);
digitalWrite(8,HIGH);
delay(1500);
}

NEDARIYA MOHAMMAD 62
P a g e | 14
TYBSC IT INTERNET OF THINGS SEM V

PRACTICAL NO. 3

AIM: Controlling Raspberry Pi With Telegram

Hardware Requirement:
1. Raspberry Pi 3 B+ model
2. LED
3. Power Supply
4. Ethernet Wires
5. Jumper Wires
6. VGA to HDMI connector
7. Monitor
8. Keyboard and Mouse

Connection:
LED Terminal Raspberry Pi Pin Number
LED Positive Pin 35
LED Negative Pin 6 (GND)

Install Telegram App. in mobile. Follow the process to obtain access token.

• Install telegram app on your smart phone from playstore


• Open telegram.
• Request the Bot Father to create a new Bot.
• Search “BotFather” and Click on Start.
• Create new Bot using /newbot
• Provide a Name for your bot (e.g. Mukeshtyit)
• Then, provide username for your bot
• Must be end in “bot” (e.g. tele_bot)
• After this process the BotFather will give you a token for access

NEDARIYA MOHAMMAD 62
P a g e | 15
TYBSC IT INTERNET OF THINGS SEM V

Code: telegram.py

import time, datetime


import RPi_GPIO as GPIO
import telepot
from telepotloop import MessageLoop
red = 35
now = datetime.datetime.now()
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BOARD)

#LED Red

GPIO.setup(red,GPIO.OUT)
GPIO.output(red,0)#off initially
def action(msg):
chit_id=msg['chat']['id']
command= msg['text']
print('Received: %s' % command)
if 'on' in command:
message = "on"
if 'red' in command:
message = message + "red "
telegram_bot.sendMessage (chat_id, message)
if 'off in command:
message "Off "
if 'red' in command:
message = message + "red
GPIO.output(red, O)

NEDARIYA MOHAMMAD 62
P a g e | 16
TYBSC IT INTERNET OF THINGS SEM V

telegram_botsendMessage (chat_id, message)

telegram_bot =
telepot.Bot('1460601618:AAFuyR4h42rHjypmgx2K6ko6UStBo4JsV_Q')

print (telegram_bot.getMe())
MessageLoop(telegram_bot,action).run_as_thread()
print ('Up and Running... ')
while 1:
time.sleep(5)

BOT CREATION IN TELEGRAM:

NEDARIYA MOHAMMAD 62
P a g e | 17
TYBSC IT INTERNET OF THINGS SEM V

NEDARIYA MOHAMMAD 62
P a g e | 18
TYBSC IT INTERNET OF THINGS SEM V

PRACTICAL NO. 4

AIM: DISPLAYING TIME OVER 4-DIGIT 7-SEGMENT DISPLAY USING RASPBERRY PI.

To display small amount of data with Raspberry Pi, we can use 4 digit 7-segment Display. 7
Segment Display has seven segments in it and each segment has one LED inside it to display
the numbers by lighting up the corresponding segments.

Hardware Requirements
1. Raspberry Pi Model A/B/B+
2. 4 digit 7 Segment Display
3. Jumper wires (Female to Female)

Here, using 4 digits-7 segments LED display with TM1637 controller

Software Requirements
1. Raspbian Stretch OS

1. Connect your 4 digit 7 segment display with Raspberry Pi's GPIO Pins.

TM1637 Board
Function RPI Physical Pin Raspberry Function
Pin
GND Ground 14 GND

NEDARIYA MOHAMMAD 62
P a g e | 19
TYBSC IT INTERNET OF THINGS SEM V

VCC + 5V Power 4 5V

DI0 Data In 18 GPIO 24

CLK Clock 16 GPIO 23

Step 1: Download Python Script


In order to control the LED, using a special script with pre-defined functions. Various
functions are available in the script, for example, to display numbers and adjust the intensity
of the LEDs.
Create a folder 4digitTime under /home/pi.

Download the script using wget command.

Note: This Script file contains some of the important functions, which are required to add in
our Python script.

NEDARIYA MOHAMMAD 62
P a g e | 20
TYBSC IT INTERNET OF THINGS SEM V

Step 2: Write Python Script to display Time (e.g clock.py)

import sys

import time

import datetime
import RPi.GPIO as GPIO
import tm1637

#CLK ->GPIO23(Pin16)
#Di0 -> GPIO24 (Pin18)

Display = tm1637.TM1637(23,24,tm1637.BRIGHT_TYPICAL)
import sys import time import datetime import
Display.Clear()
Display.SetBrightnes(1)
while(True): now =
datetime.datetime.now()
hour = now.hour minute =
now.minute second =
now.second
currenttime = [ int(hour / 10), hour % 10, int(minute / 10), minute % 10 ]
Display.Show(currenttime)
Display.ShowDoublepoint(second % 2)

time.sleep(1)
The above script needs the tm1637.py script to work, so place both files in the same folder.

Script functions
The clock script uses the following functions, defined in tm1637.py: the
Display. Clear () - Clears display if in dividual LEDs are still active.
- After thi you can adjust the brightness of the display, at least 0 and
maximum 7.
Display.SetBrightnes(x) Display. Sh
ow(x,x,x,x) - Show the actual 4 digits (digits), x can be 0 to
9.
Display.ShowDoublepoint (status) - Co ntrolling the ':' between the second and third digit, true

NEDARIYA MOHAMMAD 62
P a g e | 21
TYBSC IT INTERNET OF THINGS SEM V

(1) = on / false (0) = off.

Step 3: Start the script with following command

To run the script in background you can use following command:

NEDARIYA MOHAMMAD 62
P a g e | 22
TYBSC IT INTERNET OF THINGS SEM V

PRACTICAL NO. 5

AIM:VISITOR MONITORING WITH RASPBERRY PI AND PI CAMERA

Hardware Requirement:
1) Raspbeny Pi 3 B+ model
2) Pi camera module
3) Power Supply
4) Ethemet Cable
5) VGA to HDMI connector
6) Monitor
7) Keyboard and Mouse

Connection :

NEDARIYA MOHAMMAD 62
P a g e | 23
TYBSC IT INTERNET OF THINGS SEM V

Code:

camera.py
#To capture a photo
import picamera
import time
camera=picamera.Picamera()
camera.resolution=(1024, 768)
camera.start_preview()
time. sleep(3)
camera.capture('test_photo.jpg")
print ('Done')

Connecting Pi Camera

l) To enable the camera via the command line type following command:
sudo raspi-config
Select option 5, finterfacmg options", and then open "Pi Camera".
2) To Install the updates:
Select option 8, " Update".
3) To complete the process perform a reboot
sudo reboot

To enable the camera through GUI

NDARIYA MOHAMMAD 62
P a g e | 24
TYBSC IT INTERNET OF THINGS SEM V

2) Vide.py
#To record a video
import picamera
camera=picamera.PiCamera()
camera.resolution=(640,480)
camera.start_preview()
camera.start_recording('test_video_h264')
camera.wait_recording(15)
camera.stop_recording()
print('Finished')

Run the code:


1) Go to command line
2)Locate to your working directory
3) Type 'python camera.py' or 'python video.py' to run the code.
4) photo and video will be saved in your working directory
5) Click on test_photo.jpg to view the photo.
6) To run video type 'omxplayer test_video.h264'.

NEDARIYA MOHAMMAD 62
P a g e | 25
TYBSC IT INTERNET OF THINGS SEM V

PRACTICAL NO. 6

AIM: - GPS module interfacing with Raspberry Pi.


Hardware requirement:
1) Raspberry Pi 3 B+ model
2) GPS module
3) USB to TTL UART Converter module
4) Power Supply
5) Ethernet Cable
6) Jumper Wires
7) VGA to HDMI connector
8) Monitor
9) Keyboard and Mouse

Connection:

GPS module USB to TTL module

VCC 5V

GND GND

TxD RxD

RxD TxD

NEDARIYA MOHAMMAD 62
P a g e | 26
TYBSC IT INTERNET OF THINGS SEM V

Step 1: Checking the working USB port and connections and working of GPS module.

Step 2: Installing GPS daemon and Disabling GPS service

NEDARIYA MOHAMMAD 62
P a g e | 27
TYBSC IT INTERNET OF THINGS SEM V

Step 3: Live streaming of updates of GPS data

Command: gpsmon

cgps – s

NEDARIYA MOHAMMAD 62
P a g e | 28
TYBSC IT INTERNET OF THINGS SEM V

PRACTICAL NO. 7

AIM:INTERFACING RASPBERRY PI WITH RFID

Instatlation Mannual

RFID stands for Radio Frequency Identification uses radio frequency to read information
stored
in a RFID card or tag. Each card has a unique ID and this makes it a perfect choice for many
authentication applications. The RFID authention systems are easy to design and are cheap
in
cost. Interfacing RFID Reader with Raspberry Pi can be very useful as you can implement a
wide
range of applications like:

1)Access Control
2)Authentication
3)e-Ticket,e-Payment,c-Toll
4)Attendance System

Hardware Requirements

1. Raspberry Pi Model 3 B/B+


2. RFID Reader(RC 522)
3. RFID Tags or Cards
4. Jumper wires (Female to Male)
5. Breadboard

Here, I am using RFID Reader RC 522


This module came with two different styles of header pins,one of which needed to be soldered

onto the PCB.

NEDARIYA MOHAMMAD 62
P a g e | 29
TYBSC IT INTERNET OF THINGS SEM V

The RFID RCS22 is a very low-cost RFID (Radio-frequency


identification) reader and writer that is based on the MFRC522
microcontroller. This microcontroNer provides its data through
the SPI protocol and works by creating a 13.56MHz
electromagnetic field that it uses to communicate with the
RFID tags.

 SOFTWARE REQUIREMENTS

1.Raspbian Stretch OS
2.SPI Supporting Libraries
3.RC522 Python Library

NEDARIYA MOHAMMAD 62
P a g e | 30
TYBSC IT INTERNET OF THINGS SEM V

STEP 1:UPDATE Raspberry Pi

STEP 2:Enable SPI Interface using sudo raspi-config tool

Select using Arrow Keys-> Interfacing Option ->SPI->Enable


STEP 3:Reboot Raspberry Pi
STEP 4:Check to make sure that SPI has been enabled.

STEP 5:Install PYTHON 3-DEV ,python3-pip package to setting up RFID reader

STEP 6: Install the MFRC522 library using pip that helps talk to the RC522 module over the
SPI interface.

STEP 7:Install the MFRC522 library using pip that helps to talk to the RC522 module over the
SPI interface.

NEDARIYA MOHAMMAD 62
P a g e | 31
TYBSC IT INTERNET OF THINGS SEM V

There are two files included in this repository;


MFRC22.py which is an implementation of the RFID RC522 circuit.
Simple MRFC522.py that takes the MFRC522.py file and greatly simplifies it.

STEP 8: Write python script which is uesd to write data from the RFC522 to your RFID tags.

Write.py
Import RPi.GPIO as GPIO
From mfrc522 import SimpleMFRC522

Reader=SimpleMFRC522()
#WELCOME MESSAGE
print(“Looking for cards”)
print(“Press Ctrl+c to stop”)

try:
text=input(‘enter new data:’)
print(“Now place your tag to write……”)
reader.write(text)
print(“Data Written Successfully”)
finally:
GPIO.cleanup()

# RUN ABOVE SCRIPT

NEDARIYA MOHAMMAD 62
P a g e | 32
TYBSC IT INTERNET OF THINGS SEM V

When you run script ,it asked to write in the new data,in my case I am going to just type in
msd gurukul.Press Enter when you are happy with what you have written.

With that done,simply place your RFID tag on the top of your RFID RC522 circuit. As soon as
it detects it,it will immediately write the new data to the tag.You should see”Data written
successfully” appear in your command line if it was successful.

STEP 8:write python script which is used to read this data back off the RFID tag.

Read.py

Import RPi.GPIO as GPIO


From mfrc522 import SimpleMFRC522

Reader=SimpleMFRC522()
#WELCOME MESSAGE
print(“Looking for cards”)
print(“Press Ctrl+c to stop”)

try:
id,text=reader.read()
print(id)
print(text)
finally:
GPIO.cleanup()

#RUN THE ABOVE SCRIPT

NEDARIYA MOHAMMAD 62
P a g e | 33
TYBSC IT INTERNET OF THINGS SEM V

With the script now running ,all you need to do is place your RFID Tag on your RFID RC522
circuit .As soon as the Python scripts detects the RFID tag being placed on the top,it will
immediately read the data and print it back out to you.

If you successfully receive data back from your read.py script with the text that you pushed
to the card using your write.py script then you have successfully set up your raspberry pi to
connect with your RFID RC522 circuit.

NEDARIYA MOHAMMAD 62
P a g e | 34
TYBSC IT INTERNET OF THINGS SEM V

PRACTICAL NO. 8

AIM: FINGERPRINT SENSOR INTERFACING WITH PASPBERRY PI.

Installation Manual
Finger Print Sensor, which we used to verify the identity of a person for various purposes.
Nowadays we can see fingerprint-based systems everywhere in our daily life.

One of the advantage of fingerprint-based systems is that passwords and / or number


codes can be completely omitted.

Hardware Requirements
1. Raspberry Pi Model A/B/B+
2. Fingerprint Module

3. Serial USB Converter


4. Jumper Wires

Here, I am using R307 fingerprint module with Serial USB Converter.

R307 Fingerprint Module consists of optical fingerprint sensor, Supply voltage: DC 4.2 ~
6.0V
Pin No Pin Name Details

1 5V Regulated 5V DC

2 GND Common Ground

3 TXD Data output - Connect to MCU RX

4 RXD Data Input - Connect to MCU TX

NEDARIYA MOHAMMAD 62
P a g e | 35
TYBSC IT INTERNET OF THINGS SEM V

5 TOUCH Active Low output when there is touch on sensor by finger

6 3.3V Use this wire to give 3.3V to sensor instead of 5V

Note: So I connected first 4 pins of Fingerprint module to Serial USB Converter.


Connect fingerprint module to USB Serial converter.

Fingerprint Module USB Serial Converter


5V 5.0 V
GND GND
TXD TXD
RXD RXD
TOUCH -
3.3V -
Note: Check USB to Serial Converter pins according to your model. And connect
accordingly.

Software Requirements
1. Raspbian Stretch OS

1. Now, just connect fingerprint module to Raspberry Pi USB port by using USB to
Serial converter.

Step 1: To install this library, root privileges are required. So login with root user.

NEDARIYA MOHAMMAD 62
P a g e | 36
TYBSC IT INTERNET OF THINGS SEM V

Step 2: Download some required packages using wget command

wget –O – http://apt.pm-codeworks.de/pm-codeworks.de.gpg | apt-key add –

wget http://apt.pm-codeworks.de/pm-codeworks.list -P

/etc/apt/sources.list.d/

Step 3: Update the Raspberry Pi

Step 4: Install the downloaded finger print sensor library

Step 5: To return to the normal shell (under the Pi user), type exit

Step 6: Now check USB port on which your finger print sensor is connected. Use this USB
port in our Python script.

Step 7: Now go to the examples directory. (/usr/share/doc/python-fingerprint/examples/)

NEDARIYA MOHAMMAD 62
P a g e | 37
TYBSC IT INTERNET OF THINGS SEM V

Step 8: Run sample file, to test to see if the sensor is detected and ready for access

The above data should appear, which allows you to display the positions under which an
imprint is stored by selecting a page (0-3).
If here you get Exception message, then something is wrong with the cabling or the
sensor. Check it again.

Step 9: Now execute other scripts, to make sure Fingerprint module is working .

Script Usage

example_index.py Shows template index table.

example_enroll.py Stores new fingerprint

example_delete.py Deletes a fingerprint from sensor

example_search.py Search for recorded fingerprint

example_downloadimage.py Read fingerprint and download it.

example_generaterandom.py Generates 32 bit random number.

 Run example_enroll.py script to store new fingerprint

NEDARIYA MOHAMMAD 62
P a g e | 38
TYBSC IT INTERNET OF THINGS SEM V

Put your finger on the glass surface, wait for the instruction in the terminal and remove
your finger as soon as it is written there. Afterwards you have to put your finger a second
time for the verification and the imprint is stored in the next number.

Now, Run example_search.py script to see whether our finger is recognized.

Put the same finger on glass surface.


If the fingerprint is detected, it displays below message.

Execute same script again, this time use other finger which is not previously stored.
If fingerprint is not detected, then gives "No match Found" message

NEDARIYA MOHAMMAD 62
P a g e | 39
TYBSC IT INTERNET OF THINGS SEM V

PRACTICAL NO. 9

AIM: INSTALLING WINDOWS 10 IOT CORE ON RASPBERRY PI.

Hardware requirement:

1. Raspberry Pi 3.

2. 5V 2A microUSB power supply.

3. 8GB or larger microSD card with full-size SD adapter.

4. HDMI cable.

5. Access to a PC.
6. Ethernet cable.

Step 1:
Insert microSD card in a card reader and connect the card reader to PC.

Step 2:
Using SD Formatter software format your SD card.

Step 3:
Open any browser and search for ‘Windows 10 developer center’.

NEDARIYA MOHAMMAD 62
P a g e | 40
TYBSC IT INTERNET OF THINGS SEM V

Step 4: Click on Windows development center weblink and type ‘/iot’ in url. Hit enter
button.

Step 5:
Go to ‘Download’ tab. And Download Windows 10 IoT Core Dashboard

NEDARIYA MOHAMMAD 62
P a g e | 41
TYBSC IT INTERNET OF THINGS SEM V

Step 6:
Run the downloaded setup file to install the application. Once the installation is successful,
you can launch IoT dashboard.

Step 7:
Select Set up a new device from the sidebar.

Enter the required details. And select the correct drive for your microSD card. Give device a
name and admin password. Accept the license and click on Download and Install Button.

Step 8:
The application will now download the necessary files from Microsoft and flash them to
your microSD card.

NEDARIYA MOHAMMAD 62
P a g e | 42
TYBSC IT INTERNET OF THINGS SEM V

Once the image has been installed on the microSD card, eject the SD card from your PC and
insert to the Raspberry Pi. First connect the power supply, HDMI cable and Ethernet cable.
Connect the HDMI cable to your chosen display, connect keyboard and mouse and power it
up.

NEDARIYA MOHAMMAD 62
P a g e | 43

You might also like