in

EVM(electronic voting Machine) using Arduino

Arduino based EVM machine

Welcome to the Quanta project. in this project, we are going to make an EVM machine using Arduino. so, what can we do with this electronic voting machine? it will help us to calculate the vote for the individual we have. it will help you to learn the coding. there are many conditions in the code if conditions, if-else condition and nested if conditions. this EVM having the 4 teams for choosing so we can vote for any of them and the machine will help to count and display the number of votes get by each individual team.

How’s it works? it has four different buttons for a different team.you have to press the button of your choice and then the machine will store the value till you will not press the display button. also there is an all-clear button which helps to clear all the data from the machine. and now you can use the machine from the starting.

Electronic Voting Machine utilizing in numerous nations these days this is the implanted item that tallies the vote. A few Buttons associated with the Controller in each press of catch controller spare each catch information. what’s more, each catch match up to the distinctive vote party.

Components Required for EVM machine;-

  1. Arduino
  2. 4 Button
  3. 16×2 LCD Display
  4. Jumper Wires
  5. Variable Resistor 1k
  6. Breadboard
  7. USB ASP Cable
  8. Arduino IDE Software

All the above Components required to make the EVM machine

How to make the connection fo EVM machine;-

  • Connect Arduino pin VCC to lcd pin 2 and pin 15
  • Connect Arduino pin GND to LCD pin 1  and pin 16
  • Connect Arduino GND with 1k resistor to the Pin 3 of Lcd.
  • Connect Arduino pin 12 to lcd pin 4
  • Connect Arduino GND to lcd pin 5
  • Connect Arduino pin 11 to lcd pin 5
  • Connect Arduino pin 5 to lcd pin D4 (data pins)
  • Connect Arduino pin 4 to lcd pin D5 (data pins)
  • Connect Arduino pin 3 to lcd pin D6 (data pins)
  • Connect Arduino pin 2 to lcd pin D7 (data pins)
  • Connect 1st button with Arduino pin 6
  • Connect 2st button with Arduino pin 7
  • Connect 3st button with Arduino pin 8
  • Connect 4st button with Arduino pin 9
  • Connect 5st button with Arduino pin 10

Code for EVM machine :-

#include<LiquidCrystal.h>

LiquidCrystal lcd(12,11,5,4,3,2);

int M,M1,M2,M3; 

void setup()

{

  lcd.begin(16,2);

  for(int i=6;i<=10;i++)

  {

  pinMode(i,INPUT_PULLUP);

}

pinMode(13,INPUT_PULLUP);

 

}

void loop()

{  

  int S=digitalRead(6);

  int S1=digitalRead(7);

  int S2=digitalRead(8);

  int S3=digitalRead(9);

  int S4=digitalRead(10);

  int S5=digitalRead(13);

 

 

  if(S==LOW)

  {

  M=M+1;

  delay(200);

  }

 

else if(S1==LOW)

  {

  M1=M1+1;

  delay(200);

}

else if(S2==LOW)

  {

  M2=M2+1;

  delay(200);

  }

else if(S3==LOW)

  {

  M3=M3+1;

  delay(200);

  }

 

else if(S4==LOW)

  { lcd.clear();

    lcd.setCursor(0,0);

lcd.print(“BJP”);

  lcd.setCursor(0,12);

lcd.print(M);

delay(150);

lcd.setCursor(4,0);

lcd.print(“CON”);

lcd.setCursor(4,12);

lcd.print(M1);

delay(150);

lcd.setCursor(8,0);

lcd.print(“BSP”);

lcd.setCursor(8,12);

lcd.print(M2);

delay(150);

lcd.setCursor(12,0);

lcd.print(“AAP”);

lcd.setCursor(12,12);

lcd.print(M3);

delay(150);

}

else if(S5==LOW)

{

  lcd.clear();

 

  if(M>M1 && M>M2 && M>M3 && M1!=M2 && M2!=M3 && M1!=M3)

 

   

      {

        lcd.setCursor(0,0);

        lcd.print(“BJP WINS”);

        delay(100);

      }

 

   

 else if(M1>M && M1>M2 && M1>M3 && M!=M2 && M!=M3 && M2!=M3)

 

      {

        lcd.setCursor(0,0);

        lcd.print(“CONGRESS WINS”);

        delay(100);

      }

   

 

else if(M2>M1 && M2>M && M2>M3 && M1!=M && M1!=M3 && M!=M3)

 

      {

        lcd.setCursor(0,0);

        lcd.print(“BSP WINS”);

        delay(100);

      }

   

else if(M3>M1 && M3>M2 && M3>M && M1!=M2 && M1!=M && M!=M2)

 

      {

        lcd.setCursor(0,0);

        lcd.print(“AAP WINS”);

        delay(100);

   

  }

 

else if(M==M1 && M1==M2 && M2==M3)

 

      {

        lcd.setCursor(0,0);

        lcd.print(“TIE BW ALL”);

        delay(100);

   

  }

else if(M==M1 && M1==M2 && M3>M && M3>M1 && M3>M2)

 

      {

        lcd.setCursor(0,0);

        lcd.print(“AP-W,BJ,BS,CON-T”);

        delay(100);

   

  }

 

  else if(M==M1 && M1==M3 && M2>M && M2>M1 && M2>M3)

 

      {

        lcd.setCursor(0,0);

        lcd.print(“BS-W,BJ,AP,CON-T”);

        delay(100);

   

  }

 

else if(M==M2 && M2==M3 && M1>M && M1>M3 && M1>M2)

 

      {

        lcd.setCursor(0,0);

        lcd.print(“CON-W,BJ,BS,AAP-T”);

        delay(100);

   

  }

 

 

  else if(M3==M1 && M1==M2 && M>M3 && M>M1 && M>M2)

 

      {

        lcd.setCursor(0,0);

        lcd.print(“BJ-W,AAP,BS,CON-T”);

        delay(100);

   

  }

 

else if(M==M1 && M2==M3 )

 

      {

        lcd.setCursor(0,0);

        lcd.print(“BJ,CON-T,BS,AP-T”);

        delay(100);

   

  }

 

else if(M==M2 && M1==M3 )

 

      {

        lcd.setCursor(0,0);

        lcd.print(“BJ,BS-T,CON,AP-T”);

        delay(100);

   

  }

 

else if(M==M3 && M1==M2 )

 

      {

        lcd.setCursor(0,0);

        lcd.print(“BJ,AP-T,CO,BS-T”);

        delay(100);

   

  }

 

  else if(M1==M2 && M2==M3 )

 

      {

        lcd.setCursor(0,0);

        lcd.print(“AP,CO,BS-T”);

        delay(100);

   

  }

 

else if(M==M1 && M1!=M3 )

 

      {

       

        lcd.setCursor(0,0);

        lcd.print(“AAP & BJP TIE”);

        delay(100);

     }

}  

}

What do you think?

0 points
Upvote Downvote

Written by shahid

Leave a Reply

Your email address will not be published. Required fields are marked *

Arduino Bluetooth control RC car