How to Make EVM Machine | इलेक्ट्रॉनिक वोटिंग मशीन (EVM) कैसे बनाये | Code & Circuit Diagram

This is the prototype modal of EVM Machine for college project purpose.

Electronic Voting Machine (also known as EVM) is voting using electronic means to either aid or take care of the chores of casting and counting votes.


An EVM is designed with two units: the control unit and the balloting unit. These units are joined together by a cable. The control unit of the EVM is kept with the presiding officer or the polling officer. The balloting unit is kept within the voting compartment for electors to cast their votes. This is done to ensure that the polling officer verifies your identity. With the EVM, instead of issuing a ballot paper, the polling officer will press the Ballot Button which enables the voter to cast their vote. A list of candidates names and/or symbols will be available on the machine with a blue button next to it. The voter can press the button next to the candidate’s name they wish to vote for. Source eci.gov.in

Circuit Diagram (Proteus)

Components required-


  • Atmega16 microcontroller

  • 7805 Voltage Regulator

  • 10k Potentiometer

  • Push Button

  • 9v Battery

  • 16x2 LCD

  • LEDs


AVR Code


#include <mega16.h> #include <delay.h> #include <stdlib.h> // Alphanumeric LCD Module functions #asm .equ __lcd_port=0x15 ;PORTC #endasm #include <lcd.h> // Declaration of global variables int i,j,k; char a[10], b[10], c[10]; void main(void) { // Port A initialization PORTD=0x00; DDRD=0x00; PORTA=0x00; DDRA=0xff; // Port C initialization PORTC=0x00; DDRC=0x00; i=j=k=0; // LCD module initialization lcd_init(16); while (1) { //your code lcd_gotoxy(0,0); lcd_putsf("PLEASE GIVE VOTE"); lcd_gotoxy(0,1); lcd_putsf("AAP | CONG | BJP"); if(PIND.0==1) { PORTA=0b11111111; i=i+1; delay_ms(100); lcd_clear(); lcd_gotoxy(0,0); lcd_putsf("VOTE ACCEPTED TO"); lcd_gotoxy(0,1); lcd_putsf(" (BJP) THANKYOU "); delay_ms(300); lcd_clear(); lcd_gotoxy(0,0); PORTA=0b00000000; } if(PIND.1==1) { PORTA=0b11111111; j=j+1; lcd_clear(); delay_ms(100); lcd_gotoxy(0,0); lcd_putsf("VOTE ACCEPTED TO"); lcd_gotoxy(0,1); lcd_putsf("(CONG) THANKYOU"); delay_ms(300); lcd_clear(); lcd_gotoxy(0,0); PORTA=0b00000000; } if(PIND.2==1) { PORTA=0b11111111; k=k+1; lcd_clear(); delay_ms(100); lcd_gotoxy(0,0); lcd_putsf("VOTE ACCEPTED TO"); lcd_gotoxy(0,1); lcd_putsf(" {AAP} THANKYOU "); delay_ms(300); lcd_clear(); lcd_gotoxy(0,0); PORTA=0b00000000; } if(PIND.3==1) { if(i>j) { if(i>k) { lcd_clear(); itoa(i,a); lcd_gotoxy(1,0); lcd_putsf("WINNER IS BJP"); lcd_gotoxy(1,1); lcd_putsf("TOTAL VOTE = "); lcd_puts(a); delay_ms(500); } } else if(j>k) { lcd_clear(); itoa(j,b); lcd_gotoxy(1,0); lcd_putsf("WINNER IS CONG"); lcd_gotoxy(1,1); lcd_putsf("TOTAL VOTE = "); lcd_puts(b); delay_ms(500); } else { lcd_clear(); itoa(k,c); lcd_gotoxy(1,0); lcd_putsf("WINNER IS AAP"); lcd_gotoxy(1,1); lcd_putsf("TOTAL VOTE = "); lcd_puts(c); delay_ms(500); } } } }

240 views

©2020 by Electronics library.

  • Instagram
  • Twitter
  • LinkedIn
  • Facebook