Professional Documents
Culture Documents
"IOT Based Smart Public Distribution System": A Project Report On
"IOT Based Smart Public Distribution System": A Project Report On
A Project Report on
“IOT Based Smart Public Distribution System”
Anil (1SI13EC010)
Bindushree M S (1SI13EC019)
Mallikarjun B S (1SI13EC046)
Meghana R V (1SI13EC050)
CERTIFICATE
Certified that the project work entitled “IOT BASED SMART PUBLIC DISTRIBU-
TION SYSTEM” is a bonafide work carried out by Anil (1SI13EC010), Bindushree M S
(1SI13EC019), Mallikarjun B S (1SI13EC046) and Meghana R V (1SI13EC050) in partial
fulfillment for the award of degree of Bachelor of Engineering in Electronics & Commu-
nication Engineering from Siddaganga Institute of Technology, an autonomous institute
under Visvesvaraya Technological University, Belagavi during the academic year 2016-17.
It is certified that all corrections/suggestions indicated for internal assessment have been
incorporated in the report deposited in the department library. The Project report has
been approved as it satisfies the academic requirements in respect of project work pre-
scribed for the Bachelor of Engineering degree.
External viva:
Names of the Examiners Signature with date
1.
2.
ACKNOWLEDGEMENT
We offer our humble pranams at the lotus feet of His Holiness, Dr. Sree Sree Sivaku-
mara Swamigalu, Founder President and His Holiness, Sree Sree Siddalinga Swami-
galu, President, Sree Siddaganga Education Society, Sree Siddaganga Math for bestowing
upon their blessings.
We would like to express our sincere gratitude to Dr. K V Suresh, Professor and Head,
Department of E&CE, SIT, Tumakuru for his encouragement and valuable suggestions.
We thank our guide Mrs. S Mala, Assistant Professor, Department of Electronics &
Communincation Engineering, SIT, Tumakuru for the valuable guidance, advice and en-
couragement.
Above all, we would like to thank our parents for their support all along.
Anil (1SI13EC010)
Bindushree M S (1SI13EC019)
Mallikarjun B S (1SI13EC046)
Meghana R V (1SI13EC050)
Abstract
The system of providing basic domestic commodities on subsidy to poor families in developing
countries like India is an important aspect to meet fundamental requirement of people. The
existing public distribution system in Ration shops requires manual measurement of quantity
and maintenance of record of transactions. Many problems are encountered by the existing
system such as,
2. Card holders wasting time in queues for collecting ration for hours.
The project titled IOT based smart public distribution system proposes an automatic
method of distribution of commodities to authenticated card holders. Also, the details of
transactions made are maintained in a database. The users need to access to their account
through the Smart phone by entering their ID and password. Once they are successfully
logged in, they can view the stock availability. This system uses Raspberry-pi as controller
and it is implemented with Minutiae extraction based fingerprint matching algorithm which
efficiently works with greater accuracy score. Automatic distribution of commodities is
achieved by using DC motors controlled directly by Raspberry pi to open and close the
valves.
Initially, one of the family members need to enter unique username and password. Once
user is logged in, he/she can view commodities that is available for that particular family
account. To dispense the commodities, user is expected to provide fingerprint for next
level of authentication. Once user is verified, the system dispenses a threshold quantities of
commodities for the particular family. After dispensing user is asked to signout or view the
dispensed commodities.
i
Contents
Abstract i
Contents ii
List of Figures iv
List of Tables v
1 Introduction 1
1.1 Objective and Motivation of the project . . . . . . . . . . . . . . . . . . . . 2
1.2 Organization of the report . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2 Literature Survey 3
2.1 Previous Work on Smart PDS . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2 Previous work on fingerprint identification system . . . . . . . . . . . . . . . 4
2.2.1 Direct Matching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.2.2 Minutiae Based Matching . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2.3 Ratio of Relational Distance Matching . . . . . . . . . . . . . . . . . 8
3 System Overview 9
3.1 Hardware Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4 System Hardware 11
4.1 Raspberry pi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.2 Fingerprint Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.3 DC motor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.4 Hydraulic valve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
5 System Software 14
5.1 Android Studio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
5.2 Raspbian . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
5.3 Flowchart of minutiae based matching . . . . . . . . . . . . . . . . . . . . . 15
ii
IOT based Smart public distribution system 2016-17
6 Results 17
6.1 Snapshots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
6.2 MATLAB Results on fingerprint matching . . . . . . . . . . . . . . . . . . . 21
6.3 Quantity Analysis: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Bibliography 26
iv
List of Tables
6.1 Analysis of quantity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
6.2 Similarity and number of minutiae points . . . . . . . . . . . . . . . . . . . . 24
6.3 Accuracy analysis of database . . . . . . . . . . . . . . . . . . . . . . . . . . 24
v
Chapter 1
Introduction
Government provides food, oil and fuel to economically challenged people at subsidized rates
which are distributed to the public through ration shops. The stocks for these ration shops
will be bought from the farmers and then sold at subsidized rates. Every month fresh stock
arrives at these shops and that needs to be distributed to public. The owner of most of
the ration shops resort to malpractices and the allotted amount of ration is not distributed
to authorized people. To counter these fraudulent activities this system is developed which
incorporates the following features.
1. Fingerprint authentication system used to identify a particular user making the system
secure.
2. The commodity and it’s quantity needs to be selected using android application.
Public distribution system in the country has undergone organic changes from the ra-
tioning system introduced during World War II to an important social safety program to
ensure food security of the country. Under the public distribution System (PDS), the cen-
tral government procures and supplies special essential commodities to fair price at fixed
central issue prices. In the past, a number of items like iodized salt, palm oil, candles, ghee,
cloth etc. have been distributed through the PDS, however at present department of food
and supplies have confined the fair price distribution to few cereals, wheat, rice, sugar and
kerosene oil. At present India has 4,78,000 ration stores operating across many localities,
villages, towns and cities in the country making it the largest distribution network in the
world. Department of food and supplies is providing ration cards to the citizens based on
their economic conditions. There are mainly two types of cards:
1
IOT based Smart public distribution system 2016-17
Against the essential commodities act there are many fraudulent activities going on unfair
price shops. Users are forced to wait in long queues for hours together to purchase the essen-
tial commodities. Card holders and their family member’s details are stored in a notebook.
Hence each time transaction is made by the card holder, entry had to be made manually
in the book. Maintenance of record in book is difficult. Thus, an efficient and automated
system is required to minimize the misappropriations.
Quantity of ration to be given for these cards is fixed based on the number of members in the
card holders family. The Department of food and supplies enforces control over these provi-
sions under the orders by the Essential Commodities Act, 1955 regulating trade in specified
essential commodities by keeping a close watch on stocks, passage, quality and availability
of these commodities. Enforcement consists of collection of information and evidence of con-
travention of provisions of the relevant control orders and action taken against them under
the provisions of Essential Commodities Act.
3
IOT based Smart public distribution system 2016-17
on Ratios of distance. By conducting the evaluation on the FVC-2000 datasets and the
results were observed by conducting election with the help of these matching techniques and
the best matching technique is found.
Sharath et.al [5], this paper address the problem of fingerprint individuality by quantify-
ing the amount of information available in minutiae features to establish a correspondence
between two fingerprint images.
1. Histogram Equalization:
Histogram is a process that attempts to spread out the gray levels in an image so that
they are evenly distributed across their range. It basically reassigns brightness value
of each pixel based on the image histogram. Histogram equalization is to expand the
pixel value distribution of an image so as to increase the perceptional information.
In order to enhance a specific block by its dominant frequencies, we multiply the FFT of
the block by its magnitude a set of times. Where the magnitude of the original FFT is
abs(F (u, v)) = |F (u, v)|. So we get the enhanced block according to the Equation(2.2):
I. Calculate the gradient values along x-direction (gx) and y-direction (gy) for each
pixel of the block. Two Sobel filters are used to fulfill the task.
II. For each block, use Equation(2.4) to get the Least Square approximation of the
block direction. PP
2 (gx ∗ gy)
tan 2β = P P 2 (2.4)
(gx − gy 2 )
for all the pixels in each block The formula is easy to understand by regarding gradient
values along x-direction and y-direction as cosine value and sine value. So the tangent
value of the block direction is estimated nearly the same as the way illustrated by the
following Equation(2.5).
2 sin θ cos θ
tan 2θ = (2.5)
cos2 θ − sin2 θ
After finished with the estimation of each block direction, those blocks without sig-
nificant information on ridges and furrows are discarded based on the following Equa-
tion(2.6) PP 2
(gx − gy 2 )
PP
2 (gx ∗ gy) +
E= PP 2 (2.6)
W ∗W ∗ (gx + gy 2 )
2. Minutiae Extraction
• Fingerprint Ridge Thinning:
Ridge Thinning is to eliminate the redundant pixels of ridges till the ridges are just
one pixel wide uses an iterative, parallel thinning algorithm. In each scan of the full
fingerprint image the algorithm marks down redundant pixels in each small image win-
dow (3x3). And finally removes all those marked pixels after several scans.
• Minutiae Marking After the fingerprint ridge thinning:
Marking minutiae points is relatively easy. In general for each (3x3) window, if the
central pixel is 1 and has exactly 3 one-value neighbors then the central pixel is a ridge
branch. If the central pixel is 1 and has only 1 one-value neighbor, then the central
pixel is known as ridge ending.
3. Minutiae Postprocessing
• False Minutiae Removal :
At this stage false ridge breaks due to insufficient amount of ink and ridge cross con-
nections due to over inking are not totally eliminated. Also some of the earlier methods
introduce some spurious minutia points in the image. So to keep the recognition sys-
tem consistent these false minutiae need to be removed. first calculate the inter ridge
distance D which is the average distance between two neighboring ridges. For this scan
each row to calculate the inter ridge distance.All we label all thinned ridges in the fin-
gerprint image with a unique ID for further operation using a MATLAB morphological
operation BWLABEL [8].
• Minutiae Match
1. Alignment stage:
Given two fingerprint images to be matched, choose any one minutiae from each image
and calculate the similarity of the two ridges associated with the two referenced minu-
tiae points. If the similarity is more than a threshold transform each set of minutiae
to a new coordination system whose origin is at the referenced point and whose x axis
is coincident with the direction of the referenced point.
2. Match stage :
After geting two set of transformed minutiae points,they were used in the elastic match
algorithm to count the matched minutiae pairs by assuming two minutiae having nearly
the same position and direction are identical. If the minutiae is to be matched is within
the rectangle box placed and the direction discrepancy between them is very small, then
the two minutiae are regarded as matched minutia pair. Each minutiae in template
image either has no matched minutiae or has only one corresponding minutiae.
Figure 3.1: Block diagram of IOT based smart public distribution system.
1. Finger print module: A fingerprint module is interfaced with the Raspberry- pi. A
minutiae algorithm is used to process the fingerprint obtained from the module. Fin-
gerprint processing includes two parts: fingerprint enrollment and fingerprint matching.
During enrolling, user needs to enter the finger two times. The system will process the
two time finger images, generate a template of the finger based on processing results
and store the template.
9
IOT based Smart public distribution system 2016-17
2. Raspberri pi: The details of each user of the family are enrolled in the database.
Raspberry pi takes the serial number from reader and access corresponding record in
the database in accordance with the thumbprint identification.
3. Motor and Relay circuit: The motors are used to control the valve arrangement (i.e.to
open and close the valve). These motors are controlled by relay(timer) circuit. Relay
circuit is used for weight measurement as the grain falls through the funnel and when
it reaches the required amount the valve will close automatically.
4. Hydraulic Valve: The purpose of flow control in a hydraulic system is to regulate speed.
This valve controls the speed of an actuator by regulating the flow rate.The valve is
controlled by electric current which passes through a DC motor. The motor operates
the hydraulic valve to dispense the oil to the cardholders.
4.1 Raspberry pi
The details of each card holder of the family are enrolled in the database. Raspberry
pi takes the serial number from reader and access corresponding record in the database in
accordance with the thumb-print identification.The Raspberry Pi is a credit-card-sized single-
board computer developed in the UK by the Raspberry Pi Foundation with the intention of
promoting the teaching of basic computer science in schools. Figure 4.1 shows the Raspberry
pi embedded board.
1. processor: The heart of the Raspberry Pi is the processor. This chip is a 32 bit,
700 MHz System on a Chip, which is built on the ARM11 architecture. ARM chips
come in a variety of architectures with different cores configured to provide different
capabilities.
2. Secure Digital (SD) Card slot: There is no hard drive on the Pi. Everything is stored
on an SD Card. The minimum requirement for the SD card to store the Operating
System, programs, softwares and database must be 8GB.
11
IOT based Smart public distribution system 2016-17
3. USB port: On the Model B there are two USB 2.0 ports, but only one on the ModelA.
Some of the early Raspberry Pi boards were limited in the amount of current that they
could provide. Some USB devices can draw up 500mA.
4. Ethernet port: The model B has a standard RJ45 Ethernet port. The Model A does
not, but can be connected to a wired network by a USB Ethernet adapter (the port
on the Model B is actually an on-board USB to Ethernet adapter). Wi-fi connectivity
via a USB dongle is another option.
5. HDMI connector: The HDMI port provides digital video and audio output. 14different
video resolutions are supported, and the HDMI signal can be converted to DVI (used
by many monitors), composite (analog video signal usually carried over a yellow RCA
connector), or SCART (a European standard for connecting audio-visual equipment)
with external adapters.
6. Analog Audio output: This is a standard 3.5mm mini analog audio jack, intended
to drive high impedance loads (like amplified speakers). Headphones or unpowered
speakers wont sound very good.
7. Power input: This microUSB connector is used to supply power (this isnt an additional
USB port; its only for power).
pixel darkness, or the overall values in a small sample, and rejects the scan if the overall
image is too dark or too light. If the image is rejected, the scanner adjusts the exposure
time to let in more or less light, and then tries the scan again.
4.3 DC motor
Three DC motor system is used to open and close the valves for automatic distribution
of rice, sugar and oil. The initial valve arrangement is made to prevent fall of grains and oil.
The three DC motors, each having specifications 12 V, 60 RPM and 0.37 A are used for this
purpose.
control the speed of an actuator by regulating the flow rate. The valve is controlled by
electric current passed through the DC motor. Here it is used to dispense the oil to the
card holder. A switch has to be pressed using DC motor arrangement to collect the liquid.
Their tasks are to shut off, release, dose, distribute or mix fluids. Figure 4.2 shows the cross
sectional view of Hydraulic valve.
14
IOT based Smart public distribution system 2016-17
Initially the user is asked to enter the ID and password given to them in the app. The
Raspberry pi compares the unique ID with the data base. If the ID matches, the user can
view their profile which will have details of their transactions. Then user is asked to scan the
finger. Once the user is authenticated, the commodity and quantity can be selected their itself
using buttons given. If the commodity and quantity are valid, the system dispenses the valid
commodity. However, if the authentication fails the system waits for valid authentication.
Figure 5.1 shows the flow chart of IOT based smart public distribution system.
5.2 Raspbian
Raspbian which is based on Linux Debian is used as an operating system for the proposed
project which has a strong documentation. Raspbian comes pre-installed with plenty of
software for education, programming and general use. It has Python, Scratch, Sonic Pi,
Java, mathematica and more.The raspbian with PIXEL image contained in the ZIP archieve
is over 4GB in size, which means that these archives use features which are not supported
by older unzip tools on some platforms.
Before purchasing user has to give their fingerprint in order to withdraw the commodities.
The stored templates are used as reference. When user tries to purchase the commodities
the input fingerprint is compared with stored database to identify the user. Later user can
buy the commodities if fingerprint is matched.
6.1 Snapshots
The snapshots of the result are shown below. Finger print module is interfaced to the
Raspberry pi board through serial port. The user enters unique ID and password into the
android application which is then verified using stored database. It is followed by Finger
print identification to verify the identity of user.
After validating ID and password user is asked to scan the finger which acts as a level 2
authentication to stop any fraudulent activity in case if the ID and password are hacked.
Figure 6.1 shows the dispensing containers for three commodities rice, sugar and any fluid
which are connected by DC motors (for rice and sugar) and hydraulic valve arrangement
(for fluid)via H-bridge.
17
IOT based Smart public distribution system 2016-17
Figure 6.2 (a) displays user login page where they have to enter ID and password to see
their profile. Figure 6.2 (b) shows different options to the user. They can purchase, enroll
there fingerprint, delete unwanted fingerprint or view the profile. User can enroll his/her
fingerprint by pressing enroll button as shown in Figure 6.2 (c).
If the user selects purchase on the android app, system will ask for fingerprint authenti-
cation, user is expected to provide fingerprint by placing a finger on fingerprint scanner as
shown in Figure 6.3.
If fingerprint matched with enrolled fingerprint of user. The system displays a message
as template is found otherwise no match found as shown in Figure 6.4.
Now user can select different commodities like rice,sugar,oil as per his/her need, Figure 6.5
gives the snapshot of the android app, which shows the various commodities.
Figure 6.6 shows 1 Kg of rice being dispensed, if user needs another kilograms of rice then
they have to press the rice button once again.
Figure 6.9 shows the information about user transactions which is stored in the database.
After histogram equalization, Fast Fourier Transform FFT is applied. output of FFT is
shown in Figure 6.11.
The adaptive binarisation technique is used to convert FFT image into grey scale image as
shown in Figure 6.12.
Block direction estimation method is used for estimate the region of interest as shown in
Figure 6.13.
The particular region of interest region ROI is selected as shown in Figure 6.14.
The ridges were thinned and removes H breaks and Spikes which were present due to insuf-
ficient light intensity of the fingerprint module as shown in Figure 6.15.
The extraction of minutiae points are done by using ridge ending points and ridge bifur-
cation. Some of Minutiae points removed by false minutiae detection technique as shown in
Figure 6.16. Matching of fingerprints were done using the Minutiae points. Similarly the
accuracy score will be given for the matched fingerprints. If the accuracy score is above
threshold value then user is authorized to access the system.
The desired quantity of ration which is dispensed by the system is measured by calibrating
the delay of opening and closing of the valve. The delay is calculated using trail and error
method. Compared to previous system this system gives better performance because the
accuracy in delay calculation is more.
Table 6.2 shows samples of same fingerprint with different alignment are compared with
each other and the percentage of similarities between them are tabulated based on minutiae
points. As the alignment of fingerprint changes, similarities between the reference and input
Table 6.3 shows the accuracy of algorithm as the database is increased from 100 to 1000
and time taken to do the matching between whole database and the input fingerprint. As
the database increases accuracy decreases and time taken to process the images increases.
25
Bibliography
[1] Suhas K, Suhas N, Sumukh B, Sunil S, A project report on Public distribution system
guided by Mrs. S Mala, Department of Electronics and Communication, SIT Tumakuru
2015-16.
[2] Sana A, Qader P, Dube R , Smart Card based e-Public Distribution System , Inter-
national Journal of Advanced Research in Computer and Communication Engineering
Vol. 5, Issue 5, May 2016.
[3] Bhalekar D, Kulkarni R, Lawande K, Patil V, Online Ration Card System by using
RFID and Biometrics , International Journal of Advanced Research Computer Science
and Software Engineering 5(10), pp. 849-851, October- 2015.
[7] Deepika S, Rashmi S, Minutiae Based FingerprintMatching for Identification and Verifi-
cation, International Journal of Science and Research (IJSR), Vol. 17 Issue 6, November
2014.
[9] Raspberry Pi
https://www.Raspberrypi.org
26
Appendix
Raspberry Pi
Quick Start Guide
The Raspberry Pi – Single Board Computer
• USB mouse
• Internet connectivity - a USB WiFi adaptor (Model A/B) or a LAN cable (Model B)
• Powered USB Hub
• Case
Connecting Together
You can use the diagram to connect everything together, or use the following instructions:
• You can create your own preloaded card using any suitable SD card you have. Be sure
to backup any existing data on the card.
• Preloaded SD cards will be available from the RPi Shop.
This guide will assume you have a preloaded SD card.
Display
There are two main connection options for the RPi display, HDMI (high definition)
and Composite (low definition).
• HD TVs and most LCD Monitors can be connected using a full-size 'male' HDMI
cable, and with an inexpensive adaptor if DVI is used. HDMI versions 1.3 and 1.4 are
supported, and a version 1.4 cable is recommended. The RPi outputs audio and video
via HMDI, but does not support HDMI input.
• Older TVs can be connected using Composite (a yellow-to-yellow cable) or via
SCART (using a Composite to SCART adaptor). PAL and NTSC TVs are supported.
When using composite video, audio is available from a 3.5mm (1/8 inch) socket, and
can be sent to your TV, to headphones, or to an amplifier. To send audio your TV,
you will need a cable which adapts from 3.5mm to double (red and white) RCA
connectors.
Note: There is no VGA output available, so older VGA monitors will require an
expensive adaptor.
Using an HDMI to DVI-D (digital) adaptor plus a DVI to VGA adaptor will not work. HDMI
does not supply the DVI-A (analogue) needed to convert to VGA - converting an HDMI or
DVI-D source to VGA (or component) needs an active converter. (It can work out cheaper to
buy a new monitor.) The lack of VGA has been acknowledged as a priority issue.
Power Supply
The unit uses a Micro USB connection to power itself (only the power pins are connected - so
it will not transfer data over this connection). A standard modern phone charger with a micro-
USB connector will do, but needs to produce at least 700mA at 5 volts. Check your power
supply's ratings carefully. Suitable mains adaptors will be available from the RPi Shop and
are recommended if you are unsure what to use.
You can use a range of other power sources (assuming they are able to provide enough
current ~700mA):
• Computer USB Port or powered USB hub (will depend on power output)
• Special wall warts with USB ports
• Mobile Phone Backup Battery (will depend on power output) (in theory - needs
confirmation)
To use the above, you'll need a USB A 'male' to USB micro 'male' cable - these are often
shipped as data cables with MP3 players.
Cables
You will probably need a number of cables in order to connect your RPi up.
Additional Peripherals
You may decide you want to use various other devices with your RPi, such as Flash
Drives/Portable Hard Drives, Speakers etc.
Internet Connectivity
This may be an Ethernet/LAN cable (standard RJ45 connector) or a USB WiFi adaptor. The
RPi ethernet port is auto-sensing which means that it may be connected to a router or directly
to another computer (without the need for a crossover cable).
USB-Hub
In order to connect additional devices to the RPi, you may want to obtain a USB Hub, which
will allow multiple devices to be used.
It is recommended that a powered hub is used - this will provide any additional power to the
devices without affecting the RPi itself.
USB version 2.0 is recommended. USB version 1.1 is fine for keyboards and mice, but may
not be fast enough for other accessories.
Case
Since the RPi is supplied without a case, it will be important to ensure that you do not use it
in places where it will come into contact with conductive metal or liquids, unless suitably
protected.