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

HAWASSA UNIVERSITY

INSTITUTE OF TECHNOLOGY
SCHOOL OF ELECTRICAL AND COMPUTER ENGINEERING

STREAM: INDUSTREAL CONTROL

TITLE: MICROCONTROLLER BASED ELECTRONIC VOTING SYSTEM

Name ID NO.

1. Daniel Belay……………………………………………………0443/04

2. Dawit Gizachew ………………………………………………0468/04

3. Degu Melak ……………………………………………………0497/04

ADVISOR: NIGATU A. (Msc.)

SUBMITTED DATE: JUNE, 2016


DECLARATION

We do hereby declare that this thesis is our original work and that it has not been submitted
partially; or in full, by any other person for an award of a degree in any other
university/institution. This thesis entitled electronic voting system being submitted by

Name ID.No.

1. Daniel Belay………………………………………………………0443/04

2. Dawit Gizachew ……………………………………………………0468/04

3. Degu Melak …………………………………………………………0497/04

Head of the Department

Name:…………………………………………………………………………

Signature …………………………………………………………………….

Date:……………………………………………………………………………

Advisor

Name:…………………………………………………………………………….

Signature ……………………………………………………………………….

Date:……………………………………………………………………………

I
ACKNOWLEDGEMENT

First of all, we would like to express our gratitude for GOD to help the accomplishment of this
project. Secondly, We would like to express my gratitude and sincere thanks to our respected
advisor, instructor Nigatu ,for the guidance and support that he has provided throughout
the course of this work. We would like to thank all our friends and faculty members,
Department of Electrical and Computer engineering, for their extreme help throughout my
course of study at this institute.

Finally, we express our gratitude to all other members who are involved either directly or
indirectly for the completion of this project

II
EXECUTIVE SUMMERY

The term electronic voting characteristically depicts to the use of some electronic means in
voting and ensure the security, reliability, guarantee and transference .our project will present the
design and simulation of a simple electronic voting system with a liquid crystal display (LCD).

The project will contain switches for each candidate and also other two extra switches interfaced
with microcontroller that can give function in combination with candidate switches. The first one
new entry indicator switch is provided for enabling the candidate switches in voting mode. This
switch is highly require for voting and each voter can only vote once and protects the identity of
the voter to make the process unbiased and fair.

The other one is total vote switch used to know the total vote and indicates who the winner is. In
addition, buzzer with relay is interfaced to indicate that the voter does voting. Here, after voting
is done, the final count can be seen on LCD. The total vote switch and new entry indicator
switch is under the control of voting authority.

Generally, our project intended to design an electronic voting system model which is controlled
by a microcontroller that can be used for both voting and counting votes.

III
TABLE OF CONTENTS

DECLARATION ............................................................................................................................. I

ACKNOWLEDGEMENT .............................................................................................................. II

EXECUTIVE SUMMERY ........................................................................................................... III

TABLE OF CONTENTS .............................................................................................................. IV

LIST OF FIGURES ...................................................................................................................... VI

LIST OF TABLES ....................................................................................................................... VII

ACRONYMS AND ABBREVIATIONS .................................................................................. VIII

CHAPTER ONE ............................................................................................................................. 1

INTRODUCTION .......................................................................................................................... 1

1.1 Background of the study ........................................................................................................... 1

1.2. Statement of the problem ......................................................................................................... 3

1.3 Objective of the study ............................................................................................................... 3

1.3.1 General objective ................................................................................................................... 3

1.3.2 Specific Objective . ..................................................................................... 3

1. 4. Significance of the study......................................................................................................... 4

1.5 Frame work of the study ........................................................................................................... 4

1.6 Scope and Limitation of the project .......................................................................................... 5

CHAPTER TWO ............................................................................................................................ 6

LITERATURE REVIEW ............................................................................................................... 6

2.1. Overview of Electronic Voting System and the microcontroller............................................. 6

2.2. Introduction to several basic Electrical Components............................................................... 9

2.2.1 Microcontroller (PIC16F877A) ............................................................................................. 9

IV
2.2.2. LCD (Liquid Crystal Display) ............................................................................................ 13

2.2.3 LED ...................................................................................................................................... 16

2.2.4. Resistor ............................................................................................................................... 17

2.2.5. capacitor .............................................................................................................................. 17

2.2.6 Buzzer .................................................................................................................................. 17

2.2.7 Switch .................................................................................................................................. 18

2.2.8 Block Diagram of Power Supply for the System ................................................................. 19

CHAPTER 3 ................................................................................................................................. 22

MATERIALS AND METHODOLOGY ...................................................................................... 22

3.1. MATERIALS ......................................................................................................................... 22

3.2 METHDOLOGY .................................................................................................................... 22

3.2.1. The system design and development .................................................................................. 22

3.4. System components, integrations, and specifications ............................................................ 27

3.4.1. Input unit ............................................................................................................................. 28

3.4.2. The micro-controller unit .................................................................................................... 30

3.4.3. Output Unit ......................................................................................................................... 30

3.4.3. Regulated power supply...................................................................................................... 32

CHAPTER 4 ................................................................................................................................. 37

RESULT AND DISCUSSION ..................................................................................................... 37

4.1 Simulation Result .................................................................................................................... 37

4.1.1 Electronic voting system running condition ........................................................................ 37

CHAPTER 5 ................................................................................................................................. 40

CONCLUSION AND RECOMONDATION ............................................................................... 40

5.1. CONCLUSION ...................................................................................................................... 40

V
5.2. RECOMONDATION FOR FUTURE WORK...................................................................... 40

REFERANCE ............................................................................................................................... 41

APPENDIX ................................................................................................................................... 42

LIST OF FIGURES

Figure 1.1. The Framework of the project ...................................................................................... 4

Figure 1.2. Control System Framework.......................................................................................... 5

Figure 2.1. PIC16F877A (micro controller) ................................................................................. 11

Figure 2.2. 16x2 LCD display....................................................................................................... 14

Figure 2.3. LED indicator. ............................................................................................................ 16

Figure 2.4. Resistor ....................................................................................................................... 17

Figure 2.5. Capacitor..................................................................................................................... 17

Figure 2.6. Buzzer ......................................................................................................................... 18

Figure 2.7. Switch ......................................................................................................................... 19

Figure 2.8. Block Diagram of Power Supply for the System ....................................................... 19

Figure 2.9. Step down transformer ............................................................................................... 20

Figure 2.10. Bridge rectifier circuit Figure 2.10: .......................................................................... 20

Figure 3.1. Block Diagram For Electronic Voting Using PIC16F877A....................................... 23

Figure 3.2. Flow Chart of The Voting Process ............................................................................. 24

Figure 3.3. Flow chart of the system to see the result................................................................... 25

VI
Figure 3.4. The Overall Circuit For Electro Voting Machine....................................................... 26

Figure 3.5. Candidate push button with indicator lamp. ............................................................... 28

Figure 3.6. Start and result push button ........................................................................................ 29

Figure 3.7. Crystal oscillator circuit. ............................................................................................ 30

Figure 3.8. LCD display................................................................................................................ 31

Figure 3.9. Circuit Diagram Of Capacitor Filter........................................................................... 32

Figure 3.10. Circuit Diagram Of Voltage Regulator .................................................................... 34

Figure 3.11. The circuit of power supply unit .............................................................................. 35

Figure 3.12. Block Diagram of Power Supply for the Controlling System .................................. 35

Figure 3.13. Simulation of the power supply using the voltage regulator .................................... 36

Figure 4.1. Simulation Results With Please Welcome Message And Please Vote ...................... 37

Figure 4.2. Simulation result......................................................................................................... 38

Figure 4.3. Simulation Results With Candidate’s Symbol ........................................................... 38

Figure 4.4. Simulation Results With Voting Done And Thank You Message ............................. 39

Figure 4.5. Simulation result with total vote................................................................................. 39

LIST OF TABLES

Table 2.1. Pin Diagram and Pin No Function of LCD.................................................................. 14

VII
ACRONYMS AND ABBREVIATIONS

AC…………………………………..Alternating current

EVM…………………………………Electronic voting machine

EVS………………………………….Electronic voting system

DC…………………………………..Direct current

LC D………………………………..Liquid Crystal Display

UV…………………………………Ultra-violate

PSU…………………………………Power supply unit

CPU…………………………………Central process unit

ROM……………………………. …Read only memory

RAM………………………………..Random access memory

I/O……………………………….…Input output

V……………………………………voltage/volts

Vrms………………………………..root mean square Voltage

Vp…………………………………..peak voltage

Fout………………………………..output frequency

Fint…………………………………Input frequency

I……………………………………Current

μF …………………………………microfarad

VIII
CHAPTER ONE

INTRODUCTION

1.1 BACKGROUND OF THE STUDY

Democracy has come to be accepted as the most preferred form of political system all over the
world. Ethiopia is one of a country that uses democratic system which follows a federal form of
government. It means that governance power is not residing with one authority, but is distributed
at various levels. In Ethiopia power is distributed as at the federal level, Ethiopia elects a
legislature.

Federal and the regional councils may elect them themselves or through popular elections.
Elections were first held in Ethiopia under the provisions of the current constitution in June 1994
to elect the membership of local governments; general elections have since been held in 1997,
2002, 2007 and 2012 (Wikipedia Encyclopedia, 2013). Ethiopian constitution provide every
adult above the age of 18 years irrespective of his/her religion, region, caste, creed, color,
economic status, education and sex the essential right to vote and elect her/his candidate to
represent her/him Voting is a crucial device to reveal the opinion of a group on an issue that is
under consideration. Based on the promise of greater efficiency, better scalability, faster speed,
lower cost, and more convenience, voting is currently shifting from manual paper-based
processing to automate electronic-based processing. The term electronic voting characteristically
depicts to the use of some electronic means in voting and ensure the security, reliability,
guarantee and transference.

Now a day’s Electronic voting machine has now replaced the traditional mechanism of voting.
Perhaps the most important, influential, publicized and widespread use of voting is its use in
national elections. Compared to its traditional paper-based counterpart, electronic voting is
considered to have many greater potential benefits. These benefits include better accuracy by
eliminating the negative factor of human error like security, automatic counting, increased
speed for tally computation, lower operational cost through automated means, and the
convenience of voting from any location Whether or not electronic voting is a necessary

1
replacement for the traditional paper-based method, it is irrefutable that the conduct of voting has
been shifting to the use of electronic medium. It has become an effective voting tool. Flawless
voting is ensured by Electronic voting machine. This is the reason it became more widespread.
People are made sure that their vote is secured. One more feature is that it avoids any kind of
malpractice or invalid votes. Talking about economic benefits, this system is more economical as
consequent expenditure incurred on manpower is saved. Also it is use friendly; it means voter
feels convenient, because he/she has to press only one key of the respective candidates to vote
(Microtones Technologies).

Electronic voting machine is more economic because less manpower is required and may save
transportation cost due to its compact size. It is also more convenient and time conscious as less
time required for voting and counting. Besides that, it is also more secure because of avoiding
an invalid voting such as a people make a vote more than twice. Other than that, paper-based
voting can actually miss ballots due to human mistakes in placing the paper based ballot in
the machine. But, this will be not happen at electronic voting machine (Meher, 2014). And, of
course, helps maintain total voting secrecy without the use of ballot papers. The EVM is 100 per
cent tamper proof. Electronic voting machine has now days become an effective tool for voting.
It ensures flawless voting and thus has become more widespread. It ensures people about their
vote being secured. It avoids any kind of malpractice and invalid votes. Also such kind of
system becomes more economical as consequent expenditure incurred on manpower is saved.

These elections have always been characterized by negative reactions from different quarters,
both locally a internationally. This is because, in Ethiopia all earlier elections be it state elections
or center elections a voter used to cast his/her vote to his/her favorite candidate by putting the
stamp against his/her name and then folding the ballot paper as per a prescribed method
before putting it in the Ballot box. It is a long time consuming process and very much prone
to errors like voting more than once, manipulation of vote. This situation continued till election
scene was completely changed by electronic voting machine.

Thus, such kind of project comes up with a remedy to solve the above problem with high
efficiency and low costing system. In order to overcome the problems, Microcontroller Based
Electronic Voting machine is used. This machine is used to reduce the time, unfair, counting

2
problem on total amount of vote, and so son by using microcontroller and other interfacing
devices rather than Ballot Box. Electronic voting machine is more economic because less
manpower is required and may save transportation cost due to its compact size. It is also more
convenient and time conscious as less time required for voting and counting. Besides that, it is
also more secure due to avoid invalid voting such as people make a vote twice. Other than that,
paper-based voting can actually miss ballots due to human mistakes in placing the paper-based
ballot in the machine.

1.2. STATEMENT OF THE PROBLEM

The design and development of this Micro-controller-Based Electronic voting system will
enhance a good voting system across Ethiopia, Africa. The study therefore seeks to address the
following questions.
 What design parameters should be considered in the design of voting system model such
as the power supply, rectifier, filter, voltage regulator and micro controller?
 What are the development parameters should be used in micro _controller-based voting
system model with respect to its input and output relationship?
 What are the evaluation parameters to be used to measure the Performance, acceptability
and capabilities of the voting system model?
 How can you manage our time and human power?

1.3 OBJECTIVE OF THE STUDY

1.3.1 GENERAL OBJECTIVE

The general objective of the study is to design electronic voting system Model through
microcontroller-based circuit and simulation. The microcontroller based electronic voting system
will be demonstrated according to its established parameters.

1.3.2 SPECIFIC OBJECTIVE .

 To design an electronic voting system model which is controlled by PIC16F877A


microcontroller that can be used both for voting and counting votes.

3
 To develop the voting machine for automatic
 Counting and secured system.
 To simulate electronic voting system model using proteus and MIKROC programing
software.
 To evaluate the systems performance and acceptability in accordance to established
assessment parameters.

1. 4. SIGNIFICANCE OF THE STUDY

The design and simulation of electronic voting system model will offer a good voting system to
the people who elect their wanted candidates using microcontroller-based technology. The
application of microcontroller technology to voting paves the way for an efficient and more
convenient voting across, Ethiopia there by providing significant economic impact. Moreover,
the technology adopted also provides potent technology transfer to paper-based voting system
into possible development of an electronic voting machine.

1.5 FRAME WORK OF THE STUDY

The theoretical framework used in the study follows the input – process – output relationship as
shown in Figure 1.1 Switches are connected to the appropriate input module of the
microcontroller and output devices are connected to the designated output module of the
microcontroller. Input & output devices are processed through the microcontroller to the desired
control outcome of the output devices.

Figure 1.1. The Framework of the project

4
The study is anchored on the system framework as shown in Figure 1.2 where input/output
devices are connected to the PIC16F877A microcontroller modules; system programming in C-
language is accomplished through an interfacing circuit.

Figure 1.2. Control System Framework

1.6 SCOPE AND LIMITATION OF THE PROJECT

The study outlines the design and development of an Electrovating machine that employs
electronic switching through electronic simulation. The circuit design and implementation are
conducted via pure electronic simulation using the protues software which is preferred due to
materials and financial constraints. The project inhibits the conduct of the following in the entire
scope of the study.

 Control design and simulation of voting machine.


 The development of hardware and software.

It is significant to know that this design is limited to power supply. If there is no power supply
during voting the machine is not working.

5
CHAPTER TWO

LITERATURE REVIEW

The related literatures and similar studies mentioned in this study substantiate the arguments that
support the theories and assumptions there in. The information gathered in this chapter provides
compelling motivation to pursue the study due to the Benchmark information and baseline
research that reflect meritorious works and scholarly studies conducted by experts that are
relevant to Electronic voting. Switches, LED light emitted diode and LCD are the preferred
devices which are dependent on appropriate triggering input switches. This paper presents a way
to develop an electronic voting machine which displays the count of votes on a 16x2 LCD
interface. A user can get his/her vote register through a set of switches (one for each candidate
and corresponding led is present for each candidate to indicate whom is voted). After voting is
done, the final count can be seen on LCD. This LCD based electronic voting machine is designed
for four candidates.

Switches are connected to the appropriate input module of the microcontroller and output
devices are connected to the designated output module of the microcontroller. Input & output
devices are processed through the microcontroller to the desired control outcome of the output
devices.

2.1. OVERVIEW OF ELECTRONIC VOTING SYSTEM AND THE


MICROCONTROLLER

The use of electronic voting technology in elections was introduced in 1964 when punch cards
and computer tally machines were first used in the United States (US) presidential primaries in
two counties in the state of Georgia. Since then, other technologies like direct recording
electronic (DRE) voting machines have been introduced in some countries to help improve the
efficiency and transparency of voting/counting procedures.

However, there are countries that had previously adopted these technologies and are now
reverting to conventional paper ballots for various reasons. Electronic voting machines (EVMs),
are either electro-mechanical or electronic equipment that can be used to define ballots, cast

6
and/or count votes, report or display election results, and/or maintain and produce audit trail
information.( IFES, 2011) (Chaum 2003) addressed the concepts of untraceable electronic mail
and digital pseudonyms, which can apply for electronic voting for anonymity. In the recent
years, voting equipment which were widely adopted may be divided into five types
(Mercuri 2002): Paper-based voting, Optical voting machine, Lever voting machine, Punch card
and direct recording electronic voting machine.

Although most electronic voting devices are usually sourced out and customized (McClure and
Lohry 2001), various open source E-voting systems are also available (Chaum 2003; Keller,
Dechert et al. 2005). It is important to note that some recent studies have shown that most of the
electronic voting systems being used today are fatally defective (Kohno, Stubblefield et al.
2004; Proebstel,Riddle et al. 2007; Balzarotti, Banks et al. 2010) and that their quality does not
match the importance of the task that they are supposed to carry out. In (Qadah and Taha, 2007)
design and implementation requirements were presented while (Kumar and Begum 2011)
presented a fingerprint based system. Although these designs are quite efficient the intensity
involved and complexity of the overall system is an issue which our design answers, the
simplicity of our design is the main novelty we present.

Micro-controllers are "embedded" inside some other device so that they can control the features
or actions of the product. Another name for a micro-controller, therefore, is "embedded
controller". Micro-controllers are dedicated to one task and run one specific program. The
program is stored in ROM (read-only memory) and generally does not change. Micro-controllers
are often low-power devices. A battery-operated Micro-controller might consume 50 mill watts.
A micro-controller has a dedicated input device and often (but not always) has a small LED or
LCD display for output. A micro-controller also takes input from the device it is controlling and
controls the device by sending signals to different components in the device.

Most microcontrollers today are based on the Harvard architecture, which clearly defined the
four basic components required for an embedded system. These include a CPU core, memory for
the program (ROM or Flash memory), memory for data (RAM), one or more timers
(customizable ones and watchdog timers), as well as I/O lines to communicate with external
peripherals and complementary resources — all this in a single integrated circuit. A

7
microcontroller differs from a general-purpose CPU chip in that the former generally is quite
easy to make into a working computer, with a minimum of external support chips. The idea is
that the microcontroller will be placed in the device to control, hooked up to power and any
information it needs, and that's that.

A traditional microprocessor won't allow you to do this. It requires all of these tasks to be
handled by other chips. For example, some number of RAM memory chips must be added. The
amount of memory provided is more flexible in the traditional approach, but at least a few
external memory chips must be provided, and additionally requires that many connections must
be made to pass the data back and forth to them.

For instance, a typical microcontroller will have a built in clock generator and a small amount of
RAM and ROM (or EPROM or EEPROM), meaning that to make it work, all that is needed is
some control software and a timing crystal (though some even have internal RC clocks).
Microcontrollers will also usually have a variety of input/output devices, such as analog-to-
digital converters, timers, UART’s or specialized serial communications interfaces like PC,
Serial Peripheral Interface and Controller Area Network. Often these integrated devices can be
controlled by specialized processor instructions. Originally, microcontrollers were only
programmed in assembly language, or later in C code. Recent microcontrollers integrated with
on-chip debug circuit accessed by In-circuit emulator via JTAG (Joint Text Action Group)
enables a programmer to debug the software of an embedded system with a debugger.

PIC microcontrollers (Programmable Interface Controllers), are electronic circuits that can be
programmed to carry out a vast range of tasks. They can be programmed to be timers or to
control a production line and much more. They are found in most electronic devices such as
alarm systems, computer control systems, phones, in fact almost any electronic device. Many
types of PIC microcontrollers exist, although the best are probably found in the GENIE range of
programmable microcontrollers. These are programmed and simulated by Circuit Wizard
software. PIC Microcontrollers are relatively cheap and can be bought as pre-built circuits or as
kits that can be assembled by the user. We used for our project PIC16F877A microcontroller.

8
2.2. INTRODUCTION TO SEVERAL BASIC ELECTRICAL COMPONENTS

There are many electronic components that can be used during the development of electronic
voting circuit. There are some that we are familiar with and some are rarely used. All
components play its important role and interrelated between each other in completing the circuit
design.

2.2.1 MICROCONTROLLER (PIC16F877A)

Microcontroller PIC16F877A is one of the PICMicro Family microcontroller which is popular at


this moment, start from beginner until all professionals. Because very easy using PIC16F877A
and use FLASH memory technology so that can be write - erase until thousand times. The
superiority this RISC Microcontroller compared to with other microcontroller 8-bit especially at
a speed of and his code compression. The microcontroller has 40 pin by 33 path of I/O.

PIC1877A perfectly fits many uses, from automotive industries and controlling home appliances
to industrial instruments, remote sensors, electrical door locks and safety devices. It is also ideal
for smart cards as well as for battery supplied devices because of its low consumption. EEPROM
memory makes it easier to apply microcontrollers to devices where permanent storage of various
parameters is needed (codes for transmitters, motor speed, receiver frequencies, etc.). Low cost,
low consumption, easy handling and flexibility make PIC16F877A applicable even in areas
where microcontrollers had not previously been considered (example: timer functions, interface
replacement in larger systems, coprocessor applications, etc.). In System Programmability of this
chip (along with using only two pins in data transfer) makes possible the flexibility of a product,
after assembling and testing have been completed. This capability can be used to create
assembly-line production, to store calibration data available only after final testing, or it can be
used to improve programs on finished products.

2.2.1.1 MICROCHIP PIC16F877A MICROCONTROLLER FEATURES

a. High-Performance RISC CPU

 Lead-free; RoHS-compliant

9
 Operating speed: 20 MHz, 200 ns instruction cycle
 Operating voltage: 4.0-5.5V
 Industrial temperature range (-40° to +85°C)
 15 Interrupt Sources
 35 single-word instructions
 All single-cycle instructions except for program branches (two-cycle)

b. Special Microcontroller Features

 Flash Memory: 14.3 Kbytes (8192 words)


 Data SRAM: 368 bytes
 Data EEPROM: 256 bytes
 Self-reprogrammable under software control
 In-Circuit Serial Programming via two pins (5V)
 Watchdog Timer with on-chip RC oscillator
 Programmable code protection
 Power-saving Sleep mode
 Selectable oscillator options
 In-Circuit Debug via two pins

c. Peripheral Features

33 I/O pins; 5 I/O ports

 Timer0: 8-bit timer/counter with 8-bit prescaler


 Timer1: 16-bit timer/counter with prescaler
o Can be incremented during Sleep via external crystal/clock
 Timer2: 8-bit timer/counter with 8-bit period register, prescaler and postscaler
 Two Capture, Compare, PWM modules
o 16-bit Capture input; max resolution 12.5 ns
o 16-bit Compare; max resolution 200 ns
o 10-bit PWM

10
 Synchronous Serial Port with two modes:

o SPI Master
o I2C Master and Slave

 USART/SCI with 9-bit address detection


 Parallel Slave Port (PSP)
o 8 bits wide with external RD, WR and CS controls
 Brown-out detection circuitry for Brown-Out Reset

d. Analog Features

 10-bit, 8-channel A/D Converter


 Brown-Out Reset
 Analog Comparator module
o 2 analog comparators
o Programmable on-chip voltage reference module
o Programmable input multiplexing from device inputs and internal VREF
o Comparator outputs are externally accessible

The figure of a PIC16F877 chip is shown below.

Figure 2.1. PIC16F877A (micro controller)

11
e. Pin Number Description

1. MCLR/VPP - Master Clear Input


2. RA0/AN0 - Port A
3. RA1/AN1 - Port A
4. RA2/AN2/VREF-/CVREF - Port A
5. RA3/AN3/VREF+ - Port A
6. RA4/T0CKI/C1OUT - Port A
7. RA5/AN4/SS/C2OUT - Port A
8. RE0/RD/AN5 - Port E
9. RE1/WR/AN6 - Port E
10. RE2/CS/AN7 - Port E
11. Vdd - Positive Power Supply
12. Vss - Ground
13. OSC1/CLKI - Oscillator Input
14. OSC2/CLKO - Oscillator Output
15. RC0/T1OSO/T1CKI - Port C
16. RC1/T1OSI/CCP2 - Port C
17. RC2/CCP1 - Port C
18. RC3/SCK/SCL - Port C
19. RD0/PSP0 - Port D
20. RD1/PSP1 - Port D
21. RD2/PSP2 - Port D
22. RD3/PSP3 - Port D
23. RC4/SDI/SDA - Port C
24. RC5/SDO - Port C
25. RC6/TX/CK - Port C
26. RC7/RX/DT - Port C
27. RD4/PSP4 - Port D
28. RD5/PSP5 - Port D
29. RD6/PSP6 - Port D

12
30. RD7/PSP7 - Port D
31. Vss - Ground
32. Vdd - Positive Power Supply
33. RB0/INT - Port B
34. RB1 - Port B
35. RB2 - Port B
36. RB3/PGM - Port B
37. RB4 - Port B
38. RB5 - Port B
39. RB6/PGC - Port B
40. RB7/PGD - Port B

2.2.2. LCD (LIQUID CRYSTAL DISPLAY)

LCD screen is an electronic display module and find a wide range of applications. A 16x2 LCD
display is very basic module and is very commonly used in various devices and circuits. These
modules are preferred over seven segments and other multi segment LEDs. The reasons being:
LCDs are economical; easily programmable; have no limitation of displaying special & even
custom characters (unlike in seven segments), animations and so on.

A 16x2 LCD means it can display 16 characters per line and there are 2 such lines. In this LCD
each character is displayed in 5x7 pixel matrix. This LCD has two registers, namely, Command
and Data.

The command register stores the command instructions given to the LCD. A command is an
instruction given to LCD to do a predefined task like initializing it, clearing its screen, setting the
cursor position, controlling display etc. The data register stores the data to be displayed on the
LCD. The data is the ASCII value of the character to be displayed on the LCD. Click to learn
more about internal structure of a LCD.

13
Figure 2.2. 16x2 LCD display

Table 2.1. Pin Diagram and Pin No Function of LCD

Pin Function Name


No
1 Ground (0V) Ground
2 Supply voltage; 5V (4.7V – 5.3V) Vcc
3 Contrast adjustment; through a variable resistor VEE
4 Selects command register when low; and data register when high Register Select
5 Low to write to the register; High to read from the register Read/write
6 Sends data to data pins when a high to low pulse is given Enable
7 DB0
8 DB1
9 8 bit data pins DB2
10 DB3
11 DB4
12 DB5
13 DB6
14 DB7
15 Backlight VCC (5V) Led+
16 Backlight Ground (0V) Led-

14
VSS, VDD and VEE

Pin 1 (VSS) is a ground pin and it is certainly needed that this pin should be grounded for LCD
to work properly. VEE and VDD are given +5V normally. However VEE may have a
potentiometer voltage divider network to get the contrast adjusted. But VDD is always at +5V.

RS, R/W and E

These three pins are numbered 4, 5 and 6 as shown above. RS is used to make the selection
between data and command register. For RS=0, command register is selected and for RS=1 data
register is selected.

R/W gives you the choice between writing and reading. If set (R/W=1) reading is enabled.
R/W=0 when writing.

Enable pins is used by the LCD to latch information presented to its data pins. When data is
supplied to data pins, a high to low pulse must be applied to this pin in-order for the LCD to
latch in the data present at the data pins. It may be noted here that the pulse must be of minimum
450ns wide.

D0-D7

The 8-bit data pins, D0-D7, are used to send information to the LCD or read the contents of
LCD's internal register.

"To display letters and numbers, we send ASCII code for the letters A-Z, a-z and numbers 0-9
while making RS=1. We also use RS=0 to check the busy flag bit to see if the LCD is ready to
receive information. The busy flag is D-7 and can be read when R/W=1 and RS=0, as follows: if
R/W=1, RS=0. When D7=1 (busy flag=1), the LCD is busy taking care of internal operations
and will not accept any new information. When D7=0, the LCD is ready to receive new
information. It is recommended to check the busy flag before writing any data to LCD".

15
2.2.3 LED

A light-emitting diode (LED) is a semiconductor device that emits visible light when an electric
current passes through it. The light is not particularly bright, but in most LEDs it is
monochromatic, occurring at a single wavelength. The output from an LED can range from red
(at a wavelength of approximately 700 nanometers) to blue-violet (about 400 nanometers). Some
LEDs emit infrared (IR) energy (830 nanometers or longer); such a device is known as an
infrared-emitting diode (IRED).

An LED or IRED consists of two elements of processed material called P-type semiconductors
and N-type semiconductors. These two elements are placed in direct contact, forming a region
called the P-N junction. In this respect, the LED or IRED resembles most other diode types, but
there are important differences. The LED or IRED has a transparent package, allowing visible or
IR energy to pass through. Also, the LED or IRED has a large PN-junction area whose shape is
tailored to the application.

Typical applications include:

 Indicator lights: These can be two-state (i.e., on/off), bar-graph, or alphabetic-numeric


readouts.
 LCD panel backlighting: Specialized white LEDs are used in flat-panel computer
displays.
 Fiber optic data transmission: Ease of modulation allows wide communications
bandwidth with minimal noise, resulting in high speed and accuracy.
 Remote control: Most home-entertainment "remotes" use IREDs to transmit data to the
main unit.

Figure 2.3. LED indicator.

16
2.2.4. RESISTOR

Resistor in Figure 2.4 is a passive two terminal components which widely use in the circuit. Its
function is to limit the current of the circuit. It also used as a sefety mechanism if a circuit
exceeds safe margin.

Figure 2.4. Resistor

2.2.5. CAPACITOR

A capacitor in Figure 2.5 is a device that stores energy in the electrical field created between a
pair of conductors on which electrical changes of equal magnitude, but opposite sign, have been
placed. A capacitor is occasionally referred to using the older term condenser.

Figure 2.5. Capacitor

2.2.6 BUZZER

A Buzzer in Figure2.6or Beeper is a signaling device, usually electronic, typically used


in automobiles, household appliances such as microwave ovens, or game shows. It most
commonly consists of a number of switches or sensors connected to a control unit that
determines if and which button was pushed or a preset time has lapsed, and usually illuminates a
light on the appropriate button or control panel, and sounds a warning in the form of a
continuous or intermittent buzzing or beeping sound.

17
Figure 2.6. Buzzer

Initially this device was based on an electromechanical system which was identical to an electric
bell without the metal gong (which makes the ringing noise). Often these units were anchored to
a wall or ceiling and used the ceiling or wall as a sounding board. Another implementation with
some AC-connected devices was to implement a circuit to make the AC current into a noise loud
enough to drive a loudspeaker and hook this circuit up to an 8-ohm speaker. Nowadays, it is
more popular to use a ceramic-based piezoelectric sounder which makes a high-pitched tone.
Usually these were hooked up to "driver" circuits which varied the pitch of the sound or pulsed
the sound on and off.

In game shows it is also known as a "lockout system" because when one person signals ("buzzes
in"), all others are locked out from signaling. Several game shows have large buzzer buttons
which are identified as "plungers". The buzzer is also used to signal wrong answers and when
time expires on many game shows, such as Wheel of Fortune, Family Feud and The Price is
Right.

The word "buzzer" comes from the rasping noise that buzzers made when they were
electromechanical devices, operated from stepped-down AC line voltage at 50 or 60 cycles.
Other sounds commonly used to indicate that a button has been pressed are a ring or a beep.

2.2.7 SWITCH

A Push Switch in Figure2.7or Push to make switch, allows electricity to flow between its two
contacts when held in. When the button is released, the circuit is broken. So it is called a non-

18
latching switch. Other forms are push to break which does the opposite. i.e., when the button is
not pressed, electricity can flow, but when it is pressed the circuit is broken.

Figure 2.7. Switch

2.2.8 BLOCK DIAGRAM OF POWER SUPPLY FOR THE SYSTEM

The general block diagram of power supply in Figure2.8 consists of AC source, transformer,
rectifier, filter and regulator.

Figure 2.8. Block Diagram of Power Supply for the System

a) Power Supply

The input to the controlling circuit is applied from the regulated power supply. The ac 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 dc voltage. So in order to get a pure dc voltage,

19
the output voltage from the rectifier is fed to a filter to remove any ac components present even
after rectification. Now, this voltage is given to a voltage regulator to obtain a pure constant dc
voltage.
b) 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 ac input available at the
mains supply i.e., 230 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 as shown in the Figure 2.9 below.

Figure 2.9. Step down transformer

c) Rectifier

The output from the transformer is fed to the rectifier. It converts AC into pulsating DC. The
rectifier may be a half wave or a full wave rectifier. In this project, a bridge rectifier in Figure
2.10 is used because of its merits like good stability and full wave rectification.

Figure 2.10. Bridge rectifier circuit Figure 2.10:

20
The bridge rectifier is a circuit, which converts an AC voltage to DC voltage using both half
cycles of the input AC voltage. The bridge rectifier circuit is shown in the figure. The circuit has
four diodes connected to form a bridge. The AC input voltage is applied to the diagonally
opposite ends of the bridge. The load resistance is connected between the other two ends of the
bridge. For the positive half cycle of the input AC voltage, diodes D1 and D3 conduct, whereas
diodes D2 and D4 remain in the OFF state. The conducting diodes will be in series with the load
resistance RL and hence the load current flows through RL. For negative half cycle the input AC
voltage of the AC voltage, diode D2 and D4 conduct whereas, D1 and D3 remain OFF.

21
CHAPTER 3

MATERIALS AND METHODOLOGY

3.1. MATERIALS

The materials we have used in our project are websites; which we go through different books,
journals, and thesis and ongoing projects in Electronic voting system. From this we are going to
select appropriate rating of resistors and LED, LCD, crystal oscillator, and push button (to save
power than switch) based on their application in automated electronic voting machine and
analyzed values. In addition to this we are using PIC16F877A micro controller and MIKROC
version 6.0.0 software to finish our semester project.

3.2 METHDOLOGY

In Literature review we have discussed, Electronic voting over view and explanation of
component commonly used in Electronic voting machine.

3.2.1. THE SYSTEM DESIGN AND DEVELOPMENT

The system design and development describe the fundamental building blocks of the system
which highlights the block diagram, operational framework, components and their specification.

3.2.1.1. BASIC BLOCK DIAGRAM OF THE SYSTEM

This block diagram explains roughly about the connection of the microcontroller
PIC16F877A, 2x16 LCD screen, push buttons and LEDs. As shown in Figure 3.1 the voting
mechanisms are stipulated based on the block diagram which has closed similarity to the
benchmarked system.

Based on this block diagram, we write the program code according to our circuit design. These
block diagram contains crystal oscillator , LCD display on the port b and candidates on the port c
and also indicator lamp is there also to determine whether votes correctly or not .There are 5
push buttons the one is whether it active the voting or not and the rest 4 indicates that whether

22
the individual vote is voted or not.

We can group block diagram as a general:


 Input unit
 Micro-controller unit
 Output unit
 Power unit

Figure 3.1. Block Diagram For Electronic Voting Using PIC16F877A

3.2.1.2. FLOW CHART OF OVERALL CONTROL CIRCUIT OF THE SYSTEM

In the figure below indicates the flow chart of the overall idea of the project before writing to the
MikroC. After drowning the flow chart it is simple to write the C code on the MikroC or any
other software.

23
STAR

IS START BUTTON
PRESSED?

YES

LCD DISPLAY: WELCOME TO VOTE

NO

LCD DISPLAY: PRESS BUTTON TO CAST VOTE

LCD DISPLAY:
CANDIDATE1 CANDIDATE52 CANDIDATE5
2CANDIDATE 3 CANDIDATE 4 CANDIDATE 6

NO

YES

VALUE = VALUE + 1 LED ON SOUNDER ON

Figure 3.2. Flow Chart of The Voting Process

24
STAR

IS RESULT BUTTON
PRESSED?
NO

YES

LCD DISPLAY:
CAND 1 = RESULT CAND 2 = RESULT
CAND 3 = RESULT CAND 4 = RESULT
CAND 5 = RESULT CAND 6 = RESULT

Figure 3.3. Flow chart of the system to see the result.

25
3.2.1.3. THE OVERALL CONTROL CIRCUIT OF THE SYSTEM

The completed circuit for our semester project on electronic voting machine using micro
controller (PIC16F877A) and other components shown below.
___

Figure 3.4. The Overall Circuit For Electro Voting Machine.

3.3. SYSTEM OPERATIONS

After the start button is pressed “Welcome to vote” is displayed on the screen. Some delay time
“press button to cast vote” is also comes .As long as the voting is started by pressing the start
push button the indicator LED yellow is ON then the 4 candidates will be displayed on the LCD

26
screen and there is push button on the micro controller that indicates the candidates and there is
also corresponding LED green on the candidate to indicate whether the candidate is voted or not.
If voted the LED green is on else as it is off. If one of the candidates voted let say C1 (candidate
1) out of the 4candidates the LED1 green on and at that time C1 incremented by one the same for
others also until the voting is finished.

Then we want to determine which one is the winner and we want to know how much we get so
there is another result switch to determine the result and the winner .but in these case there is
some conditions we are take in order to secure the voting procedure .Before pressing the result
button we must active the start button and then we can press the result button and after pressing
the result button the LCD displays each candidate with their value after some delay it compares
and display which one is the winner. If there is equal value between the candidates the LCD
displays “there is equal vote”. For these case no one vote two times inside the voting room b/se
there one probability to active the start button or else no one votes if the start button is press this
is all about our semester project operates.

3.4. SYSTEM COMPONENTS, INTEGRATIONS, AND SPECIFICATIONS

In this project there are two switches one for starting EVM another for ending the voting process.
A set of switches are provided through which a user can cast vote. After every cast of vote, the
subsequent count cannot be seen on the LCD display because it is programed as not displayed
rather incremented and then displayed the result after pressing the result button. The LCD and
switches are controlled through PIC16F877A microcontroller. In this machine we have the
provision of casting votes for the candidates has been provided through four of these
switches. These switches are made active high and connected to pins of the controller.
These switches are connected in the port d of the microcontroller. These switches are made
active high.

The remaining two switches are to start and stop the voting procedure. These two switches are
made active low. The start switch initializes the voting system when pressed, while press the stop
switch ends the voting and displays the candidate results on LCD screen. These two switches are
must not be controlled by the candidate it should be controlled by a person. The display device

27
LCD is connected to the port b of the microcontroller. Our designs components are grouped into
the following units and the components of the electronic system consist of illustrated on the
block diagram above 3.1. Input unit, micro-controller unit, output unit and power unit. We will
see each later.

3.4.1. INPUT UNIT

Here, the push buttons are used to cast and result a vote. Six push buttons have been used in
modeled system to cast votes. One push button is for vote starting and the other is vote result.

Besides every switch the name of the candidates is printed so that the voter can choose their
candidate and by pressing the switch can cast the vote to their respective candidates. This EVM
is reset by the controlling person which means when one voter will complete the voting process
after few seconds the person will be reset for the next voter to process.
R7 D2
100R
Candidate 1
R8
LED-GREEN
100R
R9 D3
100R
Candidate 2
R10
LED-GREEN
100R

D4 Candidate 3

LED-GREEN

D5
Candidate 4
LED-GREEN

R2 R3 R5 R4
10k 10k 10k 10k

Figure 3.5. Candidate push button with indicator lamp.

New entry indicator (start) and Result push button

28
The two push buttons shown below are used for start and knowing the result of the candidates.

The start push button is used to avoiding multiple vote at a time b/se it active only one time so it
is used to avoid multiple voting. This switch is under the control of voting authority. Every voter
should get approval from the polling officer. It is provided for enabling the party switch in
voting mode and thus making the system more secured and less prone to mistakes .result switch
is used to know the result of candidates vote after voting.

The final results are displayed by pressing the last switch after voting process is finished.

Start button
Result button

R6
R1 10k
10k

Figure 3.6. Start and result push button

Crystal oscillators

It is an oscillator circuit in Figure below that deploys the property of mechanical resonance of a
vibrating crystal of the piezoelectric crystals for creating an accurate electrical signal with a very
precise frequency. Crystal oscillators are oscillators where the primary frequency determining
element is a quartz crystal. Because of the inherent characteristics of the quartz crystal the crystal
oscillator may be held to extreme accuracy of frequency stability. The frequency of the crystal by
keeping a track of time provides clock signal to the microcontroller. Quartz crystal of frequency
8MHz is used in the proposed system.

29
C3

22pF

X1
CRYSTAL
FREQ=8MHz
C4

22pF

Figure 3.7. Crystal oscillator circuit.

3.4.2. THE MICRO-CONTROLLER UNIT

The PIC16F877A microcontroller in Figure below is a low power, high performance CMOS 8-
bitmicrocontroller with 4kb of Flash Programmable and Erasable Read Only Memory (EPROM).
It controls the overall operation of the entire circuit. It collects data, processes it and gives an
output. When an instruction is received from the input buttons, the processor decodes the
instruction, executes it and assigns an output to the liquid Crystal Display (LCD) for data
display. The software used in writing the program was MIKROC c language. This software
provide an interface in which one can easily write, change, manipulate, process assembly codes
and then generate and also covert these assembly codes into hex codes that can be burn into a
microcontroller.

Micro controller senses the signal given from switches and decides the mode of operation in
voting mode it increments the data for corresponding key i.e. respective candidate as well as it
sends signal to display block to indicate one key is pressed. In counting mode micro controllers
fetches data from memory location and send it to display devices. Shown in the above fig 2.2 it
has 4 ports porta, portb, portc, portd and Porte and other pins that used to run the program.

3.4.3. OUTPUT UNIT

a. LCD

This LCD based electronic voting machine is designed for six candidates. The input part consists

30
of a set of six tactile switches. The switches and16x2 LCD are interfaced to microcontroller
PICF877A for various operations and displays. The main function of the LCD is to display all
the information required for voting machine. The provision of casting votes for the candidates
has been provided through four of these switches.

This display unit (LCD- LM016L) in Figure below uses an 8-bit data bus and requires three
control lines (i.e. EN, RS and RW). EN-ENABLE control line tells the LCD that data are being
sent or about to be sent to display the candidate information and knowing the results.

Figure 3.8. LCD display.

b. INDICATOR LAMP

In this case we have taken laminated LED to determine whether a voter is correctly vote or not.
An LED is there corresponding to the candidate for example a person votes candidate1 the LED
corresponding to these candidate is on others are off the same for other candidates when we
press.

c. ALARM CIRCUIT

The alarm circuit consists of the buzzer speaker with relay driven by 5V. The buzzer speaker is
an electromagnetic devil which produces a beep sound when signal is sent to the candidate’s
switches. A buzzer is provided for audio effect of switch bounce. Whenever a switch is bounced,
the system acknowledges the bounce by a short beep sound.

31
3.4.3. REGULATED POWER SUPPLY

For safe operation, the peak inverse rating of the rectifiers must be greater than Vpeak, therefore
a 220V/24V transformer was chosen.

Calculations involved

Therefore, Vp = √2 × Vrms (1)

Where Vrms = 24V since the transformer of 220V/24V was used.

The 24V AC stepped down from the transformer passes through the full wave bridge rectifier
circuit. After rectification, the 24 AC reduces by 1.4V. This is so because for full wave
rectification two diodes conduct and two diodes block and since the forward breakdown voltage
for a diode is 0.7V, the two voltages add up to give 1.4V. Thus the voltage after rectification =
24V- (0.7 × 2) = 24- 1.4 = 22.6V DC.

This is on the safer side as the capacitor begins charging up in less than half a cycle. The
maximum current that can be drawn by the main circuit is determined by the voltage regulator
following the filtering capacitor, the 7805.

Filtering Circuit

A filter figure 3.10 is used to reduce the amount of AC ripple, thus providing a relatively pure
form of DC. The main function of the filter is to minimize the ripple content in the rectifier
output. A capacitor connected in parallel with the output of the rectifier circuit is used as a filter.

Therefore a regulator is applied at the output stage.

C
1mF

Figure 3.9. Circuit Diagram Of Capacitor Filter

32
Calculation

The main voltage of 220V is stepped down by a 220V/24V transformer. Smoothing capacitors
are needed to reduce the ripples to an acceptable level. The resulting ripple voltage (dv) can be
calculated as follows

then I = Cdv/dt (2)

The standard 7805 series can produce output current in excess of 1A when used with adequate
heat sink. Therefore, it can supply a maximum of 1A. This current will be drawn from the
supply. Thus, Iload = 1A (maximum).

The value of C can then be calculated from

C = Idt/dv (3)

But generally dv which is the ripple voltage is chosen to be 30% of Vp , where Vp is the peak
voltage. For bridge rectifier, Vp(out) = Vp(in) – 1.4V, since 0.7V dropped across a diode whenever
it conducts. Only two diodes will conduct at a time. Therefore, Vp(out) = 24√2 – 1.4 = 32.54V
dv = (30/100) * 32.54 = 9.76V Therefore, C = (1 * 0.01)/9.76 = 1.034 × 10-3 F Thus, C = 1034μF
So the commercial value of 1mF.

Power Regulating Circuit

A voltage regulator is an electrical regulator designed to automatically maintain a constant


voltage level. A LM7805 voltage regulator used to achieve a 5V output voltageas shown in
Figure 3.10.

33
VOLTAGE REGULATOR
7805

1 3
VI VO

GND
2

Figure 3.10. Circuit Diagram Of Voltage Regulator

Calculation

Then the expected ripple voltage using this value of 1000μF capacitor is calculated as follows dv
= (1 * 0.01)/( 1000 × 10-6 ) = 10.00V (4)

This means that the output waveform goes from a peak value of 32.54V to (32.54- 10.00) V =
22.54V. This is required in order to maintain regulation. Therefore, peak value of 32.54V to
22.54V is acceptable since the output voltage is 5V. The ripple is neglected by the 7805
regulator. The average voltage going to the 7805 is calculated by:

VP – 0.5dv = 32.54- (0.5 × 10.00) = 27.54V the output from the 7805 is 5V at maximum current
output of 1A.

The overall design of power supply unit is shown in Figure 3.11

34
Figure 3.11. The circuit of power supply unit

In our project the power we use is 5V dc only but the power available is 220v or 230v so using
step down transformer, rectifier and 7805 voltage regulator to desired value 5v.

Figure 3.12. Block Diagram of Power Supply for the Controlling System

35
A

C
D1 D3
D
U1
J1 1N4001 1N4001 7805
2
1 1 3
VI VO

GND
CONN-H2

D4

2
C1 C2
470u 0.1u
D2 +5.00
1N4001 C3 Volts
0.1u
1N4001

Figure 3.13. Simulation of the power supply using the voltage regulator

In this case we are taking the oscilloscope to determine the wave at each stage at the rectifier and
at the filter and at the regulator stage and when we measure the output at the regulator using dc
voltmeter we get 5V dc

36
CHAPTER 4

RESULT AND DISCUSSION

The results and findings of the study are based on the stipulated methodology involved in the
conduct of the study that highlighted the design, development, and evaluation of the
development of a micro-controller based electronic voting system

4.1 SIMULATION RESULT

The aforementioned control design illustrated by the system’s truth table was simulated using the
design parameters described in the previous Chapter (The Methodology). The control parameters
were integrated into one common electronic circuit and microcontroller with source code design
to function as one whole controlling circuit for the entire control parameter. After the whole
process, an electronic simulation software known as PROTEUS was used to check, run and test
how effective and accurate the HEX code generated with the assembly language was when
virtually burn into a microcontroller and simulated.

4.1.1 ELECTRONIC VOTING SYSTEM RUNNING CONDITION

A. When the simulation in Figure 4.2 is active, the microcontroller is reset and ‘press start switch
to begin message is displayed

After that, the LCD screen will display “welcome to vote" immediately after a delay “please
vote” to indicate the voter could start to cast their vote. The result is shown in Figure 4.1 below.

Figure 4.1. Simulation Results With Please Welcome Message And Please Vote

37
Figure 4.2. Simulation result

2. The switch New Entry switch is closed, allows the electronic voting system to take the vote.
The vote is taken only when this push button is pressed. The following message in Figure 4.3
below is displayed.

Figure 4.3. Simulation Results With Candidate’s Symbol

38
3. A push button is assigned to each party. When the push button of the desired party is pressed,
then the vote is cast and the buzzer gives a beep. When the vote is casted for at least one
candidate, “voting done” after some delay “thank you” message are displayed in Figure 4.4.
Again the push button is pressed so that the electronic voting machine is ready to take the next
vote .The same process is repeated until all the voters cast their votes.

Figure 4.4. Simulation Results With Voting Done And Thank You Message

4. To know the result of the party, the push button of the respective party must be pressed so that
the number of votes cast for the party is displayed on the LCD screen. After the voting process is
ended, the Result switch is being pressed by a conservator. Then all the candidates follow by
the number of votes will be display on LCD screen as shown in Figure 4.5 and after some delay
it would declare the winner automatically.

Figure 4.5. Simulation result with total vote

39
CHAPTER 5

CONCLUSION AND RECOMONDATION

5.1. CONCLUSION

For our project we conclude that the method we are using this idea is that to save our time during
voting. Because it is voted by electrical by pressing one of the push button behind to the
candidates .and easily counting the value they get after finishing the voting and no one votes two
times and we are able to undergo voting without using paper ballot and also we have tested the
design using proteus and MIKROC, and it works successfully so that it can be applicable to the
real world based on our data survey to interviewers.

5.2. RECOMONDATION FOR FUTURE WORK

The electronic voting system can be improved for a future development. Still we are using
traditional ID card like student ID during voting when someone enters into voting room.
Therefore, lists of recommendations are given as below.

 Biometric Verification of voters, so that automatically it can be insured that one person is
voting once.
 EEPROM can be used to store data permanently.
 It could also be interfaced with the personal computer and result could be stored in the
central server and its backup could be taken on the other backend servers.
 The number of candidates can be increased by embedding another micro controller.

40
REFERANCE

[1]. Atiya Parveen1, Sobia Habib2, Saoud Sarwar3. “Scope And Limitation Of Electronic
Voting System”Ijcsmc, Vol. 2, Issue. 5, May 2013, Pg.123 – 128.
[2]. TigranAntonyan, SedaDavtyan, SotiriosKentros, AggelosKiayias, Laurent Michel,
Nicolas Nicolaou, Alexander Russell, Alexander A. Shvartsman. “State-wide Elections,
Optical Scan Voting Systems, and the Pursuit of Integrity”February 2008.
[3]. Michael D. Byrne, Kristen K. Greene, Sarah P. Everett “Usability of Voting Systems:
Baseline Data for Paper, Punch Cards, and Lever Machines” April 28-May 3, 2007.
[4]. Sahibzada Muhammad Ali, ChaudharyArshad Mehmood, AhsanKhawja,RahatNasim,
Muhammad Jawad,SaeedaUsman, Sikandar Khan, SaqibSalahuddin, MianAtifIhsan.
“Micro-Controller Based Smart Electronic Voting Machine System”2014 IEEE.
[5]. Vaibhav Bhatia, Rahul Gupta. “A Novel Electronic Voting Machine Design withVoter
Microcontroller”2014 IEEE.

41
APPENDIX

Software c code
// LCD module connections

sbit LCD_RS at RB4_bit;

sbit LCD_EN at RB5_bit;

sbit LCD_D4 at RB0_bit;

sbit LCD_D5 at RB1_bit;

sbit LCD_D6 at RB2_bit;

sbit LCD_D7 at RB3_bit;

// Pin direction

sbit LCD_RS_Direction at TRISB4_bit;

sbit LCD_EN_Direction at TRISB5_bit;

sbit LCD_D4_Direction at TRISB0_bit;

sbit LCD_D5_Direction at TRISB1_bit;

sbit LCD_D6_Direction at TRISB2_bit;

sbit LCD_D7_Direction at TRISB3_bit;

// End LCD module connections

char txt[10],txt1[10],txt2[10],txt3[10],txt4[10],txt5[10];

void main() {

int a=0,b=0;

int c=0,d=0,f=0,g=0,e=0;

trisd.f0=1;trisd.f1=1;trisd.f2=1;

42
trisd.f3=1;trisd.f4=1;trisd.f5=1,trisd.f6=1,trisd.f7=1;

portd=0;

trisc=0;

portc=0;

while(1)

if (portd.f4=1) //start button is pressed.

{ portc=2; e=1; }

while(e==1) {

Lcd_Init(); // Initialize Lcd

Lcd_Cmd(_LCD_CLEAR); // Clear display

Lcd_Cmd(_LCD_CURSOR_OFF); // Cursor off

Lcd_Out(1,1,"WELL COME TO ");

Lcd_Out(2,1," VOTING");

delay_ms(2000);

Lcd_Cmd(_LCD_CLEAR);

Lcd_Out(1,1,"press buttn" ); // Write text in first row

Lcd_Out(2,1,"To cast vote"); // Write text in second

delay_ms(3000);

Lcd_Cmd(_LCD_CLEAR); // Clear display

Lcd_Out(1,1,"C1 C3 C5"); // Write text in first row

Lcd_Out(2,1,"C2 C4 C6"); // Write text in second row

while(portd==0)

{ // This loop use for pusing the system

43
}if(portd.f0=1)

{a=a+1;portc=129;

Lcd_Cmd(_LCD_CLEAR);

Lcd_Out(2,1,"Thank you!" ); // Write text in first row

delay_ms(3000);

Lcd_Cmd(_LCD_CLEAR);

portc=0;

e=0;

if(portd.f1=1)

{b=b+1;portc=132;

Lcd_Cmd(_LCD_CLEAR);

Lcd_Out(2,1,"Thank you!");

delay_ms(3000);

Lcd_Cmd(_LCD_CLEAR);

portc=0;

e=0;

if(portd.f2=1)

{c=c+1;portc=136;

Lcd_Cmd(_LCD_CLEAR);

Lcd_Out(2,1,"Thank you!");

delay_ms(3000);

Lcd_Cmd(_LCD_CLEAR);

44
portc=0;

e=0;

if(portd.f3=1)

{d=d+1;portc=144;

Lcd_Cmd(_LCD_CLEAR);

Lcd_Out(2,1,"Thank you!");

delay_ms(3000);

Lcd_Cmd(_LCD_CLEAR);

portc=0;

e=0;

if(portd.f6=1)

{f=f+1;portc=160;

Lcd_Cmd(_LCD_CLEAR);

Lcd_Out(2,1,"Thank you!");

delay_ms(3000);

Lcd_Cmd(_LCD_CLEAR);

portc=0;

e=0;}

if(portd.f7=1)

{g=g+1;portc=192;

Lcd_Cmd(_LCD_CLEAR);

Lcd_Out(2,1,"Thank you!");

45
delay_ms(3000);

Lcd_Cmd(_LCD_CLEAR);

portc=0;

e=0;

}}

if (portd.f5=1)

{portc=2;

Lcd_Cmd(_LCD_CLEAR);

inttostr(a, txt);

inttostr(b, txt1);

inttostr(c,txt2);

inttostr(d, txt3);

inttostr(f,txt4);

inttostr(g, txt5);

delay_ms(500);

Lcd_out(1,1,"C1="); // Write text in first row

Lcd_out(1,4,txt); // Write text in first row

Lcd_out(2,1,"C2="); // Write text in second row

Lcd_out(2,4,txt1); // Write text in second row

delay_ms(2000);

Lcd_Out(1,1,"C3="); // Write text in first row

Lcd_Out(1,4,txt2);//Write text in first row

Lcd_out(2,1,"C4="); // Write text in second row

Lcd_out(2,4,txt3); // Write text in second row

46
delay_ms(2000);

Lcd_Out(1,1,"C5="); // Write text in first row

Lcd_Out(1,4,txt4);//Write text in first row

Lcd_out(2,1,"C6="); // Write text in second row

Lcd_out(2,4,txt5); // Write text in second row

delay_ms(4000);

Lcd_Cmd(_LCD_CLEAR);}}}

47

You might also like