LCD based voting machine using 8051 microcontroller Electronic voting machine has now replaced the traditional mechanism of voting due to several advantages like security, automatic counting etc. This project presents a way to develop an electronic voting machine which displays the count of votes on a 16×2 LCD interface. A user can get his/her vote register through a set of switches (one for each candidate). After every cast of vote, the subsequent count can be seen on LCD. The circuit uses AT89C51 microcontroller and the code for the project has been written in C.
Circuit Diagram: Basic component used: Preset: A preset is a three legged electronic component which can be made to offer varying resistance in a circuit. The resistance is varied by adjusting the rotary control over it. The adjustment can be done by using a small screw driver or a similar tool. The resistance does not vary linearly but rather varies in exponential or logarithmic manner. Such variable resistors are commonly used for adjusting sensitivity along with a sensor. The variable resistance is obtained across the single terminal at front and one of the two other terminals.
The two legs at back offer fixed resistance which is divided by the front leg. So whenever only the back terminals are used, a preset acts as a fixed resistor. Presets are specified by their fixed value resistance. AT89C51 Microcontroller AT89C51 is an 8-bit microcontroller and belongs to Atmel’s 8051 family. AT89C51 has 4KB of Flash programmable and erasable read only memory (PEROM) and 128 bytes of RAM. It can be erased and program to a maximum of 1000 times. In 40 pin AT89C51, there are four ports designated as P1, P2, P3 and P0.
All these ports are 8-bit bi-directional ports, i. e. , they can be used as both input and output ports. Except P0 which needs external pull-ups, rest of the ports have internal pull-ups. When 1s are written to these port pins, they are pulled high by the internal pull-ups and can be used as inputs. These ports are also bit addressable and so their bits can also be accessed individually. Port P0 and P2 are also used to provide low byte and high byte addresses, respectively, when connected to an external memory.
Port 3 has multiplexed pins for special functions like serial communication, hardware interrupts, timer inputs and read/write operation from external memory. AT89C51 has an inbuilt UART for serial communication. It can be programmed to operate at different baud rates. Including two timers ; hardware interrupts, it has a total of six interrupts. LCD: LCD (Liquid Crystal Display) screen is an electronic display module and find a wide range of applications. A 16×2 LCD display is very basic module and is very commonly used in various devices and circuits.
These modules are preferred over seven segments and other multi segment LEDs. The reasons being: LCDs are economical; easily programmable; have no limitation of displaying special ; even custom characters (unlike in seven segments), animations and so on. A 16×2 LCD means it can display 16 characters per line and there are 2 such lines. In this LCD each character is displayed in 5×7 pixel matrix. This LCD has two registers, namely, Command and Data. The command register stores the command instructions given to the LCD.
A command is an instruction given to LCD to do a predefined task like initializing it, clearing its screen, setting the cursor position, controlling display etc. The data register stores the data to be displayed on the LCD. The data is the ASCII value of the character to be displayed on the LCD. Advantages: 1. It is economical 2. Less manpower required 3. Time conscious, as less time required for voting ; counting 4. Avoids invalid voting 5. Saves transportation cost due to its compact size 6. Convenient on the part of voter Application: This could be used for voting purpose at any required place.