Sei sulla pagina 1di 48

Electrical Voting Machine Using GSM

Electrical Voting Machine Using GSM.


A PROJECT REPORT SUBMITTED BY

Pradip R. Patel Ravi D. Patel Rushabh D. Patel

090670111016 090670111024 090670111007

In fulfillment for the award of the degree Of BACHELOR OF ENGINEERING IN

Electronics & communication

SAL INSTITUTE OF TECHNOLOGY & ENGINEERING RESEARCH Science City Road, Bhadaj, Ahmedabad-380060

Gujarat Technological University, Ahmedabad May 2013

Sal Institute Of Technology & Engineering Research

Page 1

Electrical Voting Machine Using GSM

Electronics & communication May 2013

CERTIFICATE
Date: / / 2013

This is to certify that the dissertation entitled SEMINAR/PROJECT TITLE has been carried out by

Pradip R. Patel Ravi D. Patel Rushabh D. Patel

090670111016 090670111024 090670111007

under my guidance in fulfillment of the degree of Bachelor of Engineering in Electronics & communication (7th Semester/8th Semester) of Gujarat Technological University, Ahmedabad during the academic year 2012-13.

Guide: Mr. Rajani Kansagra (External) Miss. Nirali C. Shah (Internal) Head of the Department Nidhi N Bhatt
Sal Institute Of Technology & Engineering Research
Page 2

Electrical Voting Machine Using GSM

ACKNOWLEDGEMENTS

It is a known fact that words are never sufficient to express the exact amount of gratitude that a person feels, but words are the only way we can express our feeling. We would therefore like to express our hearty thanks to our project guide Mr. Rajnibhai Kansagra & Miss. Nirali C. Shah for the invaluable guidance, encouragement & kind co-operation extended by him during the term of our project.

Sal Institute Of Technology & Engineering Research

Page 3

Electrical Voting Machine Using GSM

ABSTRACT

Using SMS Based Voting machine we can vote from our home just by sending a sms a specified format from our mobile. The entire voters will be provided with a unique password (pin) and identification number.

For voting we have to send a sms in a predefined format. The voting machine will receive this messages and decode the message and verify the Pin number and identification number if both number matches the voting machine will accept the vote else the message is rejected by the machine..

The voting machine is implemented using 89S52 microcontroller. A GSM MODEM is used to receive messages from voters. The microcontroller accepts this message and verifies the message and keep updates. A key is activated used to view the result. An LCD is used to display the final result.

Sal Institute Of Technology & Engineering Research

Page 4

Electrical Voting Machine Using GSM

TABLE OF CONTENTS
Certificate. .....................2 Acknowledgements........3 Abstract..................4 Table of Contents...................5 List of Tables......6 List of Figure......7 Chapters..8 Future Planning47 Conclusion47 Reference..48

Sal Institute Of Technology & Engineering Research

Page 5

Electrical Voting Machine Using GSM

List of Tables
Table 3.1.6: Voltage and Current level in TTL logic...18 Table 3.1.7: Port description........19 Table 3.6.4: Operation according to RS and RW signal..28

Sal Institute Of Technology & Engineering Research

Page 6

Electrical Voting Machine Using GSM

LIST OF FIGURES

Figure 1: Block Diagram......13 Figure 3.1: Microcontroller Bolck Diagram.....15 Figure 3.1.1: Pin diagram of 89s52..16 Figure 3.1.3: Basic circuit -that makes 89s52 works ..17 Figure 3.1.7: Internal circuitary for the 89s52 port .19 Figure 3.2.2: Max 232......23 Figure 3.2.3: Max 232 interfacing interfacing ....23 Figure 3.4.1: GSM interfacing.25 Figure 3.6: LED....25 Figure 3.7: LCD...26 Figure 3.7.1: LCD block diagram....26 Figure 3.9 : Voltage Regulator.29 Figure 4.1: Circuit diagram..30 Figure 4.2.1: Interfacing with LCD... 31 Figure 3.7.1: Interfacing with LED .....31 Figure 5.2: Flow Chart.....34

Sal Institute Of Technology & Engineering Research

Page 7

Electrical Voting Machine Using GSM CHAPTERS


Chapter 1 Introduction.9 1.1 Existing Electronic voting..10 Chapter 2 Techanical Specification......12 Chapter 3 Hardware Discription.......13 3.1 Block diagram of project13 3.2 Microcontroller (89S52).............15 3.2.1 Pin diagram of AT89S52.16 3.2.2 Oscillator circuit..16 3.2.3 Basic circuit that makes 89S52 Works17 3.2.4 How fast AT89S52 work ?......................................................................18 3.2.5 Why is such oddball crystal frequency ?.................................................18 3.2.6 Using Port for i/o operation.....18 3.2.7 Port Functions..19 3.2.8 Be Careful....21 3.3 Max 232......21 3.3.1 RS232 waveform.21 3.3.2 RS232 level converter.22 3.3.3 Microcontroller interfacing with RS232 standard devices..23 3.4 GSM Modem..24 3.4.1 GSM serial output...25 3.6 LED25 3.7 LCD26 3.7.1 Pinout..26 3.7.2 Display Data RAM (DDRAM)...27 3.7.3 Character Generator RAM (CGRAM)37 3.7.4 Registers..28 3.8 Relay..28 3.9 Regulated Power supply28

Sal Institute Of Technology & Engineering Research

Page 8

Electrical Voting Machine Using GSM


Chapter 4 Circuits & Interfacing...30 4.1 Circuit Diagram..30 4.2 Interfacing With 89S52......31 4.2.1 LCD interfacing with 89S52...31 4.2.5 LEDs interfacing with 89S52..31 Chapter 5 Software Discription........................32 5.1 Software.....32 5.1.1 KEIL...32 5.1.2 AT89S52 Development Tool Kit...32 5.2 Flow Chart.....33 5.2.1 Description of flow34 5.3 Coding of Project..35 Chapter 6 Sequirity..........................38 6.1 Security Features in GSM.........38 6.2 Basic Mobile Voting Scheme....39 6.3 Security Requirements for voting scheme.........40 6.4 Proposed Mobile Voting Scheme......41 6.5 The Components............41 6.6 Overview... 42 6.7 Counting Phase..43 6.8 Security Analysis...43 6.9 Cryptography.44 Chapter 7 The Benefits of E-voting.46 Chapter 8 Conclusion...47 Chapter 9 Biblography.48

Sal Institute Of Technology & Engineering Research

Page 9

Electrical Voting Machine Using GSM

Chapter 1 INTRODUCTION
Voting is a vital part of the democratic process. In democratic societies, voting is an important tool to collect and reflect peoples opinions. Traditionally, a voter can cast vote after going to the designated polling place and checking his identity. This makes man directly to count the ballots and counting of votes to be long. These paper-based systems can result in a number of problems, including:

Unacceptable percentages of lost, stolen, or miscounted ballots Votes lost through unclear or invalid ballot marks Limited accommodations for people with disabilities
In an e-voting by touch screen, a voter directly selects candidates or the vote content appeared on a screen as the finger. This voting with fast counting time has also a problem that voters go to the polling place. In the meantime, an e-voting using internet has no inconvenience that voters should visit the voting booth. However, this voting is executed just in the environment with internet accessible computer.

In this project, we proposes an e-voting system that allows a voter to be identified using a wireless certificate without additionally registering when a user votes using his mobile terminal such as a cellular phone. We also present a method that ensures the anonymity of voter and the confidentiality of vote content. By our mobile voting system, a voter can cast his vote more easily and conveniently than the existing e-voting using internet, within the scheduled time period anywhere even when a voter is not able to access internet on a voting day. Our proposal can be applied not only to election but also for college election

Sal Institute Of Technology & Engineering Research

Page 10

Electrical Voting Machine Using GSM

1.1 EXISTING ELECTRONIC VOTING

In the existing offfine voting method to select a candidate in the election such as presidential election, the assembly election, or local election, electorates go to the designated polling places and have to be identified to cast their votes, and finally voters cast their ballot. Of course, voters should be in advance registered on a poll book. To do so, a significant amount of time and cost are consumed by voting and counting of votes. In the mean time, the most important security issue for on-line electronic voting using touch screen or internet is to guarantee the anonymity of voter and the confidentiality of vote content. The followings are requirements that should be considered for secure and trustworthy e-voting. - The relation between voter and vote content should not be revealed. - The result of a poll should be retained as a secret before counting the ballot. - A voter can cast his vote just one time. - Only an identified person by an e-voting device can participate in e-voting. - Other people excepting a voter himself should not know the vote content. - It is not permitted to rig the ballot An e-voting method using a touch screen which allows a voter to select a candidate or an option displayed on a screen has advantages in that a voter can cast his vote regardless of his assigned polling place, but in this case, a voter is still required to go to a polling booth to vote. As other e-voting method, a voter does not have to go to a polling place if he uses internet and vote is permitted to internet user. But, internet-accessible terminals are always required to vote and a voter can cast a vote in the just limited place which he can access internet. Especially, private data like personal ID might be leaked in the course of accessing to the internet. This means that anonymity of electronically voting over the internet is not satisfied. Also, confidentiality of voting might not be ensured if a candidate selection or a voting content is not encrypted.

Sal Institute Of Technology & Engineering Research

Page 11

Electrical Voting Machine Using GSM

Chapter 2 TECHNICAL SPECIFICATION


1) MICROCONTROLLER 89S52: 40 PIN DIP 8kMEMORY 256RAM 32I/O 10mA(MAX)EACH PIN

CRYSTAL FREQUENCY(24MHZ)

2) GSM MODULE(SIM 300): MIN-MAX(VOLTAGE)3.4V TO 5V 3) TRANSFORMER : OUTPUT VOLTAGE=12VAC CURRENT=750mA 4) DIODES 4007-2 : 1AMP BREAKDOWN VOLTAGE=1000V 5) TRANSISTOR(BC547): 400mA BREAKDOWN VOLTAGE= 45V CURRENT GAIN=100-300OHM 6) 5V REGULATOR 7805 WITH HEATSINK : INPUT= 12V-45V DC

OUTPUT=5V DC
7) MAX 232: INPUT=5V OUTPUT=10(+-) 8) LED: INPUT CURRENT=10-20mA
Page 12

Sal Institute Of Technology & Engineering Research

Electrical Voting Machine Using GSM

Chapter 3 HARDWARE DESCRIPTION


3.1 Block Diagram of Project:-

VOTER

SMS 8051
GSM MODULE

LEDS
MAX 232
TO ALL BLOCKS

POWER SUPPLY

FIG 1. BLOCK DIAGRAM

Sal Institute Of Technology & Engineering Research

Page 13

Electrical Voting Machine Using GSM 3.2 MICROCONTROLLER ( 89S52) :


When we have to learn about a new computer we have to familiarize about the machine capability we are using, and we can do it by studying the internal hardware design (devices architecture), and also to know about the size, number and the size of the registers. A microcontroller is a single chip that contains the processor (the CPU), non-volatile memory for the program (ROM or flash), volatile memory for input and output (RAM), a clock and an I/O control unit. Also called a "computer on a chip," billions of microcontroller units (MCUs) are embedded each year in a myriad of products from toys to appliances to automobiles. For example, a single vehicle can use 70 or more microcontrollers. The following picture describes a general block diagram of microcontroller. The AT89S52 is a low-power, high-performance CMOS 8-bit microcontroller with 8K bytes of in-system programmable Flash memory. The device is manufactured using Atmels high-density nonvolatile memory technology and is compatible with the industrystandard 80C51 instruction set and pinout. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory pro-grammer. By combining a versatile 8-bit CPU with in-system programmable Flash on a monolithic chip, the Atmel AT89S52 is a powerful microcontroller, which provides a highly flexible and costeffective solution to many, embedded control applications. The AT89S52 provides the following standard features: 8K bytes of Flash, 256 bytes of RAM, 32 I/O lines, Watchdog timer, two data pointers, three 16-bit timer/counters, a six-vector two-level interrupt architecture, a full duplex serial port, on-chip oscillator, and clock circuitry. In addition, the AT89S52 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port, and interrupt system to continue functioning. The Powerdown mode saves the RAM con-tents but freezes the oscillator, disabling all other chip functions until the next interrupt

Sal Institute Of Technology & Engineering Research

Page 14

Electrical Voting Machine Using GSM

FIG 2 MICROCONTROLLER BLOCK DIAGRAM

The hardware is driven by a set of program instructions, or software. Once familiar with hardware and software, the user can then apply the microcontroller to the problems easily.

Sal Institute Of Technology & Engineering Research

Page 15

Electrical Voting Machine Using GSM 3.2.1 Pin Diagram of 89S52


89S52 PIN OUT Power - Vcc, Vss Reset - RST Crystal - XTAL[1,2] External device interfacing EA, ALE, PSEN, WR, RD I/O Ports P0[7;0], P1[7:0], P2[7:0], P3

P3 is shared with control lines Serial I/O RxD, TxD, External Interrupts INT0 & INT1 Counter control T0, T1 P0 and P2 are multiplexed with Address and Data bus FIG 3 PIN DIAGARM OF 89S52

3.2.2 Oscillator Circuit


The 89S52 uses the crystal for precisely that: to synchronize its operation. Effectively, the 89S52 operates using what are called "machine cycles." A single machine cycle is the minimum amount of time in which a single 89S52 instruction can be executed. although many instruction take multiple cycles.

Sal Institute Of Technology & Engineering Research

Page 16

Electrical Voting Machine Using GSM

89S52 has an on-chip It needs an external crystal thats decides the operating frequency of the 89S52. This can be achieved in two ways.The crystal is connected to pins 18 and 19 with stabilizing capacitors. 12 MHz (11.059MHz) crystal is often used and the capacitance ranges from 20pF to 40pF. The oscillator can also be a TTL clock source connected with a NOT gate as shown above

3.2.3 BASIC CIRCUIT -THAT MAKES 89S52 WORKS

Fig. 4 BASIC CIRCUIT -THAT MAKES 89S52 WORKS If primary current exists and the secondary circuit of a CT is closed, the winding builds and maintains a counter or back EMF to the primary magnetizing force. Should the secondary be opened with current in the primary, the counter EMF is removed; and the primary magnetizing force builds up an extremely high Potential Transformer in switchyard. Inside Potential Transformer with Fuses. Voltage in the secondary, which is dangerous to personnel and can destroy the current transformer.

Sal Institute Of Technology & Engineering Research

Page 17

Electrical Voting Machine Using GSM

3.2.4 How fast 89S52 works ?


A cycle is, in reality, 12 pulses of the crystal. That is to say, if an instruction takes one machine cycle to execute, it will take 12 pulses of the crystal to execute. Since we know the crystal is pulsing 11,059,000 times per second and that one machine cycle is 12 pulses, we can calculate how many instruction cycles the 89S52 can execute per second: 11,059,000 / 12 = 921,583

3.2.5 Why is such an oddball crystal frequency?


11.0592 MHz crystals are often used because it can be divided to give you exact clock rates for most of the common baud rates for the UART, especially for the higher speeds (9600, 19200). Despite the "oddball" value, these crystals are readily available and commonly used.

3.2.6 Using Ports for I/O Operation


89S52 is TTL logic device. TTL logic has two levels: Logic "High" (1) and logic "Low" (0). The voltage and current involved for the two levels are as follows:

Level HIGH LOW

Voltage Above 2.4V Below 0.9V

Current Virtually no current flow 1.6mA Sinking current from TTL input to ground

(Depends on logic family)

Table 1

Sal Institute Of Technology & Engineering Research

Page 18

Electrical Voting Machine Using GSM

3.2.7 Port functions


PORTS PORT-0 (Pin 32-39) PORT-1 (Pin 1-8) PORT-2 (Pin 21-28) PORT-3 (Pin 10-17) Function Dual-purpose port1. general purpose I/O Port. 2. multiplexed address & data bus Open drain outputs Dedicated I/O port Used solely for interfacing to external devices Internal pull-ups Dual-purpose port1. general purpose I/O port. 2. a multiplexed address & data bus. Internal pull-ups Dual-purpose port1. general purpose I/O port. 2. pins have alternate purpose related to special features of 89S52 Internal pull-ups

Table 2 The 89S52 internal ports are partly bi-directional (Quasi-bi-directional). The following is the internal circuitry for the 89S52 port pins:

FIG 5 INTERNAL CIRCUITARY FOR THE 89S52 PORT

Sal Institute Of Technology & Engineering Research

Page 19

Electrical Voting Machine Using GSM

1.Configuring for output P0 is open drain. Has to be pulled high by external 10K resistors. Not needed if P0 is used for address lines Writing to a port pin loads data into a port latch that drives a FET connected to the port pin. P0: Note that the pull-up is absent on Port 0 except when functioning as the external address/data bus. When a "0" is written to a bit in port 0, the pin is pulled low. But when a "1" is written to it, it is in high impedance (disconnected) state. So when using port 0 for output, an external pull-up resistor is needed, depending on the input characteristics of the device driven by the port pin

P1, P2, P3 have internal pull-ups: When a "0" is written to a bit in these port , the pin is pulled low ( FET-ON) ,also when 1 is written to a bit in these port pin becomes high (FETOFF) thus using port P1,P2,P3 is simple. 2. Configuring for input At power-on all are output ports by default To configure any port for input, write all 1s (0xFF) to the port Latch bit=1, FET=OFF, Read Pin asserted by read instruction You can used a port for output any time. But for input, the FET must be off. Otherwise, you will be reading your own latch rather than the signal coming from the outside. Therefore, a "1" should be written to the pin if you want to use it as input, especially when you have used it for output before. If you don't do this input high voltage will get grounded through FET so you will read pin as low and not as high. An external device cannot easily drive it high so, you should not tide a port high directly without any resistor. Otherwise, the FET would burn

Sal Institute Of Technology & Engineering Research

Page 20

Electrical Voting Machine Using GSM

3.2.8 Be Careful :
Some port pins serve multiple functions. Be careful writing to such ports. For example, P3.0 is the UART RXD (serial input), and P3.1 is the UART TXD (serial output). If you set P3.0 to a '0', an external buffer (such as an RS232 level translator) cannot drive it high. Therefore you have prevented receiving any serial input. If an external interrupt such as EX1 on P3.3 is enabled, and set to be level sensitive, and you clear this pin's output latch to a zero, guess what? You've just caused a perpetual interrupt 1. The pin's input buffer will read the output of it's latch as always low. Your controller will spend all of its time in the interrupt handler code and will appear to have crashed, since it will have very little time for other tasks. In fact, it will get to execute a single instruction before re-entering the interrupt handler, so the rest of your program will execute very, very slowly

3.3 MAX232:
The MAX232 is an integrated circuit that converts signals from an RS-232 serial port to signals suitable for use in TTL compatible digital logic circuits. The MAX232 is a dual driver/receiver and typically converts the RX, TX, CTS and RTS signals. The drivers provide RS-232 voltage level outputs (approx. 7.5 V) from a single + 5 V supply via on-chip charge pumps and external capacitors. This makes it useful for implementing RS-232 in devices that otherwise do not need any voltages outside the 0 V to + 5 V range, as power supply design does not need to be made more complicated just for driving the RS-232 in this case. The receivers reduce RS-232 inputs (which may be as high as 25 V), to standard 5 V TTL levels. These receivers have a typical threshold of 1.3 V, and a typical hysteresis of 0.5 V.

3.3.1 RS-232 WAVEFORM

TTL/CMOS Serial Logic Waveform

Sal Institute Of Technology & Engineering Research

Page 21

Electrical Voting Machine Using GSM

The diagram above, shows the expected waveform from the UART when using the common 8N1 format. 8N1 signifies 8 Data bits, No Parity and 1 Stop Bit. The RS-232 line, when idle is in the Mark State (Logic 1). A transmission starts with a start bit which is (Logic 0). Then each bit is sent down the line, one at a time. The LSB (Least Significant Bit) is sent first. A Stop Bit (Logic 1) is then appended to the signal to make up the transmission. The data sent using this method, is said to be framed. That is the data is framed between a Start and Stop Bit . RS-232 Voltage levels +3 to +25 volts to signify a "Space"(Logic0) -3 to -25 volts for a "Mark" (logic 1). Any voltage in between these regions (i.e. between +3 and -3 Volts) is undefined.

The data byte is always transmitted least-significant-bit first. The bits are transmitted at specific time intervals determined by the baud rate of the serial signal. This is the signal present on the RS-232 Port of your computer, shown below.

3.3.2 RS-232 LEVEL CONVERTER


Standard serial interfacing of microcontroller (TTL) with PC or any RS232C Standard device , requires TTL to RS232 Level converter . A MAX232 is used for this purpose. It provides 2-channel RS232C port and requires external 10uF capacitors. The driver requires a single supply of +5V .

Sal Institute Of Technology & Engineering Research

Page 22

Electrical Voting Machine Using GSM

FIG 6 MAX 232 1. MAX-232 includes a Charge Pump, which generates +10V and -10V from a single 5v supply. BAR -PRIMARY CTs

3.3.3 MICROCONTROLLER INTERFACING WITH RS-232 STANDARD DEVICES

FIG 7 MAX 232 INTERFACING INTERFACING Sal Institute Of Technology & Engineering Research
Page 23

Electrical Voting Machine Using GSM

MAX232 (+5V -> +-12V converter) Serial port male 9 pin connector (SER)

3.4 GSM MODEM:


A GSM modem is a wireless modem that works with a GSM wireless network. A wireless modem behaves like a dial-up modem. The main difference between them is that a dial-up modem sends and receives data through a fixed telephone line while a wireless modem sends and receives data through radio waves.

A GSM modem can be an external device or a PC Card / PCMCIA Card. Typically, an external GSM modem is connected to a computer through a serial cable or a USB cable. A GSM modem in the form of a PC Card / PCMCIA Card is designed for use with a laptop computer. It should be inserted into one of the PC Card / PCMCIA Card slots of a laptop computer. Like a GSM mobile phone, a GSM modem requires a SIM card from a wireless carrier in order to operate. As mentioned in earlier sections of this SMS tutorial, computers use AT commands to control modems. Both GSM modems and dial-up modems support a common set of standard AT commands. You can use a GSM modem just like a dial-up modem. In addition to the standard AT commands, GSM modems support an extended set of AT commands. These extended AT commands are defined in the GSM standards. With the extended AT commands, you can do things like: Reading, writing and deleting SMS messages. Sending SMS messages. Monitoring the signal strength. Monitoring the charging status and charge level of the battery. Reading, writing and searching phone book entries.

The number of SMS messages that can be processed by a GSM modem per minute is very low -- only about six to ten SMS messages per minute.

Sal Institute Of Technology & Engineering Research

Page 24

Electrical Voting Machine Using GSM 3.4.1 GSM serial output


Most GPS/GSM are capable of sending information through a simple serial link. Only the TXD and GROUND pins need to be connected . The GPS/GSM must be set at 9600 bps (or 4800)bits, No Parity, and 1 stop bit. NAND gate as 2:1 Mux. which connects Rx of GSM modem or GPS receiver according to select bit logic level (pin P1.0 of uC)

FIG 8 GSM INTERFACING

3.6 LED:

Fig. 9 LED

Sal Institute Of Technology & Engineering Research

Page 25

Electrical Voting Machine Using GSM


A light-emitting diode (LED) is a semiconductor light source. LEDs are used as indicator lamps in many devices, and are increasingly used for lighting. Introduced as a practical electronic component in 1962, early LEDs emitted low-intensity red light, but modern versions are available across the visible, ultraviolet and infrared wavelengths, with very high brightness.

3.7 LCD:-

Fig. 10 LCD Most projects you create with the controller CPU require some form of display. The most common way to accomplish this is with the LCD (Liquid Crystal Display). LCDs have become a cheap and easy way to get text display for an embedded system Common display are set up as 16 to 20 characters by 1 to 4 lines.

3.7.1 Pinout

FIG 11 LCD BLOCK DIAGRAM 8 data pins D7:D0 Bi-directional data/command pins. Alphanumeric characters are sent in ASCII format.

Sal Institute Of Technology & Engineering Research

Page 26

Electrical Voting Machine Using GSM


RS: Register Select RS = 0 -> Command Register is selected RS = 1 -> Data Register is selected

R/W: Read or Write 0= Write, 1= Read E: Enable (Latch data) Used to latch the data present on the data pins. A high-to-low edge is needed to latch the data

VEE : contrast control NOTE: When writing to the display, data is transferred only on the high to low transition of this signal. However, when reading from the display, data will become available shortly after the low to high transition and remain available until the signal falls low again.

3.7.2 Display Data RAM (DDRAM)


Display data RAM (DDRAM) is where you send the characters (ASCII code) you want to see on the LCD screen. It stores display data represented in 8-bit character codes. Its capacity is 80 characters (bytes). Below you see DD RAM address layout of a 2*16 LCD. In the above memory map, the area shaded in black is the visible display (For 16x2 display). For first line addresses for first 15 characters is from 00h to 0Fh. But for second line address of first character is 40h and so on up to 4Fh for the 16th character. So if you want to display the text at specific positions of LCD , we require to manipulate address and then to set cursor position accordingly .

3.7.3 Character Generator RAM (CGRAM)-User defined character RAM


In the character generator RAM, we can define our own character patterns by program. CG RAM is 64 bytes ,allowing for eight 5*8 pixel, character patterns to be defined. However how to define this and use it is out of scope of this tutorial. So I will not talk any more about CGRAM

Sal Institute Of Technology & Engineering Research

Page 27

Electrical Voting Machine Using GSM

3.7.4 Registers
The HD44780 has two 8-bit registers, an instruction register (IR) and a data register (DR). The IR stores instruction codes. The DR temporarily stores data to be written into DDRAM or CGRAM and temporarily stores data to be read from DDRAM or CGRAM. Data written into the DR is automatically written into DDRAM or CGRAM by an internal operation. . These two registers can be selected by the register selector (RS) signal. See the table below
RS 0 0 1 1 RW 0 1 0 1 Operation IR write as an internal operation (display clear, etc.) Read busy flag (DB7) and address counter (DB0 to DB6) DR write as an internal operation (DR to DDRAM or CGRAM) DR read as an internal operation (DDRAM or CGRAM to DR)

Table 3 3.8 Relay:


A relay is an electrical switch that opens and closes under the control of another electrical circuit. In the original form, the switch is operated by an electromagnet to open or close one or many sets of contacts. Because a relay is able to control an output circuit of higher power than the input circuit, it can be considered to be, in a broad sense, a form of an electrical amplifier.

3.9

REGULATED POWER SUPPLY :-

A variable regulated power supply, also called a variable bench power supply, is one where you can continuously adjust the output voltage to your requirements. Varying the output of the power supply is the recommended way to test a project after having double checked parts placement against circuit drawings and the parts placement guide.

Sal Institute Of Technology & Engineering Research

Page 28

Electrical Voting Machine Using GSM


This type of regulation is ideal for having a simple variable bench power supply. Actually this is quite important because one of the first projects a hobbyist should undertake is the construction of a variable regulated power supply. While a dedicated supply is quite handy e.g. 5V or 12V, it's much handier to have a variable supply on hand, especially for testing. Most digital logic circuits and processors need a 5 volt power supply. To use these parts we need to build a regulated 5 volt source. Usually you start with an unregulated power To make a 5 volt power supply, we use a LM7805 voltage regulator IC (Integrated Circuit). The IC is shown below.

The LM7805 is simple to use. You simply connect the positive lead of your unregulated DC power supply (anything from 9VDC to 24VDC) to the Input pin, connect the negative lead to the Common pin and then when you turn on the power, you get a 5 volt supply from the Output pin.

Fig. 12 Voltage Regulator

Sal Institute Of Technology & Engineering Research

Page 29

Electrical Voting Machine Using GSM

Chapter 4 CIRCUITS & INTERFACING

4.1Circuit Diagram of Project

Fig. 13 Circuit Diagram

4.2 INTERFACING WITH MICROCONTROLLER 89S52 :-

Sal Institute Of Technology & Engineering Research

Page 30

Electrical Voting Machine Using GSM

4.2.1 LCD

FIG 14 INTERFACING WITH LCD

4.2.2 LEDS

FIG 15 INTERFACING WITH LED

Sal Institute Of Technology & Engineering Research

Page 31

Electrical Voting Machine Using GSM

Chapter 5 SOFTWARE DESCRIPTION


5.1 SOFTWARE 5.1.1 KEIL:Keil Software provide us with software development tools for the 89S52 family of microcontrollers. With this tools, you can generate embedded applications for the multitude of 89S52 derivatives. Our 89S52 development tools are listed below: C51 Optimizing C Cross Compiler A51 Macro Assembler 89S52 Utilities (linker, object file converter, library manager) dScope for Windows Source-Level Debugger/Simulator Vision for Windows Integrated Development Environment.

5.1.2 89S52 Development Tool Kits :-

When you use the Keil Software tools, the 89S52 project development cycle is roughly the same as for any software development project.

1. Create source files in C or assembly. 2. Compile or assemble source files. 3. Correct errors in source files. 4. Link object files from compiler and assembler. 5. Test linked application.

Sal Institute Of Technology & Engineering Research

Page 32

Electrical Voting Machine Using GSM 5.2 Flow chart

Fig. 16 Flow Chart

Sal Institute Of Technology & Engineering Research

Page 33

Electrical Voting Machine Using GSM

5.2.1 DESCRIPTION OF FLOW : A wireless certificate is issued to a mobile terminal, that is, a voter has the certificate before commencing voting. The certificate should be kept in the mobile terminal for evoting service. E-voting service is started as soon as a mobile terminal connects to an e-voting device. If an e-voting device accepts the e-voting service, it requests a certificate to verify a voters identity A mobile terminal sends the certificate to the e-voting device. So, a voter proves that he is a qualified person to cast a vote. If the voters identity is verified and the voter is given the right to vote, an e-voting device checks if the voter is re-accessing an e-voting device. The e-voting device selects and transmits an encryption key according to the encryption method to guarantee the confidentiality of the voter. Of course, this work is done after verifying the voters identity and checking double voting of a voter. After sending the encryption key, an e-voting device continuously transmits vote information containing a list of possible voting selections and supplemental information. And then, a voter decides his voting based on the vote information. A mobile terminal encrypts the vote content and transmits the encrypted vote content to an e-voting device. An e-voting device does not reveal the encrypted vote content until voting time is finished. At this moment, a mobile communication server that received the encrypted vote content and the ID of a mobile terminal always deletes ID. That is, an evoting device receives only content of voting. When voting time has passed, an e-voting device decrypts the stored encrypted vote content and checks the voting selection to count the vote.

Sal Institute Of Technology & Engineering Research

Page 34

Electrical Voting Machine Using GSM 5.3 Coding Of Project :# include <8052.h> # include "lcd.h"

void DisplayVersion(); void main(void) { unsigned int i,j,k,l,m,n = 0,

DisplayVersion();

for(j = 0; j < 15; j++) for(i = 0; i < 40000; i++);

main:

LcdInit(); LcdPuts("Enter your Vote: "); LcdCmd(NEW_LINE); while(1) { if(P1_0 == 0) { LcdCmd(NEW_LINE); LcdPuts("Party 1 : Voted "); for(j = 0; j < 10; j++) for(i = 0; i < 40000; i++); k++; LcdCmd(NEW_LINE); LcdPuts(" } if(P1_1 == 0) { LcdCmd(NEW_LINE); ");

Sal Institute Of Technology & Engineering Research

Page 35

Electrical Voting Machine Using GSM


LcdPuts("Party 2 : Voted "); for(j = 0; j < 10; j++) for(i = 0; i < 40000; i++); l++; LcdCmd(NEW_LINE); LcdPuts(" } if(P1_2 == 0) { LcdCmd(NEW_LINE); LcdPuts("Party 3 : Voted "); for(j = 0; j < 10; j++) for(i = 0; i < 40000; i++); m++; LcdCmd(NEW_LINE); LcdPuts(" } if(P1_3 == 0) { LcdCmd(NEW_LINE); LcdPuts("Party 4 : Voted "); for(j = 0; j < 10; j++) for(i = 0; i < 40000; i++); n++; LcdCmd(NEW_LINE); LcdPuts(" } if(P1_4 == 0) { LcdInit(); LcdPuts("P1: P2: "); "); "); ");

LcdCmd(NEW_LINE); LcdPuts("P3: P4: ");

LcdCmd(0x84); Sal Institute Of Technology & Engineering Research


Page 36

Electrical Voting Machine Using GSM


LcdPutc(k); LcdCmd(0x8B); LcdPutc(l); LcdCmd(0xC4); LcdPutc(m); LcdCmd(0xCB); LcdPutc(n); for(j = 0; j < 20; j++) for(i = 0; i < 40000; i++); goto main; } } }

void DisplayVersion() { LcdInit(); LcdPuts("ELECTRONIC VOTING"); LcdCmd(NEW_LINE); LcdPuts("M/C USING 8051uC "); }

Sal Institute Of Technology & Engineering Research

Page 37

Electrical Voting Machine Using GSM

Chapter 6 SECURITY
6.1 Security Features in GSM
GSM is a digital wireless network standard widely used in European and Asian countries. It provides a common set of compatible services and capabilities to all GSM mobile users. The services and security features to subscribers are subscriber identity confidentiality, subscriber identity authentication, user data confidentiality on physical connections, connectionless user data confidentiality and signaling information element confidentiality. They are summarized as follows: Subscriber identity confidentiality is the property that the subscriber's real identity remains secret by protecting his International Mobile Subscriber Identity(IMSI), which is an internal subscriber identity used only by the network, and using only temporary identities for visited networks. Subscriber identity authentication is the property that ensures that the mobile subscriber who is accessing the network or using the service is the one claimed. This feature is to protect the network against unauthorized use. Data confidentiality is the property that the user information and signaling data is not disclosed to unauthorized individuals, entities or processes. This feature is to ensure the privacy of the user information. In our proposed GSM mobile voting scheme, communication between the mobile equipment and the GSM network uses standard GSM technology. Hence GSM security features apply. Among which, the subscriber identity authentication feature is particularly used in the protocol. The subscriber identity authentication in GSM is based on a challenge response protocol. A random challenge RAND is issued when a mobile subscriber tries to access a visited network. The Authentication Centre (AC) computes a response SRES from RAND using an algorithm A3 under the control of a subscriber authentication key Ki, where the key Ki is unique to the subscriber, and is stored in the Subscriber Identity Module (SIM) on the Mobile Equipment (ME), as well as the Home Location Register (HLR).

Sal Institute Of Technology & Engineering Research

Page 38

Electrical Voting Machine Using GSM


The ME also computes a response SRES from RAND as well. Then the value SRES computed by the ME is signaled to the visited network, where it is compared with the value SRES computed by the AC. The access of the subscriber will be accepted or denied depending upon the result of comparing the two values. If the two values of SRES are the same, the mobile subscriber has been authenticated, and the connection is allowed to proceed. If the values are different, then access is denied.

6.2 Basic Mobile Voting Scheme

In a mobile environment, the mobile device have limited computational abilities, so employing schemes with large computation is not practical. Therefore, we develop our GSM mobile voting scheme based on a blind signature voting scheme presented by Fujioka et al. in 1992. It is a prototype system based on blind signatures. It was intended as a practical secret voting scheme for large scale elections. There are voters, an administrator, and a counter participating in the scheme. In this scheme, digital signature, blind signature and bitcommitment mechanisms were used. As these mechanisms are also the primitive cryptographic elements, in our proposed scheme a brief description of these mechanisms is given : Digital signature is an essential cryptographic primitive for authentication, authorization, and nonrepudiation. It binds a message and a secret known only to the signer in a way that the public can verify that the message has been signed by the signer without knowing the secret. In a public-key encryption based digital signature scheme, the secret is the private key, and the information that is used by the public to verify the signature is called the public key. Blind signature is a signature scheme with special functionality, where the signer has no knowledge of the message he signs and the signature. Hence, the signed message cannot be associated with the sender. A blind signature protocol usually includes three steps: blinding, signing and unblinding.

Sal Institute Of Technology & Engineering Research

Page 39

Electrical Voting Machine Using GSM


For example, sender A wants to get a blind signature from signer B upon message m. Functions g and h are blinding and unblinding functions that are only known to A, and SB(x) represents the normal digital signature of B on x. First, sender A blinds the message m with the blinding function g , namely g(m), and sends it to signer B. Signer B signs g(m) with B's signature, as SB(g(m)), and sends it back to sender A. Finally, A unblinds it with the unblinding function h, as h(S B(g(m))), where h(S B(g(m)))=S B(m). In the end, sender A obtains signer B's signature upon message m, without signer B knowing the message m and the signature on m, so the signer cannot link the signed message m to the sender A.

Bit-commitment is the basic component of many cryptographic protocols. In a bitcommitment scheme, the sender A sends an encrypted message m to the receiver B in such a way that when later on A sends B the key to decrypt the message, B can be confident that it is the right key to the message m and the decrypted message B gets is the same message m that A committed to with B.

6.3 Security Requirements for Voting Schemes


Now we will describe a set of voting security criteria. However, depending on different democratic requirements in different countries, and the different scales of electronic voting systems, security goals can vary. General security requirements include democracy, privacy, accuracy, fairness, verifiability and recoverability. Democracy: All and only the authorized voters can vote, and each eligible voter can vote no more than once. Voters can also choose not to vote. To achieve democracy, voters need to be properly registered and authenticated, and then there should be a convenient way for them to cast their votes, for example, availability of different language choices, special aid for disabled voters, and proper ways for absentee voting and early voting. Privacy: All votes remain secret while voting takes place and each individual vote cannot be linked by any individual to the voter who casts it. The privacy issue is paramount. Accuracy: The voting result accurately reflects voters choices. In this case, no vote can be altered, duplicated or eliminated without being detected. Fairness: No partial result is available before the final result comes out.

Sal Institute Of Technology & Engineering Research

Page 40

Electrical Voting Machine Using GSM 6.4 Proposed Mobile Voting Scheme
In this section, we introduce our GSM mobile voting scheme. In this scheme, GSM is used for the voting system to introduce voter mobility and provide voter authentication. We start by introducing the different components of the scheme, followed by stating a list of assumptions on which the protocol is based. Then the proposed voting scheme is described in detail.

6.5 The Components:

Mobile Equipment/Voting Device (ME): In electronic voting schemes, voters need to use

dedicated voting devices to cast their votes electronically, for instance, Internet connected computers or DRE machines. In our scheme, the voting device corresponds to the GSM mobile equipment (ME), which consists of a GSM SIM card . Authentication Centre (AC): AC is an entity within the GSM network. AC generates the authentication parameters and authenticates the mobile equipment . Verification Server (VS): VS belongs to the voting authority, who organizes the voting event. It verifies the legitimacy of the voter and issues a voting token to the voter . Collecting and Counting Server (CS): CS is the server that collects and counts the votes to give the final result. CS's action need to be audited by all candidate parties. Our system is based on a number of assumptions. We assume that the proposed Mobile Voting scheme is part of a voting system, and that voters can choose to vote through different methods, for example, the voting booth. If voters want to vote through Mobile, they have to be registered subscribers. This means that the voters have already registered their real names and addresses with their mobile operators by presenting their eligible credentials at the time of subscription. We assume that the Mobile operator is trusted to authenticate the mobile users for the purpose of voting and send the correct information to VS and CS.

Sal Institute Of Technology & Engineering Research

Page 41

Electrical Voting Machine Using GSM 6.6 Overview


In this section, we outline our GSM mobile voting scheme. Voters Authentication Phase:- In this phase GSM service provider is responsible to verify the authenticity of the voters. If the voter is authentic then only he will be allowed to participate in the next steps of voting. This phase is default phase and it works automatically once user try to use the services of particular GSM service provider. Voting Phase: In this phase, the voter installs the application, fills in the ballot, and obtains a voting token from VS without revealing the vote. In this paper, we consider the ballot an electronic equivalent of a paper ballot, which is an electronic form with the voter's choice of the candidates. We also define the voting token as the encrypted ballot signed by VS. The voter fills in the ballot, encrypts the ballot, blinds it using the blinding technique of a blind signature scheme, and sends it to AC through Mobile. AC authenticates the voter, signs the encrypted ballot and forwards the encrypted ballot along with the signature to VS. VS checks the signature of AC and the eligibility of the voter, signs the encrypted ballot with its private key. Here VS generates one ID for this ballot with one asymmetric key. VS encrypt the ballot, ballot ID and public key of generated asymmetric key which is generated for this particular ballot and sends the signed encrypted ballot with added attributes back to the voter. VS also send the pair of ballot ID with the encrypted private key ( using CS public key) to CS . The voter checks the signature and retrieves (unblind) the VS- signed ballot, ballot ID and Public key from the message using the retrieving (unblinding) technique of the blind signature scheme. The voter sends the voting token along with ballot ID and the public key correspond to this particular ballot ID to AC, this three items ballot, ballot ID and Public key will be encrypted with CS's public key to avoid AC decrypting the ballot and compromising the privacy of the voter. Upon receiving the encrypted key and the voting token, CS keeps its safe till counting start as per the predefined schedule. Sal Institute Of Technology & Engineering Research
Page 42

Electrical Voting Machine Using GSM 6.7 Counting Phase


At the scheduled time of counting CS decrypt the ballot and checks whether the voting token is valid or not. If it is valid it will be counted else it will be rejected. In entire process describe above it is strongly require that whenever AC is sending data to VS. Sender Identification will not be revealed at any time. So even if some body track a ballot can be identified with the particular AC but not with the particular User and a single AC can have number of users.

6.8 Security Analysis

In this section, we discuss how and to what extent the protocol fulfils the security requirements. Authentication Only the authorized voters can vote. First, voters are authenticated through GSM, which assures that voters are who they claim to be. The authentication of the voter is as good as Mobile Service provider or GSM can provide. Second, the eligibility of voters is checked by VS. This prevents voters from voting more than once. Privacy All votes remain secret while the voting takes place and each individual vote cannot be linked to the voter who casts it. The proposed scheme is divided into three phases, and they are separated in time. In the voting phase, a blind signature is applied to the vote in a way that vote is not linkable with voter and is signed by the AC without revealing the vote and in the same way it is signed by the VS.

In the next step the communication between voters and CS achieves anonymity with the help of AC. The voter V i sends the vote encrypted with CS's public key kCS to AC, so the AC is not able to reveal vote v i. Also, CS has no direct communication with voter Vi, so CS cannot tell which voter casts the vote. Hence, for all the components of the voting system, if the Voters cannot be linked with the vote vi, the privacy of the voter is protected.

Sal Institute Of Technology & Engineering Research

Page 43

Electrical Voting Machine Using GSM

6.9 Cryptography
Cryptography is the practice and study of hiding information. Modern cryptography intersects the disciplines of mathematics, computer science, and engineering. Applications of cryptography include ATM cards, computer passwords, and electronic commerce.

Cryptology prior to the modern age was almost synonymous with encryption, the conversion of information from a readable state to nonsense. The sender retained the ability to decrypt the information and therefore avoid unwanted persons being able to read it. Since WWI and the advent of the computer, the methods used to carry out cryptology have become increasingly complex and its application more widespread.

Alongside the advancement in cryptology-related technology, the practice has raised a number of legal issues, some of which remain unresolved.Until modern times cryptography referred almost exclusively to encryption, which is the process of converting ordinary information (plaintext) into unintelligible gibberish (i.e., ciphertext). Decryption is the reverse, in other words, moving from the unintelligible ciphertext back to plaintext. A cipher (or cypher) is a pair of algorithms that create the encryption and the reversing decryption.

The detailed operation of a cipher is controlled both by the algorithm and in each instance by a key. This is a secret parameter (ideally known only to the communicants) for a specific message exchange context. Keys are important, as ciphers without variable keys can be trivially broken with only the knowledge of the cipher used and are therefore useless (or even counter-productive) for most purposes. Historically, ciphers were often used directly for encryption or decryption without additional procedures such as authentication or integrity checks.

Sal Institute Of Technology & Engineering Research

Page 44

Electrical Voting Machine Using GSM

In colloquial use, the term "code" is often used to mean any method of encryption or concealment of meaning. However, in cryptography, code has a more specific meaning. It means the replacement of a unit of plaintext (i.e., a meaningful word or phrase) with a code word (for example, wallaby replaces attack at dawn). Codes are no longer used in serious cryptographyexcept incidentally for such things as unit designations (e.g., Bronco Flight or Operation Overlord)since properly chosen ciphers are both more practical and more secure than even the best codes and also are better adapted to computers.

Cryptanalysis is the term used for the study of methods for obtaining the meaning of encrypted information without access to the key normally required to do so; i.e., it is the study of how to crack encryption algorithms or their implementations.

Some use the terms cryptography and cryptology interchangeably in English, while others (including US military practice generally) use cryptography to refer specifically to the use and practice of cryptographic techniques and cryptology to refer to the combined study of cryptography and cryptanalysis. English is more flexible than several other languages in which cryptology (done by cryptologists) is always used in the second sense above.

The study of characteristics of languages which have some application in cryptography (or cryptology), i.e. frequency data, letter combinations, universal patterns, etc., is called crypto linguistics.

We have planned to make a secured mobile application in Java2Me which will encrypt vote content and following will be decrypted in controller and identity will be deleted

Sal Institute Of Technology & Engineering Research

Page 45

Electrical Voting Machine Using GSM

Chapter 7 THE BENEFITS OF E-VOTING


E-voting systems offer multiple advantages over traditional paper-based voting systemsadvantages that Reduced costs E-voting systems reduce the materials required for printing and distributing ballots. Internet based voting, in particular, offers superior economies of scale in regard to the size of the electoral roll. Increased participation and voting options E-voting offers increased convenience to the voter, encourages more voters to cast their votes remotely, and increases the likelihood of participation for mobile voters. Additionally, it permits access to more information regarding voting options. Greater speed and accuracy placing and tallying votes E-voting's step-by-step processes help minimize the number of miscast votes. The electronic gathering and counting of ballots reduces the amount of time spent tallying votes and delivering results. Greater accessibility for the disabled Because they support a variety of interfaces and accessibility features, e-voting systems allow citizens with disabilities-especially the visually impaired-to vote independently and privately. Flexibility E-voting can support multiple languages, and the flexible design allows up-to-the minute ballot modifications. Sal Institute Of Technology & Engineering Research
Page 46

Electrical Voting Machine Using GSM

Chapter 8 CONCLUSION
The project GSM BASED ELECTRICAL VOTING MACHINE has been successfully designed and tested. It has been developed by integrating features of all the hardware components used. Presence of every module has been reasoned out and placed carefully thus contributing to the best working of the unit. Secondly, using highly advanced ICs and with the help of growing technology the project has been successfully implemented. We proposed a mobile voting scheme, where the Mobile service provider authentication infrastructure is used to provide voter authentication and improve voter mobility. Authentication is always a difficult requirement to fulfill for remote voting schemes, most of which apply a public-key based signature scheme for voter authentication. Our scheme also enhances the security and provides more mobility and convenience to voters. Where the voters privacy is protected by applying a blind signature scheme.

FUTURE EXPANSION
In future if mobile device are provided with finger print sensor than identification of voter can be done in full secured way and voting process can be done in easiest way.

Sal Institute Of Technology & Engineering Research

Page 47

Electrical Voting Machine Using GSM

Chapter.9 BIBLIOGRAPHY
1) The 8051 Micro controller and Embedded Systems -Muhammad Ali Mazidi Janice Gillispie Mazidi 2) The 8051 Micro controller Architecture, Programming & Applications -Kenneth J.Ayala 3) Fundamentals Of Micro processors and Micro computers -B.Ram 4) Micro processor Architecture, Programming & Applications -Ramesh S.Gaonkar 5) Electronic Components -D.V.Prasad 6) Wireless Communications - Theodore S. Rappaport 7) Mobile Tele Communications - William C.Y. Lee

References on the Web:


www.national.com www.nxp.com www.8052.com www.microsoftsearch.com www.geocities.com

Sal Institute Of Technology & Engineering Research

Page 48

Potrebbero piacerti anche