Fingerprint Based Biometric Voting Machine using Arduino - Internet of Things

Fingerprint Based Biometric Voting Machine using Arduino

Finger Print Based Biometric Voting Machine using Arduino
We all are quite familiar with Electronic Voting Machines, where your vote gets registered electronically and you dont need to use ballot paper to vote in election. Today security is a major concern and it also needs to be ensured that someone cant 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 stops fake voting. So today we are building FingerPrint Based Biometric Voting Machine using Arduino.
Also check our previous Electronic Voting Machine Projects using different Microcontrollers:
·         RFID Based Voting Machine

Required Components:
  1. Arduino Uno
  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

Finger Print Sensor Module in Voting Machine:
Finger Print Sensor Module or Finger Print Scanner is a module which captures fingers print image and then converts it into the equivalent template and saves them into its memory on selected ID (location) by Arduino. Here all the process is commanded by Arduino like taking an image of finger print, 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 have 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 user wants to store the finger print output. Now if at this time user do not want to proceed further then he/she can press enroll key again to go back (this time enroll key 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 finger on Finger Print Sensor, if he/she passed in this authentication then he/she can vote.
To learn more about enrolling finger prints and other things, Check our previous tutorial on interfacing Finger Print Sensor with Arduino, and also check our Demo Video at the end of this tutorial.

Working Explanation:
Working of this Biometric Voting System for Election is a little bit complex for beginners. First of all, 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 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 finger over the finger print module. Now user needs to put his finger over finger print module. Then LCD will ask to remove the finger from finger print module and again ask for placing the finger. Now user needs to put his finger again over finger print module. Now finger print module takes an image and converts it into templates and stores it by selected ID in to the finger print modules memory. Now voter will be registered and he/she can vote. By 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 user wants to vote then he/she needs to press match key and then buzzer will beep and LED will also glow and LCD will ask for place finger over fingerprint module. Now Arduino 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 next stage for voting. Now Green LED will glow it means now voter can vote for their candidates by pressing a relected key (from RED bread board in this demonstration). Now if the same voter wants to vote again then the system will show it Already Voted. Means same voter cant vote again and buzzer will beep for 5 seconds. If any Non-registered user wants to vote then finger print 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.

Circuit Explanation:
The circuit of this FingerPrint Based Voting Machine Project is very simple which contains Arduino 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 fingerprint module is ready to take an image of the finger and Green LED indicates that 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 Arduino with respect to ground. Yellow LED is connected at Digital pin D7 of Arduino with respect to ground through a 1k resistor and Green LED is connected to D6 of Arduino with the same method. Fingerprint modules Rx and Tx directly connected at Serial pin Tx and Rx of Arduino. 5v supply is used for powering finger print module taken from Arduino 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 Arduino.

Program Explanation:
In a program, we have used Adafruit Fingerprint Sensor Library for interfacing fingerprint module with Arduino board. You can check the complete Code below. Here we are explaining main functions of the Arduino Program.
In setup function, we have given directions to defined pins and have initiated the LCD and Fingerprint module.

After it, in void loop() function, we have waited for check key and press Match key to start the finger print to take input and compare captured image id with stored IDs. If a match occurs then proceed with next step.
void loop()
{
 lcd.setCursor(0,0);
 lcd.print("Press Match Key ");
 lcd.setCursor(0,1);
 lcd.print("to start system");

 digitalWrite(indVote, LOW);
 digitalWrite(indFinger, LOW);
 if(digitalRead(match)==0)
 {
  digitalWrite(buzzer, HIGH);
  delay(200);
  digitalWrite(buzzer, LOW);
  digitalWrite(indFinger, HIGH);
  for(int i=0;i<3;i++)
..... .....
....... ....

Given void checkKeys() function is used for checking Enroll or DEL key is pressed or not and what to do if pressed. If the ENROL key pressed the Enroll() function is called and DEL key press then delete()function is called.
void checkKeys()
{
   if(digitalRead(enroll) == 0)
   {
    lcd.clear();
    lcd.print("Please Wait");
    delay(1000);
    while(digitalRead(enroll) == 0);
    Enroll();
   }

   else if(digitalRead(del) == 0)
   {
    lcd.clear();
    lcd.print("Please Wait");
    delay(1000);
    delet();
   } 
}

Given function is used for entering ID to be deleted and calling uint8_t deleteFingerprint(uint8_t id) function that will delete finger from records.
void delet()
{
   int count=0;
   lcd.clear();
   lcd.print("Delete Finger    ");
   lcd.setCursor(0,1);
   lcd.print("Location:");
   while(1)
   {
     lcd.setCursor(9,1);
     lcd.print(count);
     if(digitalRead(up) == 0)
     {
       count++;
       if(count>25)
       count=0;
       delay(500);
     }
.... .....
..... .....

Given function is used for delete finger print from the record of selected ID.
uint8_t deleteFingerprint(uint8_t id)
{
  uint8_t p = -1; 
  lcd.clear();
  lcd.print("Please wait");
  p = finger.deleteModel(id);
  if (p == FINGERPRINT_OK)
  {
    Serial.println("Deleted!");
    lcd.clear();
    lcd.print("Figer Deleted");
    lcd.setCursor(0,1);
    lcd.print("Successfully");
    delay(1000);
  }
 
  else
  {
    Serial.print("Something Wrong");
    lcd.clear();
    lcd.print("Something Wrong");
    lcd.setCursor(0,1);
    lcd.print("Try Again Later");
    delay(2000);
    return p;
  }  
}

Given Function is used to taking finger print image and convert them into the template and save it by selected ID into the finger print module memory.
uint8_t getFingerprintEnroll()
{
  int p = -1;
  lcd.clear();
  lcd.print("finger ID:");
  lcd.print(id);
  lcd.setCursor(0,1);
  lcd.print("Place Finger");
  delay(2000);
  while (p != FINGERPRINT_OK)
  {
    p = finger.getImage();
..... .....
....... ....

Given function is used for Voting and display results:
void Vote()
{
  lcd.clear();
  lcd.print("Please Place");
  lcd.setCursor(0,1);
  lcd.print("Your Vote");
  digitalWrite(indVote, HIGH);
  digitalWrite(indFinger, LOW);
  digitalWrite(buzzer, HIGH);
  delay(500);
  digitalWrite(buzzer, LOW);
  delay(1000);
  while(1)
  {
        if(digitalRead(sw1)==0)
..... .....
....... ....

 Demo & Code


Fingerprint Based Biometric Voting Machine using Arduino Fingerprint Based Biometric Voting Machine using Arduino Reviewed by XXX on สิงหาคม 27, 2560 Rating: 5

ไม่มีความคิดเห็น