Site icon Circuit Ideas for You

Arduino Based Electronic Voting Machine Circuit

This project makes simple Arduino Based Electronic Voting Machine Circuit and it takes votes from push buttons; also, it shows result on LCD display.

This circuit is suitable for school and college mini projects and it is easy to build and has a low cost.

Arduino Code:

#include <LiquidCrystal.h>
LiquidCrystal lcd(13,12,11,10,9,8);

int partyA=0, partyB=0, partyC=0, partyD=0;

void setup(){
  lcd.begin(16,2);
  lcd.print("Voting Machine");
  delay(2000);
  lcd.clear();
}

void loop(){
  if(analogRead(A0) > 500){ partyA++; delay(500); }
  if(analogRead(A1) > 500){ partyB++; delay(500); }
  if(analogRead(A2) > 500){ partyC++; delay(500); }
  if(analogRead(A3) > 500){ partyD++; delay(500); }

  if(analogRead(A5) > 500){
    lcd.clear();
    lcd.print("PARTY A:"); lcd.print(partyA);
    lcd.setCursor(0,1); lcd.print("PARTY B:"); lcd.print(partyB);
    delay(2000);
    
    lcd.clear();
    lcd.print("PARTY C:"); lcd.print(partyC);
    lcd.setCursor(0,1); lcd.print("PARTY D:"); lcd.print(partyD);
    delay(3000);
    
    lcd.clear();
  }
}

Coding Explanation:

Circuit Working:

Arduino Based Electronic Voting Machine Circuit Diagram

Parts List:

ComponentsQuantity
Potentiometer 10k1
Arduino Uno1
16×2 LCD Display1
Tactile switch5

Circuit is simple with Arduino, push buttons and LCD and then Arduino reads buttons, adds votes and shows result on LCD.

After that, five buttons used for party A, B, C, D and one for result, then press any party button to give vote.

Each press adds one vote and then press result button to see total votes and LCD shows result few seconds then clears.

Then voting starts again.

How to Build:

To build a Arduino Based Electronic Voting Machine Circuit follow the below steps:

Conclusion:

To conclude, this project for Arduino Based Electronic Voting Machine Circuit makes simple voting machine; it uses Arduino, LCD and few buttons.

Also, it is cheap and easy for beginners and if required then more parties and security can add later.

Exit mobile version