Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Project Documentation

Arduino UNO Based Biometric Voting Machine

Image of Arduino UNO Based Biometric Voting Machine

Circuit Documentation

Summary of the Circuit

This circuit integrates an Arduino UNO microcontroller with a Fingerprint Scanner to create a biometric authentication system. The primary function of this system is to capture and match fingerprints for identification purposes. The Arduino UNO serves as the central processing unit, controlling the operations of the fingerprint scanner and handling data storage and retrieval from EEPROM. The system is designed to be used in applications such as a voting machine, where user authentication is critical.

Component List

Arduino UNO

  • Description: A microcontroller board based on the ATmega328P.
  • Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0-A5, SCL, SDA, AREF, D13-D0.

Fingerprint Scanner

  • Description: A biometric sensor that captures fingerprints for authentication.
  • Pins: VCC, TX, RX, GND.

Wiring Details

Arduino UNO

  • 5V: Provides power to the Fingerprint Scanner.
  • GND: Common ground with the Fingerprint Scanner.
  • D1 (TX): Transmits serial data to the RX pin of the Fingerprint Scanner.
  • D0 (RX): Receives serial data from the TX pin of the Fingerprint Scanner.

Fingerprint Scanner

  • VCC: Connected to the 5V output from the Arduino UNO.
  • GND: Connected to the ground (GND) on the Arduino UNO.
  • TX: Transmits serial data to the RX (D0) pin on the Arduino UNO.
  • RX: Receives serial data from the TX (D1) pin on the Arduino UNO.

Documented Code

The code provided is for the Arduino UNO microcontroller and is written in the Arduino programming language (based on C/C++). The code is designed to operate a voting machine system that uses a fingerprint scanner for voter authentication.

#include<EEPROM.h>
#include<LiquidCrystal.h>

LiquidCrystal lcd(13,12,11,10,9,8);

#include <Adafruit_Fingerprint.h>

uint8_t id;

Adafruit_Fingerprint finger = Adafruit_Fingerprint(&Serial);

#define enroll 14
#define del 15
#define up 16
#define down 17
#define match 18
#define indVote 6

#define sw1 5
#define sw2 4
#define sw3 3
#define resultsw 2
#define indFinger 7
#define buzzer 19
#define records 25

int vote1,vote2,vote3;

int flag;

void setup() 
{
    delay(1000);
    pinMode(enroll, INPUT_PULLUP);
    pinMode(up, INPUT_PULLUP); 
    pinMode(down, INPUT_PULLUP); 
    pinMode(del, INPUT_PULLUP);
    pinMode(match, INPUT_PULLUP);
    pinMode(sw1, INPUT_PULLUP); 
    pinMode(sw2, INPUT_PULLUP);
    pinMode(sw3, INPUT_PULLUP);
    pinMode(resultsw, INPUT_PULLUP);
    pinMode(buzzer, OUTPUT);
    pinMode(indVote, OUTPUT);
    pinMode(indFinger, OUTPUT);

    lcd.begin(16,2);
    if(digitalRead(resultsw) ==0)
    {
        for(int i=0;i<records;i++)
            EEPROM.write(i+10,0xff);
        EEPROM.write(0,0);
        EEPROM.write(1,0);
        EEPROM.write(2,0);
        lcd.clear();
        lcd.print("System Reset");
        delay(1000);
    }

    lcd.clear();
    lcd.print("Voting Machine");
    lcd.setCursor(0,1);
    lcd.print("by Finger Print");
    delay(2000);
    lcd.clear();
    lcd.print("Circuit Digest");
    lcd.setCursor(0,1);
    lcd.print("Saddam Khan");
    delay(2000);

    if(EEPROM.read(0) == 0xff)
        EEPROM.write(0,0);

    if(EEPROM.read(1) == 0xff)
        EEPROM.write(1,0);

    if(EEPROM.read(1) == 0xff)
        EEPROM.write(1,0);

    Serial.begin(57600);
    lcd.clear();
    lcd.print("Finding Module");
    lcd.setCursor(0,1);
    delay(1000);
    if (finger.verifyPassword()) 
    {
        lcd.clear();
        lcd.print("Found Module ");
        delay(1000);
    } 
    else 
    {
        lcd.clear();
        lcd.print("module not Found");
        lcd.setCursor(0,1);
        lcd.print("Check Connections");
        while (1);
    }

    lcd.clear();
    lcd.setCursor(0,0);
    lcd.print("Cn1");
    lcd.setCursor(4,0);
    lcd.print("Cn2");
    lcd.setCursor(8,0);
    lcd.print("Cn3");
    lcd.setCursor(12,0);
    lcd.print("Cn4");

    lcd.setCursor(0,1);
    vote1=EEPROM.read(0);
    lcd.print(vote1);
    lcd.setCursor(6,1);
    vote2=EEPROM.read(1);
    lcd.print(vote2);
    lcd.setCursor(12,1);
    vote3=EEPROM.read(2);
    lcd.print(vote3);
    delay(2000);
}

// The rest of the code is omitted for brevity. It includes the main loop and functions for enrolling, deleting, and matching fingerprints, as well as voting logic.

The code initializes the system, sets up the LCD display, and configures the fingerprint scanner. It includes functions for enrolling new fingerprints, deleting existing ones, and matching fingerprints during the voting process. The EEPROM is used to store the votes and the fingerprint IDs to prevent multiple votes by the same person. The LCD display provides feedback to the user throughout the process.