Senior Ii - Final - Happyness Tolle

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

DAR ES SALAAM INSTITUTE OF TECHNOLOGY

DEPARTMENT OF ELECTRONICS AND TELECOMMUNICATION


ENGINEERING
BACHELOR OF ENGINEERING
NTA LEVEL 8
SENIOR PROJECT II

PROJECT TITLE: SMART VOTING MACHINE BASED ON


FINGER PRINT AND FACE RECOGNITION.
PROJECT TYPE: PROBLEM-SOLVING
NAME: HAPPYNESS HENRY TOLLE
ADMISSION No: 190640713508
ACADEMIC YEAR: 2021/2022
SUPERVISOR NAME: DR. PETRO ERNEST PESHA

June, 2022
DECLARATION
I, Tolle, Happyness, declare to the best of my knowledge that, the project presented here, as the
partial fulfillment for the award of Bachelor of Engineering in Electronics and
Telecommunication is my original work and has not been copied from anywhere or presented
elsewhere except where explicitly indicated otherwise. As all sources of knowledge have been duly
acknowledged.

Candidate Name: Happyness H. Tolle


Signature: ……………………...
Date: ……………………

i
CERTIFICATION
As the candidate’s supervisor, I have approved this project report for submission.
Supervisor’s Name: Dr. Pesha E.
Signature: …………………………

Date: ………………………

ii
ABSTRACT
Voting is the most basic right of every citizen and is one of the most important responsibilities of
every citizen.
The election process adopted in Tanzania is mostly paper-based or manual. This manually handled
process can be time-consuming and is prone to security breaches and electoral fraud.
This project aims to develop a smart voting system based on fingerprint and face recognition to ensure
enhanced security and to avoid fake, repeated voting.
In terms of sensing units, the system will comprise a fingerprint sensor and an image capturing unit
as the basic sensing units for initiating the functioning of the system. The fingerprint will be used for
the authentication of a voter’s identity and eligibility before he/she is allowed to vote in the system.
In the image capturing unit, a camera will be used to feed or stream images in real time to or through
a computer to a computer network. When "captured" by the camera, the image is saved, viewed, or
sent on to other networks via systems such as the internet.
With the implementation of this project, it is expected that more people will be invigorated to vote.
This report has covered all the preliminary information used in the designing of the proposed system,
such as a series of methods such as literature review and data collection. Hence, the report contains
all the required information for the project.
Specific objectives including design power supply unit and interface, design sensing unit
fingerprint,control unit , communication display unit, build the prototype of the overall functional
circuit were achieved successful . Hence the system has been developed by considering the
mentioned objectives and finaly smart voting machine based on finger prints and face recognition
has been developed , simulated , tested and work successfully.

iii
TABLE OF CONTENTS
DECLARATION ................................................................................................................................ 2
CERTIFICATION .............................................................................................................................. 3
ABSTRACT ....................................................................................................................................... iii
TABLE OF CONTENTS ................................................................................................................... iv
ACKNOWLEDGEMENT ................................................................................................................ vii
LIST OF FIGURES.......................................................................................................................... viii
LIST OF TABLES ............................................................................................................................. ix
LIST OF ABBREVIATION ............................................................................................................... x
1.1 Introduction ............................................................................................................................. 1
CHAPTER ONE ............................................................................................................................... 1
1 INTRODUCTION .................................................................................................................. 1
1.2 Background information ......................................................................................................... 2
1.3 Problem Statement .................................................................................................................. 3
1.4 Objectives................................................................................................................................ 3
1.4.1 Main objective.................................................................................................................. 3
1.4.2 Specific objectives............................................................................................................ 3
1.5 Significance of the project ....................................................................................................... 4
1.6 Project methodology................................................................................................................ 4
1.6.1 Literature review .............................................................................................................. 4
1.6.2 Data collection.................................................................................................................. 5
CHAPTER TWO .............................................................................................................................. 6
2 LITERATURE REVIEW........................................................................................................ 6
2.1 Introduction ............................................................................................................................. 6
2.2 Direct-recording Electronic (DRE) voting machines ............................................................... 6
2.3 Optical Scan Voting Systems .................................................................................................. 8
CHAPTER THREE .......................................................................................................................... 10
3 PROPOSED SYSTEM ......................................................................................................... 10
3.1 Introduction ........................................................................................................................... 10
3.2 Proposed system ........................................................................................................................ 10
3.3 Block diagram of the proposed system .................................................................................. 10
3.4 Parts of the proposed system ................................................................................................. 11
iv
3.4.1 Power supply .................................................................................................................. 11
3.4.2 Sensing unit .................................................................................................................... 11
3.4.3 Display unit .................................................................................................................... 11
3.4.4 Communication unit ....................................................................................................... 11
1.5 Principle of operation............................................................................................................ 12
3.6 Significances of the proposed system. ................................................................................... 12
3.7 Scope/ limitation of the proposed system. ............................................................................. 12
3.8 Chapter summary. ................................................................................................................. 13
CHAPTER FOUR ............................................................................................................................. 14
4 DATA COLLECTION ......................................................................................................... 14
4.1 Introduction ........................................................................................................................... 14
4.2 Primary data .......................................................................................................................... 14
4.3.4 Display unit .................................................................................................................... 19
4.3.5 Control unit .................................................................................................................... 20
5 DATA ANALYSIS AND SYSTEM DESIGN ..................................................................... 21
5.1 Introduction ........................................................................................................................... 21
5.2 Selection of unit block components ...................................................................................... 21
5.2.2 Control unit .................................................................................................................... 23
5.3 Software Design .................................................................................................................... 32
5.4 Overall Circuit Diagram of Proposed System ....................................................................... 32
5.5 The flow chart of the Designed system ................................................................................. 32
5.6 Chapter summary .................................................................................................................. 33
6 SIMULATION ...................................................................................................................... 34
6.1 Introduction ........................................................................................................................... 34
6.2 Simulation software .............................................................................................................. 34
6.3 Simulation constraints........................................................................................................... 34
6.4 Performance parameters and simulations ............................................................................. 34
6.5 Overall Simulation and Result Discussion ........................................................................... 36
6.6 Chapter Summary ................................................................................................................. 37
7 PROTOTYPE TESTING AND IMPLEMENTATION ....................................................... 38
7.1 Introduction .............................................................................................................................. 38
7.2 Module interfacing .................................................................................................................... 38
7.2.1 Fingerprint interfacing ........................................................................................................... 38
v
7.2.2 Image capturing interfacing .................................................................................................. 38
7.2.3 TFT display interfang............................................................................................................. 38
CHAPTER EIGHT ........................................................................................................................... 43
8 CONCLUSION AND RECOMMENDATION .................................................................... 43
8.1 Conclusion ............................................................................................................................ 43
8.2 Recommendation .................................................................................................................. 45
REFERENCES ................................................................................................................................. 46
APPENDIX A ................................................................................................................................... 47
Senior Project I ................................................................................................................................. 47
APPENDIX B ................................................................................................................................... 48
APPENDIX C ................................................................................................................................... 48
APPENDIX D ................................................................................................................................... 50

vi
ACKNOWLEDGEMENT
Firstly, I would like to thank God for the good health that has enabled me to implement this project.
His graces and mercies are indeed overwhelming. I give all praise, glory, and honor to God.
Secondly, I would like to take this opportunity to thank my project supervisor, Dr. Pesha P., for his
assistance from the time I started this project until it ended. His insights towards this stage of my
project implementation are indeed a necessity.
My regards go to the lecturers who have contributed several insights during presentations and some
outside of presentations. Their insights have had a significant impact on the implementation of this
project.
Much gratitude to my family for their support and care. The provision through prayer, material, and
other forms of support is always a gift I would endlessly be grateful for.

vii
LIST OF FIGURES

Figure 2-1: India’s DRE Voting Machine .......................................................................................... 6


Figure 2-2. iVotronic system ............................................................................................................. 7
Figure 2-3: The OPTECH III-P, an optical scan system ................................................................... 8
Figure 2-4: Ballot paper ..................................................................................................................... 9
Figure 3-1: Block diagram of the proposed system .......................................................................... 10
Figure 4-1: smart voting system awareness pie chart ....................................................................... 14
Figure 4-2: Security awareness pie chart ......................................................................................... 15
Figure 4-3: Operational feasibility ................................................................................................... 15
Figure 5-1: Fingerprint module DY50 ............................................................................................. 22
Figure 5-2: Pin configuration of DY50 ............................................................................................ 22
Figure 5-3: USB webcam camera .................................................................................................... 23
Figure 5-4: Physical appearance of Rasspberry pi 4 ........................................................................ 24
Figure 5-5: Raspberry pi 4 pin configuration .................................................................................. 25
Figure 5-6: The software model of TFT Display ............................................................................. 27
Figure 5-7: Regulator pinout ............................................................................................................ 28
Figure 5-8:Power suppy circuit ........................................................................................................ 28
Figure 5-9: relay driver circuit ......................................................................................................... 30
Figure 5-10:The foftware model of a buzzer ................................................................................... 31
Figure 5-11:The Overall Schematic Diagram of Designed System................................................. 32
Figure 5-12: System flowchart......................................................................................................... 33
Figure 6-1: Power supply simulation snapshot ................................................................................ 34
Figure 6-2:Registered voter finger print and face identity ............................................................... 35
Figure 6-3: Unregistered Finger print and Face identity. ................................................................ 36
Figure 6-4: Overall simulation ......................................................................................................... 37
Figure 7-1: The prototype interfaced (with casing) ......................................................................... 39
Figure 7-2: Voting page .................................................................................................................. 40
Figure 7-3 : Voting page ................................................................................................................. 41

viii
LIST OF TABLES
Table 5-1: Selection criteria against available options .................................................................... 21
Table 5-2: Selection criteria against available options .................................................................... 22
Table 5-3: Selection criteria against available options .................................................................... 24
Table 5-4:Specifications of Raspberry PI 4 board: .......................................................................... 25
Table 5-5: Selection criteria against available options .................................................................... 26
Table 5-6: Selection criteria ............................................................................................................. 29
Table 5-7:Different buzzer available and their characteristics ......................................................... 31
Table 6-2: The result of simulated power supply unit ...................................................................... 35

ix
LIST OF ABBREVIATION
AC Alternating current
DC Direct current
DRE Direct recording Electronic
ID Identity
ICR Investor confidence rating
NEC National Electoral Commission
OCR Optical character recognition
OMR Optical mark recognition
PBE Personal electronic ballot

x
CHAPTER ONE
1 INTRODUCTION
1.1 Introduction
Voting is a process that involves citizen or a group of people in an institution to collectively make
a choice on a particular contestant among listed contestants based on rules and regulations. Voting
began in very ancient times, with the need to involve every eligible member to participate in
sound decision making for the benefit of their own communities.

Back then, open ballot methods of voting were employed, where the public would just raise their
hands to vote for a particular opinion or candidate. Since then, several methods have been
developing among the voting systems, such as paper-based methods, machine voting, postal
voting, open ballot, online voting and many more.

In the United Republic of Tanzania, paper-based methods have been used since the first election
held in 1965, with the late Hon. Mwl. Julius K. Nyerere emerging as the victor of the elections.
Paper-based methods have been used in both local and central government elections in the United
Republic of Tanzania. After the adoption of multi-party politics, the Republic has had six general
elections.

Although more trustful among many, paper-based methods do have several shortcomings that link
it to the aim of this project. Paper-based voting is tedious, slow, exhaustive and not time efficient
at all. Long queues are generated with so much of human intervention in between to enable smooth
flow of the voting process. Paper-based voting also incurs null votes if voters didn’t mark
appropriately their votes. In paper-based methods, voters are limited to little flexibility in voting
at polling centers which they have been registered to.

In the current voting system, there would be a queue of processes during voting such as first, the
voter’s ID would have to be processed to verify eligibility, then he/she would get a paper/form that
he/she will fill the choices he/she prefers in a private spot, then he/she would cast the votes into
ballot boxes respectively.

This project introduces a smart voting system which digitize the paper-based method forming an
electronic one that would mitigate the challenges associated with a paper-based voting system.

1
The project aims at central government elections: Members of Parliament and Presidential
elections. This mart voting system would enable fast processing during verification, and enable
voters to vote even though not within their registered constituency. The foreseen possibilities of
this project are brought about by the available technology in the project’s locality and the need to
foster development.
1.2 Background information
Voting is a process that involves citizen or a group of people in an institution to collectively make a
choice on a particular contestant among listed contestants based on rules and regulations. Voting
began in very ancient times, with the need to involve every eligible member to participate in sound
decision making for the benefit of their own communities.
Back then, open ballot methods of voting were employed, where the public would just raise their
hands to vote for a particular opinion or candidate. Since then, several methods have been developing
among the voting systems, such as paper-based methods, machine voting, postal voting, open ballot,
online voting and many more.
In the United Republic of Tanzania, paper-based methods have been used since the first election held
in 1965, with the late Hon. Mwl. Julius K. Nyerere emerging as the victor of the elections. Paper-
based methods have been used in both local and central government elections in the United Republic
of Tanzania. After the adoption of multi-party politics, the Republic has had six general elections.
Although more trustful among many, paper-based methods do have several shortcomings that link it
to the aim of this project. Paper-based voting is tedious, slow, exhaustive and not time efficient at all.
Long queues are generated with so much of human intervention in between to enable smooth flow
of the voting process. Paper-based voting also incurs null votes if voters didn’t mark appropriately
their votes. In paper-based methods, voters are limited to little flexibility in voting at polling centers
which they have been registered to.

2
1.3 Problem Statement
Manual system of voting is tedious, exhaustive and time consuming. There fore Smart Voting system
is intending to solve problems of manual voting system.

1.4 Objectives
The objectives of this project are categorized into main, and specific objectives.

1.4.1 Main objective


To design and implement smart voting machine based on finger prints and face recognition, which
will mitigate the effect of manual voting system.

1.4.2 Specific objectives


Specific objectives compile a list of sub-individual tasks that lead to the accomplishment of the
main objective. The following is a list of the objectives:
i. To establish design specification.
ii. To design a power supply unit and interface with active components of the system.
iii. To design sensing unit fingerprint will be used for the authentication of a voter’s identity
and eligibility.
iv. To design a control unit that will hosts the main program that controls the devices.
v. To design the communication unit that will link up necessary points between the device and
a hosted database.
vi. To design display unit on which the selection interface will be displayed and choices will be
allowed through touch input.
vii. To build the prototype of the overall functional circuit.

3
1.5 Significance of the project
Below are some of the significances that are inevitable after its implementation:

i. Counting accuracy and precision is high and consistent, unlike manual counting.

ii. It reduces costs associated with the voting process.

iii. It increases the level of participation among the youth and working class.

iv. It reduces the risks of rigging elections.

v. This system allows only authenticated voting than the existing equipment as the person is
identified based on his Fingerprint and Face Recognition which is unique to each
individual.

vi. Time conscious, less time required for voting & counting.

1.6 Project methodology


This consists of the steps that will be followed toward the implementation of this project, so as to
achieve the objectives.
Below are the steps:

i. Literature review.

ii. Data collection.

iii. Data analysis.

iv. System design.

v. Prototype testing, iteration, and implementation.

vi. Report writing.

1.6.1 Literature review


At this step, a descriptive study shall be conducted with the existing systems related to this project.
The study shall focus around the basic operations of the systems. Limitations shall be discussed
and a highlight feature for the establishment of this project shall be noted.

4
1.6.2 Data collection
This step involves collection of data that will first justify the existence of the problem, and then
provide design criteria for the proposed solution. Primary data will be collected from associated
stakeholders through questionnaires, and interviews. The stakeholders for this project are voters,
the National Electoral Commission of Tanzania and candidates (both selected and not selected on
different runs). Secondary data will be obtained from journals and related articles.
1.6.3 Data analysis
Data collected in the previous step will be analyzed to establish design criteria for the project’s
implementation. Component choices for the project will be analyzed with reference to the data
collected and prototyping shall begin.
1.6.4 System design
Following the design criteria established in the data analysis stage, several systems shall be designed
accordingly to emulate the working behind the proposed system.
1.6.5 Prototype testing, iteration and implementation
The designed system shall be versioned from first prototype to final. Each version shall be tested
with regards to the objectives established to be met. Iterations shall be considered if any data is
collected during the versioning.
1.6.6 Report writing
A report shall be compiled following the procedures towards the implementation of this project.
1.6.7 Chapter summary
This chapter introduces the project, the inspiration behind its call for implementation and
methodology comprising the steps that will be done towards the accomplishment of this project.

5
CHAPTER TWO
2 LITERATURE REVIEW
2.1 Introduction
There are different types of voting methods that have been designed since the rise of technology in
the voting systems, but the most used systems are Self- contained Direct-Recording Electronic
(DRE) machines. These have been developed in different aspects, to even incorporate
accessibility features for disabled people.
The literature review in this project is taken from DRE voting systems and Optical scan
systems. The internal working principle of these machines has not been public for introspection
since they are kept abstract to limit concept inception of tampering. Therefore, just the external
introspection of the machines is discussed here: How they vote and count. [1]

2.2 Direct-recording Electronic (DRE) voting machines


2.2.1 Self- contained Direct-recording Electronic (DRE) voting machines
DRE voting machines are voting machines that record votes by means of ballot-display provided
with mechanical or electro-optical components that can be activated by the voter. These are
typically buttons or touch screen and process data using a computer program to record voting data
and ballot image in memory components. After the election, it produces a tabulation of the voting
data stored in a removable memory components and as printed copy. See Fig. 2.1 below.

Figure 2-1: India’s DRE Voting Machine

On the right is the tab containing a list of candidates against a button which is pressed upon
selection of the preferred candidate. DRE voting machines are not connected to the internet due to
security issues.

6
2.2.2 Ivotronic direct recording system

Figure 2-2. iVotronic system

Ivotronic is the direct recording system with a touch screen interfaces that record votes in internal
flash memory. A poll worker uses a device called a personal electronic ballot (PBE) to turn the
machine on and enable voting. Voters choose their ballot language and then make their
selections using a touch screen, When the polls close, polls workers move summary data from
each machine onto the Personal electronic ballot. The PEBs are then transported to election
headquarters or their contents transmitted via a computer network. [2]

7
2.3 Optical Scan Voting Systems
Optical scan voting systems use optical recognition features to recognize marked symbols labeled
as votes on ballot papers. So, a ballot paper of a format such as one shown in Fig. 2.3 below on the
counting machine is given to a voter. The voter marks his/her preferred candidate with the standard
symbol. During counting, the ballot papers are fed into the counting machine which then reads the
symbols and counts them into votes. [2]

Figure 2-3: The OPTECH III-P, an optical scan system


Optical scan voting systems are mainly classified as either OCR, OMR, or ICR .

2.4 Existing system in our country


In our country, all votes are counted manually at a polling station. The voters are given a ballot paper
with the candidates listed on it and choice options as shown in Fig. 2.4 below.

8
Figure 2-4: Ballot paper

The voter marks his preferred candidate and folds the paper and puts it into a ballot box. After
closing the voting process, residing officers and polling agents at the polling station start the
counting. The counting is done loud and clear, categorizing each ballot paper into the registered
campaigned parties. A count is established and records are sealed and recorded into the national
register for summing up the state elections.[3]

2.5 Limitations of the existing systems

The single limitation observed among these systems that inspires the implementation of this project
is that most do not incorporate voter verification procedures, so a queue of physical steps exists.
Other limitations are such as the presence of null votes among ballot papers especially in paper-
based voting method. [5]
2.6 Chapter summary
Electronic voting systems have been developed highly to sophisticated levels. This chapter has
highlighted two major e-voting systems, and the existing system in our country. The limitations
associated with them are the key inspiration to the build-up of this project.

9
CHAPTER THREE
3 PROPOSED SYSTEM
3.1 Introduction
This chapter describes the functions of functional block and structure of the proposed system. The
information provided in this chapter will be used as a guideline for the design of the working
prototype.

3.2 Proposed system


Smart electronic voting system is basically introduced to solve the problems identified in manual
voting systems.

3.3 Block diagram of the proposed system


The proposed system is shown in Fig. 3.1. different units are represented in the block diagram
with their respective functionality.

Figure 3-1: Block diagram of the proposed system

10
3.4 Parts of the proposed system
3.4.1 Power supply
The power supply unit supplies power to all subsystem of proposed system in order for the devices
to operate.
3.4.2 Sensing unit
Fingerprint module used for recognizing and authenticating the fingerprint of the voters. Also
sensing unit comprise of image capturing unit which used to authenticate voter identity by
matching the voter face against a data base of faces. [6]
3.4.3 Display unit
The function of this unit is to display the warning message for the voter who is barred from polling
his vote when the data from the reader is not matching with the pre-stored information
of the registered fingerprint and Face. Also used to display the candidates when the
voter is allowed to cast his/her vote.
3.4.4 Communication unit
Communication unit used to connect control unit to a remote system/database so as to allow the
comparison of the data from reader and the pre stored data.
3.4.5 Control unit
The control unit is used as the main circuit of the proposed system. It is programmed to give
command when the data from leader is required to be compared with the pre stored information in
the data base.
3.4.6 Driver circuit
This is used to boost the current to the level that needed by Alarm module.
3.4.7 Alarm module
Alarm module is used to produce audible signal when the data from the reader is not matches with
the already existing data stored during the registration of the voters.
3.4.8 Interfacing circuit
This is used for interconnection between control unit and sensing unit.
3.4.9 Data base server (NEC Service)
This is used to store information of the registered voters fingerprint and Face identity.

11
1.5 Principle of operation
The flow of operation of the proposed system highly depends on the predefined location of the
device. The paragraph below sequences a series of steps followed towards the operation of the
system.
First the person at the polling booth needs only to place his Finger in finger print scanner and capture
the face identity in camera at the counter of the polling booth, thus allowing the acquisition of an
on-spot Fingerprint and Face from the voter which serves as an identification. This data is passed
on to the data base server for the verification. Then the data from the reader is compares with the
already existing data stored during the registration of the voters. If the data matches with the pre-
stored information of the registered fingerprint and Face, the person is allowed to cast his vote. If
not, a warning message is displayed on LCD and warns through the voice by this way, the person
is barred from polling his vote. The vote casting mechanism is carried out manually using LCD,
since LCD is used as the input device also is used to display the related messages, warnings and
ensuing results.[2]

3.6 Significances of the proposed system.


The significances of implementing this project are outlined below:

i. Counting accuracy and precision is high and consistent, unlike manual counting.

ii. It reduces costs associated with the voting process.

iii. It saves time.

iv. It increases the level of participation among the youth and working class.

v. It reduces the risks of rigging elections.

3.7 Scope/ limitation of the proposed system.


Different electronic voting systems have had abundant features to work with a wide scope of people
such as people with disabilities, but the scope of this project is only a novel introduction to our
country. So basic features have been incorporated into it at the moment following the locality
descriptions of our nation. [2]

12
3.8 Chapter summary.
This chapter provide details about what and how the system is constituted. It is also explaining how
the system works by analyzing the function of each block in the system.

13
CHAPTER FOUR
4 DATA COLLECTION
4.1 Introduction
Data collection is the systematic approach to gathering information from a variety of sources to get
a complete and accurate picture of an area of interest. Data collection enables a person or organization
to answer relevant questions, evaluate outcomes and make predictions about future probabilities and
trends. Also, it contains information to facilitate the design of proposed system, that is the design
requirement.
Data collected in this project was mainly aimed at measuring the following concepts:

a) Technology literacy

b) Feasibility in operational and legal aspects

Most of this data has been acquired through questionnaires and secondary tools such as articles.
The primary data was collected using questionnaires. The questionnaires for this research can be
found in the Appendix B.
4.2 Primary data
This primary data has been acquired from voters. Below are some visual representations of the data
collected from voters on some key aspects explained in the introduction above:
a) The response shown in Fig. 4.1 was obtained from the questions whose intent was
to understand the awareness of smart voting systems in our country for which 75% of the
voter are aware about the smart voting system and 25% are not aware of it.

NO, 25%

YES, 75%

Figure 4-1: smart voting system awareness pie chart

14
b) The response shown in Fig. 4.2 was obtained from the questions whose intent was to check
about the security awareness in smart voting systems, in which 80% of the voters are aware
and 20% are not aware about the security on smart voting system.

NO, 20%

YES, 80%

Figure 4-2: Security awareness pie chart

c) Operational feasibility concerns matter about legality of a proposal, its operation


readiness and other concerns that could hinder the takeoff of the project. Most responses
(70%) deemed it operational feasible. The few ‘No’s about 30% offered insightful
concepts on why the operation could be hindered. The responses are surmised in see Fig.
4.3.

NO, 30%

YES, 70%

Figure 4-3: Operational feasibility

15
The following are the data collected from (NEC) National Electoral Commission
Table 4-1: Collected data from (NEC)
QNs QUESTIONS RESPONSES
NO
1. What Electronic voting system are you  Online (internet) voting system
aware about?  Direct-Recording Electronic
(DRE)
 Optical Scanning System
 Punch Cards Electronic voting
system

2. Are you aware of the security risks that are Electronic voting and especially Internet
associated with Electronic voting? voting systems are vulnerable to denial of
service attacks, spoofing attacks,
malicious code attacks, spyware attacks,
remote management attacks, and
automated vote selling schemes. These
attacks are powerful enough to
compromise Trust and Privacy. They can
be launched by anyone in the world, from
a disturbed teenager to a foreign
government. These vulnerabilities are
quite fundamental
3. Do you think it is feasible to implement a Voting is a unique task with many
smart electr onic voting system in distinctive challenges. One of the most
Tanzania? difficult aspects of elections is the
extraordinary trust and privacy
requirements.
Digital technology in a form of smart
electronic voting system has a potential
for multitude of benefits compared to
traditional voting systems however
providing guaranteed trust and privacy to
all stakeholders’ laypersons and
professionals alike in a form of complex
technology soup may is challenging.
Currently, even the highly developed
societies with broad spectrum of
technology resources available at their
disposal are reluctant to use electronic
voting.
Therefore, until a proper solution to smart
electronic voting guarantees Trust and
Privacy that can be accepted by electoral
stakeholders, only then will it be feasible
16
to implement smart electronic voting
systems in Tanzania.
4. What are the challenges that you think  Security risks outlined above
would hinder the implementation of this  Communication Network coverage
project? concerns in some parts of the
country.
 Cost of implementation.
 Trust and privacy concerns from
electoral stakeholders including,
Political parties, Candidates,
Observers and Voters and the
General public.

Based on the primary data collected from voters and from National Electoral Commission (NEC), it
is feasible to implement a smart electronic voting system in Tanzania. This is because voting is a
unique task with many distinctive challenges. One of the most difficult aspects of elections is the
extraordinary trust and privacy requirements so, through digital technology like smart electronic
voting system there is a potential for multitude of benefits compared to manual voting systems
however providing guaranteed trust and privacy to all stakeholders’ laypersons and professionals
alike in a form of complex technology soup may became a challenging situation.
4.3 Secondary data
This part describes the data that has been collected by considering the advantages, characteristics
performances as well as availability of the component and devices. Besides data of the real situation
in the relation to the proposed system, data about different parts of the proposed system were
collected and presented as the table below.
4.3.1 Finger print sensor
A finger print sensor is used to input and read the fingerprint data.The finger print sensor for this
system can be chosen from a range of available sensors. The choice of a finger print sensor depends
much upon the requirements of the system design like what kind of people will be using the
system,amount of people,the budget and the control unit to which the finger print sensor will be used
on. The followings are some parameters used to decide the type of used finger print sensor.

17
Table 4-2: Oversighted design requirement for fingerprint sensor

Design criteria Design requirement

Operating voltage 3.6 - 6.0VDC

Operating current 120mA max

Fingerprint imaging time 1.0 sec

Window area 14𝑚𝑚 × 18𝑚𝑚

FLASH memory capacity 162

Security level (FAR & FFR) Level 3

Working temperature rating -20C to +50C

Full Dimensions 56 x 20 x 21.5cm 56 x 20 x 21.5cm

Cost Affordable cost


4.3.2 Image capturing unit.
For facial recognition there are some features to consider for each individual elector face. Those
features are such as
i. The shape of the cheekbones
ii. Distance between the eyes
iii. Depth of the eye sockets
iv. Width of nose
v. The length of jaw line
Table 4-3: Requirement for image capturing unit

Design criteria Design requirements

Operating voltage 5V

Sensitivity 700Mv/lux -sec

Resolution 2500×2000

Signal to noise ratio 40dB

Weight >100g

18
Cost Affordable

4.3.3 Power supply


The power supply unit supplies power to all subsystem of the proposed system in order for the device
to operate. The choice of a power suppy depends much upon the requirements of the system design
such as input voltage,temperature range and product life.The table below gives an overview of
required specifics of the power supply to be implemented.
Table 4-4: An oversight of design requirements for the power supply.

Design criteria Design requirement

Power supply used Regulated power supply

Output voltage 5VDC,12VDC

Operating time 12hours min

Power source Main grid or battery


Main grid or battery
Output current 2A max
DC power
Power source
4.3.4 Display unit
Main grid or battery
A Display is a device for presentation of images, text, or video transmitted electronically without
Operating voltage
producing
RegulatedaDCpermanent
voltage record.The dsplay unit for this system can be chosen from a range of
available displays. The choice of a display unit depends much upon the requirements of the system
design such as display technology, resolution,screen size,ports, and refreshing rate. Below are
design requirements for the display unit.
Table 4-5: An oversight of design requirements for the display unit

Design criteria Design requirement

Screen resolution 800× 480 pixel

Size 7”

Peripheral HDMI support

Refresh rate 60Hz

Operating voltage 5VDC


19
Operating current 500𝑚𝐴(full brightness)
4.3.5 Control unit
A control unit is used to process the signal from input and produce the required output in
accordance to the system. The control device for this system can be chosen from a range of
available controllers. The choice of a controller depends much upon the complexity of the
system design. The followings are some parameters used to decide the type of used control unit.
Table 4-6: Design requirements for the control unit

Design criteria Design requirement


Operating voltage 5V
Operating current 2A
RAM 1GB
Processing speed 1GHz
GPIO pins 24
Operating frequency 1GHz
Cost Affordable

4.3.6 Alarm module


This is the device used as the alerting device , then the most importance things to consider when
selecting alarm module are what kind of alert needed and signal level.
Table 4-7: Design criteria for alarm module
Parameter Requirement
Voltage range 4 – 8VDC
Resonant frequency ~2300𝐻𝑧
Oscillator Built in oscillator

4.4 Chapter summary


The data collection chapter based on learning the scope of the problem statement by gathering
information from the people involved. Primary and secondary data extraction methods have been
used to gather this information for selecting suitable components in the next chapter.

20
CHAPTER FIVE
5 DATA ANALYSIS AND SYSTEM DESIGN
5.1 Introduction
This chapter details analysis of data collected in Chapter four and the design of the system following
the components chosen. Based on design criteria established in Chapter four, unit blocks of the
proposed system shall be designed. Blocks shall be analyzed both qualitatively and quantitatively
until a selection is made out of some proposed common components. A set of observations were
obtained from the data collected.
5.2 Selection of unit block components
5.2.1 Fingerprint sensor
The sensing unit consists primary of the fingerprint sensor which reads unique patterns termed as
‘minutiae’. Minutiae are unique patterns formed by ridge and valley features found at the fingertips
of human finger.
5.2.1.1 Selecting suitable fingerprint sensor
Based on the design criteria established in chapter four for a required fingerprint sensor, the table
below show two available fingerprint sensors which shall be compared and one selected.
Table 5-1: Selection criteria against available options

Design criteria from data collected

Design criteria Design requirements DY50 R305

Operating voltage 3.6 – 6.0 VDC 3.6 – 6.0 VDC(agree) 3.6 – 6.0 VDC(agree)

Operating current 12OmA 12OmA(agree) 100mA(disagree)

Finger print imaging 1.0 sec <1.0 sec(agree) <0.5 sec(disagree)


time

Window area 14 x 18 mm 14 x 18 mm(agree) 19 x 15


mm(disagree)

FLASH memory 162 bytes 256 bytes(disagree) 256 bytes(disagree)


capacity

Security Level 3 Level 3(agree) Level 5(disagree)


level(FAR&FFR)

21
Working temperature -20℃ to +50℃ -20℃to -20℃to +
rating +50℃(agree) 45℃(disagree)

cost Affordable Tsh. 35,000/= Tsh. 75,000/=

From the options in table 5.1 above, the DY 50 is suitable for the proposed system.

Figure 5-1: Fingerprint module DY50


An optical biometric fingerprint (DY50) is used to input and read the fingerprint data. It uses TTL
serial and can connect to a microcontroller to send data, detect prints, hash and search. The module
has FLASH memory of its own.

Figure 5-2: Pin configuration of DY50

5.2.1.2 Image capturing unit


Table 5-2: Selection criteria against available options

Design criteria from data collected Modules


Design criteria Design requirements 0V7670 Raspberry pi USB webcam
camera camera
Operating voltage 5V 5V 5V 5V
Sensitivity 700Mv/lux-sec 1.3V/lux-sec 680Mv/lux-sec 12000Mv/lux-
sec
Resolution 2500 × 2000 640 × 480 2592 × 1944 1920 × 1080

22
Signal to noise ratio 40dB 46dB 36dB 39dB
Weight >100g 100g G.W 17g 100g
Cost Affordable Tsh. 30,000/= Tsh. 35,000/= Tsh. 75,000
From the table 5.2 USB webcam camera is more preferred for this project since its affordable and
meet some project requirements.

Figure 5-3: USB webcam camera

5.2.2 Control unit


Control Unit is the part of the computer’s central processing unit (CPU), which directs the operation
of the processor. It is the responsibility of the Control Unit to tell the computer’s memory,
arithmetic/logic unit and input and output devices how to respond to the instructions that have been
sent to the processor. It fetches internal instructions of the programs from the main memory to the
processor instruction register, and based on this register contents, the control unit generates a control
signal that supervises the execution of these instructions.
Control units process instructions at a speed equal to the clock speed set by the oscillator of the
system.
5.2.2.1 Qualitative analysis of control unit.
Following the design criteria established in Table 4.5, the options below are compared against each
other to obtain a single choice for design in the system.

23
Table 5-3: Selection criteria against available options

Design criteria from data collected

Design criteria Design requirements Raspberry pi3B+ Raspberry pi4

Operating voltage 5V 5V 5V

Operating current 2A 2.5A 3A

RAM(bytes) 1GB 512Bytes to 1.2GB 2GB to 4

Processing speed 1GHz 700MHz to 1.2GHz 1.8GHz

GPIO pins 24 40 40

Operating frequency 1GHz 1.4GHz Vs 1.2GHz 1.5GHz

Cost Affordable 240,000 400,000

According to the data provided in chapter four and data provided from the table above, Raspberry
pi 4 is suited to be a control unit of this project, there fore Rasspberry pi 4 is selected.The physical
appearance and pin configuration of the selected Rasspberry pi 4 is illustrated bellow.

Figure 5-4: Physical appearance of Rasspberry pi 4

24
Figure 5-5: Raspberry pi 4 pin configuration
Table 5-4:Specifications of Raspberry PI 4 board:

PIN GROUP PIN NAME DESCRIPTION

POWER SOURCE +5V, +3.3V, GND and Vin +5V -power output
+3.3V -power output
GND – GROUND pin

COMMUNICATION UART Interface(RXD, UART(Universal Asynchronous


INTERFACE TXD) [(GPIO15,GPIO14)] Receiver Transmitter) used for
interfacing sensors and other devices.

SPI Interface(MOSI, SPI (Serial Peripheral


MISO, CLK,CE) x 2 Interface) used for
[SPI0-(GPIO10 communicating with other
,GPIO9, GPIO11 boards or peripherals.
,GPIO8)]
[SPI1--(GPIO20
,GPIO19, GPIO21
,GPIO7)
TWI Interface(SDA, TWI (Two Wire Interface)
SCL) x 2 Interface can be used to
[(GPIO2, GPIO3)] connect peripherals
[(ID_SD,ID_SC)]

25
INPUT/OUTPUT PINS 26 I/O Although these some pins have
multiple functionsthey can be
considered as I/O pins.

PWM Hardware PWM available These 4 channels can provide PWM


on GPIO12, GPIO13, (Pulse Width Modulation) outputs.
GPIO18, GPIO19
*Software PWM available on all pins

EXTERNAL All I/O In the board all I/O pins can be used
INTERRUPTS as Interrupts

5.2.3 Display Unit


The display unit is the sub-system of the proposed system that used to display the whole process
carried out during votting system like to show whether the finger print placed is registered or not
registered, the face identity placed is registered or not registered also used to display the status of
the candidate. The display with enough size , readability,brightness, less power consumption is
required. In the selection of diplay the basic requirement according to data collected were as follows
i. It should operate with 5V dc supply
ii. It should be easily to interface with microcontroller
iii. It should be low cost
5.2.3.1 Qualitative analysis of display unit
The table 5.5 below follows the design criteria established in Chapter four,
Table 5-5: Selection criteria against available options

Selection criteria Design requirements TFT Mega Touch LCD touch


Display module

Resolution 800 × 480 pixel 240x320 RGB 640x480 RGB

Size “7” 3.5inch 7inch

Peripheral HDMI support HDMI support HDMI support


Refresh rate 60Hz 29Hz 60Hz

Operating voltage 5VDC 2.5-3.6V 3-5.5V

Operating current >150mA(full brightness) 200mA 500mA

Cost Affordable Tsh. 35,000/= Tsh. 240,000/=


26
The TFT Mega touch module fits well under requirements based on cost affordability
5.2.3.2 Software interface of TFT Mega touch module
TFT display receive data from Raspberry pie 4 and communicate through computer software
program.

Figure 5-6: The software model of TFT Display

5.2.4 Power supply unit


The power supply unit is the sub-system of proposed system, which require to power the whole
proposed system. The input power is battery source 12V DC. Output of the power supply is +5V.
5.2.4.1 Qualitative analysis of power supply unit
To convert 12V DC to +5V requires procedures from input to output. Voltage regulator LM7805 is
required so as to regulate 12V to 5V.

27
Figure 5-7: Regulator pinout

From the 7805 IC datasheet the following rating and application


i. Input voltage range 7V- 35V
ii. Current rating Ic = 1A
iii. Output voltage range VMax=5.2V, VMin=4.8V
A 0.33uf capacitor is connects across input and 0.1uF across output.
The LM7805 is simple to use. First connect the positive lead of our unregulated DC power supply
Input pin, connect the negative lead to the Common pin and then when we turn on the power, we
get a 5 volt supply from the Output pin.

Figure 5-8:Power suppy circuit

28
5.2.5 Driver circuit
A relay driver circuit is a circuit which can drive or operate a relay so that it can function
appropriately in a circuit. In this project a driven relay operate as a switch which can be open or close
according to the need so as to manage the alarm module.
5.2.5.1 Qualitative analysis of driver circuit
Table 5-6: Selection criteria

S/N Features 2N2222 2N3055 BC549

1 Polarity NPN NPN NPN

2 Maximum collector power 0.5W 117W 0.5W


Dssipation

3 Maximum collector -base 60V 100 50V


Voltage

4 Maximum collector-base 30V 70 50V


voltage(Vbc)

5 Max emitter- base 5V 7 6V


voltage(Vbe)

6 Max collector current(Ic 0.8A 15A 0.1A


max)
7 Max operating junction 175℃ 200℃ 150℃
temperature

8 Transistor Frequency (ft) 250MHz 0.2MHz 300MHz

9 Collector Capacitor (Cc) 8Pf 6Pf

29
The software model of driver circuit is shown below

Figure 5-9: relay driver circuit

Equation for base current


𝐵𝑎𝑠𝑒 𝑐𝑢𝑟𝑟𝑒𝑛𝑡 (𝐼𝑏 ) = 𝐸𝑚𝑖𝑡𝑡𝑒𝑟𝑐𝑢𝑟𝑟𝑒𝑛𝑡(𝐼𝑒 ) − 𝐶𝑜𝑙𝑙𝑒𝑐𝑡𝑜𝑟 𝑐𝑢𝑟𝑟𝑒𝑛𝑡(𝐼𝑐 )

𝐼𝑏 = 𝐼𝑒 − 𝐼𝑐
From the table above for BC547
Gain (hFe)= 𝛽 = 100
From choosen relay, trigger current
𝐼𝐶 = 70 𝑚𝐴
This current will be required to trigger the transistor for producing the audible signal of the buzzer.
𝐵𝑎𝑠𝑒 𝑣𝑜𝑙𝑡𝑎𝑔𝑒 𝑎𝑣𝑎𝑖𝑙𝑎𝑏𝑙𝑒 𝑉𝑏 = 5𝑉𝑑𝑐,

𝑇𝑟𝑎𝑛𝑠𝑖𝑠𝑡𝑜𝑟 𝑣𝑜𝑙𝑡𝑎𝑔𝑒 𝑑𝑟𝑜𝑝 𝑉𝑑 = 0.7𝑉


𝑇ℎ𝑒𝑟𝑒𝑓𝑜𝑟𝑒, 𝑏𝑎𝑠𝑒 𝑟𝑒𝑠𝑖𝑠𝑡𝑎𝑛𝑐𝑒𝑅𝑏 = (𝑉𝑏−𝑉𝑑)/𝐼𝑏 = (5𝑉𝑏−0.7𝑉𝑑)/0.7𝑚𝐴 = 6,142.8Ω

𝑇ℎ𝑢𝑠, 𝑡ℎ𝑒 𝑠𝑒𝑙𝑒𝑐𝑡𝑒𝑑 𝑏𝑎𝑠𝑒 𝑟𝑒𝑠𝑖𝑠𝑡𝑎𝑛𝑐𝑒 = 6.1𝐾Ω


Therefore, The transistor NPN BC 549 is chosen as it give the low base current value and its
operating voltage is 5V DC.
5.2.6 Alarm module
The alarm system unit is the sub-system of proposed system that used to produce audible signal
when the data from the reader is not matches with the already existing data stored during the
registration of the voters.The basic requirements of alarm system are ;

30
i. It should have high sound pressure
ii. It should have built in oscillator
iii. It should have loud low frequency.
There are variety types of alarm systems in the market so that the qualitative analysis must be done
for good choice of the alarm system based on basic requirements.
5.2.6.1 Qualitative Analysis of Alarm unit
There are varies buzzers or beepers have been designed for different applications. A buzzer or beeper
is an audible signaling device , which may be mechanical, electromechanical and piezoelectric. The
human audible range is between20Hz and 20000Hz. The buzzer suitable for this project is in
frequency of 20000Hz for it is the range of alarm system. The following are the basic requirements
of buzzer, in orger to choose the suitable buzzer for this project the qualitative analysis has to be
done. table below represents buzzer and their characteristics.
Table 5-7:Different buzzer available and their characteristics

Design criteria from data collected

Selection Design Electromechanical Mechanical Piezoelectic


criteria requirements buzzer

Voltage range 4 – 8V It has wide range 8-15 3-30

Resonant ~2300𝐻𝑧 Loud low 300-500 2000-10000


frequency frequency

Oscillator Built in Built in oscillator Built in Built in


oscillator oscillator oscillator

From table above piezoelectric buzzer is chosen for this project as it meets all necessary
requirements.

Figure 5-10:The foftware model of a buzzer

31
5.3 Software Design
In order to interface each sub system of the proposed system with Raspberry pie 3B+ ,then the
algorithm of software program must be designed to achieve the main objective of the designed
system.
5.3.1 Qualitative Analysis of Software Design Tool
After the design process of the system then it requires some software design tool to realize the
designed system. The software design tool employed in this project is proteus software.
5.4 Overall Circuit Diagram of Proposed System
It consists the schematic diagram of power supply, control unit,Finger print sensor ,Image capturing
unit ,Display unit, Driver ciruit,Alarm module, Communication unit and Data base. Figure shows
overall circuit diagram of whole proposed system which is to be simulated.

Figure 5-11:The Overall Schematic Diagram of Designed System

5.5 The flow chart of the Designed system


A flow chart is the diagram that is used to show the flow of the steps or process of the system

32
between different stages. Figure describe the units of the flow chart of the designed system.

Figure 5-12: System flowchart

5.6 Chapter summary


This chapter has described about data analysis and system design. It has shown how the blocks of
the proposed system have been opened and how components value has been calculated by using
suitabledesign equations. The simulation of the designed system , its results and discussion of its
result are explained in the next chapter.

33
CHAPTER SIX
6 SIMULATION
6.1 Introduction
This chapter discusses the simulation of parts of the system to be implemented. Simulation tools,
software, constraints, and testing procedures are discussed.Not only that but also it presents the
simulation results and their discussions. Electronic circuit simulation uses mathematical models to
replicate the behavior of an actual electronic device or circuit.
6.2 Simulation software
The software designated to be used in simulating the system is Proteus ISIS 8.10. The software
supports a wide variety of electronic system.
6.3 Simulation constraints
The simulation setup in proteus is limited to the following from the context of this project:

 The programming language used in this design is Python. Though the software supports
python interpreters, it is limited to importing only predefined libraries.
6.4 Performance parameters and simulations
The performance parameters in each simulation are detailed under this subsection
6.4.1 Output from the power supply
The system requires a DC power supply of 5V. The power supply is tested at input and after
regulation to obtain the required voltage . A battery is used in this case . A regulator is set after the
battery to obtain a fixed voltage . See fig 6.1 for a simulation snapshot of the power supply output
voltage.

Figure 6-1: Power supply simulation snapshot

34
Table 6-1: The result of simulated power supply unit

Testing Nodes (points) Measured values (V)

The input voltage from battery 12

Output voltage from regulator 5

6.4.2 Simulation when the voter finger print and face identity is registered.
Finger print sensor work by capturing the pattern of ridges and valleys on finger. The information
is then processed by the device’s pattern analysis/matching software, which compares it to the list
of registered finger prints on file.For simulation purpose, a push button has been used instead of
finger print sensor. Also green LED proved an alert for registered finger print .
Facial recognition camera uses computer generated filters to transform face image into numerical
expression that can be compared to determine their similarity.For simulation purpose push button
used to represent the face identity of the voter and green LED alerting for registered face identity.

Figure 6-2:Registered voter finger print and face identity

35
6.4.3 Simulation when the voter finger print and face identity is not registered.
On simulation red LED alert for unregisterd voter also buzzer produce an audible signal.

Figure 6-3: Unregistered Finger print and Face identity.

6.5 Overall Simulation and Result Discussion


Based on simulation results,the overall system performance is good since the simulated parameters
are very close to the expected results.The overall designed system have been described in the specific
objectives.

36
Figure 6-4: Overall simulation

6.6 Chapter Summary


This chapter has detailed about the simulation tools,software,constrains,performance
parameters,results and discussion from the simulated components. The results section briefly keys to
the successful simulation of the supported components.

37
CHAPTER SEVEN
7 PROTOTYPE TESTING AND IMPLEMENTATION
7.1 Introduction
This chapter discusses the implementation process, from low-level prototype to high-level
prototype. It includes the iterations in software processes that successfully led to the proper
interfacing and full operation of the system.
7.2 Module interfacing
The central processing unit designated for this project is the ARM-based Raspberry Pi 4. The SBC
runs on Raspbian: a Debian-based operating system for Raspberry Pi’s. The SBC is mainly
programmed or interfaced using C, C++ or Python programming languages. Interfacing done in this
project is programmed using Python language.
7.2.1 Fingerprint interfacing
Fingerprint sensors communicate with Raspberry Pi 4 using Transistor-Transistor Logic (TTL) serial
communication: HIGH (3.3V) or LOW (0V). The Raspberry pi 4 does not allow direct TTL
communication between its microprocessor and TTL-based peripherals. In this case, a TTL converter
has to be used so as a TTL-based device can be interfaced to the microcontroller. For better
performance, the sensor is place on direct UART physical pins (GPIO14 & GPIO15) on the SBC.
7.2.2 Image capturing interfacing
Camera interface with Raspberry pie through by USB and Ethernet port.
7.2.3 TFT display interfang
TFT display communicate with Raspberry Pi 4 using spi interface and operate with 5V dc supply.
7.3 Results
The prototype is successfully integrated as seen in the figure 7.1 below.

38
Figure 7-1: The prototype interfaced (with casing)

39
Figure 7-2: Registration page

40
Figure 7-3 : Voting page

41
7.4 Chapter summary
This chapter details the implementation for the prototype. Interfacing requirements have been
highlighted and been interfaced as required for proper functioning of the prototype. Generally, the
prototype works as the system flowchart proposed in chapter three.

42
CHAPTER EIGHT
8 CONCLUSION AND RECOMMENDATION
8.1 Conclusion
The project aimed to design and implement smart voting machine based on finger prints and face
recognition, which will mitigate the effect of manual voting system.
Senior project II compiles a report continuing from the first four chapters of senior project I. This
report compiles the system design, simulation and prototyping phase of the voting device.
An introduction of the project has been given containing the background information of the problem
to be solved which is the tedious and exhaustive tasks involved in paper-based voting methods. A
detailed explanation of the paper-based voting method our country uses has been given following the
laws enacted for voting in the National Elections Act (2016 revision) that show how the voting
process is tedious and exhaustive. A methodology is then established that is to be followed towards
the implementation of this project.
A literature review was done around devices already made. The literature review about these devices
is so limited to outer feature functionalities due to the security required by their systems. Electronic
voting machines are partially novel to our country, so the study was done on abroad devices. There
have been several designed electronic voting machines, but two major classes were discussed: Direct-
Recording Electronic voting machines and Optical Scan Systems. A single key limitation has been
pointed out that inspired the development of this project.
The proposed system is detailed in chapter three. It details the proposed system using a block
diagram, and some descriptive explanations.
To work out the solution’s features, data had to be collected from stakeholders of the problem in
status. The data collected focused on understanding concepts of technology literacy and the
operational feasibility around the implementation of the project. A sample space of 37 people was
obtained within the one-week window that was available for data collection. This data was the
primary data. Secondary data was extracted from the country’s National Electoral Commission site,
nec.go.tz.
The data analysis chapter goes hand in hand with the system design chapter, where technical
specifications and design of parts of the proposed system where set.
Specific objectives including design power supply unit and interface, design sensing unit
fingerprint,control unit , communication display unit, build the prototype of the overall functional
circuit were achieved successful . Hence the system has been developed by considering the
43
mentioned objectives and finaly smart voting machine based on finger prints and face recognition
has been developed , simulated , tested and work successfully

44
8.2 Recommendation
The aim of this project was to design and implement smart voting machine based on finger prints
and face recognition, which will mitigate the effect of manual voting .
Also as the prototype had been completed and in working condition. Moreover, it is recommended
that, it should be tested in real environment and employed for use in the elections so as to reduce the
existing problem.

45
REFERENCES
[1] H. Mohammed, "Fingerprint Base Electronic Voting System," 2008.
[2] ECI, " Electronic Voting machine.," 02 02 2022. [Online]. Available:
https://eci.gov.in/faqs/evm/generalqa/electronic voting-machine-r2/. .
[3] L. Ada, " Adafruit Optical Fingerprint sensor.," 16 02 2021. [Online]. Available:
https://cdnlearn.adafruit.com/downloads/pdf/adafruit-optical-fingerprint-sensor.pdf. .
[4] Homepage, "National Electoral Commission.," 12 02 2020. [Online]. Available:
https://www.nec.go.tz/..
[5] Nilspeace, " A memo on the Tanzania 2020 Elections.," 25 01 2022. [Online]. Available:
https://minbane.wordpress.com/2020/10/25/https-wp-me-p1xtjg-fiv/. .
[6] ECI, " Electronic Voting machine.," 15 01 2022. [Online]. Available:
https://eci.gov.in/faqs/evm/generalqa/electronic voting-machine-r2/. .
[7] M. Othman, " Compendium of electoral laws.," 22 01 2022. [Online]. Available:
https://www.politicalpartydb.org/wpcontent/uploads/Statutes/Tanzania/Tanzania_Compendium-
of-Electoral-Laws-andRegulations_2016.pdf.
[8] ECI, "Electronic Voting machine.," 2018. [Online]. Available:
https://eci.gov.in/faqs/evm/generalqa/electronic- voting-machine-r2/. Accessed 12/02/2021..

46
APPENDIX A
Senior Project I
Activity Duration of the project in weeks

1 2 3 4 5 6 7 8 9 10 11 12 13

Selection of project title

Title defending

Re writing proposal

Literature review

Data collection

Report writing

Report submission

Senior Project II
Activity Duration of the project in weeks

1 2 3 4 5 6 7 8 9 10 11 12 13 14

Data analysis

Circuit design

Simulation

Prototype building

Report writing

Report Submision

47
APPENDIX B
APPROXIMATED BUDGET
APP Item Unit price Required Subtotal
ROXI
1 Raspberry Pi 4 400,000 1 400,000
MAT
2 Fingerprint sensor 75,000 1 75,000
ED
3 Display & accessories 200,000 1 200,000
BUD
4 Image capturing unit 56,000 1 56,000
GETS
5
/no. Alarm module 12,000 1 12,000
6 Stationery 70,000 1 70,000
7 Casing 80,000 1 80,000
Total 893,000

APPENDIX C
There have been different voting systems since the beginnings of democracy, from hand raising to
the novel electronic systems available to-date. In our country, the United republic of Tanzania, we
have been using paper-based systems since our independence.
As a final year student, I am intending to implement a smart electronic voting system for the
general elections. The data collected in this form will be used to establish design criteria for this
project.

NOTE: No personal data will be collected in this form.


* Required
1. Are you aware of electronic voting systems? *
Mark only one oval.

Yes,

No

2. How efficient are they compared to the current methods being used in our country? *
Mark only one oval.

1 2 3 4 5

48
3. Would you trust machines to do the counting in electronic voting systems? *
Mark only one oval.

1 2 3 4 5

4. Do you think it is feasible to implement a smart electronic voting system in Tanzania? *

Mark only one oval.

Yes

No

5. Would you trust a few able-bodied technicians to service and maintain the electronic voting
systems? * Mark only one oval.

1 2 3 4 5

6. Have you ever voted outside your registered poll station? *

Mark only one oval.

Yes

No

7. What are the challenges you faced as you voted outside your polling station?

49
APPENDIX D
Paper based voting system has been used as a method to vote during elections. In our country, the
United republic of Tanzania, we have been using paper-based systems since our independence.
As a final year student, I am intending to implement a smart electronic voting system for the general
elections. The data collected in this form (NEC) will be used to establish design criteria for this
project.
1. What electronic voting systems are you aware about? *

2. Are you aware of the security risks that are associated with electronic voting? *

3. Do you think it is feasible to implement a smart electronic voting system in Tanzania? *

4. What are the challenges that you think would hinder the implementation of this project? *

5. Please fill here any additional recommendations

50
APPENDIX D
Interfacing code for fingerprint sensor
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT
import time
import board
#import busio
from digitalio import DigitalInOut, Direction
import adafruit_fingerprint
led = DigitalInOut(board.D13)
led.direction = Direction.OUTPUT
#uart = busio.UART(board.TX, board.RX, baudrate=57600)
# If using with a computer such as Linux/RaspberryPi, Mac, Windows with USB/serial converter:
# import serial
# uart = serial.Serial("/dev/ttyUSB0", baudrate=57600, timeout=1)
# If using with Linux/Raspberry Pi and hardware UART:
import serial
uart = serial.Serial("/dev/ttyS0", baudrate=57600, timeout=1)
finger = adafruit_fingerprint.Adafruit_Fingerprint(uart)
##################################################
def get_fingerprint():
"""Get a finger print image, template it, and see if it matches!"""
print("Waiting for image...")
while finger.get_image() != adafruit_fingerprint.OK:
pass
print("Templating...")
if finger.image_2_tz(1) != adafruit_fingerprint.OK:
return False
print("Searching...")
if finger.finger_search() != adafruit_fingerprint.OK:
return False
return True
51
# pylint: disable=too-many-branches
def get_fingerprint_detail():
"""Get a finger print image, template it, and see if it matches!
This time, print out each error instead of just returning on failure"""
print("Getting image...", end="", flush=True)
i = finger.get_image()
if i == adafruit_fingerprint.OK:
print("Image taken")
else:
if i == adafruit_fingerprint.NOFINGER:
print("No finger detected")
elif i == adafruit_fingerprint.IMAGEFAIL:
print("Imaging error")
else:
print("Other error")
return False

print("Templating...", end="", flush=True)


i = finger.image_2_tz(1)
if i == adafruit_fingerprint.OK:
print("Templated")
else:
if i == adafruit_fingerprint.IMAGEMESS:
print("Image too messy")
elif i == adafruit_fingerprint.FEATUREFAIL:
print("Could not identify features")
elif i == adafruit_fingerprint.INVALIDIMAGE:
print("Image invalid")
else:
print("Other error")
return False
print("Searching...", end="", flush=True)
52
i = finger.finger_fast_search()
# pylint: disable=no-else-return
# This block needs to be refactored when it can be tested.
if i == adafruit_fingerprint.OK:
print("Found fingerprint!")
return True
else:
if i == adafruit_fingerprint.NOTFOUND:
print("No match found")
else:
print("Other error")
return False
# pylint: disable=too-many-statements
def enroll_finger(location):
"""Take a 2 finger images and template it, then store in 'location'"""
for fingerimg in range(1, 3):
if fingerimg == 1:
print("Place finger on sensor...", end="", flush=True)
else:
print("Place same finger again...", end="", flush=True)

while True:
i = finger.get_image()
if i == adafruit_fingerprint.OK:
print("Image taken")
break
if i == adafruit_fingerprint.NOFINGER:
print(".", end="", flush=True)
elif i == adafruit_fingerprint.IMAGEFAIL:
print("Imaging error")
return False
else:
53
print("Other error")
return False

print("Templating...", end="", flush=True)


i = finger.image_2_tz(fingerimg)
if i == adafruit_fingerprint.OK:
print("Templated")
else:
if i == adafruit_fingerprint.IMAGEMESS:
print("Image too messy")
elif i == adafruit_fingerprint.FEATUREFAIL:
print("Could not identify features")
elif i == adafruit_fingerprint.INVALIDIMAGE:
print("Image invalid")
else:
print("Other error")
return False

if fingerimg == 1:
print("Remove finger")
time.sleep(1)
while i != adafruit_fingerprint.NOFINGER:
i = finger.get_image()

print("Creating model...", end="", flush=True)


i = finger.create_model()
if i == adafruit_fingerprint.OK:
print("Created")
else:
if i == adafruit_fingerprint.ENROLLMISMATCH:
print("Prints did not match")
else:
54
print("Other error")
return False

print("Storing model #%d..." % location, end="", flush=True)


i = finger.store_model(location)
if i == adafruit_fingerprint.OK:
print("Stored")
else:
if i == adafruit_fingerprint.BADLOCATION:
print("Bad storage location")
elif i == adafruit_fingerprint.FLASHERR:
print("Flash storage error")
else:
print("Other error")
return False

return True
##################################################
def get_num():
"""Use input() to get a valid number from 1 to 127. Retry till success!"""
i=0
while (i > 127) or (i < 1):
try:
i = int(input("Enter ID # from 1-127: "))
except ValueError:
pass
return i
while True:
print("----------------")
if finger.read_templates() != adafruit_fingerprint.OK:
raise RuntimeError("Failed to read templates")
print("Fingerprint templates:", finger.templates)
55
print("e) enroll print")
print("f) find print")
print("d) delete print")
print("----------------")
c = input("> ")

if c == "e":
enroll_finger(get_num())
if c == "f":
if get_fingerprint():
print("Detected #", finger.finger_id, "with confidence", finger.confidence)
else:
print("Finger not found")
if c == "d":
if finger.delete_model(get_num()) == adafruit_fingerprint.OK:
print("Deleted!")
else:
print("Failed to delete")

Interfacing code for Camera


from device.FaceRecognition import FaceRecognition

if __name__ == "__main__":
# FaceRecognition().faces_encoding()

face_recognizer = FaceRecognition(
encodings="encodings/encodings.pickle",
)
face_recognizer.faces_detection()

56
codes for data base creation
<?php
$db_user = "root";
$db_pass = "";
$db_server = "localhost";
$conn = mysqli_connect($db_server,$db_user,$db_pass);
if(!$conn){
//echo "connection error";
}
else{
//echo "connection succesful ";
}
$sql = "CREATE DATABASE voting_system";
$result = mysqli_query($conn,$sql);
if($result){
// echo "Database created successfully";
} else {
// echo "Error creating database: " . $conn->error;
}
mysqli_close($conn);
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "voting_system";
$link = new mysqli($servername, $username, $password, $dbname);

if (!$link) {
die("Connection failed: " . mysqli_connect_error());
}

57

You might also like