Top Banner
PROJECT REPORT : CELLPHONE BASED EVM CHAPTER: 1 INTRODUCTION Voting is a method for a group such as a meeting or an electorate to make a decision or to express an opinion often following discussions or debates. The aim of our project is to design & develop a mobile based voting machine. In this project user can dial the specific number from any land line or mobile phone to cast his vote. Once the user is connected to the voting machine he can enter his password & choice of vote. If he has entered a valid choice & password his vote will be caste with two short duration beeps. For invalid password/choice long beep will be generated. User is allotted 15 seconds to enter his password & choice. A reset button is provided for resetting the system. A total key is provided to display the result. We have also used non-volatile memory for storing all data. EEPROM will preserve all information in case of power failure. BACKGROUND 1.1 VOTING Voting is a method for a group such as a meeting or an electorate to make a decision or to express an opinion often following discussions or debates. 1 DEPARTMENT OF ECE ( MIT , MEERUT)
62
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Major Report Cell Phone Based Evm

PROJECT REPORT : CELLPHONE BASED EVM

CHAPTER: 1

INTRODUCTION

Voting is a method for a group such as a meeting or an electorate to make a decision

or to express an opinion often following discussions or debates.

The aim of our project is to design & develop a mobile based voting machine. In this project user can dial the specific number from any land line or mobile phone to cast his vote. Once the user is connected to the voting machine he can enter his password & choice of vote. If he has entered a valid choice & password his vote will be caste with two short duration beeps. For invalid password/choice long beep will be generated. User is allotted 15 seconds to enter his password & choice. A reset button is provided for resetting the system. A total key is provided to display the result.

We have also used non-volatile memory for storing all data. EEPROM will preserve all information in case of power failure.

BACKGROUND

1.1 VOTING

Voting is a method for a group such as a meeting or an electorate to make a decision

or to express an opinion often following discussions or debates.

1.1.1 Voting Techniques

In India all earlier elections be it state elections or centre elections a voter

used to cast his/her vote to his/her favourite candidate by putting the stamp against

his/her name and then folding the ballot paper as per a prescribed method before

putting it in the Ballot box. This is a long, time-consuming process and very much

prone to errors.

This method wanted voters to be skilled voters to know how to put a stamp,

and methodical folding of ballot paper. Millions of paper would be printed and heavy

ballot boxes would be loaded and unloaded to and from ballot office to polling

station. All this continued till election scene was completely changed by electronic

1 DEPARTMENT OF ECE ( MIT , MEERUT)

Page 2: Major Report Cell Phone Based Evm

PROJECT REPORT : CELLPHONE BASED EVM

voting machine. No more ballot paper, ballot boxes, stamping, etc. all this condensed

into a simple box called ballot unit of the electronic voting machine.

1.1.2 Electronic Voting Machine

The complete EVM consists mainly of two units - (a) Control Unit and (b)

Balloting Unit with cable for connecting it with Control unit. A Balloting Unit caters

up-to 16 candidates. Four Balloting Units linked together catering in all to 64

candidates can be used with one control unit. The control unit is kept with the

Presiding Officer and the Balloting Unit is used by the voter for polling.

The Balloting Unit of EVM is a small Box-like device, on top of which each

candidate and his/her election symbol is listed like a big ballot paper. Against each

candidate's name, a red LED and a blue button is provided. The voter polls his vote by

pressing the blue button against the name of his desired candidate.

1.1.3 Tele voting Machine

Tele-voting is a method of decision making and opinion polling conducted by

telephone. TVM has the major unit i.e. control unit. And the heart of the machine is a

microcontroller which controls all the ICs and components connected to it. It can cater

large number of candidates and even further its capacity can be increased by

interfacing it with 8255.

In this a voter calls up the number with which the machine is connected and

the system automatically activates and the voice message already stored on voice

processor chip gets played and on following the voice script voter casts his vote by

pressing the respective key of his phone. And the vote cast gets stored in flash

memory instantly. All vote cast can be checked later with the help of couple of

switches and LCD display. Reset keys are also provided to reset the machine for next

time.

1.2 ADVANTAGES OF TVM

2 DEPARTMENT OF ECE ( MIT , MEERUT)

Page 3: Major Report Cell Phone Based Evm

PROJECT REPORT : CELLPHONE BASED EVM

The TVMs have following advantages:

Elimination of polling queues.

Can be interfaced with PC to generate back-ups

The saving of considerable printing stationery and transport of large volumes

of electoral material,

Easy transportation, storage, and maintenance,

No invalid votes,

Reduction in polling time.

Easy and accurate counting without any mischief at the counting centre

Eco-friendly.

1.3 COMPARE A ND CONTRAST: PAPER VOTING, EVM and

TVM

We have so far discussed three different voting systems. These systems are being used

or considered obsolete because of certain positive and negative points. These are

summarized as follows:

Device type

Ballot paper : Papers and boxes

EVM : Embedded system with Assembly code

TVM : Embedded system with Assembly code

Visual Output

Ballot paper : Stamp on paper

EVM : Single LED against each candidate's name

TVM : LCD screen and one LED

Security Issues

Ballot paper : No security provided by the system, neither during polling

nor during voting.

3 DEPARTMENT OF ECE ( MIT , MEERUT)

Page 4: Major Report Cell Phone Based Evm

PROJECT REPORT : CELLPHONE BASED EVM

EVM : During polling, a facility is provided to seal the machine in

case of booth capturing. No further voting can be done

afterwards.

TVM : machine is disconnected from the telephone line. No

more calls can be received afterward.

Power Supply

Ballot paper : No power supply required.

EVM : 6V alkaline batteries or electricity.

TVM : Electricity and supply from exchange.

Capacity

Ballot paper : As much a ballot box can hold.

EVM : 3840 Votes.

TVM : Depends on the size of flash memory attached.

1.4 EXISTING SYSTEM

But this electronic voting machine has its disadvantages too. These areas of

deficiency are not much of a concern to a layman, but for an intelligent voter this

must be eliminated for a secure election. The few technical disadvantages are given

as:

Microprocessor based design, which requires a no. of supporting components

like memory, peripheral interface, etc.

Long polling queues at the centre.

Existing system costs around 12000 INR(300$)

4 DEPARTMENT OF ECE ( MIT , MEERUT)

Page 5: Major Report Cell Phone Based Evm

PROJECT REPORT : CELLPHONE BASED EVM

1.5 PROPOSED SYSTEM

All these faults motivated us to make this enhanced version of EVM. The faults

which are eliminated are summarized as follows:

Microcontroller replaced microprocessor, which made the EVM closer to real

time operation making it faster, more reliable and unique.

More user friendly and interactive LCD display

Proposed Module costs around Rs 2000.

Elimination of polling queues had been the major factor.

~*~*~*~*~*~*~*~

5 DEPARTMENT OF ECE ( MIT , MEERUT)

Page 6: Major Report Cell Phone Based Evm

PROJECT REPORT : CELLPHONE BASED EVM

CHAPTER: 2

COMPONENTS

The “Electronic Voting Machine” consists of following main components. These are-

1) Switches for voting,

2) Switches for control,

3) Micro controller

4) Display

1) Switches: These are used in both voting and counting modes. In voting mode, a

key of a respective candidate is pressed and the corresponding signal is sensed by

micro controller. In counting mode, these are used to check the votes of respective

candidates. The key given for candidate is pressed and micro controller senses the

corresponding signal.

There are four switches for different operations:

I & II . Clear Votes – Two switches for clearing all the casted votes

by password.

III. Controller switches – For allowing the voter to caste the vote.

IV. Total Votes Switch – For checking the total number of casted votes.

2) Micro controller: Micro controller senses the signal given from switches and

decides the mode of operation. In voting mode it increments the data for

corresponding key i.e. respective candidate as well as it sends signal to the buzzer to

indicate one key is pressed. In counting mode micro controllers fetches data from

memory location and send it to display devices.

6 DEPARTMENT OF ECE ( MIT , MEERUT)

Page 7: Major Report Cell Phone Based Evm

PROJECT REPORT : CELLPHONE BASED EVM

3) LCD: Liquid Crystal Display which is commonly known as LCD is an

Alphanumeric Display. It means that it can display Alphabets, Numbers as well as

special symbols. Thus LCD is a user friendly display device which can be used for

displaying various messages unlike seven segment displays which can display only

numbers and some of the alphabets. The only disadvantage of LCD over seven

segment is that seven segment is robust display and be visualized from a longer

distance as compared to LCD. Here 16 x 2 Alphanumeric Display is used; which

means on this display we can display two lines with maximum of 16 characters in one

line.

7 DEPARTMENT OF ECE ( MIT , MEERUT)

Page 8: Major Report Cell Phone Based Evm

PROJECT REPORT : CELLPHONE BASED EVM

2.1 List of Components

Table 2.1: List of Components

S.NO. LIST OF COMPONENTS QUANTITY

1 220V, 50HZ, 9V-0-9V CENTRE TAP

TRANSFORMER

1

2 7805 VOLTAGE REGULATOR 1

3 LIQUID CRYSTAL DISPLAY 1

4 8Ω LOUD SPEAKER 1

5 89S52 MICROCONTROLLER 1

6 24C02 EEPROM 1

7 LED 1

8 IN4148 DIODE 1

9 IN 4007 DIODE 2

10 1000µF,16V ELECTROLYTIC CAPACITOR 2

11 PUSH BUTTON SWITCH 12

12 10KΩ RESISTOR 8

13 4.7KΩ RESISTOR 1

14 10µF,100V ELECTROLYTIC CAPACITOR 1

15 10KΩ RESISTOR 9

16 1KΩ RESISTOR 1

17 3.58 MHZ CRYSTAL OSCILLATOR 1

18 27PF CERAMIC CAPACITOR 2

~*~*~*~*~*~*~*~

8 DEPARTMENT OF ECE ( MIT , MEERUT)

Page 9: Major Report Cell Phone Based Evm

PROJECT REPORT : CELLPHONE BASED EVM

CHAPTER:3

COMPONENT DESCRIPTION

3.1 Power Supply

These days almost all the electronic equipments include a circuit that converts AC

supply into DC supply. The part of equipment that converts AC into DC is known as

AC to DC converter. In general, at the input of the power supply is a transformer. It

is followed by a rectifier, a smoothing filter and then by a voltage regulator circuit.

3.1.1 Components of Power Supply

Power supply consists of four components:-

(i) Step-Down Transformer

(ii) Rectifier

(iii) Filter

(iv) Voltage Regulator

Block diagram of such a supply is shown below:-

Fig 3.1: Block diagram of power supply

(i) Step down Transformer

A transformer in which the output (secondary) voltage is less than the input (primary)

voltage is called step down transformer. Alternating current is passed through the

primary coil which creates the changing magnetic field in iron core. The changing

magnetic field then induces alternating current of the same frequency in the secondary

9 DEPARTMENT OF ECE ( MIT , MEERUT)

TRANSFORMER VOLTAGE REGULATOR

RECTIFIER FILTER

Page 10: Major Report Cell Phone Based Evm

PROJECT REPORT : CELLPHONE BASED EVM

coil (the output). A step down transformer has more turns of wire on the primary coil

than in secondary coil which makes a smaller induced voltage in the secondary coil.

(ii) Rectifier: Rectifier is defined as an electronic device used for converting A.C

voltage into unidirectional voltage. A rectifier utilizes unidirectional conduction

device like P-N junction diode.

There are three types of rectifier:-

a. Half wave rectifier.

b. Full wave centre tap rectifier.

c. Full wave bridge rectifier.

(iii) Filter: The output from any of the rectifier circuits is not purely D.C but also has

some A.C components, called ripples, along it. Therefore such supply is not useful for

driving sophisticated electronic devices/circuits. Hence, it becomes essential to reduce

the ripples from the pulsating D.C supply available from rectifier circuits to the

minimum. This is achieved by using a filter or smoothing circuit which removes the

A.C components and allows only the D.C component to reach the load. A filter circuit

should be placed between the rectifier and the load.

(iv) Voltage Regulator: Voltage Regulator (regulator), usually having three legs,

converts varying input voltage and produces a constant regulated output voltage.

7805 voltage regulator has three pins:-

a. Input:- For 7805 the rectified and filtered voltage coming at this pin must be

between 8 to 18V in order to get stable 5V DC output at the output pin.

INPUT OUTPOUTPUT

GND

Fig. 3.2: Pin configuration of voltage regulator

10 DEPARTMENT OF ECE ( MIT , MEERUT)

7805

Page 11: Major Report Cell Phone Based Evm

PROJECT REPORT : CELLPHONE BASED EVM

b. Ground:- This pin is connected to the ground of the circuit to which this 5V DC

supply is provided.

c. Output:- If the input voltage at input pin is between 8-18V then at the output pin

a stable 5V DC voltage will be available.

3.1.2 5V DC Power Supply Using Full Wave Center Tap Rectifier

The transformer supplies the source voltage for two diode rectifiers, D1 and D2.

This transformer has a center-tapped, low-voltage secondary winding that is divided

into two equal parts (W1 and W2). W1 provides the source voltage for D1, and W2

provides the source voltage for D2. The connections to the diodes are arranged so

that the diodes conduct on alternate half cycles. When the centre tap is grounded, the

voltages at the opposite ends of the secondary windings are 180 degrees out of phase

with each other. Thus, when the voltage at point A is positive with respect to

ground, the voltage at point B is negative with respect to ground. Let's examine the

operation of the circuit during one complete cycle.

During the first half cycle (indicated by the solid arrows), the anode of D1 is

positive with respect to ground and the anode of D2 is negative. As shown, current

flows from ground (center tap) to point A, through diode D1 to point B and to point

D. When D1 conducts, it acts like a closed switch so that the positive half cycle is

felt across the load (RL).

During the second half cycle (indicated by the dotted lines), the polarity of the

applied voltage has reversed. Now the anode of D2 is positive with respect to

ground and the anode of D1 is negative. Now only D2 can conduct. Current now

flows, as shown, from point C to point B through diode D2 then to point F and back

to point D.

11 DEPARTMENT OF ECE ( MIT , MEERUT)

Page 12: Major Report Cell Phone Based Evm

PROJECT REPORT : CELLPHONE BASED EVM

Now during both the cycles the capacitor C1 quickly charges to the peak voltage but

when the input voltage becomes less than peak voltage the capacitor discharges

through load resistance and loses charge. But because of large load resistance the

discharging time is large and hence capacitor does not have sufficient time to

discharge appreciably. Due to this the capacitor maintains a sufficiently large

voltage across the load.

Fig. 3.3: Center-tap full-wave rectifier

The voltage across the capacitor is applied to 7805 voltage regulator which provides

a constant 5V D.C. voltage at its output.

Fig. 3.4: Output waveforms of centre-tap full-wave rectifier

12 DEPARTMENT OF ECE ( MIT , MEERUT)

i/p

Page 13: Major Report Cell Phone Based Evm

PROJECT REPORT : CELLPHONE BASED EVM

3.2 Microcontroller 89S52

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 Atmel’s high-density nonvolatile memory technology and is compatible with

the industry- standard 80C51 instruction set and pin out. The on-chip flash allows the

program memory to be reprogrammed in-system or by a conventional nonvolatile

memory programmer. 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 cost-effective solution to many

embedded control applications.

.

3.2.1 Features

Compatible with MCS-51® Products

8K Bytes of In-System Programmable (ISP) Flash Memory

Endurance: 1000 Write/Erase Cycles

4.0V to 5.5V Operating Range

Fully Static Operation: 0 Hz to 33 MHz

Three-level Program Memory Lock

256 x 8-bit Internal RAM

32 Programmable I/O Lines

Three 16-bit Timer/Counters

Eight Interrupt Sources

Full Duplex UART Serial Channel

Low-power Idle and Power-down Modes

Interrupt Recovery from Power-down Mode

Watchdog Timer

Dual Data Pointer

Power-off Flag

Fast Programming Time

13 DEPARTMENT OF ECE ( MIT , MEERUT)

Page 14: Major Report Cell Phone Based Evm

PROJECT REPORT : CELLPHONE BASED EVM

3.2.2 Block Diagram

Fig 3.5: Block Diagram of microcontroller

14 DEPARTMENT OF ECE ( MIT , MEERUT)

Page 15: Major Report Cell Phone Based Evm

PROJECT REPORT : CELLPHONE BASED EVM

3.2.3 Pin Description

Fig 3.6: Pin Diagram of microcontroller

VCC : Supply voltage

GND : Ground.

15 DEPARTMENT OF ECE ( MIT , MEERUT)

Page 16: Major Report Cell Phone Based Evm

PROJECT REPORT : CELLPHONE BASED EVM

Port 0 Port 0 is an 8-bit open drain bidirectional I/O port. As an output port,

each pin can sink eight TTL inputs. When 1s are written to port 0 pins,

the pins can be used as high impedance inputs. Port 0 can also be

configured to be the multiplexed low-order address/data bus during

accesses to external program and data memory. In this mode, P0 has

internal pull-ups. Port 0 also receives the code bytes during Flash

programming and outputs the code bytes during program verification.

External pull-ups are required during program verification.

Port 1 Port 1 is an 8-bit bidirectional I/O port with internal pull-ups. The Port

1 output buffers can sink/source four TTL inputs. When 1s are written

to Port 1 pins, they are pulled high by the internal pull-ups and can be

used as inputs. As inputs, Port 1 pins that are externally being pulled

low will source current (IIL) because of the internal pull-ups. In

addition, P1.0 and P1.1 can be configured to be the timer/counter 2

external count input (P1.0/T2) and the timer/counter 2 trigger input

(P1.1/T2EX), respectively. Port 1 also receives the low-order address

bytes during Flash programming and verification.

Port 2 Port 2 is an 8-bit bidirectional I/O port with internal pull-ups. The Port

2 output buffers can sink/source four TTL inputs. When 1s are written

to Port 2 pins, they are pulled high by the internal pull-ups and can be

used as inputs. As inputs, Port 2 pins that are externally being pulled

low will source current (IIL) because of the internal pull-ups. Port 2

emits the high-order address byte during fetches from external program

memory and during accesses to external data memory that use 16-bit

addresses. In this application, Port 2 uses strong internal pull-ups when

emitting 1s.

16 DEPARTMENT OF ECE ( MIT , MEERUT)

Page 17: Major Report Cell Phone Based Evm

PROJECT REPORT : CELLPHONE BASED EVM

Port 3 : Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 3

output buffers can sink/source four TTL inputs. When 1s are written to Port 3 pins,

they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port

3 pins that are externally being pulled low will source current (IIL) because of the

pull-ups. Port 3 receives some control signals for Flash programming and verification.

Port 3 also serves the functions of various special features of the AT89S52.

ALE/PROG : Address Latch Enable (ALE) is an output pulse for latching the low

byte of the address during accesses to external memory. This pin is also the program

pulse input (PROG) during Flash programming. In normal operation, ALE is emitted

at a constant rate of 1/6 the oscillator frequency and may be used for external timing

or clocking purposes. Note, however, that one ALE pulse is skipped during each

access to external data memory. If desired, ALE operation can be disabled by setting

bit 0 of SFR location 8EH. With the bit set, ALE is active only during a MOVX or

MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the ALE-disable

bit has no effect if the microcontroller is in external execution mode.

PSEN Program Store Enable (PSEN) is the read strobe to external program memory.

When the AT89S52 is executing code from external program memory, PSEN is

activated twice each machine cycle, except that two PSEN activations are skipped

during each access to external data memory.

EA/VPP : External Access Enable. EA must be strapped to GND in order to enable

the device to fetch code from external program memory locations starting at 0000H

up to FFFFH. Note, however, that if lock bit 1 is programmed, EA will be internally

latched on reset. EA should be strapped to VCC for Internal program executions. This

pin also receives the 12-volt programming enable voltage (VPP) during Flash

programming.

17 DEPARTMENT OF ECE ( MIT , MEERUT)

Page 18: Major Report Cell Phone Based Evm

PROJECT REPORT : CELLPHONE BASED EVM

XTAL1 Input to the inverting oscillator amplifier and input to the internal clock

operating circuit.

XTAL2 Output from the inverting oscillator amplifier.

3.3 Liquid Crystal Display

Liquid Crystal Display also called as LCD is very helpful in providing user

interface as well as for debugging purpose. These LCD's are very simple to

interface with the controller as well as are cost effective.

Figure 8.FFFF

Fig 3.7: LCD

The most commonly used ALPHANUMERIC displays are 1x16 (Single Line & 16

characters), 2x16 (Double Line & 16 character per line) & 4x20 (four lines & Twenty

characters per line).

The LCD requires 3 control lines (RS, R/W & EN) & 8 (or 4) data lines. The number

of data lines depends on the mode of operation. If operated in 8-bit mode then 8 data

lines + 3 control lines i.e. total 11 lines are required. And if operated in 4-bit mode

then 4 data lines + 3 control lines i.e. 7 lines are required. How do we decide which

mode to use? It’s simple if you have sufficient data lines you can go for 8 bit mode &

if there is a time constrain i.e. display should be faster then we have to use 8-bit mode

because basically 4-bit mode takes twice as more time as compared to 8-bit mode.

18 DEPARTMENT OF ECE ( MIT , MEERUT)

Page 19: Major Report Cell Phone Based Evm

PROJECT REPORT : CELLPHONE BASED EVM

3.3.1 Pin Description

fig 3.8: Pin Description of LCD

Table 3.1: Pin Description of LCD

Pin Symbol Function

1 Vss Ground

2 Vdd Supply Voltage

Pin Symbol Function

3 Vo Contrast Setting

4 RS Register Select

5 R/W Read/Write Select

6 En Chip Enable Signal

7-14 DB0-DB7 Data Lines

15 A/Vee Gnd for the backlight

16 K Vcc for backlight

1. RS (Register Select)

19 DEPARTMENT OF ECE ( MIT , MEERUT)

Page 20: Major Report Cell Phone Based Evm

PROJECT REPORT : CELLPHONE BASED EVM

When RS is low (0), the data is to be treated as a command. When RS is high (1), the

data being sent is considered as text data which should be displayed on the screen.

2. R/W (Read/Write)

When R/W is low (0), the information on the data bus is being written to the LCD.

When RW is high (1), the program is effectively reading from the LCD. Most of the

times there is no need to read from the LCD so this line can directly be connected to

GND thus saving one controller line.

3. E (enable)

The ENABLE pin is used to latch the data present on the data pins. A HIGH - LOW

signal is required to latch the data. The LCD interprets and executes our command at

the instant the EN line is brought low. If you never bring EN low, your instruction

will never be executed.

4. D0-D7

The 8 bit data pins D0-D7 are used to send information to the LCD or read the

contents of the LCD’s internal registers. .To display any character on LCD micro

controller has to send its ASCII value to the data bus of LCD. For e.g. to display 'AB'

microcontroller has to send two hex bytes 41h and 42h respectively LCD display used

here is having 16x2 size. It means 2 lines each with 16 characters.

20 DEPARTMENT OF ECE ( MIT , MEERUT)

Page 21: Major Report Cell Phone Based Evm

PROJECT REPORT : CELLPHONE BASED EVM

3.4 AT24c02 Flash Memory

The AT24C01A/02/04/08A/16A provides 1024/2048/4096/8192/16384 bits of serial

electrically erasable and programmable read-only memory (EEPROM) organized as

128/256/512/1024/2048 words of 8 bits each. The device is optimized for use in many

industrial and commercial applications where low power and low voltage operation

are essential. The AT24C01A/02/04/08A/16A is available in space-saving 8-lead

PDIP, 8-lead JEDEC SOIC, 8-lead Ultra Thin Mini-MAP (MLP 2x3), 5-lead SOT23

(AT24C01A/AT24C02/AT24C04), 8-lead TSSOP, and 8-ball dBGA2 packages and is

accessed via a Two-wire serial interface. In addition, the entire family is available in

2.7V (2.7V to 5.5V) and 1.8V (1.8V to 5.5V) versions.

3.4.1 Features

Low-voltage and Standard-voltage Operation

– 2.7 (VCC = 2.7V to 5.5V)

– 1.8 (VCC = 1.8V to 5.5V)

Internally Organized 128 x 8 (1K), 256 x 8 (2K), 512 x 8 (4K),

1024 x 8 (8K) or 2048 x 8 (16K)

Two-wire Serial Interface

Schmitt Trigger, Filtered Inputs for Noise Suppression

Bidirectional Data Transfer Protocol

100 kHz (1.8V) and 400 kHz (2.7V, 5V) Compatibility

Write Protect Pin for Hardware Data Protection

8-byte Page (1K, 2K), 16-byte Page (4K, 8K, 16K) Write Modes

Partial Page Writes Allowed

Self-timed Write Cycle (5 ms max)

High-reliability

– Endurance: 1 Million Write Cycles

– Data Retention: 100 Years

21 DEPARTMENT OF ECE ( MIT , MEERUT)

Page 22: Major Report Cell Phone Based Evm

PROJECT REPORT : CELLPHONE BASED EVM

3.4.2 Block Diagram

Fig 3.9: Block Diagram of EEPROM

3.4.3 Pin Description

Fig 3.10: Pin diagram of EEPROM

22 DEPARTMENT OF ECE ( MIT , MEERUT)

Page 23: Major Report Cell Phone Based Evm

PROJECT REPORT : CELLPHONE BASED EVM

Serial Clock (SCL): The SCL input is used to positive edge clock data into each

EEPROM device and negative edge clock data out of each device.

Serial Data (SDA): The SDA pin is bidirectional for serial data transfer. This pin is

open-drain driven and may be wire-ORed with any number of other open-drain or

open collector devices.

Device/Page Addresses (A2, A1, and A0): The A2, A1 and A0 pins are device

address inputs that are hard wired for the AT24C01A and the AT24C02. As many as

eight 1K/2K devices may be addressed on a single bus system (device addressing is

discussed in detail under the Device Addressing section).

The AT24C04 uses the A2 and A1 inputs for hard wire addressing and a total of four

4K devices may be addressed on a single bus system. The A0 pin is a no connect and

can be connected to ground.

The AT24C08A only uses the A2 input for hardwire addressing and a total of two 8K

devices may be addressed on a single bus system. The A0 and A1 pins are no

connects and can be connected to ground. The AT24C16A does not use the device

address pins, which limits the number of devices on a single bus to one. The A0, A1

and A2 pins are no connects and can be connected to ground.

Table 3.2: Pin Description of Flash Memory

23 DEPARTMENT OF ECE ( MIT , MEERUT)

Page 24: Major Report Cell Phone Based Evm

PROJECT REPORT : CELLPHONE BASED EVM

Write Protect (WP): The AT24C01A/02/04/08A/16A has a Write Protect pin that

provides hardware data protection. The Write Protect pin allows normal Read/Write

operations when connected to ground (GND). When the Write Protect pin is

connected to VCC, the write protection feature is enabled.

3.5 Voltage Regulator

Voltage regulator ICs are available with fixed (typically 5, 12 and 15V) or variable

output voltages. The maximum current they can pass also rates them. Negative

voltage regulators are available, mainly for use in dual supplies. Most regulators

include some automatic protection from excessive current and overheating (thermal

protection). Many of fixed voltage regulator ICs has 3 leads. They include a hole for

attaching a heat sink if necessary.

Fig 3.11: 7805 Voltage Regulator

24 DEPARTMENT OF ECE ( MIT , MEERUT)

Page 25: Major Report Cell Phone Based Evm

PROJECT REPORT : CELLPHONE BASED EVM

3.5.1 Features

Output current in Excess of 1.0 A

No external component required

Internal thermal overload protection

Internal short circuit current limiting

Output transistor safe-area compensation

Output voltage offered in 2% and 4% tolerance

Available in surface mount D2PAK and standard 3-lead transistor packages

Previous commercial temperature range has been extended to a junction

temperature range of -40 degree C to +125 degree C.

3.6 Diode

The diode is a p-n junction device. Diode is the component used to control the flow of

the current in any one direction. The diode widely works in forward bias.

Fig 3.12: Diode & Diode symbol

When the current flows from the P to N direction, then it is in forward bias. The Zener

diode is used in reverse bias function i.e. N to P direction. Visually the identification

of the diode`s terminal can be done by identifying he silver/black line. The

silver/black line is the negative terminal (cathode) and the other terminal is the

positive terminal (cathode).

25 DEPARTMENT OF ECE ( MIT , MEERUT)

Page 26: Major Report Cell Phone Based Evm

PROJECT REPORT : CELLPHONE BASED EVM

3.6.1 Application

Diodes: Rectification, free-wheeling, etc

Zener diode: Voltage control, regulator etc.

Tunnel diode: Control the current flow, snobbier circuit, etc.

3.7 Resistors

The flow of charge through any material encounters an opposing force similar in

many respects to mechanical friction. This opposing force is called resistance of the

material .in some electric circuit resistance is deliberately introduced in form of

resistor. Resistor used fall in three categories , only two of which are colour coded

which are metal film and carbon film resistor .the third category is the wire wound

type ,where value are generally printed on the vitreous paint finish of the component.

Resistors are in ohms and are represented in Greek letter omega, looks as an upturned

horseshoe. Most electronic circuit require resistors to make them work properly and it

is obliviously important to find out something about the different types of resistors

available. Resistance is measured in ohms, the symbol for ohm is an omega ohm. 1

ohm is quite small for electronics so resistances are often given in kohm and Mohm.

Resistors used in electronics can have resistances as low as 0.1 ohm or as high as 10

Mohm.

Fig 3.13: Resistor symbol & resistor

26 DEPARTMENT OF ECE ( MIT , MEERUT)

Page 27: Major Report Cell Phone Based Evm

PROJECT REPORT : CELLPHONE BASED EVM

3.8 Capacitors

In a way, a capacitor is a little like a battery. Although they work in completely

different ways, capacitors and batteries both store electrical energy. If you have read

How Batteries Work, then you know that a battery has two terminals. Inside the

battery, chemical reactions produce electrons on one terminal and absorb electrons at

the other terminal.

3.8.1 Basic

Like a battery, a capacitor has two terminals. Inside the capacitor, the terminals

connect to two metal plates separated by a dielectric. The dielectric can be air, paper,

plastic or anything else that does not conduct electricity and keeps the plates from

touching each other. You can easily make a capacitor from two pieces of aluminum

foil and a piece of paper. It won't be a particularly good capacitor in terms of its

storage capacity, but it will work.

Fig 3.14: Capacitor & capacitor symbol

27 DEPARTMENT OF ECE ( MIT , MEERUT)

Page 28: Major Report Cell Phone Based Evm

PROJECT REPORT : CELLPHONE BASED EVM

3.9 LED

LED falls within the family of P-N junction devices. The light emitting diode (LED)

is a diode that will give off visible light when it is energized. In any forward biased P-

N junction there is, with in the structure and primarily close to the junction, a

recombination of hole and electrons. This recombination requires that the energy

possessed by the unbound free electron be transferred to another state. The process of

giving off light by applying an electrical source is called electroluminescence.

Fig 3.15: LED & LED symbol

LED is a component used for indication. All the functions being carried out are

displayed by led .The LED is diode which glows when the current is being flown

through it in forward bias condition. The LEDs are available in the round shell and

also in the flat shells. The positive leg is longer than negative leg.

28 DEPARTMENT OF ECE ( MIT , MEERUT)

Page 29: Major Report Cell Phone Based Evm

PROJECT REPORT : CELLPHONE BASED EVM

3.10 Crystal Oscillators

Crystal oscillators are oscillators where the primary frequency determining element is

a quartz crystal. Because of the inherent characteristics of the quartz crystal the crystal

oscillator may be held to extreme accuracy of frequency stability. Temperature

compensation may be applied to crystal oscillators to improve thermal stability of the

crystal oscillator. Crystal oscillators are usually, fixed frequency oscillators where

stability and accuracy are the primary considerations. For example it is almost

impossible to design a stable and accurate LC oscillator for the upper HF and higher

frequencies without resorting to some sort of crystal control. Hence the reason for

crystal oscillators. The frequency of older FT-243 crystals can be moved upward by

crystal grinding.

Fig 3.16: crystal oscillator & symbol

~*~*~*~*~*~*~*~

29 DEPARTMENT OF ECE ( MIT , MEERUT)

Page 30: Major Report Cell Phone Based Evm

PROJECT REPORT : CELLPHONE BASED EVM

CHAPTER:4

PROJECT DESCRIPTION

4.1 Circuit Diagram

Fig 4.1: Circuit Diagram of EVM

30 DEPARTMENT OF ECE ( MIT , MEERUT)

Page 31: Major Report Cell Phone Based Evm

PROJECT REPORT : CELLPHONE BASED EVM

4.2 Block Diagram:

Figure No. 4.2 : Block Diagram of EVM

31 DEPARTMENT OF ECE ( MIT , MEERUT)

230V AC

Step Down T/F

Full Wave Bridge Rectifier

Voltage Regulator

DTMF Decoder (MM8870)

Microcontroller AT89C2051

LCD Display

MOBILE PHONE EEPROM (24C16)

+5VDC/500mA

Page 32: Major Report Cell Phone Based Evm

PROJECT REPORT : CELLPHONE BASED EVM

4.3 PCB Layout

Fig 4.3: PCB Layout

32 DEPARTMENT OF ECE ( MIT , MEERUT)

Page 33: Major Report Cell Phone Based Evm

PROJECT REPORT : CELLPHONE BASED EVM

4.4 Functional Description

The function of the pins of microcontroller AT89S52 used in the electronic voting

machine can be described as follows:

Pin no 1,2,3,4 of PORT 1 are connected to get the vote data input for four

different candidates.

Pin no 5,6,7,8 are connected to four push-button switches to check the vote

data casted for individual candidate.

Pin no 9 is connected to the reset button to reset the microcontroller

automatically when we switch on the power. It is a Power on reset.

Pin no 10 of PORT 3 is connected to a push-button switch to check the total

vote caste for all the candidates.

Pin no 11 and 12 of PORT 3 are connected to two push-button switches to

reset or clear all the vote data. To reset the data firstly we will press the R-1

button then press the R-2 button and again press the R-1 button. Then all the

vote data has to be cleared from the AT24c02 flash memory.

Crystal is connected to the pin no 18(XTAL 1) and pin no 19(XTAL 2)

providing 11.0592 MHz frequency.

Pin no 20 is connected to the ground (GND).

Pin no 21 and 22 of PORT 2 are connected to pin no 5(SDA- serial data) and

pin no 6 (SCL- serial clock input) of AT24c02 flash memory.

Pin no 26, 27, 28 of PORT 2 are connected to the pin no 4, 5, 6 of LCD

display. Pin no 26 is connected to RS (register select), pin no 27 is connected

to R/W (read/write select) and pin no 28 is connected to En(chip enable

signal) of LCD.

Pin no 31( EA/Vpp) should be strapped to VCC for internal program

executions, this pin also receives the 12-volt programming enable voltage

(VPP) during flash programming.

Pin no 32 – 39 of PORT 0 are connected to the DB0-DB7 (8-bit) data lines of

LCD display.

33 DEPARTMENT OF ECE ( MIT , MEERUT)

Page 34: Major Report Cell Phone Based Evm

PROJECT REPORT : CELLPHONE BASED EVM

4.5 Working of Project

The working of this project is controlled by a microcontroller ATMEL AT89S52 and

EEPROM is used for memory storage. The project works in the following ways:

1. Switch on power supply.

2. Message ‘VOTING MACHINE’ , ‘INDIA VOTING’ will appear on LCD.

3. Controller switch is pressed after which the message ‘Cast the Vote’ appears.

4. After casting the vote, one hears the buzzer after which no other votes will be

casted until the controller button is again pressed.

5. To check the number of vote press the button on the PCB and number of votes of

each candidate & total number of vote will appear on LCD.

6. Two memory clear pins are provided for clearing the EEPROM.

34 DEPARTMENT OF ECE ( MIT , MEERUT)

Page 35: Major Report Cell Phone Based Evm

PROJECT REPORT : CELLPHONE BASED EVM

4.6 PROBLEM FACED

First problem that was in making the circuit of METRO TRAIN PROTOTYPE that, it is difficult to match time with rotation of stepper motor & LCD.

Second problem is faced due to redundancy in handling the rotation of STEPPER MOTOR

We have to take extra care while soldering 2 line LCD

During soldering, many of the connection become short cktd. So we desolder the connection and did soldering again.

A leg of the crystal oscillator was broken during mounting. So it has to be replaced.

LED`s get damaged when we switched ON the supply so we replace it by the new one.

4.7TROUBLESHOOT

Care should be taken while soldering. There should be no shorting of joints.

Proper power supply should maintain.

Project should be handled with care since IC are delicate

Component change and check again circuit

35 DEPARTMENT OF ECE ( MIT , MEERUT)

Page 36: Major Report Cell Phone Based Evm

PROJECT REPORT : CELLPHONE BASED EVM

4.8 C Code

Program code is to be written in embedded C code and after this, the code is

converted into hex code using Keil µ vision3 and transfer onto the blank chip

AT89s52 microcontroller with the help of programmer kit SPIPGM37.

The program code using AT89s52 microcontroller chip is as follows:

#include<reg52.h>

#define lcdport P0

sbit rs=P2^2;

sbit rdwr=P2^1;

sbit lcde=P2^0;

sbit cand1=P1^0;

sbit cand2=P1^1;

sbit cand3=P1^2;

sbit cand4=P1^3;

sbit cand5=P1^4;

sbit cand6=P1^5;

sbit cand7=P1^6;

sbit cand8=P1^7;

sbit party1=P3^0;

sbit party2=P3^1;

sbit party3=P3^2;

sbit party4=P3^3;

sbit party5=P3^4;

bit vote_switchflag;

unsigned int

cand1count,cand2count,cand3count,cand4count,cand5count,cand6count,cand7count,c

and8count;

36 DEPARTMENT OF ECE ( MIT , MEERUT)

Page 37: Major Report Cell Phone Based Evm

PROJECT REPORT : CELLPHONE BASED EVM

/****************FUNCTION FOR SWAPPING LSBYTE AND MSBYTE OF

THE DATA***************/

unsigned char xch(unsigned char data1)

unsigned char temp,temp1;

temp=data1;

data1=data1>>4;

temp1=data1;

data1=temp;

data1=data1<<4;

data1=data1|temp1;

return(data1);

/************ delay for 20 micro second

**********************************************/

void delay()

unsigned char i,j;

for(i=0;i<80;i++)

for(j=0;j<120;j++)

/***************** FUNCTION FOR SENDING LCD

COMMANDS***********************************/

void send_command(unsigned char data1)

37 DEPARTMENT OF ECE ( MIT , MEERUT)

Page 38: Major Report Cell Phone Based Evm

PROJECT REPORT : CELLPHONE BASED EVM

unsigned char newdata;

rs=0;

delay();

lcde=1;

delay();

lcdport=data1;

lcde=0;

delay();

lcde=1;

newdata=xch(data1);

lcdport=newdata;

delay();

lcde=0;

delay();

rs=1;

/************************** FUNCTION FOR WRITING DATA ON THE

LCD***********************/

void send_data(unsigned char data1)

unsigned char newdata;

rs=1;

delay();

lcde=1;

delay();

lcdport=data1;

lcde=0;

delay();

lcde=1;

38 DEPARTMENT OF ECE ( MIT , MEERUT)

Page 39: Major Report Cell Phone Based Evm

PROJECT REPORT : CELLPHONE BASED EVM

newdata=xch(data1);

lcdport=newdata;

delay();

lcde=0;

delay();

rs=0;

/*********** COMMAND FOR BRINGING LCD CURSOR ON SECOND LINE

***************************/

void next_line()

send_command(0xc0);

delay();

/* FUNCTION FOR DISPLAYING DATA ON THE LCD

*************************************/

void dispslogan(unsigned char *p)

unsigned char data1;

while(*p)

data1=*p;

send_data(data1);

p++;

39 DEPARTMENT OF ECE ( MIT , MEERUT)

Page 40: Major Report Cell Phone Based Evm

PROJECT REPORT : CELLPHONE BASED EVM

/********************** INITIALIZATION OF LCD

***********************************/

void lcdinit()

clr_lcd(); /*FUNCTION SET */

send_command(0x28);

delay();

send_command(0x28);

delay();

send_command(0x28);

delay();

send_command(0x06); //ENTRY MODE

delay();

send_command(0x0e); //DISPLAY ON/OFF

delay();

clr_lcd();

void count_display(unsigned int data1)

unsigned int a[4];

int i=0;

while(data1!=0)

a[i++]=data1%10;

data1=data1/10;

i--;

for(;i>=0;i--)

40 DEPARTMENT OF ECE ( MIT , MEERUT)

Page 41: Major Report Cell Phone Based Evm

PROJECT REPORT : CELLPHONE BASED EVM

send_data(a[i] + 48);

void cand1chk()

if(cand1==0 && vote_switchflag==1)

next_line();

dispslogan("CONG_OK ");

vote_switchflag=0;

cand1count++;

void cand2chk()

if(cand2==0 && vote_switchflag==1)

next_line();

dispslogan("BJP_OK ");

vote_switchflag=0;

cand2count++;

void cand3chk()

if(cand3==0 && vote_switchflag==1)

next_line();

dispslogan("RSS_OK ");

vote_switchflag=0;

cand3count++;

void cand4chk()

if(cand4==0 && vote_switchflag==1)

41 DEPARTMENT OF ECE ( MIT , MEERUT)

Page 42: Major Report Cell Phone Based Evm

PROJECT REPORT : CELLPHONE BASED EVM

next_line();

dispslogan("BSP_OK ");

vote_switchflag=0;

cand4count++;

~*~*~*~*~*~*~*~

42 DEPARTMENT OF ECE ( MIT , MEERUT)

Page 43: Major Report Cell Phone Based Evm

PROJECT REPORT : CELLPHONE BASED EVM

CHAPTER:5

CONCLUSION

5.1 Area of Applications

Fast track voting which could be used in small scale elections, like resident

welfare association, “panchayat” level election and other society level

elections.

It could also be used to conduct opinion polls during annual share holders

meeting.

It could also be used to conduct general assembly elections where number of

candidates are less than or equal to eight in the current situation.

It is used in various TV serials as for public opinion.

5.2 Future Scope

Number of candidates could be increased by using other microcontroller.

It could be interfaced with printer to get the hard copy of the result almost

instantly from the machine itself.

It could also be interfaced with the personal computer and result could be

stored in the central server and its backup could be taken on the other backend

servers.

Again, once the result is on the server it could be relayed on the network to

various offices of the election conducting authority. Thus our project could

make the result available any corner of the world in a matter of seconds.

~*~*~*~*~*~*~*

43 DEPARTMENT OF ECE ( MIT , MEERUT)

Page 44: Major Report Cell Phone Based Evm

PROJECT REPORT : CELLPHONE BASED EVM

APPENDIX

ABBREVIATIONS

Sr. no. Short form Details1 EVM Electronic Voting Machine2 TVM Tele Voting Machine3 LCD Liquid Crystal Display4 LED Light Emitting Device5 DC Direct current6 AC Analog current7 GND Ground8 VCC Voltage Supply (+5 V)9 OSC Oscillator10 PSW Program Status Word11 ALU Airthematic & Logical Unit12 RAM Read Access Memory13 ROM Read Only Memory14 PC Program Counter15 TTL Transistor Transistor Logic16 ALE Address Latch Enable17 PROG Program18 PSEN Program Status Enable19 PCB Printed Circuit Board20 T/F Transformer21 EEPROM Electrically Erasable & programmable Read

Only Memory

~*~*~*~*~*~*~*~

44 DEPARTMENT OF ECE ( MIT , MEERUT)

Page 45: Major Report Cell Phone Based Evm

PROJECT REPORT : CELLPHONE BASED EVM

REFRENCES

Muhammad Ali Mazidi , Janice Gillispie Mazidi, Rolin D. Mckinlay. Second edition, “THE 8051 MICROCONTROLLER AND EMBEDDED SYSTEM”

K. J. Ayala. Third edition, “The 8051 MICROCONTROLLER”

Tutorial on microcontroller: www.8051projects.net/microcontroller_tutorials/

Tutorial on LCD: www.8051projects.net/lcd-interfacing/

WEBSITES

www.atmel.com

www.seimens.com

www.howstuffworks.com

www.alldatasheets.com

www.efyprojects.com

www.google.com

www.eci.gov.in/Audio_VideoClips/presentation/EVM.ppt

www.rajasthan.net/election/guide/evm.htm

www.indian-elections.com/electoralsystem/electricvotingmachine.html

~*~*~*~*~*~*~*~

45 DEPARTMENT OF ECE ( MIT , MEERUT)