Voting Machine Using Atmel Mega32


Our project is an electronic voting system. The system allows for quick and accurate voting electronically. The system uses a client/server architecture, which allows voters to cast ballots on the client terminal. Each client interfaces with the server, which keeps track of the entire system.

Voting Machine Using Atmel Mega32

High Level Design

Our design is broken up into several components. After solving each component individually, they were pieced together to form a complete system.
As the primary display for the client machine, the television is an integral part of the voting machine. The display is text only the code driving it was optimized for such a purpose.
Card reader
The card reader used is a standard track two reader. For most cards, track two stores data that is easily accessible via other means (i.e. credit card numbers, student ID number, drivers license number). When a user swipes their card, the machine will authenticate the number as valid (in our case, a valid Cornell ID) and allow the person to continue. If the card is not of the proper format, an error is returned. For our purposes, the student ID number is sufficient for authentication.
Communication between multiple chips via TWI
Communication between multiple chips via TWISince we planned on allowing multiple devices to simultaneously connect to one server, we needed to use some sort of common bus. Fortunately, the Mega32 has such a feature in the form of the Two Wire Interface. As the name implies, the TWI has two wires; one for a clock pulse and another for data. Since there can be multiple devices on the bus, the TWI also uses device addressing and a master/slave system to determine which devices are allowed to talk at any given time. By implementing some more robust communication protocols, data can be sent from the client to the server for verification and an acknowledgement can be sent from the server to the client.
Since digital data can be compromised and altered, we decided to implement a method to create a hard copy of a users selection. After a person has finished entering his or her choices and the data is verified, the text is sent out to the printer attached to the machine. After some experimentation, we discovered this was fairly simple to do, since it only required feeding the data through the serial port, followed by a form feed to start the printer.
Hardware/Software Tradeoffs
Client/Server architecture.
The inherent tradeoff in this architecture is that the server requires more storage and processing power to be able to fulfill all client requests. This also creates a vulnerability in the system since it is a key component. A server compromise would be disastrous. However, coding a verification transaction protocol becomes much simpler in a client/server architecture. An alternative would be a peer to peer system. In this method, a machine must communicate with every other machine on each transaction. Furthermore if any of the client machines where to go down, they will not be able to respond to requests. A client/server architecture is advantageous in this scenario as it simplifies programming and makes the system easier to control.

 Parts list:

Client Voting Machine x2 Cost Quantity Total
Custom Pc Board $5.00 2 $10.00
ATMEL Mega32 $8.00 2 $16.00
Max 232 Sampled $0.00 2 $0.00
Serial Connector(Male) $2.00 1 $2.00
Card Reader $1.50 2 $3.00
Buttons $0.50 2 $1.00
Whiteboard (owned) $0.00 1 $0.00
TV (lab) $0.00 2 $0.00
Total $32.00
Client Cost $16.00 per unit
Server Voting Machine Cost Quantity Total
STK-500> $15.00 1 $15.00
ATMEL Mega32 $8.00 1 $8.00
Total $23.00
Server Cost $23.00 per unit
Cost as shown $55.00
Cost of Base System $39.00

For more detail: Voting Machine

About The Author

Ibrar Ayyub

Ibrar Ayyub is an experienced technical writer with a Master's degree in computer science from BZU Multan University. He has written for various industries, mainly home automation, and engineering. He has a clear and simple writing style and is skilled in using infographics and diagrams. He is a great researcher and is able to present information in a well-organized and logical manner.

Scroll to Top