You are on page 1of 7

AIM: To implement electronic voting machine circuit using Arduino UNO.

INTRODUCTION:
Electronic Voting Machines ("EVM") are being used in Indian General and State
Elections to implement electronic voting in part from 1999 elections and recently in 2017
state elections held in five states across India. EVMs have replaced paper ballots in local,
state and general (parliamentary) elections in India.

In 1980, M. B. Haneefa invented the first Indian voting machine, gazetted "Electronically
operated vote counting machine". His original design (using Integrated Circuits) was
exhibited to the public in Government Exhibitions held in six cities across Tamil Nadu. The
EVMs were commissioned in 1989 by Election Commission of India in collaboration
with Bharat Electronics Limited and Electronics Corporation of India Limited. The Industrial
designers of the EVMs were faculty members at the Industrial Design Centre, IIT Bombay.
The EVMs were first used in 1982 in the by-election to North Paravur Assembly
Constituency in Kerala for a limited number of polling stations.
An EVM consists of two units, control unit and balloting unit. Balloting unit facilitates voting
by voter via labelled buttons while control unit controls the ballot units, stores voting counts
and displays the results on 7 segment LED displays. The controller used in EVMs has its
operating program etched permanently in silicon at the time of manufacturing by the
manufacturer. No one (including the manufacturer) can change the program once the
controller is manufactured.
Generally, EVMs are powered by an ordinary 6 volt alkaline battery manufactured by Bharat
Electronics Limited, Bangalore and Electronics Corporation of India Limited, Hyderabad.
This design enables the use of EVMs throughout the country without interruptions because
several parts of India do not have power supply and/or erratic power supply.

Advantages of EVM:
 Even though the initial investment was heavy, it has since been expected to save costs
of production and printing of crores of ballot papers, their transportation and storage,
substantial reduction in the counting staff and the remuneration paid to them.
 For each national election, it is estimated that about 10,000 tonnes of ballot paper is
saved.
 EVMs are easier to transport compared to ballot boxes as they are lighter, more
portable, and come with polypropylene carrying cases.
 Vote counting is also faster.
 In places where illiteracy is a factor, illiterate people find EVMs easier than ballot
paper system.
 Bogus voting is greatly reduced as the vote is recorded only once. The unit can store
the result in its memory before it is erased manually.

Disadvantages of EVM:
 A candidate can know how many people from a polling station voted for him. This is
a significant issue particularly if lop-sided votes for/against a candidate are cast in
individual polling stations and the winning candidate might show favouritism or hold
grudge on specific areas.

List of Components:
1. Arduino Uno
2. 16x2 LCD
3. Push button (x5)
4. PCB
5. Power
6. Connecting wires

Circuit Diagram:

Theory (Working Explanation):


In this project we have used four push buttons for four different candidates. We can
increase the number of candidate but for better understanding we have limited it to four.
When any voter press any of four button then respecting voting value will increment by one
each time. After whole voting we will press result button to see the results. As the "result"
button is pressed, arduino calculates the total votes of each candidate and show it on LCD
display.
Circuit of this project is quite easy which contains Arduino, push buttons and LCD.
Arduino controls the complete processes like reading button, incrementing vote value,
generating result and sending vote and result to LCD. Here we have added five buttons in
which first button is for BJP, second for INC, third is for AAP, forth is for OTH means
others and last button is used for calculating or displaying results.
The five push buttons are directly connected with pin 15-19(A1-A5) of Arduino with respect
to ground. A 16x2 LCD is connected with Arduino in 4-bit mode. Control pin RS, RW and
En are directly connected to Arduino pin 12, GND and 11. And data pin D4-D7 is connected
to pins 5, 4, 3 and 2 of Arduino.

Software Implement:
1) Algorithm:
 Include header files; define pins for LCD and then initialize some variables and pin
for taking candidate's voting input means switch.
 Initialize the LCD and give direction to input-output pins.
 Make pull-up the input pin by software.
 Use digital read function to read Button pressed.
 Display voting on the LCD with the candidate party’s Name.

2) Program:
#include<LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
#define sw1 15
#define sw2 16
#define sw3 17
#define sw4 18
#define sw5 19
int vote1=0;
int vote2=0;
int vote3=0;
int vote4=0;
void setup()
{
pinMode(sw1, INPUT);
pinMode(sw2,INPUT);
pinMode(sw3,INPUT);
pinMode(sw4,INPUT);
pinMode(sw5,INPUT);
lcd.begin(16, 2);
lcd.print("Voting Machine");
lcd.setCursor(0,1);
lcd.print("Circuit Digest");
delay(3000);
digitalWrite(sw1, HIGH);
digitalWrite(sw2, HIGH);
digitalWrite(sw3, HIGH);
digitalWrite(sw4, HIGH);
digitalWrite(sw5, HIGH);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("BJP");
lcd.setCursor(4,0);
lcd.print("INC");
lcd.setCursor(8,0);
lcd.print("AAP");
lcd.setCursor(12,0);
lcd.print("OTH");
}
void loop()
{
lcd.setCursor(0,0);
lcd.print("BJP");
lcd.setCursor(1,1);
lcd.print(vote1);
lcd.setCursor(4,0);
lcd.print("INC");
lcd.setCursor(5,1);
lcd.print(vote2);
lcd.setCursor(8,0);
lcd.print("AAP");
lcd.setCursor(9,1);
lcd.print(vote3);
lcd.setCursor(12,0);
lcd.print("OTH");
lcd.setCursor(13,1);
lcd.print(vote4);
if(digitalRead(sw1)==0)
vote1++;
while(digitalRead(sw1)==0);
if(digitalRead(sw2)==0)
vote2++;
while(digitalRead(sw2)==0);
if(digitalRead(sw3)==0)
vote3++;
while(digitalRead(sw3)==0);
if(digitalRead(sw4)==0)
vote4++;
while(digitalRead(sw4)==0);
if(digitalRead(sw5)==0)
{
int vote=vote1+vote2+vote3+vote4;
if(vote)
{
if((vote1 > vote2 && vote1 > vote3 && vote1 > vote4))
{
lcd.clear();
lcd.print("BJP Wins");
delay(2000);
lcd.clear();
}
else if((vote2 > vote1 && vote2 > vote3 && vote2 > vote4))
{
lcd.clear();
lcd.print("INC Wins");
delay(2000);
lcd.clear();
}
else if((vote3 > vote1 && vote3 > vote2 && vote3 > vote4))
{
lcd.clear();
lcd.print("AAP Wins");
delay(2000);
lcd.clear();
}
else if(vote4 > vote1 && vote4 > vote2 && vote4 > vote3)
{
lcd.setCursor(0,0);
lcd.clear();
lcd.print("OTH Wins");
delay(2000);
lcd.clear();
}
else if(vote4 > vote1 && vote4 > vote2 && vote4 > vote3)
{
lcd.setCursor(0,0);
lcd.clear();
lcd.print("OTH Wins");
delay(2000);
lcd.clear();
}
else
{
lcd.clear();
lcd.print(" Tie Up Or ");
lcd.setCursor(0,1);
lcd.print(" No Result ");
delay(1000);
lcd.clear();
}
}
else
{
lcd.clear();
lcd.print("No Voting....");
delay(1000);
lcd.clear();
}
vote1=0;vote2=0;vote3=0;vote4=0,vote=0;
lcd.clear();
}
}

Result:
Hence, we successfully implemented Electronic voting machine using Arduino
controller which increments the voting count for each party when the corresponding
button is pressed, displays the count for each party and displays the final result on the
16 X 2 LCD as soon as ‘Result’ button is pressed.

Conclusion:
Hence, we concluded that:
 EVM can be simply implemented on Arduino Uno by using Arduino
Integrated Development Environment Software.
 Arduino Programming language is similar to C language which consists of
some header files, initialization of variables and some functions for
performance of desired tasks.

You might also like