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.
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.
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
Since 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.
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.
|Client Voting Machine x2||Cost||Quantity||Total|
|Custom Pc Board||$5.00||2||$10.00|
|Max 232 Sampled||$0.00||2||$0.00|
|Client Cost||$16.00 per unit|
|Server Voting Machine||Cost||Quantity||Total|
|Server Cost||$23.00 per unit|
|Cost as shown||$55.00|
|Cost of Base System||$39.00|
For more detail: Voting Machine