Top Banner
DESIGN OF RFID BASED ELECTRONIC VOTING MACHINE A Major Project Report Submitted in partial fulfilment of the requirements for the award of the degree of Bachelor of Technology in ELECTRONICS AND COMMUNICATION ENGINEERING BY BHAVYAI GUPTA 2K12/EC/051 Under the guidance of DR. MALTI BANSAL ASSISTANT PROFESSOR, DEPARTMENT OF ECE DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING DELHI TECHNOLOGICAL UNIVERSITY DELHI-110042 (INDIA) MAY, 2016
43

RFID based Electronic Voting Machine

Apr 15, 2017

Download

Engineering

Bhavyai Gupta
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: RFID based Electronic Voting Machine

DESIGN OF RFID BASED

ELECTRONIC VOTING MACHINE

A Major Project Report

Submitted in partial fulfilment of the requirements

for the award of the degree of

Bachelor of Technology

in

ELECTRONICS AND COMMUNICATION ENGINEERING

BY

BHAVYAI GUPTA 2K12/EC/051

Under the guidance of

DR. MALTI BANSAL

ASSISTANT PROFESSOR, DEPARTMENT OF ECE

DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

DELHI TECHNOLOGICAL UNIVERSITY

DELHI-110042 (INDIA)

MAY, 2016

Page 2: RFID based Electronic Voting Machine

DELHI TECHNOLOGICAL UNIVERSITY

Established by Govt. of India vide Act 6 of 2009 (Formerly Delhi College of Engineering)

SHAHBAD DAULATPUR, BAWANA ROAD, DELHI 110042

CERTIFICATE

I hereby certify that the work which is being presented in the B.Tech Major Project

Report entitled “RFID BASED ELECTRONIC VOTING MACHINE”, in partial fulfilment

of the requirements for the award of the Degree of Bachelor of Technology in Electronics

and Communication Engineering and submitted to the Department of Electronics and

Communication Engineering of Delhi Technological University is an authentic record of my

own work carried out under the supervision of Dr. Malti Bansal, Assistant Professor.

The matter presented in this report has not been submitted by me for the award of any

other Degree/Diploma elsewhere.

BHAVYAI GUPTA

2K12/EC/051

Date: 31/05/2016

Dr. MALTI BANSAL

ASSISTANT PROFESSOR

Page 3: RFID based Electronic Voting Machine

DELHI TECHNOLOGICAL UNIVERSITY

Established by Govt. of India vide Act 6 of 2009 (Formerly Delhi College of Engineering)

SHAHBAD DAULATPUR, BAWANA ROAD, DELHI 110042

DECLARATION

I hereby declare that all the information in this document has been obtained and

presented in accordance with academic rules and ethical conduct. This report is my own work

to the best of my belief and knowledge. I have fully cited all the material by others which I

have used in my work.

It is being submitted for the degree of Bachelor of Technology in Electronics and

Communication at the Delhi Technological University. To the best of my knowledge, it has

not been submitted before any degree or examination in any other university.

Bhavyai Gupta

B.Tech (ECE)

2K12/EC/051

Page 4: RFID based Electronic Voting Machine

ACKNOWLEDGEMENT

I express my deepest gratitude towards Dr. Malti Bansal, Department of Electronics

and Communication Engineering, Delhi Technological University, whose encouragement,

guidance and support from initial to final level enabled to develop an understanding of the

subject. Her suggestion and ways of summarizing the things made me to go for independent

studying and trying my best to get the maximum in the topic, this made my circle of

knowledge very vast. I am highly thankful to her for guiding me in this project.

Date: 31/05/2016

Bhavyai Gupta

2K12/EC/051

B.Tech (ECE)

Page 5: RFID based Electronic Voting Machine

ABSTRACT

The aim of this project is to design and implement a secured voting system which

utilizes the RFID technology along with the Electronic Voting Machine to further improve

the election process and to avoid rigging.

The system we have developed uses Arduino Uno as a microcontroller, a RFID reader

and LCD display. Here the voter comes to the polling booth to exercise his franchise, he is

directed to swipe his voter identity card on a RFID reader. The RFID reader senses the voter

ID and sends this information to the Arduino. After receiving the voter ID, the Arduino

checks whether the received voter ID belongs to the particular polling booth or not. If the

voter ID belongs to the particular booth, the Arduino finds if the voter has voted or not. If

not, then it the makes the voting machine ready for voting. This process continues for each

voter.

Page 6: RFID based Electronic Voting Machine

TABLE OF CONTENTS

I. CERTIFICATE................................................................................................................... (2)

II. DECLARATION.............................................................................................................. (3)

III. ACKNOWLEDGEMENT............................................................................................... (4)

IV. ABSTRACT.................................................................................................................... (5)

V. TABLE OF CONTENTS................................................................................................. (6)

VI. LIST OF FIGURES......................................................................................................... (8)

VII. LIST OF TABLES......................................................................................................... (9)

VIII. LIST OF ABBREVIATIONS..................................................................................... (10)

IX. INTRODUCTION......................................................................................................... (11)

1. Radio Frequency Identification........................................................................................ (12)

1.1 Overview of RFID.............................................................................................. (12)

1. 2 Design of RFID Tags......................................................................................... (12)

1.3 Design of RFID Readers..................................................................................... (13)

1.4 RFID Signalling.................................................................................................. (14)

1.5 RFID Application............................................................................................... (15)

1.6 Use of RFID in our project................................................................................. (16)

1.7 Working of RFID Tags and Readers.................................................................. (17)

2. Liquid Crystal Display..................................................................................................... (19)

2.1 Overview of LCD............................................................................................... (19)

2.2 Working of LCD................................................................................................. (19)

2.3 Design of 16X2 LCD.......................................................................................... (20)

3. Arduino Uno..................................................................................................................... (21)

3.1 Overview of Arduino.......................................................................................... (21)

3.2 Feature of Arduino Boards................................................................................. (21)

3.3 Overview of Arduino Uno.................................................................................. (23)

3.4 Arduino Libraries Used...................................................................................... (24)

Page 7: RFID based Electronic Voting Machine

3.4.1 Software Serial.................................................................................... (24)

3.4.2 Liquid Crystal...................................................................................... (26)

4. Other Hardware Used....................................................................................................... (28)

4.1 Potentiometer...................................................................................................... (28)

4.2 Push Button......................................................................................................... (28)

4.3 Resistor............................................................................................................... (29)

4.4 Bread Board........................................................................................................ (30)

5. Working of the Project...................................................................................................... (31)

5.1 Pictures of the circuit.......................................................................................... (31)

5.2 Arduino Code..................................................................................................... (32)

5.3 Explanation of the code and Working................................................................ (38)

6. Results and Analysis......................................................................................................... (40)

6.1 Results................................................................................................................ (40)

6.2 Analysis.............................................................................................................. (40)

7. Conclusion and Future Scope........................................................................................... (41)

7.1 Conclusion.......................................................................................................... (41)

7.2 Limitation and Future scope............................................................................... (41)

X. REFERENCES................................................................................................................ (42)

Page 8: RFID based Electronic Voting Machine

LIST OF FIGURES

Fig 1: EM-18 Reader Module............................................................................................... (15)

Fig 2: RFID Tags.................................................................................................................. (16)

Fig 3: Internal Wiring of RFID Tags.......................................................................................... (17)

Fig 4: Individual Components of RFID Reader Module............................................................ (18)

Fig 5: 16x2 LCD display............................................................................................................ (20)

Fig 6: Arduino Uno Pin Diagram............................................................................................... (23)

Fig 7: Potentiometer................................................................................................................... (28)

Fig 8: Push Button..................................................................................................................... (29)

Fig 9: Resistor........................................................................................................................... (29)

Fig 10: Bread Board................................................................................................................... (30)

Fig 11: Connections in the circuit............................................................................................... (31)

Fig 12: Snap of working of Project............................................................................................ (31)

Fig 13: Block Diagram of the circuit........................................................................................ (32)

Page 9: RFID based Electronic Voting Machine

LIST OF TABLES

Table 1: RFID Frequency Bands.................................................................................. ........ (14)

Table 2: EM-18 Pin Specification........................................................................................ (16)

Table 3: LCD Pin Description.................................................................................................. (20)

Table 4: Arduino Uno Specifications......................................................................................... (24)

Page 10: RFID based Electronic Voting Machine

LIST OF ABBREVIATIONS

S No Abbreviation Full Form

1 RFID Radio Frequency Identification

2 EVM Electronic Voting Machine

3 AIDC Automatic Identification and Data Capture

4 RF Radio Frequency

5 PRAT Passive Reader Active Tag

6 ARPT Active Reader Passive Tag

7 ID Identification

8 BAP Battery Assisted Power

9 LF Low Frequency

10 HF High Frequency

11 TDMA Time Division Multiple Access

12 LCD Liquid Crystal Display

13 CRT Cathode Ray Tube

14 IDE Integrated Development Environment

15 USB Universal Serial Bus

16 AC Alternating Current

17 DC Direct Current

18 ASCII American Standard Code for Information Interchange

19 UART Universal Asynchronous Receiver/Transmitter

Page 11: RFID based Electronic Voting Machine

INTRODUCTION

Election is a basic process that occupies a prominent place in any democratic country.

Many countries are using technology to effectively conduct elections and to smoothen the

process. Recently a massive general election process concluded in India. Electronic Voting

machines are used effectively in these elections. Though the election commission took

extreme care, here and there some rigging and malpractices were reported during this election

process. It is a difficult task for the polling officials also for identifying the authenticity of the

voter and to stop rigging. If a sophisticated electronic identification system is developed to

identify the voter, then the malpractices can be stopped and it will help the polling officials in

their work. In that direction we thought of a system which can identify the voter ID and check

the voter for authenticity.

This project is a product of that idea. Here Radio-Frequency Identification (RFID)

based voter identification is employed. Arduino Uno is used analyse the data received from

the RFID reader. The Microcontroller is provided with the data base of the all the voters and

theirs voter Ids. After receiving the voter ID from the RFID reader, the Arduino Uno

compares the ID with its data base. If the voter ID belongs to that Polling booth, the Arduino

identifies the voter and displays his/her name on the LCD screen. Arduino then checks

whether the voter has voted in the current voting process or not. If not, the Arduino generates

an enabling control signal to the EVM. Then the EVM gets ready for voting.

Page 12: RFID based Electronic Voting Machine

1. RADIO FREQUENCY IDENTIFICATION

1.1 Overview of RFID

Radio-frequency identification (RFID) uses electromagnetic fields to automatically

identify and track tags attached to objects. The tags contain electronically stored information.

Passive tags collect energy from a nearby RFID reader's interrogating radio waves. Active

tags have a local power source such as a battery and may operate at hundreds of meters from

the RFID reader. Unlike a barcode, the tag need not be within the line of sight of the reader,

so it may be embedded in the tracked object. RFID is one method for Automatic

Identification and Data Capture (AIDC).

RFID tags are used in many industries, for example, an RFID tag attached to an

automobile during production can be used to track its progress through the assembly line;

RFID-tagged pharmaceuticals can be tracked through warehouses; and implanting RFID

microchips in livestock and pets allows positive identification of animals.

In 2014, the world RFID market is worth US$8.89 billion, up from US$7.77 billion in

2013 and US$6.96 billion in 2012. This includes tags, readers, and software/services for

RFID cards, labels, fobs, and all other form factors. The market value is expected to rise to

US$18.68 billion by 2026.

1.2 Design of RFID Tags

A radio-frequency identification system uses tags, or labels attached to the objects to

be identified. Two-way radio transmitter-receivers called interrogators or readers send a

signal to the tag and read its response.

RFID tags can be either passive, active or battery-assisted passive. An active tag has an on-

board battery and periodically transmits its ID signal. A battery-assisted passive (BAP) has a

small battery on board and is activated when in the presence of an RFID reader. A passive tag

Page 13: RFID based Electronic Voting Machine

is cheaper and smaller because it has no battery; instead, the tag uses the radio energy

transmitted by the reader. However, to operate a passive tag, it must be illuminated with a

power level roughly a thousand times stronger than for signal transmission. That makes a

difference in interference and in exposure to radiation.

Tags may either be read-only, having a factory-assigned serial number that is used as

a key into a database, or may be read/write, where object-specific data can be written into the

tag by the system user. Field programmable tags may be write-once, read-multiple; "blank"

tags may be written with an electronic product code by the user.

RFID tags contain at least two parts: an integrated circuit for storing and processing

information, modulating and demodulating a radio-frequency (RF) signal, collecting DC

power from the incident reader signal, and other specialized functions; and an antenna for

receiving and transmitting the signal. The tag information is stored in a non-volatile memory.

The RFID tag includes either fixed or programmable logic for processing the transmission

and sensor data, respectively.

An RFID reader transmits an encoded radio signal to interrogate the tag. The RFID

tag receives the message and then responds with its identification and other information. This

may be only a unique tag serial number, or may be product-related information such as a

stock number, lot or batch number, production date, or other specific information. Since tags

have individual serial numbers, the RFID system design can discriminate among several tags

that might be within the range of the RFID reader and read them simultaneously.

1.3 Design of RFID Readers

RFID systems can be classified by the type of tag and reader. A Passive Reader

Active Tag (PRAT) system has a passive reader which only receives radio signals from active

tags (battery operated, transmit only). The reception range of a PRAT system reader can be

adjusted from 1–2,000 feet (0–600 m), allowing flexibility in applications such as asset

protection and supervision.

Page 14: RFID based Electronic Voting Machine

An Active Reader Passive Tag (ARPT) system has an active reader, which transmits

interrogator signals and also receives authentication replies from passive tags.

An Active Reader Active Tag (ARAT) system uses active tags awoken with an

interrogator signal from the active reader. A variation of this system could also use a Battery-

Assisted Passive (BAP) tag which acts like a passive tag but has a small battery to power the

tag's return reporting signal.

Fixed readers are set up to create a specific interrogation zone which can be tightly

controlled. This allows a highly defined reading area for when tags go in and out of the

interrogation zone. Mobile readers may be hand-held or mounted on carts or vehicles.

Table 1: RFID Frequency Bands

Band Range Data Speed

120–150 kHz (LF) 10cm Low

13.56 MHz (HF) 10cm – 1m Low to moderate

433 MHz (UHF) 1 – 100m Moderate

865-868 MHz 1 – 12m Moderate to high

2450-5800 MHz 1 – 2m High

3.1–10 GHz to 200m High

1.4 RFID Signalling

Signalling between the reader and the tag is done in several different incompatible

ways, depending on the frequency band used by the tag. Tags operating on LF and HF bands

are, in terms of radio wavelength, very close to the reader antenna because they are only a

small percentage of a wavelength away. In this near field region, the tag is closely coupled

electrically with the transmitter in the reader. The tag can modulate the field produced by the

reader by changing the electrical loading the tag represents. By switching between lower and

higher relative loads, the tag produces a change that the reader can detect.

Page 15: RFID based Electronic Voting Machine

At UHF and higher frequencies, the tag is more than one radio wavelength away from

the reader, requiring a different approach. The tag can backscatter a signal. Active tags may

contain functionally separated transmitters and receivers, and the tag need not respond on a

frequency related to the reader's interrogation signal.

1.5 RFID Application

RFID tags are widely used in identification badges, replacing earlier magnetic stripe

cards. These badges need only be held within a certain distance of the reader to authenticate

the holder. Tags can also be placed on vehicles, which can be read at a distance, to allow

entrance to controlled areas without having to stop the vehicle and present a card or enter an

access code.

1.6 Use of RFID in our Project

We are using EM-18 Reader Module which is a RFID tag reader. This is a low

frequency (125 KHz) RFID reader with serial output at range of 8-12 cm.

Fig 1: EM-18 Reader Module

Page 16: RFID based Electronic Voting Machine

Features

1. Serial and TTL output

2. Along with two RFID cards

3. Excellent read performance without an external circuit

4. Compact size and Cost effective

Table 2: EM-18 Pin Specification

Parameter Use

VCC 5V

GND 0V

BUZZ For Buzzer or LED

TX For data transmission to Arduino

Fig 2: RFID Tags

Features

These are small sized RFID tags. These works in the 125 KHz range and perfect for our

RFID reader.

Page 17: RFID based Electronic Voting Machine

1.7 Working of RFID Tags and Reader

An RFID reader transmits an encoded radio signal to interrogate the tag. The RFID

tag receives the message and then responds with its identification and other information.

Since tags have individual serial numbers, the RFID system design can discriminate

among several tags that might be within the range of the RFID reader and read them

simultaneously.

Fig 3: Internal Wiring of RFID Tags

The antenna emits radio signals to activate the tag and read and write data to it.

Antennas are the conduits between the tag and the transceiver, which controls the system's

data acquisition and communication. The electromagnetic field produced by an antenna can

be constantly present when multiple tags are expected continually. If constant interrogation is

not required, a sensor device can activate the field.

RFID tags broadcast over a portion of the electromagnetic spectrum. The exact

frequency is variable and can be chosen to avoid interference with other electronics or among

RFID tags and readers in the form of tag interference or reader interference

Page 18: RFID based Electronic Voting Machine

RFID systems can use a cellular system called Time Division Multiple Access

(TDMA) to make sure the wireless communication is handled properly.

Fig 4: Individual Components of RFID Reader Module

The reader emits radio waves in ranges of anywhere from one inch to 100 feet or

more, depending upon its power output and the radio frequency used. When an RFID tag

passes through the electromagnetic zone, it detects the reader's activation signal. The reader

decodes the data encoded in the tag's integrated circuit (silicon chip) and the data is passed to

the host computer for processing.

Page 19: RFID based Electronic Voting Machine

2. LIQUID CRYSTAL DISPLAY

2.1 Overview of LCD

A liquid-crystal display (LCD) is a flat-panel display or other electronic visual display

that uses the light-modulating properties of liquid crystals. Liquid crystals do not emit light

directly. The LCD screen is more energy-efficient and can be disposed of more safely than a

CRT can. Its low electrical power consumption enables it to be used in battery-powered

electronic equipment more efficiently than CRTs can be. It is an electronically modulated

optical device made up of any number of segments controlling a layer of liquid crystals and

arrayed in front of a light source (backlight) or reflector to produce images in color or

monochrome. Liquid crystals were first discovered in 1888.

LCD (Liquid Crystal Display) 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.

2.2 Working of LCD

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.

Page 20: RFID based Electronic Voting Machine

2.3 Design of 16x2 LCD

LCDs are economical; easily programmable; have no limitation of displaying special

& even custom characters (unlike in seven segments), animations and so on.

Fig 5: 16x2 LCD display

Table 3: LCD Pin Description

Pin No

Function Name

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

8-bit data pins

DB0

8 DB1

9 DB2

10 DB3

11 DB4

12 DB5

13 DB6

14 DB7

15 Backlight VCC (5V) Led+

16 Backlight Ground (0V) Led-

Page 21: RFID based Electronic Voting Machine

3. ARDUINO UNO

3.1 Overview of Arduino

Arduino is an open-source prototyping platform based on easy-to-use hardware and

software. Arduino boards are able to read inputs - light on a sensor, a finger on a button, or a

Twitter message - and turn it into an output - activating a motor, turning on an LED,

publishing something online. You can tell your board what to do by sending a set of

instructions to the microcontroller on the board. To do so you use the Arduino programming

language (based on Wiring), and the Arduino Software (IDE), based on Processing.

Over the years Arduino has been the brain of thousands of projects, from everyday

objects to complex scientific instruments. A worldwide community of makers - students,

hobbyists, artists, programmers, and professionals - has gathered around this open-source

platform, their contributions have added up to an incredible amount of accessible knowledge

that can be of great help to novices and experts alike.

Arduino was born at the Ivrea Interaction Design Institute as an easy tool for fast

prototyping, aimed at students without a background in electronics and programming. As

soon as it reached a wider community, the Arduino board started changing to adapt to new

needs and challenges, differentiating its offer from simple 8-bit boards to products for IoT

applications, wearable, 3D printing, and embedded environments. All Arduino boards are

completely open-source, empowering users to build them independently and eventually adapt

them to their particular needs. The software, too, is open-source, and it is growing through

the contributions of users worldwide.

3.2 Features of Arduino Boards

There are many other microcontrollers and microcontroller platforms available for

physical computing. Parallax Basic Stamp, Netmedia's BX-24, Phidgets, MIT's Handyboard,

and many others offer similar functionality. All of these tools take the messy details of

Page 22: RFID based Electronic Voting Machine

microcontroller programming and wrap it up in an easy-to-use package. Arduino also

simplifies the process of working with microcontrollers, but it offers some advantage for

teachers, students, and interested amateurs over other systems:

Inexpensive

Arduino boards are relatively inexpensive compared to other microcontroller

platforms. The least expensive version of the Arduino module can be assembled by

hand, and even the pre-assembled Arduino modules cost less than $50

Cross-platform

The Arduino Software (IDE) runs on Windows, Macintosh OSX, and Linux

operating systems. Most microcontroller systems are limited to Windows.

Simple, clear programming environment

The Arduino Software (IDE) is easy-to-use for beginners, yet flexible enough

for advanced users to take advantage of as well. For teachers, it's conveniently based

on the Processing programming environment, so students learning to program in that

environment will be familiar with how the Arduino IDE works.

Open source and extensible software

The Arduino software is published as open source tools, available for

extension by experienced programmers. The language can be expanded through C++

libraries, and people wanting to understand the technical details can make the leap

from Arduino to the AVR C programming language on which it's based. Similarly,

you can add AVR-C code directly into your Arduino programs if you want to.

The plans of the Arduino boards are published under a Creative Commons

license, so experienced circuit designers can make their own version of the module,

extending it and improving it. Even relatively inexperienced users can build the

breadboard version of the module in order to understand how it works and save

money.

Page 23: RFID based Electronic Voting Machine

3.3 Overview of Arduino Uno

The Uno is a microcontroller board based on the ATmega328P. It has 14 digital

input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz

quartz crystal, a USB connection, a power jack, an ICSP header and a reset button. It contains

everything needed to support the microcontroller; simply connect it to a computer with a

USB cable or power it with an AC-to-DC adapter or battery to get started.

Fig 6: Arduino Uno Pin Diagram

Page 24: RFID based Electronic Voting Machine

Table 4: Arduino Uno Specifications

Microcontroller ATmega328P

Operating Voltage 5V

Input Voltage (recommended) 7-12V

Input Voltage (limit) 6-20V

Digital I/O Pins 14 (of which 6 provide PWM output)

PWM Digital I/O Pins 6

Analog Input Pins 6

DC Current per I/O Pin 20 mA

DC Current for 3.3V Pin 50 mA

Flash Memory 32 KB (ATmega328P)

of which 0.5 KB used by bootloader

SRAM 2 KB (ATmega328P)

EEPROM 1 KB (ATmega328P)

Clock Speed 16 MHz

Length 68.6 mm

Width 53.4 mm

Weight 25 g

3.4 Arduino Libraries Used

3.4.1 Software Serial

The Arduino hardware has built-in support for serial communication on pins 0 and 1

(which also goes to the computer via the USB connection). The native serial support happens

via a piece of hardware (built into the chip) called a UART. This hardware allows the

Atmega chip to receive serial communication even while working on other tasks, as long as

there room in the 64 byte serial buffer.

The SoftwareSerial library has been developed to allow serial communication on

other digital pins of the Arduino, using software to replicate the functionality (hence the

name "SoftwareSerial"). It is possible to have multiple software serial ports with speeds up to

115200 bps. A parameter enables inverted signaling for devices which require that protocol.

Page 25: RFID based Electronic Voting Machine

Functions Used

1. SoftwareSerial(rxPin, txPin)

SoftwareSerial is used to create an instance of a SoftwareSerial object, whose

name you need to provide as in the example below. The inverse_logic argument is

optional and defaults to false. See below for more details about what it does. Multiple

SoftwareSerial objects may be created, however only one can be active at a given

moment.

rxPin: the pin on which to receive serial data

txPin: the pin on which to transmit serial data

2. begin(speed)

Sets the speed (baud rate) for the serial communication. Supported baud rates

are 300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 28800, 31250, 38400, 57600,

and 115200. We have used 9600 baud rate.

3. available()

Get the number of bytes (characters) available for reading from a software

serial port. This is data that's already arrived and stored in the serial receive buffer.

4. read()

Return a character that was received on the RX pin of the software serial port.

Note that only one SoftwareSerial instance can receive incoming data at a time

Page 26: RFID based Electronic Voting Machine

3.4.2 Liquid Crystal

This library allows an Arduino board to control LiquidCrystal displays (LCDs) based

on the Hitachi HD44780 (or a compatible) chipset, which is found on most text-based LCDs.

The library works with in either 4- or 8-bit mode (i.e. using 4 or 8 data lines in addition to the

rs, enable, and, optionally, the rw control lines).

Functions Used

1. LiquidCrystal()

Creates a variable of type LiquidCrystal. The display can be controlled using 4 or

8 data lines. If the former, omit the pin numbers for d0 to d3 and leave those lines

unconnected. The RW pin can be tied to ground instead of connected to a pin on the

Arduino; if so, omit it from this function's parameters.

LiquidCrystal(rs, enable, d4, d5, d6, d7);

rs: the number of the Arduino pin that is connected to the RS pin on the LCD

enable: the number of the Arduino pin that is connected to the enable pin on the LCD

d0, d1, d2, d3, d4, d5, d6, d7: the numbers of the Arduino pins that are connected to

the corresponding data pins on the LCD. d0, d1, d2, and d3 are optional; if omitted,

the LCD will be controlled using only the four data lines (d4, d5, d6, d7).

2. begin()

Initializes the interface to the LCD screen, and specifies the dimensions (width

and height) of the display. begin() needs to be called before any other LCD library

commands.

3. clear()

Clears the LCD screen and positions the cursor in the upper-left corner.

Page 27: RFID based Electronic Voting Machine

4. setCursor()

Position the LCD cursor; that is, set the location at which subsequent text written

to the LCD will be displayed.

5. scrollDisplayLeft()

Scrolls the contents of the display (text and cursor) one space to the left.

6. write()

Write a character to the LCD.

7. print()

Prints text to the LCD.

8. display()

Turns on the LCD display, after it's been turned off with noDisplay(). This will

restore the text (and cursor) that was on the display.

Page 28: RFID based Electronic Voting Machine

4. OTHER HARDWARE USED

4.1 Potentiometer

A potentiometer, informally a pot, is a three-terminal resistor with a sliding or rotating

contact that forms an adjustable voltage divider. If only two terminals are used, one end and

the wiper, it acts as a variable resistor or rheostat.

We have used potentiometer to adjust the contrast of the LCD.

Fig 7: Potentiometer

4.2 Push Button

A push-button (also spelled pushbutton) or simply button is a simple switch

mechanism for controlling some aspect of a machine or a process. Buttons are typically made

out of hard material, usually plastic or metal. The surface is usually flat or shaped to

accommodate the human finger or hand, so as to be easily depressed or pushed. Buttons are

most often biased switches, though even many un-biased buttons (due to their physical

Page 29: RFID based Electronic Voting Machine

nature) require a spring to return to their un-pushed state. Different people use different terms

for the "pushing" of the button, such as press, depress, mash, hit, and punch.

We have used 4 push buttons to select the preferred candidate during voting.

Fig 8: Push Button

4.3 Resistor

A resistor is a passive two-terminal electrical component that implements electrical

resistance as a circuit element. Resistors may be used to reduce current flow, and, at the same

time, may act to lower voltage levels within circuits. In electronic circuits, resistors are used

to limit current flow, to adjust signal levels, bias active elements, and terminate transmission

lines among other uses. Fixed resistors have resistances that only change slightly with

temperature, time or operating voltage.

We have used 200 KΩ resistor to set the backlight of the LCD.

Fig 9: Resistor

Page 30: RFID based Electronic Voting Machine

4.4 Bread Board

A breadboard is a construction base for prototyping of electronics. Originally it was

literally a bread board, a polished piece of wood used for slicing bread. In the 1970s the

solderless breadboard (AKA plugboard, a terminal array board) became available and

nowadays the term "breadboard" is commonly used to refer to these. "Breadboard" is also a

synonym for "prototype".

Because the solderless breadboard does not require soldering, it is reusable. This

makes it easy to use for creating temporary prototypes and experimenting with circuit design.

For this reason, solderless breadboards are also extremely popular with students and in

technological education.

Fig 10: Bread Board

Page 31: RFID based Electronic Voting Machine

5. WORKING OF THE PROJECT

5.1 Pictures of the Circuit

Fig 11: Connections in the circuit

Fig 12: Snap of working of Project

Page 32: RFID based Electronic Voting Machine

Fig 13: Block diagram of circuit

5.2 Arduino Code

#include <LiquidCrystal.h>

#include <SoftwareSerial.h>

String votersDatabase[10] =

"160066C6F345",

"560012400501",

"660066C6F345",

"5600123FFE85",

"330014FRE4BE",

"460042FA34EA",

"760066C6F345",

"330394FHE4BE",

"860066C6F345",

"160066C6FR45"

;

String votersName[10] =

Page 33: RFID based Electronic Voting Machine

"Anadi",

"Bhavyai",

"Chetan",

"Dhruv",

"Eklavya",

"Fardeen",

"Gaurav",

"Hemant",

"Inder",

"Jatin"

;

int whetherCasted[10] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;

int voteBank[4] = 0, 0, 0, 0;

String voterID = "";

boolean casted = false;

boolean exist = false;

char c;

LiquidCrystal lcd(7, 6, 5, 4, 3, 2);

SoftwareSerial rfid(9, 10);

void setup()

pinMode(A2, INPUT_PULLUP);

pinMode(A3, INPUT_PULLUP);

pinMode(A4, INPUT_PULLUP);

pinMode(A5, INPUT_PULLUP);

lcd.begin(16, 2);

lcd.display();

Page 34: RFID based Electronic Voting Machine

lcd.clear();

lcd.print("Welcome to EVM with Enhanced Security");

delay(500);

for(int sh=0; sh<21; sh++)

delay(200);

lcd.scrollDisplayLeft();

delay(1000);

lcd.clear();

lcd.print("Start Voting");

delay(1000);

lcd.clear();

Serial.begin(9600);

rfid.begin(9600);

void loop()

lcd.print("Touch RFID Card");

delay(50);

if(rfid.available() > 0)

Page 35: RFID based Electronic Voting Machine

lcd.clear();

voterID = voterID + String((char)rfid.read());

if(voterID.length() == 12)

gotID();

voterID = "";

lcd.clear();

void gotID()

exist = false;

casted = false;

for(int i=0; i<10; i++)

if(votersDatabase[i] == voterID) //check for valid voter

exist = true;

lcd.print("Welcome, ");

lcd.print(votersName[i]);

delay(2000);

if(whetherCasted[i] == 1)

lcd.clear();

Page 36: RFID based Electronic Voting Machine

lcd.print("Vote already");

lcd.setCursor(0, 2);

lcd.print("casted");

delay(1000);

lcd.clear();

else

while(casted == false)

lcd.clear();

lcd.print("Please vote:");

delay(750);

lcd.clear();

if(digitalRead(A2) == LOW)

lcd.clear();

lcd.print("Candidate A");

casted = true;

voteBank[0] = voteBank[0] + 1;

else if(digitalRead(A3) == LOW)

lcd.clear();

lcd.print("Candidate B");

casted = true;

voteBank[1] = voteBank[1] + 1;

Page 37: RFID based Electronic Voting Machine

else if(digitalRead(A4) == LOW)

lcd.clear();

lcd.print("Candidate C");

casted = true;

voteBank[2] = voteBank[2] + 1;

else if(digitalRead(A5) == LOW)

lcd.clear();

lcd.print("Candidate D");

casted = true;

voteBank[3] = voteBank[3] + 1;

delay(2000);

lcd.clear();

whetherCasted[i] = 1;

lcd.print("Vote Casted");

delay(2000);

lcd.clear();

lcd.print("Thanx for Voting");

delay(2000);

lcd.clear();

Serial.print("Tally:");

Serial.print("\nCandidate A = ");

Page 38: RFID based Electronic Voting Machine

Serial.print(voteBank[0]);

Serial.print("\nCandidate B = ");

Serial.print(voteBank[1]);

Serial.print("\nCandidate C = ");

Serial.print(voteBank[2]);

Serial.print("\nCandidate D = ");

Serial.print(voteBank[3]);

Serial.print("\n\n");

if(exist == false)

lcd.print("Not Registered");

delay(2000);

lcd.clear();

5.3 Explanation of the Code and working

We maintain database of the registered voters as an array of String. Currently, our

project has 10 registered voters. In the same way, a same variable is used to find out the

corresponding voter ID and voter’s Name and whether they have casted their vote.

We have provided provision for four candidates to contest the elections. There total

vote share can be checked by authorized personnel only and is not visible to the voter.

We are using LCD in 4- bit mode and RFID module is used only to read the RFID

tags. Arduino pins connected to the push buttons are setup in INPUT_PULLUP modes, so

Page 39: RFID based Electronic Voting Machine

that Arduino provides pull-up resistors for the switches and we don’t have to explicitly

connect the resistors ourselves.

Whenever the EVM is powered on, all the database is initialized. “Welcome to EVM

with Enhanced Security” is displayed to ensure our branding. Then “Start Voting” appears to

make ensure us that the EVM is working. Then “Touch RFID Card” text shows, which is an

instruction to the voter.

Now the voter swipe his/her RFID card. If he/she is not registered, an error message is

displayed that the voter is “Not Registered”. This function eliminates the need of paper work

done by polling officers to check whether the voter is registered with current polling booth or

not.

If he/she is registered, but have already voted, a message will be displayed that the

person has already voted and cannot be allowed to vote again. This function of our EVM

eliminates the need to put a mark to those people who have already casted there vote.

If the person is registered and has not voted yet, the voting machine opens up to him

allowing to choose his candidate.

Page 40: RFID based Electronic Voting Machine

6. RESULTS AND ANALYSIS

6.1 Results

We were able to show our Project EVM with RFID in complete working condition.

Our project works as we stated. Registered voters were able to cast their vote and un-

registered voters were barred by the EVM itself.

6.2 Analysis

6.2.1 Polling officer is not needed to activate the voting machine as our EVM will accept

only one vote from one registered person.

6.2.2 Polling officers are not needed to check the voters on paper as the checking task is

done by our EVM.

6.2.3 There is no requirement for marking the fingers with ink of people who have casted

their vote because our EVM won’t allow people second time for voting process.

6.2.4 Our EVM makes it quicker to count the total votes casted and whom because the

data is continuously updated after every vote.

Page 41: RFID based Electronic Voting Machine

7. CONCLUSION AND FUTURE SCOPE

7.1 Conclusion

In this project we have shown the implementation of a system that minimizes the

possibility of rigging in elections and eliminates the need to do manual work. Cost of the

system is low and the system is convenient to use. It reduces the burden of the polling

officials in identifying the voter.

7. 2 Limitations and Future Scope

7.2.1 We have used database of 10 voters as a sample. In the real scenario, the number of

voters will be quite large. In that case, storing them as array of strings might not work.

We may need to employ a database management system to hold the record and

retrieve the data quickly. Besides that, external memory will be required to hold such

database.

7.2.2 As Arduino is programmed over volatile memory, all the temporary data, like who

has casted the vote and is reset. Although the total of the votes is stored, who has

casted the vote and who has not, is lost. So, the EVM must remain in power on mode

till the election is over.

7.2.3 Anyone can carry the RFID card of someone being an imposter. To curb the menace

of these imposters, an additional mechanism would be required to identify the voters

like integrating the voting machine with fingerprint matching or face recognition.

7.2.4 Another improvement that can be done is instead of storing the database locally on the

EVM, the information of the voter can be retrieved from the server, where the server

holds the database of all the registered users. This will allow any of the registered

voter to vote from any polling booth.

Page 42: RFID based Electronic Voting Machine

REFERENCES

1. http://www.instructables.com/id/Arduino-Voting-machine/?ALLSTEPS

2. http://www.gadgetronicx.com/arduino-based-voting-system/

3. http://circuitdigest.com/microcontroller-projects/electronic-voting-machine-using-

arduino

4. http://www.engineersgarage.com/electronic-components/16x2-lcd-module-datasheet

5. http://www.circuitstoday.com/interfacing-rfid-with-arduino

6. http://circuitdigest.com/microcontroller-projects/rfid-based-voting-machine-project

7. https://electrosome.com/em-18-rfid-reader-arduino-uno/

8. https://www.arduino.cc/en/Tutorial/HelloWorld

9. https://en.wikipedia.org/wiki/Radio-frequency_identification

10. http://www.vathsav.com/img/interfacing_rfid_with_arduino/em_18_pin_diagram.png

11. http://www.tomsonelectronics.com/uploads/1430561217EM-18-RFID-Reader.pdf

12. http://forum.researchdesignlab.com/datasheet/modules/RFID%20reader%20module.p

df

13. https://electrosome.com/wp-content/uploads/2014/10/RFID-Tag-Card-600x600.jpg

14. http://www.nadielcomercio.com.br/blog/wp-content/uploads/2014/05/Lcd_0.jpg

15. https://en.wikipedia.org/wiki/Liquid-crystal_display

16. http://www.engineersgarage.com/electronic-components/16x2-lcd-module-datasheet

17. http://www.nadielcomercio.com.br/blog/wp-content/uploads/2014/05/Lcd_0.jpg

18. https://www.robomart.com/image/catalog/RM0058/01.jpg

19. https://en.wikipedia.org/wiki/Potentiometer

20. https://upload.wikimedia.org/wikipedia/commons/b/b5/Potentiometer.jpg

21. https://electrosome.com/wp-content/uploads/2012/12/Push-Button-Switch.jpg

22. https://en.wikipedia.org/wiki/Resistor

23. https://en.wikipedia.org/wiki/Resistor#/media/File:Resistor.jpg

24. http://cfnewsads.thomasnet.com/images/cmsimage/image/automation-

electronics/resistor-sample.JPG

25. https://upload.wikimedia.org/wikipedia/commons/7/73/400_points_breadboard.jpg

26. http://www.ijireeice.com/upload/2014/june/IJIREEICE1B%20s%20jani%20Voter%2

0Identification.pdf

Page 43: RFID based Electronic Voting Machine

27. https://www.arduino.cc/en/Reference/ClientStop

28. https://www.arduino.cc/en/Reference/ClientFlush

29. https://www.arduino.cc/en/Reference/ClientRead

30. https://www.arduino.cc/en/Reference/ClientAvailable

31. https://www.arduino.cc/en/Reference/ClientPrint

32. https://www.arduino.cc/en/Reference/ClientWrite

33. https://www.arduino.cc/en/Reference/ClientConnect

34. https://www.arduino.cc/en/Reference/ClientConnected

35. https://www.arduino.cc/en/Reference/LiquidCrystalDisplay

36. https://www.arduino.cc/en/Reference/LiquidCrystalPrint

37. https://www.arduino.cc/en/Reference/LiquidCrystalWrite

38. https://www.arduino.cc/en/Reference/SoftwareSerialRead

39. https://www.arduino.cc/en/Reference/SoftwareSerialPrint

40. https://www.arduino.cc/en/Reference/SoftwareSerialAvailable