Advanced Finger Print Based Electronic Voting System

Published on June 2016 | Categories: Documents | Downloads: 47 | Comments: 0 | Views: 382
of 48
Download PDF   Embed   Report

Its all about advance system which is used to design a Voting Machine overcoming many existing drawbacks

Comments

Content

Finger print based electronic voting system

1

CHAPTER – 1
1.1 OBJECTIVE OF THE PROJECT:
The main aim of this project is to avoid rigging completely. Electronic voting
systems have come into picture to prevent rigging upto the maximum extent. But even
there may be some malfunctions during elections. Thus, fingerprint based electronic
voting system has been designed.

When a person wants to register himself in the voter list, he has to provide his
complete details along with his fingerprint image. Thus, when the same person comes to
poll his vote during the elections, he needs to give his fingerprint image before polling his
vote. Thus, the system scans his fingerprint image, compares the image with the already
stored image. If both the images are matched, the person is eligible to poll his vote. If not,
the system simply alerts the buzzer not allowing the voter to poll his vote. LCD is used to
display the related messages.

NMREC

Department of Electronics and Communication Engineering

Finger print based electronic voting system

2

CHAPTER - 2
2.1 INTRODUCTION:

According to ancient Greek scripts BIOMETRICS means study of life.
Biometrics studies commonly include fingerprint, face, iris, voice, signature, and hand
geometry recognition and verification. Many other modalities are in various stages of
development and assessment. Among these available biometric traits, Finger Print proves
to be one of the best traits providing good mismatch ratio and also reliable. The present
scenario to operate a bank locker is with locks which are having keys. By this we can’t
say that we are going to provide good security to our lockers. To provide perfect security
and to make our work easier, we are taking the help of two different technologies viz.
EMBEDDED SYSTEMS and BIOMETRICS.
Firstly discussing about Biometrics we are concentrating on Fingerprint scanning.
For this, we are using FIM 3030N high voltage module as a scanner. This module has inbuilt ROM, DSP and RAM. In this, we can store the fingerprints of up to 100 users. This
module can operate in 2 modes i.e., Master mode and User mode. We will be using
Master mode to register the fingerprints which will be stored in the ROM present on the
scanner with a unique id.
When a person wants to register himself in the voter list, he has to provide his
complete details along with his fingerprint image. Thus, when the same person comes to
poll his vote during the elections, he needs to give his fingerprint image before polling his
vote. Thus, the system scans his fingerprint image, compares the image with the already
stored image. If both the images are matched, the person is eligible to poll his vote. If not,
the system simply alerts the buzzer not allowing the voter to poll his vote. LCD is used to
display the related messages.

NMREC

Department of Electronics and Communication Engineering

Finger print based electronic voting system

3

CHAPTER - 3

3.1 BLOCK DIAGRAM OF TRANSMITTER:

Powersupply

LCD

Finger print
module

Buzzer

MAX232

Micro
controller

TRS

TDP

(AT89S51)

LEDS

Zigbee
transreceiver

CONG

BJP

Crystal oscillator
Reset Circuit

Fig 3.1 Block diagram of transmitter of Finger Print Based Electronic Voting
System

NMREC

Department of Electronics and Communication Engineering

Finger print based electronic voting system

4

3.2 BLOCK DIAGRAM OF RECEIVER:

Log in

Microcontroller

Zigbee
transreceiver

(AT89S51)

PC

LCD

Key pad for
Repolling in xyz location

Fig 3.2 Block diagram of receiver of Finger Print Based Electronic Voting System

NMREC

Department of Electronics and Communication Engineering

Finger print based electronic voting system

5

3.3 DESCRIPTION OF BLOCK DIAGRAM:
3.3.1 POWER SUPPLY:
The input to the circuit is applied from the regulated power supply. The a.c. input
i.e., 230V from the mains supply is step down by the transformer to 12V and is fed to a
rectifier. The output obtained from the rectifier is a pulsating d.c voltage. So in order to
get a pure d.c voltage, the output voltage from the rectifier is fed to a filter to remove any
a.c components present even after rectification. Now, this voltage is given to a voltage
regulator to obtain a pure constant dc voltage.

Fig 3.3 Block diagram of power supply
Transformer:
Usually, DC voltages are required to operate various electronic equipment and
these voltages are 5V, 9V or 12V. But these voltages cannot be obtained directly. Thus the
a.c input available at the mains supply i.e., 230V is to be brought down to the required
voltage level. This is done by a transformer. Thus, a step down transformer is employed
to decrease the voltage to a required level.

NMREC

Department of Electronics and Communication Engineering

Finger print based electronic voting system

6

Rectifier:
The output from the transformer is fed to the rectifier. It converts A.C. into
pulsating D.C. The rectifier may be a half wave or a full wave rectifier. In this project, a
bridge rectifier is used because of its merits like good stability and full wave rectification.
Filter:
Capacitive filter is used in this project. It removes the ripples from the output of
rectifier and smoothens the D.C. Output received from this filter is constant until the
mains voltage and load is maintained constant. However, if either of the two is varied,
D.C. voltage received at this point changes. Therefore a regulator is applied at the output
stage.
Voltage regulator:
As the name itself implies, it regulates the input applied to it. A voltage regulator
is an electrical regulator designed to automatically maintain a constant voltage level. In
this project, power supply of 5V and 12V are required. In order to obtain these voltage
levels, 7805 and 7812 voltage regulators are to be used. The first number 78 represents
positive supply and the numbers 05, 12 represent the required output voltage levels.

3.3.2 LIQUID CRYSTAL DISPLAY:
LCD stands for Liquid Crystal Display. LCD is finding wide spread use replacing LEDs
(seven segment LEDs or other multi segment LEDs) because of the following reasons:
1. The declining prices of LCDs.
2. The ability to display numbers, characters and graphics. This is in contrast to
LEDs, which are limited to numbers and a few characters.
3. Incorporation of a refreshing controller into the LCD, thereby relieving the CPU
of the task of refreshing the LCD. In contrast, the LED must be refreshed by the
CPU to keep displaying the data.
4. Ease of programming for characters and graphics.

NMREC

Department of Electronics and Communication Engineering

Finger print based electronic voting system

7

Pins Functions:
There are pins along one side of the small printed board used for connection to the
microcontroller. There are total of 14 pins marked with numbers (16 in case the
background light is built in). Their function is described in the table below:

Function
Ground
Power supply
Contrast

Control

Pin Number
1
2
3

Name
Vss
Vdd
Vee

4

RS

of 5

R/W

operating

Logic State
0
1

E

D0
D1
D2
D3
D4
D5
D6
D7

D0 – D7 are interpreted as data
Write data (from controller to
LCD)

1

Read

1
From 1 to 0

7
8
9
10
Data / commands
11
12
13
14
LCD screen:

commands

0

0
6

Description
0V
+5V
0 – Vdd
D0 – D7 are interpreted as

0/1
0/1
0/1
0/1
0/1
0/1
0/1
0/1

data

controller)
Access
to

(from
LCD

Normal

to

disabled
operating

Data/commands are transferred to
LCD
Bit 0 LSB
Bit 1
Bit 2
Bit 3
Bit 4
Bit 5
Bit 6
Bit 7 MSB

LCD screen consists of two lines with 16 characters each. Each character consists
of 5x7 dot matrix. Contrast on display depends on the power supply voltage and whether
messages are displayed in one or two lines. For that reason, variable voltage 0-Vdd is
applied on pin marked as Vee. Trimmer potentiometer is usually used for that purpose.

NMREC

LCD

Department of Electronics and Communication Engineering

Finger print based electronic voting system

8

Some versions of displays have built in backlight (blue or green diodes). When used
during operating, a resistor for current limitation should be used (like with any LE diode).

Fig 3.4 LCD screen with basic commands
LCD Basic Commands:
All data transferred to LCD through outputs D0-D7 will be interpreted as
commands or as data, which depends on logic state on pin RS:
RS = 1 - Bits D0 - D7 are addresses of characters that should be displayed. Built in
processor addresses built in “map of characters” and displays corresponding symbols.
Displaying position is determined by DDRAM address. This address is either previously
defined or the address of previously transferred character is automatically incremented.
RS = 0 - Bits D0 - D7 are commands which determine display mode. List of commands
which LCD recognizes are given in the table below:
LCD Connection :
Depending on how many lines are used for connection to the microcontroller,
there are 8-bit and 4-bit LCD modes. The appropriate mode is determined at the
beginning of the process in a phase called “initialization”. In the first case, the data are
transferred through outputs D0-D7 as it has been already explained. In case of 4-bit LED
NMREC

Department of Electronics and Communication Engineering

Finger print based electronic voting system

9

mode, for the sake of saving valuable I/O pins of the microcontroller, there are only 4
higher bits (D4-D7) used for communication, while other may be left unconnected.
Consequently, each data is sent to LCD in two steps: four higher bits are sent first (that
normally would be sent through lines D4-D7), four lower bits are sent afterwards. With
the help of initialization, LCD will correctly connect and interpret each data received.
Besides, with regards to the fact that data are rarely read from LCD (data mainly are
transferred from microcontroller to LCD) one more I/O pin may be saved by simple
connecting R/W pin to the Ground. Such saving has its price.
Even though message displaying will be normally performed, it will not be possible to
read from busy flag since it is not possible to read from display.
LCD Initialization :
Once the power supply is turned on, LCD is automatically cleared. This process lasts for
approximately 15mS. After that, display is ready to operate. The mode of operating is set
by default. This means that:
1. Display is cleared
2. Mode
DL = 1 Communication through 8-bit interface
N = 0 Messages are displayed in one line
F = 0 Character font 5 x 8 dots
3. Display/Cursor on/off
D = 0 Display off
U = 0 Cursor off
B = 0 Cursor blink off
4. Character entry
ID = 1 Addresses on display are automatically incremented by 1
S = 0 Display shift off
Contrast control:
To have a clear view of the characters on the LCD, contrast should be adjusted. To
adjust the contrast, the voltage should be varied. For this, a preset is used which can
behave like a variable voltage device. As the voltage of this preset is varied, the contrast
of the LCD can be adjusted.
NMREC

Department of Electronics and Communication Engineering

Finger print based electronic voting system

10

Figure.3.5 contrast control of LCD

3.3.3 BUZZER: Audio Indication
Digital systems and microcontroller pins lack sufficient current to drive the
circuits like relays, buzzer circuits etc. While these circuits require around 10milli amps
to be operated, the microcontroller’s pin can provide a maximum of 1-2milli amps
current. For this reason, a driver such as a power transistor is placed in between the
microcontroller and the buzzer circuit.

NMREC

Department of Electronics and Communication Engineering

Finger print based electronic voting system

11

Fig 3.6 block diagram of BUZZER
The operation of this circuit is as follows:
The input to the base of the transistor is applied from the microcontroller port pin
P1.0. The transistor will be switched on when the base to emitter voltage is greater than
0.7V (cut-in voltage). Thus when the voltage applied to the pin P1.0 is high i.e., P1.0=1
(>0.7V), the transistor will be switched on and thus the buzzer will be ON. When the
voltage at the pin P1.0 is low i.e., P1.0=0 (<0.7V) the transistor will be in off state and
the buzzer will be OFF. Thus the transistor acts like a current driver to operate the buzzer
accordingly.

Fig 3.7 BUZZER interfacing with microcontroller
NMREC

Department of Electronics and Communication Engineering

Finger print based electronic voting system

12

CHAPTER – 4
4.1

CIRCUIT DIAGRAM OF TRANSMITTER :

Fig 4.1 Circuit diagram of transmitter of Finger Print based Electronic Voting System

NMREC

Department of Electronics and Communication Engineering

Finger print based electronic voting system

13

4.2 CIRCUIT DIAGRAM OF RECEIVER:

Fig 4.2 Circuit diagram of receiver of Finger Print based Electronic Voting System

NMREC

Department of Electronics and Communication Engineering

Finger print based electronic voting system

NMREC

14

Department of Electronics and Communication Engineering

Finger print based electronic voting system

NMREC

15

Department of Electronics and Communication Engineering

Finger print based electronic voting system

16

CHAPTER - 5
5.1 INTRODUCTION OF FINGER PRINT MODULE:
The uniqueness and permanence of the fingerprints are very well-know.
Archaeological artifacts prove that fingerprints were already used by the ancient
Assyrians and Chinese as a form of identification of a person. The first scientific studies
on fingerprints date from the late sixteen century, but the fundamentals of modern
fingerprint identification methods were provided at the end of nineteenth century. The
studies of Sir F. Galton and E. Henry led to formally accept fingerprints as valid signs of
identity by law enforcement agencies. The first Automated Fingerprint Identification
Systems (AFIS) were developed in the 1950s by the F.B.I. (Federal Bureau of
Investigation) in cooperation with the National Bureau of Standards, the Cornell
Aeronautical Laboratory and Rockwell International Corp. Ten years later other AFISs
were developed by NEC Technologies Inc. (Tokyo), Printrack Inc. (Anaheim, California),
and Morpho System (Paris).
Fingerprint recognition is nowadays the basic task of the Integrated Automated
Fingerprint Identification Service (IAFIS) of the most famous police agencies. Ten-print
based identification and latent fingerprint recognition are the two main concerns of an
IAFIS.
Fingerprint Recognition :
In the context of the term "identification through fingerprint images", fingerprints are
generally accepted as human fingerprint images. Identification can functionally be split
up into the following three basic tasks:
• Fingerprint scanning,
• Fingerprint classification and
• Fingerprint comparison.

NMREC

Department of Electronics and Communication Engineering

Finger print based electronic voting system

17

Fingerprints can be acquired as color prints or via sensors which store the ridges on a
medium (glass, paper, sensor surface, etc.). During the classification process, fingerprint
images are optionally allocated to a certain category based on the global orientation of the
ridges while the location of the minutiae is marked as well. The comparison determines
whether two fingerprint images are identical, i.e. whether they belong to the same person
(finger).
The complete process of a fingerprint image analysis (comparison of patterns) can be
divided into six steps as shown in the figure.

Process of fingerprint analysis
1. Scanning of a fingerprint image: The quality of the scanned image is the decisive
factor for automatic identification purposes. It is desirable to use a high-definition
fingerprint scanner which is able to tolerate different skin types, damages, dryness, as
well as the humidity of the finger surface.
2. Image quality improvement: By using image quality improvement, an optical
improvement of the structures (ridges) on the scanned image can be achieved.
3. Image processing: Image processing means the preparatory phase for feature
extraction and classification purposes.
NMREC

Department of Electronics and Communication Engineering

Finger print based electronic voting system

18

4. Feature classification: The fact is that all fingerprints show certain global similarities,
which allow for rough classification into three principal finger classes. However,
classification is a rather difficult process both for algorithm-based decisions as well as
for man-made decisions since some fingerprints cannot be clearly allocated to a
concrete finger class. Nowadays, pattern classification is only used in dactyloscopic
systems, e.g. AFIS (Automated Fingerprint Identification System) of the Federal
Office of Criminal Investigation (BKA). This method is not feasible for access
systems.
5. Feature extraction: In this phase, the location of the minutiae (ridge bifurcations and
ridge endings) in the fingerprint is detected and extracted. In practice, scanned
fingerprint images show differing qualities. The algorithm performance is negatively
influenced by a poor image quality.
6. Verification phase: In the verification phase two feature vectors are being compared.
The algorithm performance strongly depends on the quality (significance) of the
extracted minutiae and on the comparison process.
Below, we will describe in more detail the fingerprint scanning, feature classification and
fingerprint comparison processes.

5.2 FINGER PRINT SCANNING:
Depending on whether the scanning process is carried out on- or off-line, the fingerprint
image can either be
• A color image, e.g. on paper or
• An image of a life finger obtained through a sensor.

[

Fig 5.1 Finger print color image

NMREC

Department of Electronics and Communication Engineering

Finger print based electronic voting system

19

The term life image of a finger is a comprehensive term for images that are
obtained directly by placing the finger on a suitable sensor. There are a vast number of
various methods, which can be used for scanning ridges.
They include:
• Optical sensors.
• Electrical field sensors,
• Polymer TFT sensors (TFT – Thin Film Transistor).
• Thermal sensors.
• Capacitive sensors.
• Contactless 3D-sensors and
• Ultrasound sensors.

The life image is usually recorded by lightly placing the finger on the surface of the
sensor. Since it is not so user-friendly, the finger's surface is only rolled in the context of
AFIS-systems (as in the dactyloscopic method). Of course, in this case, only such ridges
can be captured that are recorded as a result of being directly in contact with the sensor
surface. Hence, compared to rolled fingerprint images, the life image generates the image
of a smaller section of the finger's surface but, in addition, it might also have smaller
distortions of the image.

Fig 5.2 Capacitive sensor, optical sensor

NMREC

Department of Electronics and Communication Engineering

Finger print based electronic voting system

20

Fig 5.3 Types of sensors
Pattern Classification:
The global pattern of papillary lines occurring in the central area of the tip of the
finger constitutes a specific configuration, which is sufficient for a rough systematic
classification. For fingerprint classification purposes, only a part of the entire image,
called Pattern Area, is used. The Pattern Area is defined as the inner area, which is
limited by two lines, so-called Type Lines.

Fig 5.4 Type lines

Two singular points are part of this central area of the fingerprint image:
NMREC

Department of Electronics and Communication Engineering

Finger print based electronic voting system

21

(a) The delta (several of which may exist; only sample arches do not have deltas)
(b) The nucleus. Delta, which is sometimes also called "outer border”, is usually located
at the fringe of the fingerprint image.
An image of papillary lines is called a delta if it is similar to the Greek capital
letter delta. It is formed by two parting ridges or by a ridge bifurcation and a third ridge
that is convex and coming from another direction. Some examples of a delta
configuration are shown in the figure below.

Fig 5.5 Delta configurations

5.3 FINGER PRINT IMAGE COMPARISON:
Data about the fingerprint category and further global characteristics, such as the
number and position of the centers, deltas, and ridges, does provide enough information
for a certain differentiation of fingerprints. However, the true individuality of fingerprints
is determined by the anatomic characteristics of the ridges (minutiae) and their respective
orientation. Whether they can be recorded in their entirety depends on the conditions
when the fingerprint was taken as well as on its quality. The most frequently occurring
minutiae are
• Ridge ending and
• Ridge bifurcation.
Ridge ending defines the end of a line, while ridge bifurcation is defined as a point in
the ridge where the line is separated into two branches. Minutiae are usually stable and
robust with regard to conditions occurring during the scanning process. The below figure
shows some examples. Minutiae can be characterized by their type, by x- and ycoordinates in a coordinate system, and by their direction.
NMREC

Department of Electronics and Communication Engineering

Finger print based electronic voting system

22

The general definition for the identicalness of any two fingerprint images consists of four
criteria and says:
• The general pattern configuration has to be identical,
• The minutiae have to be qualitatively identical (qualitative factor),
• The quantitative factor says that a certain number of minutiae must be found
• There has to be a mutual minutiae relationship specifying that corresponding minutiae
must have a mutual relationship. In practice, a large number of complex identification
protocols for fingerprint image comparisons have been proposed. These protocols are
derived from the traditional dactyloscopic methodology and prescribe an exact procedure
for trained specialists.

NMREC

Department of Electronics and Communication Engineering

Finger print based electronic voting system

23

5.4 FINGER PRINT IMAGE IDENTIFICATION:
In this section, the individual steps of the application "Fingerprint Image Recognition by
Comparing Minutiae" are documented in pictures.

Fig 5.6 Minutiae-based fingerprint identification procedure
NMREC

Department of Electronics and Communication Engineering

Finger print based electronic voting system

24

5.5 MAX 232:
Max232 IC is a specialized circuit which makes standard voltages as required by
RS232 standards. This IC provides best noise rejection and very reliable against
discharges and short circuits. MAX232 IC chips are commonly referred to as line drivers.
To ensure data transfer between PC and microcontroller, the baud rate and voltage levels
of Microcontroller and PC should be the same. The voltage levels of microcontroller are
logic1 and logic 0 i.e., logic 1 is +5V and logic 0 is 0V. But for PC, RS232 voltage levels
are considered and they are: logic 1 is taken as -3V to -25V and logic 0 as +3V to +25V.
So, in order to equal these voltage levels, MAX232 IC is used. Thus this IC converts
RS232 voltage levels to microcontroller voltage levels and vice versa.

Fig 5.7 Pin diagram of MAX232 IC

NMREC

Department of Electronics and Communication Engineering

Finger print based electronic voting system

25

CHAPTER – 6
6.1 INTRODUCTION OF MICROCONTROLLERS:
Microprocessors and microcontrollers are widely used in embedded systems
products. Microcontroller is a programmable device. A microcontroller has a CPU in
addition to a fixed amount of RAM, ROM, I/O ports and a timer embedded all on a single
chip. The fixed amount of on-chip ROM, RAM and number of I/O ports in
microcontrollers makes them ideal for many applications in which cost and space are
critical.
The Intel 8051 is Harvard architecture, single chip microcontroller (µC) which
was developed by Intel in 1980 for use in embedded systems. It was popular in the 1980s
and early 1990s, but today it has largely been superseded by a vast range of enhanced
devices with 8051-compatible processor cores that are manufactured by more than 20
independent manufacturers including Atmel, Infineon Technologies and Maxim
Integrated Products.
8051 is an 8-bit processor, meaning that the CPU can work on only 8 bits of data
at a time. Data larger than 8 bits has to be broken into 8-bit pieces to be processed by the
CPU. 8051 is available in different memory types such as UV-EPROM, Flash and NVRAM.
Features of AT89S52:


8K Bytes of Re-programmable Flash Memory.



RAM is 256 bytes.



4.0V to 5.5V Operating Range.



Fully Static Operation: 0 Hz to 33 MHz’s



Three-level Program Memory Lock.



256 x 8-bit Internal RAM.

NMREC

Department of Electronics and Communication Engineering

Finger print based electronic voting system


32 Programmable I/O Lines.



Three 16-bit Timer/Counters.



Eight Interrupt Sources.



Full Duplex UART Serial Channel.



Low-power Idle and Power-down Modes.



Interrupt recovery from power down mode.



Watchdog timer.



Dual data pointer.



Power-off flag.



Fast programming time.



Flexible ISP programming (byte and page mode).

26

6.2 PIN DESCRIPTION:
The AT89s52 is a low-voltage, high-performance CMOS 8-bit microcomputer
with 8K bytes of Flash programmable memory. The device is manufactured using
Atmel’s high density nonvolatile memory technology and is compatible with the
industry-standard MCS-51 instruction set. The on chip flash allows the program memory
to be reprogrammed in system or by a conventional non volatile memory programmer. By
combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89s52 is a
powerful microcomputer, which provides a highly flexible and cost-effective solution to
many embedded control applications.
In addition, the AT89s52 is designed with static logic for operation down to zero
frequency and supports two software selectable power saving modes. The Idle Mode
stops the CPU while allowing the RAM, timer/counters, serial port and interrupt system
to continue functioning. The power-down mode saves the RAM contents but freezes the
oscillator disabling all other chip functions until the next hardware reset.

NMREC

Department of Electronics and Communication Engineering

Finger print based electronic voting system

27

Pin description:
Vcc : Pin 40 provides supply voltage to the chip. The voltage source is +5V.
GND : Pin 20 is the ground.

Fig 6.1 Pin diagram of AT89S51 microcontroller
Port 0:
Port 0 is an 8-bit open drain bidirectional I/O port. As an output port, each pin can sink
eight TTL inputs. When 1s are written to port 0 pins, the pins can be used
as high impedance inputs. Port 0 can also be configured to be the
multiplexed low-order address/data bus during accesses to external
program and data memory. In this mode, P0 has internal pull-ups.Port 0
also receives the code bytes during Flash programming and outputs the
code bytes during Program verification. External pull-ups are required
during program verification.
NMREC

Department of Electronics and Communication Engineering

Finger print based electronic voting system

28

Fig 6.2 Block diagram of AT89C51 microcontroller
Port 1:

NMREC

Department of Electronics and Communication Engineering

Finger print based electronic voting system

29

Port 1 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 1 output buffers
can sink/source four TTL inputs. When 1s are written to Port 1 pins, they
are pulled high by the internal pull-ups and can be used as inputs. As
inputs, Port 1 pins that are externally being pulled low will source current
(IIL) because of the internal pull-ups. In addition, P1.0 and P1.1 can be
configured to be the timer/counter 2 external count input (P1.0/T2) and the
timer/counter 2 trigger input (P1.1/T2EX), respectively, as shown in the
following table.
Port 1 also receives the low-order address bytes during Flash programming and
verification.

Port 2:
Port 2 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 2 output buffers
can sink/source four TTL inputs. When 1s are written to Port 2 pins, they
are pulled high by the internal pull-ups and can be used as inputs. As
inputs, Port 2 pins that are externally being pulled low will source current
(IIL) because of the internal pull-ups.
Port 2 emits the high-order address byte during fetches from external program memory
and during accesses to external data memory that uses 16-bit addresses
(MOVX @ DPTR). In this application, Port 2 uses strong internal pull-ups
when emitting 1s. During accesses to external data memory that uses 8-bit
addresses (MOVX @ RI), Port 2 emits the contents of the P2 Special
Function Register. The port also receives the high-order address bits and
some control signals during Flash programming and verification.
NMREC

Department of Electronics and Communication Engineering

Finger print based electronic voting system

30

Port 3:
Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 3 output buffers
can sink/source four TTL inputs. When 1s are written to Port 3 pins, they
are pulled high by the internal pull-ups and can be used as inputs. As
inputs, Port 3 pins that are externally being pulled low will source current
(IIL) because of the pull-ups. Port 3 receives some control signals for
Flash programming and verification.
Port 3 also serves the functions of various special features of the AT89S52, as shown in
the following table.

RST:
Reset input A high on this pin for two machine cycles while the oscillator is running
resets the device. This pin drives high for 98 oscillator periods after the
Watchdog times out. The DISRTO bit in SFR AUXR (address 8EH) can
be used to disable this feature. In the default state of bit DISRTO, the
RESET HIGH out feature is enabled.
ALE/PROG:

NMREC

Department of Electronics and Communication Engineering

Finger print based electronic voting system

31

Address Latch Enable (ALE) is an output pulse for latching the low byte of the address
during accesses to external memory. This pin is also the program pulse
input (PROG) during Flash programming.
In normal operation, ALE is emitted at a constant rate of 1/6 the oscillator frequency and
may be used for external timing or clocking purposes. Note, however, that
one ALE pulse is skipped during each access to external data memory.
PSEN:
Program Store Enable (PSEN) is the read strobe to external program memory. When the
AT89S52 is executing code from external program memory, PSEN is
activated twice each machine cycle, except that two PSEN activations are
skipped during each access to external data memory.

EA/VPP:
External Access Enable EA must be strapped to GND in order to enable the device to
fetch code from external program memory locations starting at 0000H up
to FFFFH. Note, however, that if lock bit 1 is programmed, EA will be
internally latched on reset.
EA should be strapped to VCC for internal program executions. This pin also receives the
12-volt programming enable voltage (VPP) during Flash programming.
XTAL1:
Input to the inverting oscillator amplifier and input to the internal clock operating circuit.
XTAL2:
Output from the inverting oscillator amplifier.

NMREC

Department of Electronics and Communication Engineering

Finger print based electronic voting system

32

Fig 6.3 Oscillator connections

NMREC

Department of Electronics and Communication Engineering

Finger print based electronic voting system

33

XTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier that
can be configured for use as an on-chip oscillator. Either a quartz crystal
or ceramic resonator may be used. To drive the device from an external
clock source, XTAL2 should be left unconnected while XTAL1 is driven.
There are no requirements on the duty cycle of the external clock signal,
since the input to the internal clocking circuitry is through a divide-by-two
flip-flop, but minimum and maximum voltage high and low time
specifications must be observed.

6.3 MEMORY ORGANIZATION:
MCS-51 devices have a separate address space for Program and Data Memory. Up to
64K bytes each of external Program and Data Memory can be addressed.
Program Memory:
If the EA pin is connected to GND, all program fetches are directed to external
memory. On the AT89S52, if EA is connected to VCC, program fetches to addresses
0000H through 1FFFH are directed to internal memory and fetches to addresses 2000H
through FFFFH are to external memory.
Data Memory:
The AT89S52 implements 256 bytes of on-chip RAM. The upper 128 bytes
occupy a parallel address space to the Special Function Registers. This means that the
upper 128 bytes have the same addresses as the SFR space but are physically separate
from SFR space.
When an instruction accesses an internal location above address 7FH, the address
mode used in the instruction specifies whether the CPU accesses the upper 128 bytes of
RAM or the SFR space. Instructions which use direct addressing access the SFR space.
For example, the following direct addressing instruction accesses the SFR at location
0A0H (which is P2).
MOV 0A0H, #data
NMREC

Department of Electronics and Communication Engineering

Finger print based electronic voting system

34

Watchdog Timer (One-time Enabled with Reset-out):
The WDT is intended as a recovery method in situations where the CPU may be
subjected to software upsets. The WDT consists of a 14-bit counter and the Watchdog
Timer Reset (WDTRST) SFR. The WDT is defaulted to disable from exiting reset. To
enable the WDT, a user must write 01EH and 0E1H in sequence to the WDTRST register
(SFR location 0A6H).
When the WDT is enabled, it will increment every machine cycle while the
oscillator is running. The WDT timeout period is dependent on the external clock
frequency. There is no way to disable the WDT except through reset (either hardware
reset or WDT overflow reset). When WDT overflows, it will drive an output RESET
HIGH pulse at the RST pin.
Using the WDT:
To enable the WDT, a user must write 01EH and 0E1H in sequence to the
WDTRST register (SFR location 0A6H). When the WDT is enabled, the user needs to
service it regularly by writing 01EH and 0E1H to WDTRST to avoid a WDT overflow.
The 14-bit counter overflows when it reaches 16383 (3FFFH) and this will reset the
device. When the WDT is enabled, it will increment every machine cycle while the
oscillator is running. This means the user must reset the WDT at least for every 16383
machine cycles.

6.4 UART:
The Atmel 8051 Microcontrollers implement three general purpose, 16-bit timers/
counters. They are identified as Timer 0, Timer 1 and Timer 2 and can be independently
configured to operate in a variety of modes as a timer or as an event counter. When
operating as a timer, the timer/counter runs for a programmed length of time and then
issues an interrupt request. When operating as a counter, the timer/counter counts
negative transitions on an external pin. After a preset number of counts, the counter issues
an interrupt request. The various operating modes of each timer/counter are described in
the following sections.
A basic operation consists of timer registers THx and TLx (x= 0, 1) connected in
cascade to form a 16-bit timer. Setting the run control bit (TRx) in TCON register turns
NMREC

Department of Electronics and Communication Engineering

Finger print based electronic voting system

35

the timer on by allowing the selected input to increment TLx. When TLx overflows it
increments THx; when THx overflows it sets the timer overflow flag (TFx) in TCON
register. Setting the TRx does not clear the THx and TLx timer registers. Timer registers
can be accessed to obtain the current count or to enter preset values. They can be read at
any time but TRx bit must be cleared to preset their values, otherwise the behavior of the
timer/counter is unpredictable.
The four operating modes are described below. Timer 2, has three modes of
operation: ‘capture’, ‘auto-reload’ and ‘baud rate generator’.
Timer 0:
Timer 0 functions as either a timer or event counter in four modes of operation.
Timer 0 is controlled by the four lower bits of the TMOD register and bits 0, 1, 4 and 5 of
the TCON register. TMOD register selects the method of timer gating (GATE0), timer or
counter operation (T/C0#) and mode of operation (M10 and M00). The TCON register
provides timer 0 control functions: overflow flag (TF0), run control bit (TR0), interrupt
flag (IE0) and interrupt type control bit (IT0).
For normal timer operation (GATE0= 0), setting TR0 allows TL0 to be
incremented by the selected input. Setting GATE0 and TR0 allows external pin INT0# to
control timer operation.
Timer 0 overflow (count rolls over from all 1s to all 0s) sets TF0 flag, generating
an interrupt request. It is important to stop timer/counter before changing mode.
Mode 0 (13-bit Timer):
Mode 0 configures timer 0 as a 13-bit timer which is set up as an 8-bit timer (TH0
register) with a modulo-32 prescaler implemented with the lower five bits of the TL0
register. The upper three bits of TL0 register are indeterminate and should be ignored.
Prescaler overflow increments the TH0 register.
As the count rolls over from all 1’s to all 0’s, it sets the timer interrupt flag TF0. The
counted input is enabled to the Timer when TR0 = 1 and either GATE = 0 or INT0 = 1.
(Setting GATE = 1 allows the Timer to be controlled by external input INT0, to facilitate
NMREC

Department of Electronics and Communication Engineering

Finger print based electronic voting system

36

pulse width measurements). TR0 is a control bit in the Special Function register TCON.
GATE is in TMOD.

Fig 6.4 For mode 0(13 bit timer)

Mode 1 (16-bit Timer):
Mode 1 is the same as Mode 0, except that the Timer register is being run with all 16 bits.
Mode 1 configures timer 0 as a 16-bit timer with the TH0 and TL0 registers connected in
cascade. The selected input increments the TL0 register.
Mode 2 (8-bit Timer with Auto-Reload):
Mode 2 configures timer 0 as an 8-bit timer (TL0 register) that automatically reloads
from the TH0 register. TL0 overflow sets TF0 flag in the TCON register and reloads TL0
with the contents of TH0, which is preset by software.
When the interrupt request is serviced, hardware clears TF0. The reload leaves TH0
unchanged. The next reload value may be changed at any time by writing it to the TH0
register. Mode 2 operation is the same for Timer/Counter 1.
Mode 3 (Two 8-bit Timers):
Mode 3 configures timer 0 so that registers TL0 and TH0 operate as separate 8-bit timers.
This mode is provided for applications requiring an additional 8-bit timer or counter. TL0
uses the timer 0 control bits C/T0# and GATE0 in the TMOD register, and TR0 and TF0
in the TCON register in the normal manner. TH0 is locked into a timer function (counting

NMREC

Department of Electronics and Communication Engineering

Finger print based electronic voting system

37

FPER /6) and takes over use of the timer 1 interrupt (TF1) and run control (TR1) bits.
Thus, operation of timer 1 is restricted when timer 0 is in mode 3.
Timer 1:
Timer 1 is identical to timer 0, except for mode 3, which is a hold-count mode. The
following comments help to understand the differences:
• Timer 1 functions as either a timer or event counter in three modes of operation. Timer
1’s mode 3 is a hold-count mode.
• Timer 1 is controlled by the four high-order bits of the TMOD register and bits 2, 3, 6
and 7 of the TCON register. The TMOD register selects the method of timer gating
(GATE1), timer or counter operation (C/T1#) and mode of operation (M11 and M01).
The TCON register provides timer 1 control functions: overflow flag (TF1), run control
bit (TR1), interrupt flag (IE1) and interrupt type control bit (IT1).
• Timer 1 can serve as the baud rate generator for the serial port. Mode 2 is best suited for
this purpose.
Mode 0 (13-bit Timer):
Mode 0 configures Timer 1 as a 13-bit timer, which is set up as an 8-bit timer (TH1
register) with a modulo-32 prescaler implemented with the lower 5 bits of the TL1
register. The upper 3 bits of the TL1 register are ignored. Prescaler overflow increments
the TH1 register.
Mode 1 (16-bit Timer):
Mode 1 configures Timer 1 as a 16-bit timer with the TH1 and TL1 registers connected in
cascade. The selected input increments the TL1 register.
Mode 2 (8-bit Timer with Auto Reload):
Mode 2 configures Timer 1 as an 8-bit timer (TL1 register) with automatic reload from
the TH1 register on overflow. TL1 overflow sets the TF1 flag in the TCON register and
reloads TL1 with the contents of TH1, which is preset by software. The reload leaves
TH1 unchanged.
NMREC

Department of Electronics and Communication Engineering

Finger print based electronic voting system

38

Mode 3 (Halt) :
Placing Timer 1 in mode 3 causes it to halt and hold its count. This can be used to halt
Timer 1 when TR1 run control bit is not available i.e., when Timer 0 is in mode 3.
Timer 2:
Timer 2 is a 16-bit Timer/Counter that can operate as either a timer or an event counter.
The type of operation is selected by bit C/T2 in the SFR T2CON. Timer 2 has three
operating modes: capture, auto-reload (up or down counting), and baud rate generator.
The modes are selected by bits in T2CON. Timer 2 consists of two 8-bit registers, TH2
and TL2. In the Timer function, the TL2 register is incremented every machine cycle.
Since a machine cycle consists of 12 oscillator periods, the count rate is 1/12 of the
oscillator frequency.

Power saving modes of operation :
8051 has two power saving modes. They are:
1. Idle Mode
2. Power Down mode.
The two power saving modes are entered by setting two bits IDL and PD in the special
function register (PCON) respectively.
The structure of PCON register is as follows.
PCON:

Address 87H

Asynchronous and Synchronous Serial Communication:
NMREC

Department of Electronics and Communication Engineering

Finger print based electronic voting system

39

Computers transfer data in two ways: parallel and serial. In parallel data transfers,
often 8 or more lines are used to transfer data to a device that is only a few feet away.
Although a lot of data can be transferred in a short amount of time by using many wires
in parallel, the distance cannot be great. To transfer to a device located many meters
away, the serial method is best suitable.
Serial data communication uses two methods, asynchronous and synchronous.
The synchronous method transfers a block of data at a time, while the asynchronous
method transfers a single byte at a time. With synchronous communications, the two
devices initially synchronize themselves to each other, and then continually send
characters to stay in sync. Even when data is not really being sent, a constant flow of bits
allows each device to know where the other is at any given time. That is, each character
that is sent is either actual data or an idle character. Synchronous communications allows
faster data transfer rates than asynchronous methods, because additional bits to mark the
beginning and end of each data byte are not required. The serial ports on IBM-style PCs
are

asynchronous

devices

and

therefore

only

support

asynchronous

serial

communications.
Asynchronous means "no synchronization", and thus does not require sending and
receiving idle characters. However, the beginning and end of each byte of data must be
identified by start and stop bits. The start bit indicates when the data byte is about to
begin and the stop bit signals when it ends. The requirement to send these additional two
bits causes asynchronous communication to be slightly slower than synchronous however
it has the advantage that the processor does not have to deal with the additional idle
characters.
RS232 CABLE:
To allow compatibility among data communication equipment, an interfacing
standard called RS232 is used. Since the standard was set long before the advent of the
TTL logic family, its input and output voltage levels are not TTL compatible. For this
reason, to connect any RS232 to a microcontroller system, voltage converters such as

NMREC

Department of Electronics and Communication Engineering

Finger print based electronic voting system

40

MAX232 are used to convert the TTL logic levels to the RS232 voltage levels and vice
versa.

6.5 REAL TIME CLOCK:
The real time clock (RTC) is a widely used device that provides accurate time and
date for many applications. The RTC chip present in the PC provides time components of
hour, minute and second in addition to the date/calendar components of year, month and
day.
Features:
 Real-Time Clock (RTC) Counts seconds, minutes, hours, date of the month,
month, day of the week, and year with Leap-Year Compensation valid up to 2100.
 56-Byte, Battery-Backed, Nonvolatile (NV) RAM for Data Storage.
 I2C Serial Interface.
 Programmable Square-Wave Output Signal.
The DS1307 is a low-power clock/calendar with 56 bytes of battery-backed
SRAM. The clock/calendar provides seconds, minutes, hours, day, date, month, and year
information. The date at the end of the month is automatically adjusted for months with
fewer than 31 days, including corrections for leap year.
Oscillator Circuit:
The DS1307 uses an external 32.768 kHz crystal. The oscillator circuit does not
require any external resistors or capacitors to operate. The below table specifies several
crystal parameters for the external crystal. If using a crystal with the specified
characteristics, the startup time is usually less than one second.

NMREC

Department of Electronics and Communication Engineering

Finger print based electronic voting system

41

CHAPTER – 7
FIREWARE IMPLEMENTATION OF THE PROJECT DESIGN

This chapter briefly explains about the firmware implementation of the project.
The required software tools are discussed in section 4.2. Section 4.3 shows the flow
diagram of the project design. Section 4.4 presents the firmware implementation of the
project design.
Software Tools Required
Keil µv3, Proload are the two software tools used to program microcontroller. The
working of each software tool is explained below in detail.
Programming Microcontroller
A compiler for a high level language helps to reduce production time. To program
the AT89S52 microcontroller the Keil µv3 is used. The programming is done strictly in
the embedded C language. Keil µv3 is a suite of executable, open source software
development tools for the microcontrollers hosted on the Windows platform.
The compilation of the C program converts it into machine language file (.hex).
This is the only language the microcontroller will understand, because it contains the
original program code converted into a hexadecimal format. During this step there are
some warnings about eventual errors in the program. This is shown in Fig 4.1. If there
are no errors and warnings then run the program, the system performs all the required
tasks and behaves as expected the software developed. If not, the whole procedure will
have to be repeated again. Fig 4.2 shows expected outputs for given inputs when run
compiled program.
One of the difficulties of programming microcontrollers is the limited amount of
resources the programmer has to deal with. In personal computers resources such as
NMREC

Department of Electronics and Communication Engineering

Finger print based electronic voting system

42

RAM and processing speed are basically limitless when compared to microcontrollers. In
contrast, the code on microcontrollers should be as low on resources as possible.

Keil Compiler:
Keil compiler is software used where the machine language code is written and
compiled. After compilation, the machine source code is converted into hex code which
is to be dumped into the microcontroller for further processing. Keil compiler also
supports C language code.

NMREC

Department of Electronics and Communication Engineering

Finger print based electronic voting system

43

Proload:
Proload is software which accepts only hex files. Once the machine code is
converted into hex code, that hex code has to be dumped into the microcontroller and this
is done by the Proload. Proload is a programmer which itself contains a microcontroller
in it other than the one which is to be programmed. This microcontroller has a program in
it written in such a way that it accepts the hex file from the Keil compiler and dumps this
hex file into the microcontroller which is to be programmed. As the Proload programmer
kit requires power supply to be operated, this power supply is given from the power
supply circuit designed above. It should be noted that this programmer kit contains a
power supply section in the board itself but in order to switch on that power supply, a
source is required. Thus this is accomplished from the power supply board with an output
of 12volts.

NMREC

Department of Electronics and Communication Engineering

Finger print based electronic voting system

44

Features


Supports major Atmel 89 series devices



Auto Identify connected hardware and devices



Error checking and verification in-built



Lock of programs in chip supported to prevent program copying



20 and 40 pin ZIF socket on-board



Auto Erase before writing and Auto Verify after writing



Informative status bar and access to latest programmed file



Simple and Easy to use



Works on 57600 speed

Description :
It is simple to use and low cost, yet powerful flash microcontroller programmer
for the Atmel 89 series. It will Program, Read and Verify Code Data, Write Lock Bits,
Erase and Blank Check. All fuse and lock bits are programmable. This programmer has
intelligent onboard firmware and connects to the serial port. It can be used with any type
of computer and requires no special hardware. All that is needed is a serial
communication ports which all computers have.
All devices have signature bytes that the programmer reads to automatically
identify the chip. No need to select the device type, just plug it in and go! All devices also
have a number of lock bits to provide various levels of software and programming
protection. These lock bits are fully programmable using this programmer. Lock bits are
useful to protect the program to be read back from microcontroller only allowing erase to
reprogram the microcontroller. The programmer connects to a host computer using a
standard RS232 serial port. All the programming 'intelligence' is built into the
NMREC

Department of Electronics and Communication Engineering

Finger print based electronic voting system

45

programmer so you do not need any special hardware to run it. Programmer comes with
window based software for easy programming of the devices.

Programming Software
Computer side software called 'Proload V4.1' is executed that accepts the Intel HEX
format file generated from compiler to be sent to target microcontroller. It auto detects the
hardware connected to the serial port. It also auto detects the chip inserted and bytes
used. Software is developed in Delphi 7 and requires no overhead of any external DLL.

NMREC

Department of Electronics and Communication Engineering

Finger print based electronic voting system

46

CHAPTER – 8
ADVANTAGES:
1. Less manpower required
2. Time conscious, as less time required for voting
3. Avoids invalid voting
4. Avoid rigging

CHAPTER – 9
APPLICATIONS:
1.Banking-ATM
2.Accesscontrol
3.Biometric ID card, E-Passport
4.SystemLogin
5.Medical Environment

CHAPTER – 10
NMREC

Department of Electronics and Communication Engineering

Finger print based electronic voting system

47

CONCLUSION :
By using this we can conclude that, this fingerprint based electronic voting
machine we can combat rigging and malpractices that occur in elections.

CHAPTER – 11
REFERENCES :
NMREC

Department of Electronics and Communication Engineering

Finger print based electronic voting system

48

1. The 8051 microcontroller and embedded systems using assembly and C
(second edition) by Muhammad Ali Mazidi , Janice Gillispie Mazidi.
2.

http://www.scribd.com/doc/77009945/Fingerprint-Based-ElectronicVoting-machine.

3.

www.wikypedia.com / fingerprint module.

NMREC

Department of Electronics and Communication Engineering

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close