[go: up one dir, main page]

0% found this document useful (0 votes)
221 views20 pages

Implementation of Aadhar Based Voting Machine Using Arm7 With GSM

Download as docx, pdf, or txt
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 20

IMPLEMENTATION OF AADHAR BASED VOTING MACHINE USING ARM7

WITH GSM

We all are quite familiar with Electronic Voting Machines, where your vote gets registered
electronically and you don’t need to use ballot paper to vote in the election. Today security is
a major concern and it also needs to be ensured that someone can’t vote twice, so this
problem can be solved by introducing Finger Print Based Voting, where a person can be
authorized based on his finger Print. This will also stop fake voting. So today we are
building Fingerprint Based Biometric Voting Machine using Arm7.

The main objective is to design and develop a fingerprint based electronic voting machine
for authentication and sorting out the wired electronic voting problems. This method
includes the overall technical idea behind using Aadhar card for voting. Electronic Voting
Machine (EVM) is a device, used to count ballot and record votes instead of doing it
manually using the human resource to record and count votes. Many problems are associated
with the manual counting of votes that is laborious, erroneous and time-consuming. This
makes the entire system very inefficient. This project discusses in detail the design of a solar-
powered EVM prototype which is efficient and allows the user relief from the laborious act
of vote collection and counting. At the time of voting in the elections, the Barcode-Scanner
also used to decode the Enrollment ID printed on the Aadhar card. This electronic voting
machine will save time and efforts of a human. Thus, the proposed EVM system is more fast
and reliable as compared to the existing electronic voting system. The security of data, the
privacy of the voters and the accuracy of the vote are also the main aspects that have to be
taken into account while building a secure electronic voting system. Overcoming the
disadvantages of the current voting system, the proposed method provides a secure and
reliable voting system.

Required Components:

1. Arm7 (LPC 2148) Microcontroller


2. Finger Print Sensor Module
3. Push Buttons
4. LEDs -2
5. 1K Resistor -3
6. 2.2K resistor
7. Power
8. Connecting wires
9. Buzzer
10. 16x2 LCD
11. Bread Board

EXISTING SYSTEM:

The traditional or existing voting system has to be done in the following methods:

i. Verification:

In the verification process, voter verifies by showing his/her finger, this step takes more
time to scan the finger. At the end of the verification process, governing officer allow the
voter to cast his / her vote.

ii. Voting Method:

The voting process is taking place in a protected booth where the voter cannot be seen
by any person. The voter cast their vote on EVM machine.

iii. Vote counting:

At the end of voting, the governing officer collects the all EVM machine and submitted
to the counting canter. After that all the members of the election commission nominated by
election commission of India, the votes are counted and the results are then announced.
Conventional voting systems do not efficient due to the long period of preparation, bogus
voting, and it cannot provide security.
Working Explanation:

Working of this Biometric Voting System for Election is a little bit complex for beginners.
First of all, the user needs to enroll finger or voters (in this code max limit of the voter is 25)
with the help of push buttons/keys. To do this user need to press ENROLL key and then LCD
asks for entering location/ID where finger will be a store. So now user needs to enter the ID
(Location) by using UP/DOWN keys. After selecting Location/ID user needs to press an OK key
(DEL key). Now LCD will ask for placing a finger over the fingerprint module. Now user needs
to put his finger over fingerprint module. Then LCD will ask to remove the finger from
fingerprint module and again ask for placing the finger. Now user needs to put his finger again
over fingerprint module. Now fingerprint module takes an image and converts it into templates
and stores it by selected ID into the fingerprint module’s memory. Now voter will be registered
and he/she can vote. By the same method, all the voter can be registered into the system.

Now if the user wants to remove or delete any of stored ID then he/she need to press DEL key,
after pressing DEL key, LCD will ask for select location means select ID that to be deleted. Now
user needs to select ID and press OK key (same DEL key). Now LCD will let you know that
finger has been deleted successfully.

Voting Process:

Now when the user wants to vote then he/she needs to press match key and the buzzer will beep
and LED will also glow and LCD will ask for place finger over fingerprint module. Now, Arm7
will give you three attempts to put your finger. After placing a finger over fingerprint module
fingerprint module captures finger image find its IDs is present in the system. If finger ID
detected then LCD will show authorized Voter. It means the user is authorized to vote. And then
the system moves to the next stage for voting. Now Green LED will glow it means now voter
can vote for their candidates by pressing a selected key (from RED breadboard in this
demonstration). Now if the same voter wants to vote again then the system will show it ‘Already
Voted’. Means the same voter can’t vote again and buzzer will beep for 5 seconds. If any Non-
registered user wants to vote then fingerprint module will not detect its ID into the system and
LCD will show ‘No Fingerprint Found’.
CAN1, CAN2, CAN3 here represents the Candidate 1, Candidate 2 and Candidate 3, who have
stood for election.

BLOCK DIAGRAM:
POWER SUPPLY LCD Display

KEYS
ARM

BUZZER

FINGER MAX
PRINT 232 GSM
MODULE

Fig.1.1. Block diagram of the voting machine using Arm7

Circuit Explanation:

The circuit of this FingerPrint Based Voting Machine Project is very simple which contains
Arm7 for controlling whole the process of the project, push button for enrolling, deleting,
selecting IDs and voting purpose, a buzzer for alert, LEDs for indication and 16x2 LCD for
instruct Voter and showing the result as well. Yellow LED indicates that the fingerprint module
is ready to take an image of the finger and Green LED indicates that the system is ready to take a
vote or see results.
The push button is directly connected to pin A0(ENROL), A1(DEL), A2(UP), A3(DOWN) and
A4(Match), D5(Can1), D4(Can2), D3(Can3), D2(Result) of Arm7 with respect to ground.
Yellow LED is connected at Digital pin D7 of Arm7 with respect to ground through a 1k resistor
and Green LED is connected to D6 of Arm7 with the same method. Fingerprint module’s Rx and
Tx directly connected at Serial pin Tx and Rx of Arm7. 5v supply is used for powering
fingerprint module taken from Arm7 board. A buzzer is also connected at A5. A 16x2 LCD is
configured in 4-bit mode and its RS, EN, D4, D5, D6, and D7 are directly connected at Digital
pin D13, D12, D11, D10, D9, and D8 of Arm7.

REQUIREMENT:

1. FINGERPRINT SCANNER:-
Finger Print Sensor Module or Finger Print Scanner is a module which captures finger’s
print image and then converts it into the equivalent template and saves them into its memory on
selected ID (location) by Arm7. Here all the process is commanded by Arm7 like taking an
image of a fingerprint, convert it into templates and storing location etc.

In this FingerPrint Voting Machine Circuit, we have used Finger Print Sensor Module to
authenticate true voter by taking their finger input in the system. Here we are using 5 push
buttons to Match, Enroll/back, Delete/OK, UP and Down. Enroll and Del key has double features
here. Enroll key is used for enrolling new finger impression into the system and back function as
well. Means when the user wants to enroll new finger then he/she needs to press enroll key then
LCD asks for the ID or Location where the user wants to store the fingerprint output. Now if at
this time user does not want to proceed further then he/she can press enroll key again to go back
(this time enroll key to behave as Back key). Means enroll key has both enrollment and back
function. DEL/OK key also has same double function like when user enrolls new finger then
he/she need to select finger ID or Location by using another two key namely UP AND DOWN
now user needs to press DEL/OK key (this time this key behaves like OK) to proceed with
selected ID or Location. Match key is used for whenever voter wants to vote then he/she needs
to authenticate first for true voter by keeping a finger on Finger Print Sensor, if he/she passed in
this authentication then he/she can vote.

2. GSM MODULE:
GSM module is a digital communication system which is rapidly gained market share
worldwide and acceptance. The mobile service is based on GSM technology. This system is
provided with many other useful features such as authentications and security the ability to
switch phones without the need to reconfigure the phone with the existence of the sim card.

4. BUZZER:
The piezoelectric buzzer is used and it is based on the inverse principle of piezoelectricity.
Phenomena of procreating electricity. When mechanical pressure is applied. It indicates
sound when the vote is polled successfully.

5. LCD DISPLAY:
The LCD display is the most common device attached to a microcontroller. It is special thin
flat panels that can let light go through it, or can block the light. Some of the common
LCD’s connected to microcontroller are 16*2 and 20*2 LCD display. Display the activity to
perform the candidates.
6. PUSH BUTTON SWITCH:
The push button switch is a type of switch that connects two points in a circuit when you
press the switch. Three wires Arm7 board is connected to switch. The first wire goes from 1
leg of push button through a pull-up resistor to the 5V supply; the second wire goes from leg
of the push button to the ground level, the third wire connected to a digital I/O which reads
the buttons status

7. POWER SUPPLY:
The power supply will supply the regulated power supply to the unit which is first converted
into 12V AC. 12V AC is converted into DC using rectifier circuit. Finally, the 7805 IC
voltage regulator provides constant 5V DC supply which has mentioned in the circuit.
IV.CONCLUSION:

The proposed method enables secured voting and reduces manpower efficiently. It is easy to
eliminate bogus voting and vote repetition, less election expenditure, more transparency and
fast counting of results. The Aadhar based voting system will be very useful to avoid
rigging, to avoid time consuming, to keep the voter’s information more secured. GSM
module is also used so that they voted information can be sent through the registered
mobile number. This voting system has many advantages over the traditional way of voting.
Some of these advantages are high efficiency, avoids invalid voting, low complex design,
high-speed processing.
Program Explanation:

/************************************************************/
/* PROJECT NAME:
IMPLEMENTATION OF AADHAR BASED VOTING MACHINE USING ARM7 WITH
GSM */
/***INTERFACING MODULES :

MAIN SECTION:
LPC2148 Microcntroller (ARM7TDMI)
LCD(4-bit data ) RS-P1.16,EN-P1.17,DATA -P1.18-P1.19
Fingerprint (UART0)

inc (P0.16)
dec (P0.17)
ent (P0.18)
exit (P0.19)

buzzer (P0.21)

*********** EEPROM *******


SCL(I2C0)=P0.2
SDA(I2C0)=P0.3

****************/
/************** LATCH PROGRAMMING *************/

/******** HEDDER FILES ********/


#include <LPC214X.H>
#include "lcd.h"
#include "uart.h"
#include "eeprom.h"
#include "string.h"

#define inc (1 << 16)


#define dec (1 << 17)
#define ent (1 << 18)
#define exit (1 << 19)

#define buzzer (1 << 21)


/*** Finger print **********/
unsigned char fp[20],p,t,pnum,flag;

unsigned char a[4],*pt,*d;


unsigned char temp1,temp2;

unsigned char phno[]="+919160572369";

void check(unsigned char x1);


void voting(void);
void clear(void);
void display(void);
void fun(void);
void message(unsigned char *n);

// ISR1 programming
void srial1(void)__irq
{
unsigned char IIR,temp4;
while((IIR = U1IIR& 0x01)==0)
{
switch(U1IIR & 0x0e)
{
case 0x04:
{
temp4= U1RBR; // Finger print
fp[p++]=temp4;
if(p>=12){flag=1;}
break;
}
}
}
VICVectAddr=0x00;
}

// ISR0 Programming
void srial0(void)__irq
{
unsigned char IIR,temp5;
while((IIR = U0IIR& 0x01)==0)
{
switch(U0IIR & 0x0e)
{
case 0x04:
{
temp5= U0RBR; // receiving data from GSM

c[i++]=temp5;
break;
}
}
}
VICVectAddr=0x00;
}

int main( void )


{

dev1_flag=0;dev2_flag=0;
lcdint();
disp_loc(0x80," WELCOME TO ");
disp_loc(0xc0," THE PROJECT ");
delay(20000);

serialint1();
delay(1000);
VICIntEnable|=0x80;
U1IER=0x01;
VICVectAddr0=(unsigned)srial1;
VICVectCntl0=0x27;

serialint0();
delay(1000);
VICIntEnable|=0x40;
U0IER=0x01;
VICVectAddr2=(unsigned)srial0;
VICVectCntl2=0x26;

IODIR0|=dev1|dev2;
IOSET0|=dev1|dev2;

IODIR0|=buzzer;
IOCLR0|=buzzer;

lcdcmd(0x01);
IODIR0|=inc|dec|ent;
IODIR0|=exit;
IODIR0|=0x00080000;
IOSET0|=0x000f0000;

if(IOPIN0==((IOPIN0&0xfff0ffff)|0x000B0000))
{
while(IOPIN0==((IOPIN0&0xfff0ffff)|0x000B0000));
lcdclear();
disp_loc(0x80," ENROLL STARTED ");
delay(1000);
disp_loc(0x80," ENTER PERSON ");
disp_loc(0xc0," NO:");
pnum=keyscan(0xc4);
delay(5000);lcdclear();disp_loc(0x80," GETTING
IMAGE ");
l1: getimage();flag=0;p=1;
while(flag==0);flag=0;
if(fp[10]==0x00){disp_loc(0xc0," GET IMAGE
");delay(500);goto l2;}
else{ goto l1;}
l2: getchar();flag=0;p=1;
while(flag==0);flag=0;
if(fp[10]==0x00){disp_loc(0xc0," GET IMAGE ID
");delay(500);goto l3;}
else{ goto l2;}
l3: storechar(pnum);flag=0;p=1;
while(flag==0);flag=0;
if(fp[10]==0x00){disp_loc(0xc0,"IMAGE ID
STORED");delay(500);}
else{ goto l3;}
lcdclear();
disp_loc(0x80,"ENROLL COMPLETED");
}
delay(5000);
disp_loc(0x80,"EEPROM INITILISE");
delay(3000);
i2cint();
set_char(0x04,'E');
set_char(0x08,'C');
disp_loc(0x80,"EEPROM COMPETED");
delay(3000);
temp1=get_char(0x04);
temp2=get_char(0x08);
lcdcmd(0x01);
lcdcmd(0x80);lcddata(temp1);
lcdcmd(0xc0);lcddata(temp2);
delay(20000);
if(IOPIN0==((IOPIN0&0xfff0ffff)|0x000E0000))
{
while(IOPIN0==((IOPIN0&0xfff0ffff)|0x000E0000));
set_str(0x20,"00000");
delay(5000);
}
delay(2000);
lcdcmd(0x01);
disp_loc(0x80," KEEP FINGER & ");
disp_loc(0xc0," PRESS ENT KEY ");
while(1)
{
if(IOPIN0==((IOPIN0&0xfff0ffff)|0x000B0000))
{
while(IOPIN0==((IOPIN0&0xfff0ffff)|0x000B0000));
lcdclear();
disp_loc(0x80,"IDENTIFYING ");
identify();
flag=0;p=1;
while(flag==0);
flag=0;
if(fp[10]==0x00)
{
lcdclear();
lcdcmd(0x80);
lcddata(fp[12]+0x30);
disp_loc(0xc0,"IMAGE IDENTIFIED");
delay(2000);
lcdclear();lcdcmd(0x80);

if(fp[12]==1)
{
lcd_str("VALID PERSON 1");clear0();
serial0(" PERSON 1 Authenticating ");
delay(50000);

set_str(0x30,"123");delay(1000);check(1);
}
else if(fp[12]==2)
{
lcd_str("VALID PERSON 2");clear0();
serial0(" PERSON 2 Authenticating ");
delay(50000);

set_str(0x30,"234");delay(1000);check(2);
}
else if(fp[12]==3)
{
lcd_str("VALID PERSON 3");clear0();
serial0(" PERSON 3 Authenticating ");
delay(50000);

set_str(0x30,"345");delay(1000);check(3);
}
else if(fp[12]==4)
{
lcd_str("VALID PERSON 4");clear0();
serial0(" PERSON 4 Authenticating ");
delay(50000);

set_str(0x30,"456");delay(1000);check(4);
}
else if(fp[12]==5)
{
lcd_str("VALID PERSON 5");clear0();
serial0(" PERSON 5 Authenticating ");
delay(50000);

set_str(0x30,"567");delay(1000);check(5);
}
else if(fp[12]==9)
{
lcd_str("ELECTION OFFICER");clear0();
serial0(" Election Officer
Authenticating ");
delay(50000);

set_str(0x30,"999");delay(1000);check(9);

}
else
{
disp_loc(0x80," Invalid Access ");
delay(5000);
IOSET0=buzzer;
delay(5000);
IOCLR0=buzzer;
}
}
else
{
lcdclear();
disp_loc(0x80,"IMAGE NOT IDENTI");
IOSET0=buzzer;
delay(5000);
IOCLR0=buzzer;
}
delay(1000);
lcdcmd(0x01);
disp_loc(0x80," KEEP FINGER & ");
disp_loc(0xc0," PRESS ENT KEY ");

}
}
}

/******** VOTING **********/

void voting(void)
{
unsigned char *c,flag3;
clear0();
serial0("WELCOME for Voting..");
lcdcmd(0x01);
disp_loc(0x80," WELCOME For U ");
disp_loc(0xc0," To use VOTE ");
lcdcmd(0x01);
disp_loc(0x80,"SELECT CANDIDATE");
flag3=0;
c=get_str(0x10);
while(flag3==0)
{
if(IOPIN0==((IOPIN0&0xfff0ffff)|0x00070000))
{
while(IOPIN0==((IOPIN0&0xfff0ffff)|0x00070000));
flag3=1;
disp_loc(0xc0," CANDIDATE 4 ");
c[3]=c[3]+1; //delay(200);
}
if(IOPIN0==((IOPIN0&0xfff0ffff)|0x000B0000))
{
while(IOPIN0==((IOPIN0&0xfff0ffff)|0x000B0000));
flag3=1;
disp_loc(0xc0," CANDIDATE 3 ");
c[2]=c[2]+1; //delay(200);
}
if(IOPIN0==((IOPIN0&0xfff0ffff)|0x000D0000))
{
while(IOPIN0==((IOPIN0&0xfff0ffff)|0x000D0000));
flag3=1;
disp_loc(0xc0," CANDIDATE 2 ");
c[1]=c[1]+1; //delay(200);
}
if(IOPIN0==((IOPIN0&0xfff0ffff)|0x000E0000))
{
while(IOPIN0==((IOPIN0&0xfff0ffff)|0x000E0000));
flag3=1;
disp_loc(0xc0," CANDIDATE 1 ");
c[0]=c[0]+1;
// delay(200);
}

}
set_str(0x10,c);
clear0();
serial0(" Voting Process Completed");
lcdcmd(0x01);
disp_loc(0x80," Thank You ");
disp_loc(0xc0,"Voting Completed");
}

void clear(void)
{
set_str(0x10,"0000");
delay(5000);
set_str(0x20,"00000");
delay(5000);
}
void display(void)
{
unsigned char *c,flag3;
lcdcmd(0x01);
disp_loc(0x80," C1 C2 C3 C4 ");
c=get_str(0x10);
lcdcmd(0xc1);lcddata(c[0]);
lcdcmd(0xc5);lcddata(c[1]);
lcdcmd(0xc9);lcddata(c[2]);
lcdcmd(0xCD);lcddata(c[3]);
flag3=0;
while(flag3==0)
{
if(IOPIN0==((IOPIN0&0xfff0ffff)|0x00070000))
{
while(IOPIN0==((IOPIN0&0xfff0ffff)|0x00070000));
flag3=1;
}
}
}

void check(unsigned char x1)


{
d=get_str(0x20);
if(x1==1)
{
if(d[0]==0x30){
fun();voting();d=get_str(0x20);d[0]=0x31;}
else{lcdcmd(0x01);disp_loc(0x80,"Already voted");
clear0();serial0("Already Voted");
IOSET0=buzzer;delay(5000);IOCLR0=buzzer;}
}
else if(x1==2)
{
if(d[1]==0x30){
fun();voting();d=get_str(0x20);d[1]=0x31;}
else{lcdcmd(0x01);disp_loc(0x80,"Already voted");
clear0();serial0("Already Voted");
IOSET0=buzzer;delay(5000);IOCLR0=buzzer;}
}
else if(x1==3)
{
if(d[2]==0x30){
fun();voting();d=get_str(0x20);d[2]=0x31;}
else{lcdcmd(0x01);disp_loc(0x80,"Already voted");
clear0();serial0("Already Voted");
IOSET0=buzzer;delay(5000);IOCLR0=buzzer;}
}
else if(x1==4)
{
if(d[3]==0x30){
fun();voting();d=get_str(0x20);d[3]=0x31;}
else{lcdcmd(0x01);disp_loc(0x80,"Already voted");
clear0();serial0("Already Voted");
IOSET0=buzzer;delay(5000);IOCLR0=buzzer;}
}
else if(x1==5)
{
if(d[4]==0x30){
fun();voting();d=get_str(0x20);d[4]=0x31;}
else{lcdcmd(0x01);disp_loc(0x80,"Already voted");
clear0();serial0("Already Voted");
IOSET0=buzzer;delay(5000);IOCLR0=buzzer;}
}
else if(x1==9)
{
fun();
display();
message(phno);
clear();
d=get_str(0x20);
}
d[5]='\0';
set_str(0x20,d);
delay(1000);
}

void fun()
{
pt=get_str(0x30);
lcdcmd(0x01);
disp_loc(0x80,"ENTER CODE FOR ");
P3: disp_loc(0xc0,"VERIFY:");
a[0]=keyscan(0xc7)+0x30;
a[1]=keyscan(0xc8)+0x30;
a[2]=keyscan(0xc9)+0x30;
a[3]='\0';
disp_loc(0xcB,a);
delay(100);
lcdcmd(0x01);
lcd_str("PASSWORD ENTERED");
if(!(strcmp(a,pt)))
{
disp_loc(0xc0,"CORRECT CODE");
clear0();
serial0("Authentication completed");
delay(1000);goto P4;
}
else
{
disp_loc(0xc0," WRONG CODE");
IOSET0=buzzer;
delay(5000);
IOCLR0=buzzer;
lcdcmd(0x01);
lcd_str("REENTER CODE");
goto P3;
}
P4: delay(100);
}

void message(unsigned char *n)


{

lcdclear();
disp_loc(0x80,"SENDING SMS...");
serial0("AT+CMGS=");
disp_loc(0xc0,n);
serial_char0(0x22);serial0(n);serial_char0(0x22);
serial_char0(0x0d);
delay(1000);
serial0("Voting results : ");
pt=get_str(0x10);
serial0(" Candidate1: ");
serial_char0(pt[0]);
serial0(" Candidate2: ");
serial_char0(pt[1]);
serial0(" Candidate3: ");
serial_char0(pt[2]);
serial0(" Candidate4: ");
serial_char0(pt[3]);
serial_char0(0x1A);
disp_loc(0x80,"SMS SENT...");
delay(20000);

You might also like