Design of Electronic Voting Machine
Design of Electronic Voting Machine
CHAPTER ONE.....................................................................................................................................1
1.0 INTRODUCTION.......................................................................................................................3
1.1 ELECTRONIC VOTING...............................................................................................................4
1.2 FINGER PRINT TECHNOLOGY...................................................................................................5
1.3 ADVANTAGES OF FINGER PRINT..............................................................................................5
1.4 BARRIERS TO ELECTRONIC VOTING.........................................................................................6
1.5 SCOPE OF THE PROJECT..........................................................................................................6
1.6 BASIC BLOCK DIAGRAM...........................................................................................................6
1.7 Power Supply..........................................................................................................................7
1.7.1 Transformer Unit.................................................................................................................7
1.7.2 Rectifier Unit.......................................................................................................................7
1.7.3 Filter Unit............................................................................................................................8
1.7.4 Regulator Unit.....................................................................................................................8
1.8 Keypad....................................................................................................................................8
1.9 Microcontroller.......................................................................................................................8
1.10 FINGER PRINT MODULE..........................................................................................................8
1.11 Control Unit.............................................................................................................................9
1.12 PC Interface.............................................................................................................................9
1.13 Personal Computer.................................................................................................................9
1.14 AREAS OF APPLICATION..........................................................................................................9
1.15 GOALS AND OBJECTIVES..........................................................................................................9
CHAPTER TWO..................................................................................................................................10
2.0 LITERATURE REVIEW.............................................................................................................10
2.1 POWER SUPPLY.....................................................................................................................11
2.1.0 Transformer......................................................................................................................11
2.1.1 Rectifier.............................................................................................................................12
Full Wave Rectifier Working & Operation...............................................................................14
2.1.2 Resistor.............................................................................................................................17
2.1.3 Types of Resistors....................................................................................................................18
2.2 Resistor Colour Code............................................................................................................19
2.3 Pull-Up and Pull-Down Resistor.................................................................................................20
2.5 CAPACITORS..........................................................................................................................21
2.6 Types of Capacitor.................................................................................................................22
2.8 SWITCHES (PUSH BUTTON SWITCH)......................................................................................24
2.9 MICROCONTROLLER AT89C52.................................................................................................25
1
2.8 FEATURES OF MAX 232.........................................................................................................29
2.9 FINGER PRINT MODULE.........................................................................................................30
2.10 LCD Display............................................................................................................................30
CHAPTER THREE................................................................................................................................31
3.0 DESIGN OF AN ELECTRONIC VOTING MACHINE....................................................................32
3.1 DESIGN SPECIFICATIONS.......................................................................................................32
3.2 DESIGN OF POWER SUPPLY UNIT..........................................................................................33
3.3 TRANSFORMER SELECTION.......................................................................................................33
3.4 THE SELECTION OF THE BRIDGE RECTIFIER...............................................................................34
3.5 THE FILTER SELECTION.............................................................................................................35
3.6 THE VOLTAGE REGULATOR SELECTION.....................................................................................37
3.7 THE MICROCONTROLLER UNIT (AT89C52)............................................................................38
3.8 FINGER PRINT MODULE........................................................................................................39
3.9 FEATURES OF MIAXIS SM630 MODULE.....................................................................................39
3.10 DESIGN OF THE DISPLAY UNIT..................................................................................................39
3.11 DESIGN OF THE KEYPAD...........................................................................................................40
3.12 PROGRAM FLOW ALGORITHM................................................................................................41
3.13 PROGRAM CODE.....................................................................................................................42
CHAPTER FOUR.................................................................................................................................62
4.0 CONSTRUCTION....................................................................................................................62
4.1 Tools and Test Equipment...........................................................................................................63
4.2 INSTALLATION PROCEDURE..................................................................................................64
4.2.1 Bread Boarding.................................................................................................................64
4.2.2 VERO BOARDING...............................................................................................................65
4.2.3 FITTING OF VERO BOARD..................................................................................................65
4.2.4 SOLDERING TECHNIQUES......................................................................................................65
4.3 CONNECTION TECHNIQUES..................................................................................................66
4.4 TESTING....................................................................................................................................66
CONSTRUCTION OF MECHANICAL STRUCTURE (CASING).................................................................67
4.6 CONSTRUCTION PROCEDURES....................................................................................................67
4.7 CONSTRUCTION OF THE POWER SUPPLY UNIT.........................................................................68
4.8 Construction of the MAX 232 Unit............................................................................................69
4.9 CONSTRUCTION OF THE CONTROLLER UNIT.............................................................................69
4.10 CONSTRUCTION OF THE DISPLAY UNIT...................................................................................69
4.11 CONSTRUCTION OF THE KEYPAD UNIT....................................................................................69
4.12 CONTRUCTION OF THE FINGER PRINT MODULE....................................................................70
CONSTRUCTION OF MECHANICAL STRUCTURE (CASING).................................................................70
2
4.14 PRINCIPLE OF OPERATION.................................................................................................70
4.15 REGISTRATION PROCESS........................................................................................................71
4.16 VERIFICATION PROCESS..........................................................................................................71
4.17 VOTING PROCESS.....................................................................................................................71
4.18 Test, Result, Observation and Precaution............................................................................72
4.19 Visual Inspection Test..............................................................................................................72
4.20 Continuity Test.....................................................................................................................72
4.21 Operation Test.........................................................................................................................72
4.22 Results....................................................................................................................................72
4.23 Observation.............................................................................................................................73
4.24 Precautions..............................................................................................................................73
4.25 COST ANALYSIS........................................................................................................................77
CHAPTER FIVE...................................................................................................................................80
5.0 CONCLUSION AND RECOMMENDATION..................................................................................80
5.1 CONCLUSION........................................................................................................................80
5.2 RECOMMENDATION..............................................................................................................81
4.0.4 Software Design Architecture - - - - - - - 57......................................................................94
3
CHAPTER ONE
1.0 INTRODUCTION
One basic feature of democracy today in the society and the nation at large is the act of
law, so that people may have and express themselves as they choose who leads them.
This does not only give people a chance to choose their leaders but also to freely
Also in recent times, there has been call for the reformation of the electoral process in
Nigeria so that through the process of a credible elections, selfless leaders could
The traditional par-based ballot system of voting that has been on ground has not been
able to solve the challenges of electoral malpractices here in our country and even the
world at large, however, countries that have successfully implemented the electronic
voting system have witnessed a significant change in their electoral system and
governance. Examples of such countries include countries in Europe; the United State
casting and counting of votes. Electronic voting technology can include finger print
based voting system, optical (eye) scan voting systems and specialized voting kiosk
(including self contained direct recording electronic (DRE) voting system). It can also
the internet.
4
In order to computerize election from beginning to the end, there are several legal and
Registration of voters
In this project, the design and construction of an electronic voting machine using
finger print technology to identify voters and ensure the voting process is adequately
using a finger print reader.It is also a technique used in electronic voting machine to
carryout voting exercise. In this technique, the voters has no need to carry his/her ID
which contains his/her entire details, instead the voters has to show his/her finger at the
polling booth and by placing his/her finger on the finger print reader, it reads the
details from the finger print and passed to a corresponding controller and if the data
matches with the already stored information, the person is allowed to vote.
This unique finger print voter ID card can be used for identification purpose in
5
Facilitates quick and accurate counting-possible to declare results
instantaneously
As the whole data of the finger prints of the people is available it can be
usedfor identifying thieves, culpritsi.e it’ll be more helpful for police dept. for
investigation.
contesting for a position like in the Student Union Government election in Petroleum
6
1.6 BASIC BLOCK DIAGRAM
The block diagram comprises of few major blocks as follows;
Power
Supply
LCD Display
Micro-
Switch
Controller
AT89C52 Keypad
PC Interface
Personal
Computer
Finger Print
Max 232 Module
Transformer unit
Rectifier unit
Filter unit
Regulator unit
7
1.7.1 TRANSFORMER UNIT
The transformer steps up or steps down the input line voltage and isolates the power
voltage.
1.8 KEYPAD
The keypad allows the voter to poll his vote by selecting a party of his choice from the
options provided.
1.9 MICROCONTROLLER
This is the heart of the project which has the following functions:
It is able to receive unique code from the finger print module. Then it checks
If received code and stored code are matched, then it allows the voter to put his
It also help to displays voter’s name and whether he has finished giving his
vote or not.
8
1.10 FINGER PRINT MODULE
A fingerprint module is an electronic device used to capture a digital image of the
fingerprint pattern. The captured image is called a live scan, this live scan is digitally
control process of the voter’s database stored in the microcontroller and the memory.
1.12 PC INTERFACE
This unit makes it possible for the PC to interact with the voting system for the voting
process.
9
technology provided if the fingerprints of the voters are maintained in a
database.
CHAPTER TWO
components used in the construction of this project work as well as the circuit diagram.
The finger print based voting machine uses the following for its operation which
includes:
1. Power supply
2. Resistors
3. Capacitors
4. Switches
5. Microcontroller
6. MAX 232
8. LCD display
10
9. Crystal oscillator
2.1.0 TRANSFORMER
Transformers are manufactured in a large variety of shapes and sizes with and without
The power transformer is designed to be used at power frequency, usually 50Hz. Both
the primary and secondary windings are placed on a magnetic iron core. The co-
winding the coils in layers or by inter winding are employed. Two basic construction
types are found in the modern transformer; that is the “core type” and the “shell type”.
secondary is OPEN, a small magnetizing current will flow in the primary to establish
the magnetic fields and to overcome any losses due to resistance. The magnetizing
current is small and is limited by the amount of applied voltage, its frequency and the
reactance of the primary winding. The expanding and collapsing magnetic field of the
primary cut across the secondary voltage will depend upon the direction of the
11
Fig. 2.2 Schematic Diagram of a Transformer
The magnitude and density of the flux lines of the primary coil will depend upon the
current and the number of turns (I x N). Since both primary and secondary are wound
closely together and on a common core, the flux for the secondary must be almost the same
as the primary.
IP NP = IS NS
IS NP
=
Ip NS
The transformer functioned in two ways: one it took the dangerous high voltage
and transformed it to a much safer low voltage, second it isolated the two sides. That
made it even safer because there was no way for the hot line to show up in the
2.1.1 RECTIFIER
(A) HALF – WAVE RECTIFIER
12
The easiest and cheapest way to convert (also called rectify) AC to DC is to
use a single diode. A diode is a simple electronic 'valve' - it only lets current
flow one way Since AC voltage cycles from positive to negative and we only
want positive, it is connected so that the circuit only receives the positive half
of the AC cycle.
13
What we have now is not really AC and nor really DC, it is a lumpy wave. The
efficiency of this rectification is reduced compared to when the diode is doubled, and
the power delivered to the load is reduced as the diode conducts only in the positive
half – cycle and transmits only half the power from the source. Hence the Bridge
Rectifier is used.
A Full wave rectifier is a circuit arrangement which makes use of both half cycles of
input alternating current (AC) and converts them to direct current (DC). We know that
a half wave rectifier makes use of only one half cycle of the input alternating current.
Thus a full wave rectifier is much more efficient (double+) than a half wave rectifier.
This process of converting both half cycles of the input supply (alternating current) to
direct current (DC) is termed full wave rectification.Full wave rectifier can be
constructed in 2 ways. The first method makes use of a center tapped transformer and
Center Tapped Full Wave Rectifier. The second method uses a normal transformer
The working & operation of a full wave bridge rectifier is pretty simple. The circuit
diagrams and wave forms we have given below will help you understand the operation
of a bridge rectifier perfectly. In the circuit diagram, 4 diodes are arranged in the form
points of the bridge at points A & C. The load resistance RL is connected to bridge
14
Fig 2.6 Full Wave Bridge Rectifier – Circuit Diagram with Input and Output Wave
During first half cycle of the input voltage, the upper end of the transformer secondary
winding is positive with respect to the lower end. Thus during the first half cycle
15
diodes D1 and D3 are forward biased and current flows through arm AB, enters the
load resistance RL, and returns back flowing through arm DC. During this half of each
input cycle, the diodes D2 and D4 are reverse biased and current is not allowed to flow
in arms AD and BC. The flow of current is indicated by solid arrows in the figure
above. We have developed another diagram below to help you understand the current
flow quickly. See the diagram below – the green arrows indicate beginning of current
flow from source (transformer secondary) to the load resistance. The red arrows
indicate return path of current from load resistance to the source, thus completing the
circuit.
During second half cycle of the input voltage, the lower end of the transformer
secondary winding is positive with respect to the upper end. Thus diodes D2 and D4
become forward biased and current flows through arm CB, enters the load resistance
RL, and returns back to the source flowing through arm DA. Flow of current has been
shown by dotted arrows in the figure. Thus the direction of flow of current through the
load resistance RL remains the same during both half cycles of the input supply
voltage. See the diagram below – the green arrows indicate beginning of current flow
from source (transformer secondary) to the load resistance. The red arrows indicate
return path of current from load resistance to the source, thus completing the circuit.
16
2.1.2 RESISTOR
A resistor is a device that offers opposition to the flow of an electric current in a
circuit. The potential drop across a resistor is proportional to the current flowing
V = IR …………………………… (ii)
Where R is the proportionality constant, which is also the resistance offered by the
resistor.
V
R =
Therefore, I
ampere (1A) to flow through it when voltage of 1V is applied across its terminal.
1. Fixed resistor
2. Variance resistor
i. Mineral-oxide resistor
17
Variable resistor: This includes;
i. Thermometer
18
2.2 RESISTOR COLOUR CODE
Table 2.1: Resistor Colour Coding
is connected between the floating input and ground. The value of resistance depends
on the voltage of the supply and it varies from some few k to hundred to ks.
. Digital
Circuit
. Digital
Circuit
Fig. 2.10 (a) Pull-Up Resistor Fig. 2.10 (b) Pull-Down Resistor
IS V1 IS
R1
+ + R1
V1
E R2 E R2 V2
V2
- -
I1
R3 I2
V3
E = V1 + V2 + V2 Is = I 1 + I2
E = V1 =V2
IN SERIES, the same current flows through all the components but a different
IN PARALLEL, the same potential difference (voltage) exists across all the
20
For resistors in series:
The total resistance of two or more resistors connected in series is given simply adding
the individual values of the resistors to find the total sum to;
RTOT= R1 + R2 + R3 - - - etc
To calculate to total resistance of a circuit that involves parallel resistors the following
1 1 1 1
= + + … …. etc
R T R1 R2 R3
Notice however that unit formular does not give you the total resistance R T. It gives
you the RECIPROCAL of RT. This is very different value and is NOT the total
I
resistance. To obtain the correct value for RT, it is the reciprocal of Rtotal
.
2.5 CAPACITORS
A capacitor consists basically of two conductor plates separated by a dielectric or
capacitor is said to have capacitance because of its ability to store changes. .the S.I unit
of the capacitance of a capacitor is farads. But farads is a rather larger unit so it is usual
to use the microfarad (For 10-6F), nanofarad (nFi.e 10-9) and the picofarad (pFi.e 10-
12
F).
A capacitor has a capacitance of one farad (1F) when it receives a charge of one
21
Fig. 2.12 Symbols of Capacitor
i. Ceramic capacitor
Ceramic Capacitor: These capacitors are made from ceramic. They come in variety
of shapes with capacitance ranging from 10pF to 47f. Their stability is very poor and
sometimes are very sensitive to heat, but they do have a low leakage.
formationof oxide film by electrolytic action inside the can as soon as they are
connected in a circuit. These capacitors are polarized and have a high leakage current;
1. Series: In series, the same current flows through all the components but a
2. Parallel: In parallel, the same potential difference (voltage) exists across all the
22
To calculate the total capacitance of a circuit that involves parallel capacitors, the
1 1 1 1 1
= + + + …+
C T C 1 C2 C 3 Cn
C1 C2 C3
C1
Fig. 2.13 Series Connection of Capacitors
However this formular does not give us the total resistance C total. It gives us the
RECIPROCAL of CT.
This is a very difference value- and is NOT the total capacitance. To obtain the correct
1
, it is the reciprocal of CT
T
value for C
The total capacitance of two or more capacitors connected in series is given by simply
adding the individual values of the capacitors, to find the total sum (Ctot)
C1 C2 Cn
23
2.8 SWITCHES (PUSH BUTTON SWITCH)
In electronics, a switch is an electrical component that can break an electrical circuit by
interrupting the current or diverting its from one conducting to another or it creates (or
A switch has two conductive pieces often metal, called contacts that touch a complete
There are various types of switch, for example; toggle switch, rocker switch, mercury
tilt switch, knife switch, push button and foot switch. The foot switch which is used in
In a push button switch, the content remains in one place unless actuated. The contacts
can either be normally open (NO) until closed by the switch action.
A switch with both types of contact is called a change over switch. These may be
before make’ which interrupts one circuit before closing the other.
The term poles and throw are also used to describe switch contact variations. The
number of poles is the number of separate circuits which are controlled in a switch. For
example, a 2 pole switch has two separate identical sets of contact controlled by the
same knob. The number of throws is the number of separate positions that the switch
can adopt. The various configurations of throws and poles are itemized in the table
below.
24
Table 2.2: Configuration of Switches
connected or disconnected
Single pole-double SPDT/SPCO A simple change over L1
com
throw/single pole center switch; COM (common) L2
OFF is connected to L1 or L2
and L2.
Double pole single throw DPST Equivalent to two SPSI
switches controlled by a
single mechanisms
Double pole double throw DPDT Equivalent two SPDT
switches controlled by a
single mechanism
2.9MICROCONTROLLER AT89C52
AT89C52 is an 8-bit microcontroller and belongs to Atmel’s 8051 family. AT89C52
has 8kb of flash programmable and erasable read only memory (PEROM) and 256
25
bytes of RAM. AT89C52 has an endurance of 1000 write/erase cycles which means
Though very slight difference between the features of AT89C51 and AT89C52, they
are very similar to their pin configurations and operations. The differences between
AT89C52 AT89C51
RAM 256 Bytes 128 Bytes
Flash 8KB 4KB
Number of interrupt 3(16-bit each) 2(16-bit each)
Sources 8 6
The pin configuration of AT89C52 is exactly similar to that of AT89C51 except that
the first two pins, P1.0 and P1.1 are multiplexed to correspond to timer 2 operations.
The AT89C51 has two timers (timer 0 and timer 1), AT89C52 also has timer 2.
Corresponding to timer 2, there are extra SFRs (special function registers) T2CON and
T2MOD. Also there are register RCAP2H and RCAP2L to configure 16-bit capture
26
Fig Pin diagram of AT89C52
control
3. P1.2
4. P1.3
27
5. 8 bit input/output port (P1) P1.4
6. Pins P1.5
7. P1.6
8. P1.7
9. Reset pin: active high Reset
10. Input (receiver) for serial RXD communication P3.0
11. Output( transmitter) fort serial communication TXD P3.1
12. External interrupt 1 into 5 bit input/output port (P3) pins P3.2
13. External interrupt 2 into 1 P3.3
14. Timer 1 external input T0 P3.4
15. Timer 2 external input T1 P3.5
16. Write to external data memory write P3.5
17. Read from external data memory Read P3.7
18. Quarter crystal insulator (up to 24 MHz) Crystal 2
19. Crystal 1
20. Ground (or) Ground
21. P2.0/A8
22. P2.1/A9
23 8 bit input/output port (P2) P2.2/A10
24. Pins/ high-order address bit when P2.3/A11
25. Interfacing with external memory P2.4/A12
26. P2.5/A13
27. P2.6/A14
28. P2.7/A15
29. Program store enable; Read from external program memory PSEN
30. Address latch enable program pulse input during flash ALE/Prog
programming
31. External access enable; Vcc for internal program executions EA/VPP
28
34. 8 bit input/output port (P0) P0.5/AD5
35. Pins P0.4/AD4
36. Low-order address bits when interfacing with external P0.3/AD3
memory
37. P0.2/AD2
38. P0.1/AD1
39 P0.0/AD0
40. Supply voltage; 5V (up to 6.6V) Vcc
It converts the R5-232 levels of the finger print scanner to the TTL voltage
levels of c 8051.
29
2.9 FINGER PRINT MODULE
A fingerprint module is an electronic device used to capture a digital image of
the fingerprint pattern. The captured image is called a live scan, this live scan is
30
CHAPTER THREE
part that can perform the stated function of each block, configuration of these
component parts and calculation where necessary to set operating range. This chapter
covers the detailed design and selection of the component used in the construction of
the project.
31
Operating current 500mA
Switching unit
Microcontroller unit
Display unit
keypad
operation. The input to this unit is 220/240V AC at a frequency of 50Hz and the output
Bridge Diode
capacitors
32
i. The input voltage range
vi. The input voltage range from the supply mains is from 220~240V ac single
phase supply.
vii. The output voltage range of the transformer will be from 12VAC to the rectifier
circuit.
viii. The rating of the transformer or the power rating of the transformer is 1kVA.
This means that the capacity of the circuit is 1kVA. Also, the current rating for
DI-D4 = IN 4007
33
Fig. 3.1: The Bridge Rectifier
The four diode bridge full-wave rectifier was used due to its added advantage over a
two diode centre-tapped full-wave rectifier as well as a one diode half-wave rectifier.
ii. The peak inverse voltage that the diodes would withstand.
The diode forward current rating is the maximum that the diode can conduct
before failing. The diode should be selected in such a way that the current
The peak inverse voltage is the maximum reverse voltage that a diode can
withstand without destroying the junction. If the reverse voltage across a diode
exceeds this value, the reverse current increase sharply and breaks down the
voltage across the diode does not exceed its PIV during the negative half-cycle
diode rectifier circuit. The peak inverse voltage of rectifier diodes lie between
Vpeak = √ 2 Vrms
Where Vrms is the transformer’s output voltage using the maximum output
Vrms = 12V
34
For a bridge rectifier, the peak voltage equals the peak inverse voltage. Therefore the
Thus, the IN4007 diode was chosen for the rectifier since it satisfies the above stated
called ripple). The ripple is undesirable and causes pulsations in the rectified
output, the smaller this is, the more effective is the rectifier. The ripple factor is
The smaller the ripple factor the lesser the amount of ripples and hence more
effective is the rectified output signal. These ripples have a frequency of twice
the input supply frequency. The ripple factor for full-wave rectifiers and
Im
IRMS =
√2
2 Im
IDC =
π
35
2
Im
∴R=
√( ×
π
√2 2 Im ) −1 = 0.48
This shows that the dc component of the full-wave rectifier output is more than
the ripples, making full wave rectifiers more suitable for rectifying ac to dc.
The Capacitor Breakdown Voltage The fixed positive IC voltage regulator was
chosen from the 78xx family of fixed positive voltage as they are more efficient in
providing the much needed constant voltages for the interconnected circuitries of the
design.
law at the output of the rectifier to the terminal of the filter capacitor.
IL
∆V =
2 fC
Where; ∆V= change in maximum – minimum peak values of the capacitor voltage
IL = load current
f = frequency
C = capacitance
IL
∴C=
2f ∆V
0.5
C=
2× 50× 2
36
C = 2500μF
at the output of the power supply regardless of the variations from the supply input or
load connected. The regulation used is the IC voltage regulator LM7805. This implies
that a positive fixed +5volts regulator was used to provide the fixed positive voltage
level required by the circuitries. The rating of the voltage regulator from the datasheet
is as given below:
The fixed positive IC voltage regulator was chosen from the 78xx family of fixed
positive voltage as they are more efficient in providing the much needed constant
microcomputer with 8k bytes of flash programmable and erasable read only memory
memory technology and is compatible with the industry standard 80C51 and 80C52
instruction set and pin out. The on-chip flash allows the program memory to be
combining a versatile 8bit CUP with flash on a monolithic, chip, the Atmel AT89C52
37
is a powerful microcomputer which provides a highly flexible and cost effective
features.
used to capture a digital image of the finger print pattern. The fingerprint module
selected for this project was MIAXIS SM630 because of the following features
38
TTL level standard serial interface
4 pin interface
Coding method
(LCD) that is used was a 16 × 4, means of rows and 16 columns, each row can carry
The liquid crystal display (LCD) gives the virtual representation of the active system
TYPE; Character
numeric purpose. It is used for loading numerical and alphabetical values into the
micro controller. It consist of it buttons arranged in an array containing four lines and
four columns.
FI - forward shift
39
F2 - back shift
F3 - backspace
F4 - delete
40
3.13 PROGRAM CODE
#include <at89x52.h>
#define RS P2_2
#define E P2_3
unsigned char
dataa[16]={48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48};
char temp[4];
41
unsigned cursor=0;
intr,check=0;
charid,err,print_id=0;
int ii=0;
int vi=0;
char search=0;
char indicator;
voidreg_process();
void load();
voidwrite_to_pc();
//KEYPAD
voidGet_keys();
void clear();
voidDebounce();
//LCD
void __delay_ms(intyp);
voidcct_init(void);
voidsend_data(char t);
42
voidlcdinit(void);
voidclear_row(char rrow);
//UART
voidsave_name(char iddx);
voiduart_init(void);
uart_putc()
uart_getce()
i2s(),uart_puts()
uart_gets(),s2i()
void uart_init2(void);
//FINGER PRINT
voidsearchh_ID(char idf);
43
voiddelete_print(char nubb);
voidempty_print();
charget_id();
voiddelete_pprint();
voidsave_to_memory(char fg);
voidclear_res();
voidadd_print(unsigned intidd);
unsigned char
res[28]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
intind,pi=0;
char reply=0;
char count=0;
voidDebounce(void){ __delay_ms(80); }
unsignedinti, limit;
limit = d/15;
for(i=0;i<limit;i++);
void __delay_ms(intyp){
longoo=0;
longooo=yp*50;
for(oo=0;oo<ooo;oo++){ ;; }
44
voidcct_init(void)
void delay(int a)
inti;
command(0x0c);
voidclear_row(char rrow){
if(rrow==1){ boo=0x80;}
if(rrow==2){ boo=0xc0;}
if(rrow==3){ boo=0x90;}
if(rrow==4){ boo=0xd0;}
45
command(0x0c);
command(boo+po);
command(0x0c);
send_data(' ');
command(0x0e);
command(boo);
voidsend_data(char t)
RS = 1; // This is data
E = 1; // => E = 1
delay(150);
E = 0; // => E = 0
delay(150);
E = 1; // => E = 1
delay(150);
46
E = 0; // => E = 0
delay(150);
voidsend_string(char* letters){
while(*letters){
send_data(*letters);
++letters;
void command(int z)
RS = 0; // This is command
E = 1; // => E = 1
delay(150);
E = 0; // => E = 0
delay(150);
47
E = 1; // => E = 1
delay(150);
E = 0; // => E = 0
delay(150);
voidlcdinit(void)
__delay_ms(15000);
E = 1; // => E = 1
delay(150);
E = 0; // => E = 0
delay(150);
delay(500);
E = 1; // => E = 1
delay(150);
48
E = 0; // => E = 0
delay(150);
delay(600);
E = 1; // => E = 1
delay(150);
E = 0; // => E = 0
delay(150);
delay(650);
E = 1; // => E = 1
delay(150);
E = 0; // => E = 0
delay(150);
delay(650);
/////////////////////////////////////////////////////
49
//command(0x0c); //display on,cursoroff,blink off
Debounce(); index=0;
P1_4=0;
P1_5=0;
P1_6=0;
P1_7=0;
P1_4=1;
50
if(P0_1==1){ index=73; if(i>=3){i=0; dataa[cursor]='4'; }else{ i=i+1;
P1_4=0;
P1_5=0;
P1_6=0;
P1_7=0;
P1_5=1;
P1_4=0;
P1_5=0;
P1_6=0;
P1_7=0;
P1_6=1;
51
if(P0_3==1){ return '*'; }//H stop
P1_4=0;
P1_5=0;
P1_6=0;
P1_7=0;
P1_7=1;
command(0xd0+cursor); }//C
command(0xd0+cursor); }//B
command(0xd0+cursor); }//A
52
returndataa[cursor];
void clear(){
command(0xd0);
command(0x0C);
command(0xd0); command(0x0e);
voidGet_keys(){
clear_row(4); clear();
while(1){
val=0;
val = Get_Key();
send_data(dataa[cursor]); command(0xd0+cursor); }
old_char = dataa[cursor];
53
unsigned char get(){
Debounce();
P1_4=0;
P1_5=0;
P1_6=0;
P1_7=0;
P1_4=1;
P1_4=0;
P1_5=0;
P1_6=0;
P1_7=0;
P1_5=1;
54
if(P0_0==1){ return 0; }//2
P1_4=0;
P1_5=0;
P1_6=0;
P1_7=0;
P1_6=1;
P1_4=0;
P1_5=0;
P1_6=0;
P1_7=0;
P1_7=1;
return 0;
55
}
temp[0]=(data/100)%10;
temp[1]=(data/10)%10;
temp[2]=(data/1)%10;
void bring(){
intvv=0;
uart_puts("\r\n");
voidsearchh_ID(char idf){
intvv=0;
uart_init2();
if(indicator==1){
indicator=0;
split(idf);
56
}else{
uart_puts("\r\n");
SBUF=c;
while(TI==0);TI=0;
while(RI==0);RI=0;
return SBUF;
uart_putc()
while(*s!=0){uart_putc(*s);s++;}
57
voiduart_gets(char *s) // Get String from UART, Require
uart_getc()
while(((*s)=uart_getc())!=13)s++;
*s=0;
inti=0;char sign='+';
if(*s=='-'){sign='-';s++;}
while(*s!=0){i=i*10+(*s-'0');s++;}
if(sign=='-')i=-i;
returni;
void main(){
__delay_ms(70000); __delay_ms(70000);
cct_init();
uart_init2();
lcdinit();
command(0x01); command(0x80);
send_string("**Electronic**");
58
command(0xc0); send_string("-Voting Machine-");
__delay_ms(70000); __delay_ms(70000);
while(1){
ii=0;
if(res[0]=='A'){
print_id=(res[1]*100)+(res[2]*10)+(res[3]*1);
uart_init();
add_print(print_id);
if(res[0]=='S'){
uart_init();
search_print(500);
if(res[0]=='V'){
election();
if(res[0]=='Q'){
load();
59
}
if(res[0]=='L'){
clear_pc();
if(res[0]=='*'){
receive_data();
if(res[0]=='M'){
bring();
if(res[0]=='D'){
print_id=(res[1]*100)+(res[2]*10)+(res[3]*1);
uart_init();
delete_print(print_id);
if(res[0]=='C'){
uart_init();
empty_print();
if(res[0]=='R'){
60
command(0x01); command(0x80);
send_string("**Electronic**");
command(0x90); send_string("Ready...");
if(res[0]=='P'){
command(0x01); command(0x80);
__delay_ms(80);
CHAPTER FOUR
4.0 CONSTRUCTION
The design was basically carried out using theories learnt during classes and from
research work into the project. But the project will not be complete if there is no
tangible work to prove its workability, considering the fact that components experience
of designer and cost implication. Building this circuit require first, to look for a way to
61
best by connecting components temporarily and after which permanent connections
The construction of this project was divided into two parts; the electrical (i.e.
electronics) and mechanical (i.e. casing) parts. The construction of both units was
carefully planned taking into consideration the operation and utility of the device. The
components of the electronic part construction were tested one after the other to
confirm that they exhibit their expected characteristics, thereafter, they were connected
of the circuit and to effect any change as the case may be. After the pre-connection and
testing of components and the circuit, a permanent construction was then made on the
The construction of the electronic part of the project was divided as follow:
Proteus software.
Digital Multimeter
Knife.
De-soldering pump.
62
Hand drill.
Saw.
Side cutter.
Pliers.
Transformer
Capacitor
Voltage regulator
Resistor
Micro controller
Max 232
Soldering iron
Soldering lead
lead sucker
Brush
DB-9- plug
63
4.2 INSTALLATION PROCEDURE
purpose of testing and correction. This was done in two parts soas to make debugging
easier.
First, the input to the interlock/latch output was bread boarded and the outputs A1 and
B1 were checked to see if multiple voting (either for A or A and B) was recorded by
Secondly, the 3-digit counter down to the display for one candidate was bread boarded
and the circuit (figure 4.1) was used to provide debounce clock signal (negative edge)
10cm. the board was sliced using pen knife to cut through to size.
4.2.4SOLDERING TECHNIQUES
The components were laid out on a project board and to a vero board for soldering.
64
Soldering is an important process in the mounting of component on a Vero-board.
Soldering operations were carefully performed and the necessary precautions were
strictly adhere to during soldering, some circuit parts sensitive to heat, to avoid damage
- Solder the joint by applying the second, then apply cored solder to the joint at
the points where the iron tips is touching as soon as wetting occurs, remove the
iron.
- When the solder has cooled enough and solidifies. Clean off excessive flux
- Do not test the joint by pulling one of the leads, the parts or wires connected to
the joints.
Dis-soldering is done where necessary to remove components part that is not good and
they are replaced eventually. When dis-soldering, the right tools for absorbing the lead
was used. Avoid the use of brush as it can short circuit other components on the board.
those points that cannot be connected by the foil were connected using network cable
as jumper wire. Also the joined by the copper foil that were not supposed to be
connected were isolated using razor blade to etch out the unwanted path. All the
To connect the mother board to the multiplexed display requires ten wires (three for
then common cathodes and seven for the looped anode. This was done using ribbon
cables (like the used in PC to connect drives and a connector. These connectors can be
65
plugged only in one direction to their socket and both for the displays are configured
differently.
4.4 TESTING
After the connection of the vero board, static test (continuity) was carried out to sort
out any open circuit, or wrong connection. Then the display board and main board
were linked together, and the system is simulated with switches and its performance
confirmed okay.
Finally when the circuit and the various input and output were mounted on the casing,
then the system was plugged to mains. The system thus work to specification.
After the construction of the electronic unit, the casing was constructed. The project
was cased so as to give the device a good finishing, protecting the electronic device
from environmental condition like moisture, low and high ambient temperature and
increases the reliability of the device by offering mechanical strength to the device.
After successfully completing the electronic construction, the unit was assembled in a
plastic container.
66
Fig. 4.1Casing of theproject
1. The design for each of the circuits or units was planned and executed.
2. The components and materials needed for each circuit was purchased.
3. All the tools and equipment needed for construction were also provided as
listed above.
5. All necessary interconnections between each circuit were made and the circuits
were finally interconnected together to give the desired function of the system.
6. Visual inspection test were carried out to ensure that components and cables
7. Open and short circuit test was also carried out to ensure proper connections.
8. The entire circuit was tested using a test signal from a signal generator which
was connected to the input while the result was observed at the output.
9. The circuit was then tested with the stipulated supply voltage from the supply
10. The casing was constructed paying attention to the size and structure of the
circuit it is housing.
Below is the detailed construction connection procedure of each of the different circuit
stages.
67
4.7 CONSTRUCTION OF THE POWER SUPPLY UNIT
The power supply unit comprised of the 220/12V step down transformer, the bridge
diode, the capacitor and the voltage regulator. The transformer output (secondary coil
i.e. 12V) was connected to the bridge diode pin 2 and 3. The pin 1 of the bridge diode
was the positive output (+12V) while the pin 4 was the negative output (12V). The
output of the bridge diode was then connected to the capacitor (25V 2500uF), the
capacitor was then connected to the voltage regulator and the voltage regulator regulate
follows (7,8,9,10,11,12,13,14). The pin 12 of the MAX 232 was connected to the
microcontroller pin 11 of the circuit, the pin 2 was connected to Vcc (+5v), pins 14
connected to the receiver pin of the finger print module and 13 to the transmitter pins
respectively.
Corporation. The microcontroller has 40 pins. The pin 9 is the reset pin which is 0v
active and was connected to +5V Vcc directly. Then pin 40 is the power supply pins,
pins 18 and 19 were the crystal oscillator input. The crystal used was 11.0592MHz
microcontroller pins 21, 22, 23,32,33, 34, 35,36,37,38 and 39through which the signals
68
4.11CONSTRUCTION OF THE KEYPAD UNIT
This unit was implemented with an alpha-numeric keypad with function keys (F1-F4).
The buttons were connected to pins 1,2,3,4,5, 6,7 and 8 of the microcontroller. The
communicate with the microcontroller with the help of the MAX 252 by connecting Rx to Pin
was cased so as to give the device a good finishing, protecting the electronic device
from environmental condition like moisture, low and high ambient temperature and
increases the reliability of the device by offering mechanical strength to the device.
voltage required by the microcontroller, LCD and the finger print module. The
microcontroller initializes the LCD, finger print module and keypad. The keypad then
enters into loop to wait for command from the PC interface. The architecture between
the machine and the PC interface is a client server interface where the machine is the
69
4.15REGISTRATION PROCESS
The PC initiate a request for the voter’s information beginning from the name, age,
sex, date of birth, occupation, address, password and thumbprint and image. For this
process the machine act as the collation system for the voter’s information.
4.16VERIFICATION PROCESS
The PC initiates a request for a voter through the machine requesting for his or her
thumb print when the voter places his thumb on the machine, the PC interface then
performs a search with the intersected thumb print and stores the print when the
match is found and the complete details or information of the voter. This entire process
4.17VOTING PROCESS
The PC interface also initiate a request to the voter through the machine for his or her
thumb print the PC interface searches through a stored print or data base to look for a
match.When a match is found, the PC interface starts a process of displaying all the
valid candidate and the contested positions sequentially to the voter through the
machine, when the voter presses the start button it indicate that he has voted for the
current displayed candidate and when that is done the next election also comes up with
all the valid candidates, when the election process is completed there is a button in the
PC interface that indicates compute election results and when this button is clicked,
the result of all the election being computed will display on the PC interface for
viewing. There is an option for print out the result so that the result can be printed out
70
4.18 TEST, RESULT, OBSERVATION AND PRECAUTION
The aim of testing is to ascertain that after the design and construction of the entire
circuit, it will perform the required function optimally as desired. Three basic tests
2. Continuity test
3. Operation test
and components arrangement for faults such as open circuit and short circuit that can
be visually detected.
specific paths were continuous. The continuity test also verified the result of the visual
inspection test.
required function. The operation test was carried out by injecting a known signal using
signal generators into the system and the system’s output performance was observed.
4.22RESULTS
When the entire circuit was visually inspected, short circuited conductor lines were
detected. These short circuits corrected by cutting the open link between the two
conductor lines.
71
When continuity test were carried out on specific circuit paths such as the paths
between the microcontroller and the real time clock terminals and ground, it was found
4.23 OBSERVATION
Some of the observations made during the development of the project are listed below:
i. It was observed that most of the calculated values of the components were not
available in the market, hence the commercially available standard values were
used
ii. It was observed that when the AC voltage supply is below the required range
(220~240V), the display gives a low illumination due to the applied voltage
iii. It was observed that when no pulse signal is introduced to the microcontroller,
iv. It was observed that every microcontroller requires a crystal oscillator which
4.24 PRECAUTIONS
The following precautions were taken during the construction of the project;
i. The components such as the microcontroller, LCD, voltage regulator and other
ii. The application of heat on the component was done meticulously to avoid
iii. Proper IC handling procedures was followed when dealing with components
iv. It was ensured that the power rating of the components was not exceeded.
72
v. It was ensured that the circuit was firstly constructed and tested on a bread
board before it was transferred to the Vero board were it was permanently
soldered.
vi. It was ensured that the components were properly terminated for effective and
smooth operations.
vii. It was ensured that the specified crystal clock oscillator was used for the
microcontroller (AT89C52)
73
OTHER DIAGRAM
74
Fig 4.3Inside View of the Construction
75
4.25 COST ANALYSIS
Table 4.1: The Cost of the Materials
S/N DESCRIPTION OF ITEM QTY UNIT PRICE (N) TOTAL COST (N)
1 220/12V Transformer 1 1000 1000
2 Rectifier diodes IN4007 5 100 500
3 Resistor 10kΩ 9 40 360
4 35V, 2500µf 2 150 300
5 Micro controller 1 500 500
6 AT89C52 1 1500 1500
7 4×4 alpha numeric keypad 1 1500 1500
8 Voltage Regulator (LM7805) 1 200 200
9 MAX 232 1 300 300
10 Keypad 5 100 500
11 Casing 1 2000 2000
12 OFF/ON switch 1 250 250
13 LCD display 1 6000 6000
14 Printed circuit board 2 100 200
15 Connecting belt Wires 10 200 2000
16 40 pin IC socket 1 150 150
17 Crystal oscillator 1 1000 1000
18 Finger print module 1 10000 10000
19 DB-9-plug 1 1000 1000
19 Soldering Lead 1 200 200
Total (N)30310
76
LCD1
16x4 LCD
To 5v VCC
RV1
VDD
VSS
VEE
RW
RS
D0
D1
D2
D3
D4
D5
D6
D7
E
1
2
3
4
5
6
7
8
9
10
11
12
13
14
502
C2 U2
19 39
XTAL1 P0.0/AD0
38
P0.1/AD1
15pF 37
P0.2/AD2
11.0592MHZ 18
XTAL2 P0.3/AD3
36
CRYSTAL 35
P0.4/AD4
34
C3 P0.5/AD5
33
P0.6/AD6
9 32
RST P0.7/AD7
15pF 21 C4
P2.0/A8
22
P2.1/A9
23
P2.2/A10
29 24 1nF
5v VCC 30
PSEN P2.3/A11
25
31
ALE P2.4/A12
26 1 3 U3
EA P2.5/A13
27
P2.6/A14
28
TR1 12 VCC P2.7/A15 C1+ C1- Vcc
BR1 1 10 11 14
RX
U1 2
P1.0/T2 P3.0/RXD
11 12
T1IN T1OUT
13
7805 P1.1/T2EX P3.1/TXD R1OUT R1IN
3 12 10 7
4
P1.2 P3.2/INT0
13 9
T2IN T2OUT
8
TX Vss
R1 P1.3 P3.3/INT1 R2OUT R2IN
1 3 5 14
VI VO 4x4 AlphaNumeric Keypad 6
P1.4 P3.4/T0
15 2
10k P1.5 P3.5/T1 VS+
GND
7 16 6
P1.6 P3.6/WR VS- SM630 Finger print moudle
1n4007 C1 C8 8
P1.7 P3.7/RD
17
2500uF 0.1uF C6 C2+ C2-
C7
2
U4
7805
1 3
VI VO
GND
2
77
CHAPTER FIVE
gives the summary of the processes involved in the design and construction of
5.1 CONCLUSION
The aim of this project is design and construction of an electronic voting
verification and casting of vote for any candidate or party of your choice by
typing the name of the party or candidate using the keypad on the voting
work started with a research into the existing system of voting, their
techniques and technology. From these a workable circuit was designed using
module, LCD displays and also basic electronics construction, despite all the
hurdles encountered in this design early stage, it has however offered a vast
successful.
78
5.2 RECOMMENDATION
The adoption of this type of voting system using a finger-print technology
helpful to elect the genuine candidates on the basis of number of votes polled
From the working principle of the project work, it is recommended for use in
election etc. However, this project work can be improved upon in the
following ways.
ii. It could be interfaced with printer to get the hard copy of the result
iii. The project work can be interfaced with a central server where the
whole exercise can be monitored with the aid of an internet which will
79
REFERENCE
Anil K. Jain and Thomas L. Flboyd (2002); “Digital Fundamental” Pearson Education
Parag K. Lala (2008); “Principle of Modem Digital and Microcontroller Design” John
Omowaye F. N. (2013), Guide to electronics (Project made easy), Jonokase Nig. Co.,
Robert l. Boylestad and Louis Nashelsky (2005); “Electronics Device and Circuit
Lionel Warner (1990); “Electrical and Electronic Engineering Principles and Practice”
Ronald J. Tocci(1991); “Digital Systems Principles and Applications” Prentice Hall Inc.
80
APPENDIX I
81
4.1 CIRCUIT DIAGRAM
82
DESIGN AND CONSTRUCTION OF AN ELECTRONIC VOTING
MACHINE
BY
IN
83
PARTIAL FULFILLMENT OF THE REQUIREMENT FOR THE
AWARD OF HIGHER NATIONAL DIPLOMA (HND) IN
ELECTRICAL AND ELECTRONICS ENGINEERING TECHNOLOGY
(ELECTRONICS AND TELECOMMUNICATION)
AUGUST, 2016
84
CERTIFICATION
This is tocertify that this project work was carried out byISAAC CHRISTOPHER
SIGNED………………………. SIGNED……………………
SIGNED……………………….
ENGR. E. N. ANUKWU
(Head of Department)
85
DEDICATION
We dedicate this project work to God almighty for his strength and life to complete it.
86
ACKNOWLEDGEMENT
We wish to express our appreciation to our amiable supervisor for his motherly and
professional advice; academic support and immeasurable sacrifice in making this work a
reality.
We are grateful to Engr. E.N. Anukwu, H.O.D of Electrical and Electronics Engineering
Department and also acknowledge the effort of my departmental lecturers who have been
up and doing in exposing me to the Technology world. My sincere gratitude goes to all our
wonderful academic and non-academic staff who toil day and night in ensuring our success,
We are most grateful to my parents, brothers, sisters and friends for their support and
87
ABSTRACT
The objective of voting is to allow voters to exercise their right to express their choices
has always been an onerous task for the election commission to conduct free and fair polls
in our country, the largest democracy in the world. A lot of money have been spent on this
to make sure that the elections are rampage free. But, now- a -days it has become very
usual for some forces to indulge in rigging which may eventually lead to a result contrary
to the actual verdict given by the people. In order to provide inexpensive solutions to the
above, this project will be implemented with biometric system i.e. finger print scanning.
This is used to ensure the security to avoid fake, repeated voting etc. It also enhances the
accuracy and speed of the process. The system uses thumb impression for voter
identification as we know that the thumb impression of every human being has a unique
pattern. Thus it would have an edge over the present day voting systems. The purpose of
such system is to ensure that the voting rights are accessed only by a legitimate user and
no one else. In this, creation of a database consisting of the thumb impressions of all the
thumb impression of a voter is entered as input to the system. This is then compared with
the available records in the database. If the particular pattern matches with any one in the
available record, access to cast a vote is granted. But in case the pattern doesn’t match
with the records of the database or in case of repetition, access to cast a vote is denied or
the vote gets rejected. The result is instantaneous and counting is done. The overall cost
for conducting elections gets reduced and so does the maintenance cost of the systems.
88
89
TABLE OF CONTENTS
Pages
Title Page - - - - - - - - - - i
Certification - - - - - - - - - ii
Dedication - - - - - - - - - iii
Acknowledgement - - - - - - - - iv
Abstract - - - - - - - - - - v
Table of Content - - - - - - - - - vi
List of Tables - - - - - - - - - - x
List of Figures - - - - - - - - - xi
90
2.2.2 Forms of Voting - - - - - - - - 21
2.2.3 Fundamental Election Rules, Suffrage, and Law - - - - 22
2.2.4 Barriers to Electronic Voting - - - - - - 22
2.2.5 Pattern Recognition - - - - - - - - 23
2.2.6 Biometric Methods - - - - - - - - 23
2.0.3 The Problem of Speech Recognition - - - - - 26
2.3.1 Features of the Electronic Voting System with Pattern Recognition - 28
2.3.2 Database Management System - - - - - - 28
2.3.3 Optical Fingerprint Scanners - - - - - - - 29
2.3.4 Technique Involved - - - - - - - - 31
91
3.14.2 Voter Table - - - - - - - - - 52
3.14.3 Candidate Table - - - - - - - - 53
CHAPTER FIVE
5.0.0 Conclusion, Problems Encountered, Recommendation and Appraisal - 68
5.0.1 Conclusion - - - - - - - - - 68
5.0.2 Problems Encountered - - - - - - - 68
5.0.3 Recommendation - - - - - - - - 69
5.0.4 Appraisal - - - - - - - - - 70
References
LIST OF FIGURES
Pages
92
Candidate
Figure 3.3: Program Design - - - - - - - - 40
Figure 3.4: System Flowchart for Unregistered Voter - - - - 40
Figure 3.5: System Flowchart for Registered Voter - - - - - 40
Figure 3.6: System Flowchart for Administration - - - - - 42
Figure 3.7: ER Diagram for Electronic Voting System - - - - 51
Figure 4.1 First Administrative (INEC) Login with Pattern Recognition - - 61
Figure 4.2 Administrative (INEC) Login - - - - - - 61
Figure 4.3 Add New Candidate - - - - - - - 62
Figure 4.4 Add New Candidate - - - - - - - 62
Figure 4.5 Display Lists of Unvoted Voters - - - - - - 63
Figure 4.6: Lists of Presidential Candidates - - - - - - 63
Figure 4.7: View Candidate Information Page - - - - - 64
Figure 4.8 Voter Login Page - - - - - - - - 64
Figure 4.9 Voting Panel - - - - - - - - 65
Figure 4.10 Vote Summary Pages- - - - - - - - 66
Figure 4.11 Confirmation Page - - - - - - - 66
LIST OF TABLES
Pages
93
DESIGN AND IMPLEMENTATION OF ELECTRONICS VOTING
SYSTEM WITH PATTERN RECOGNITION
BY
94
ELECTRICAL AND ELECTRONIC ENGINEERING DEPARTMENT,
PETROLEUM TRAINING INSTITUTE,EFFURUN, DELTA STATE.
AUGUST, 2015.
95