Sei sulla pagina 1di 91

RFID BASED ELECTRONIC VOTING MACHINE

CHAPTER-1

INTRODUCTION

1.1 Introduction:
Many secure systems, such as contactless credit cards and secure entrance systems, are built with
contactless smartcard RFID technologies.
In many cases these systems are claimed to be secure based on the assumption that readers and
tags need to be in close proximity (about5cm) in order to communicate. However, it is known
that this proximity assumption is false: Relay attacks are a class of hardware-based attacks which
compromise the safety of such systems by dramatically extending interrogation range of the
contactless system. Interestingly, the proposed Israeli e-voting scheme is based on contactless
smartcards. In this work we show how the proposed system can be completely compromised
using low-cost relay attacks. Our attacks allow an adversary to read out all votes already cast into
the ballot box, suppress the votes of one or several voters, rewrite votes at will and even
completely disqualify all votes in a single voting station. Our attacks are easy to mount, very
difficult detect, and compromise both the confidentiality and the integrity of the election systems.

Page 1

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE

1.2 INTRODUCTION TO RFID:


Radio-frequency identification (RFID) is an automatic identification method, relying on storing
and remotely retrieving data using devices called RFID tags or transponders. The technology
requires some extent of cooperation of an RFID reader and an RFID tag.
An RFID tag is an object that can be applied to or incorporated into a product, animal, or person
for the purpose of identification and tracking using radio waves. Some tags can be read from
several meters away and beyond the line of sight of the reader.

1.3 What is RFID?


A basic RFID system consists of three components:
a) An antenna or coil
b) A transceiver (with decoder)
c) A transponder (RF tag)
Electronically programmed with unique information. There are many different types of RFID
systems out in the market. They are categorized according to there frequency ranges. Some of the
most commonly used RFID kits are as follows:
1) Low-frequency (30 KHz to 500 KHz)
2) Mid-Frequency (900KHz to 1500MHz)
3) High Frequency (2.4GHz to 2.5GHz)

Page 2

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE

These frequency ranges mostly tell the RF ranges of the tags from low frequency tag ranging
from 3m to 5m, mid-frequency ranging from 5m to 17m and high frequency ranging from 5ft to
90ft. The cost of the system is based according to there ranges with low-frequency system
ranging from a few hundred dollars to a high-frequency system ranging somewhere near 5000
dollars.

1.4 How RFID Is Changing the Business Environment today?

Radio frequency identification (RFID) technology has been in use for several decades to track
and identify goods, assets and even living things. Recently, however, RFID has generated
widespread corporate interest as a means to improve supply chain performance. Market activity
has been exploding since Wal-Mart's June 2003 announcement that its top 100 suppliers must be
RFID-compliant by January 2005. Mandates from Wal-Mart and the Department of Defense
(DoD) are making many companies scramble to evaluate, select and implement solutions that
will make them compliant with their customers' RFID requirements and additional retailers and
other large supply chain channel masters are likely to follow suit.

Page 3

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE

Chapter- 2

TECHNOLOGY USED
2.1 Embedded System:
A way of working, organizing or performing one or many tasks according to a fixed set of rules,
program or plan. A general-purpose definition of embedded systems is that they are devices used
to control, monitor or assist the operation of equipment, machinery or plant. Embedded reflects
the fact that they are an integral part of the system. In many cases, their embeddedness may be
such that their presence is far from obvious to the casual observer.

2.2.1 Embedded System Definitions:


An embedded system is a system that has software embedded into computer-hardware, which
makes a system dedicated for an application or specific part of an application or product or part
of a larger system.
An embedded system is one that has dedicated purpose software embedded in computer is a
hardware.
It is a dedicated computer based system for an application (s) or product. It may be an a
independent system or a part of large system. Its software usually embeds into a ROM (Read
Only Memory) or flash.
It is any device that includes a programmable computer but is not itself intended to be a general
purpose computer.

Page 4

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE


Embedded Systems are the electronic systems that contain a microprocessor or microcontroller,
but we do not think of them as computers the computer is hidden or embedded in the system.

2.2.2 Embedded system components:


Embedded a real time operating system (RTOS), which supervises the application software tasks
running on the hardware and organizes the accesses to system resources according to priorities
and timing constraints of tasks in the system.Enables execution of concurrent processes or
threads or tasks, it also provides a mechanism to let the processor run each process as per
scheduling and to do context-switch between the various processes (threads or tasks).

2.3 BLOCK DIAGRAM:

Page 5

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE


Fig 2.1 Block Diagram of RFID based EVM

2.4 CIRCUIT DIAGRAM:

Page 6

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE

Fig 2.2 Circuit Diagram of RFID based EVM

2.5 COMPONENT LIST:


Page 7

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE


RFID Based Electronic Voting Machine
Name

IC No.

Quantity

Microcontroller

AT89S52

Voltage Regulator

7805

Voltage Regulator

7812

LCD

16*2

CRYSTAL OSCILLATOR

11.0592

DIODE

1N4007

RESISTOR

220 OHM

RESISTOR

10K OHM

CAPACITOR(CERAMIC)

22PF

CAPACITOR(CERAMIC)

104

CAPACITOR(POLARISED)

1000,10 microF

CONNECTOR

2 PIN

IC BASE

40PIN

SWITCH

MICRO

Table:2.1 Components List used in project

2.6 A BRIEF INTRODUCTION TO 8051 MICROCONTROLLER:


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.

Page 8

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE


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.

2.6.1 AT89S52:
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 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 insystem 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.
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
Power-down mode saves the RAM con-tents but freezes the oscillator, disabling all other chip
functions until the next interrupt.

Page 9

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE

Fig2.3:-Microcontroller

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. The
pin diagram of the 8051 shows all of the input/output pins unique to microcontrollers.

Page 10

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE


The following are some of the capabilities of 8051 microcontroller.

Internal ROM and RAM

I/O ports with programmable pins

Timers and counters

Serial data communication

The 8051 architecture consists of these specific features:

8 bit program status word (PSW)

8 bit stack pointer (SP)

Internal ROM 4k

16 bit PC &data pointer (DPTR)

Internal RAM of 128 bytes.

4 register banks, each containing 8 registers

80 bits of general purpose data memory

32 input/output pins arranged as four 8 bit ports: P0-P3

Two 16 bit timer/counters: T0-T1

Two external and three internal interrupt sources Oscillator andclock circuits.

2.6.2 Architecture of 8051:

Page 11

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE

Fig.2.4 8051 Architecture

The 8051 is a high performance single chip computer intended for use in sophisticated real time
applications such as instrumentation, industrial control and computer peripherals. It provides
extra features like interrupts, bit address ability and an enhanced set of instructions, which makes
the chip very powerful and cost effective.

2.6.3 Pin Configuration:Page 12

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE

Fig2.5: Pin configuration of microcontroller

Most microcontrollers will also combine other devices such as:Page 13

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE

A Timer module to allow the microcontroller to perform tasks for certain time periods.

A serial I/O port to allow data to flow between the microcontroller and other devices such
PC and Internet.

An ADC to allow the microcontroller to accept analogue input data for processing.

The pins of the micro controller are explained below:-

I/O Ports:

Four 8-bit I/O port. Most have alternate functions.

Port 0 (pin 32-39)


Dual purpose I/O port. In min. component design, it is used as a general purpose I/O port. In
larger designs with external memory, it becomes a multiplexed data bus:1)-Low byte of address bus, strobes by ALE.
2)-8-bit instruction bus, strobe by PSEN.
3)-8-bit data bus, strobe by WR and RD.

Port 1 (pin 1-8)


Page 14

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE

As an I/O port: Standard bi-directional port for interfacing to external devices as required for I/O.
Alternate functions: Only on some derivatives

Port 2 (pin 21-28)


Dual purpose I/O port. As an I/O port: Standard bi-directional general purpose I/O port. Alternate
functions: High byte of address bus for external program and data memory accesses.

Port 3 (pin 10-17)


Port is an 8-bit bi-directional I/O port with internal pull-ups. It also serves the
functions of various special features of the 80C51

Table of alternate uses of Port- 3 pins:


PINS

ALTERNATE USE

SFR

P3.0 RXD

Serial data input

SBUF

P3.1 TXD

Serial data output

SBUF

P3.2 INT0

External Interrupt 0

TCON.1

P3.3 INT1

External Interrupt 1

TCON.3

P3.4 T0

External Timer 0 I/P

TMOD

P3.5 T1

External Timer 1 I/P

TMOD

P3.6 WR

External Memory writes pulse

P3. RD

External Memory read pulse

Table:2.2 uses of port-3 pins

Page 15

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE


Reset:
It resets total 8051 micro controller.
XTAL1 & XTAL2:
To connect the crystal oscillator. For 8051 crystal oscillator of 11.0592 MHZ is connected
between these pins.
ALE:
Address latch enable which is used to access the address locations from external memory.
PSEN:
Program store enable which is used for storing programming Code into the external memory.
EA:
External Access: 64 KB of ROM is the limit for external memory.

Supply and Ground pins:


Pin 40 is for +5V and pin 20 is for GND.

Page 16

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE


2.6.4 RESET CIRCUIT and CLOCK CIRCUIT:

Fig2.6: Reset circuit of microcontroller

Page 17

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE

2.7 Family Members of 8051:

Features
ROM
RAM(bytes)
Timers
I/O Pins
Serial Port
Interrupt Sources

8051
4K
128
2
32
1
6

8031
0K
128
2
32
1
6

8052
8K
256
3
32
1
7

8032
0K
256
3
32
1
7

Table:2.3 Family members of 8051

The 8051 has a bank of 128 bytes of Internal RAM. This Internal RAM is found on-chip on the
8051 so it is the fastest RAM available, and it is also the most flexible in terms of reading,
writing, and modifying its contents. Internal RAM is volatile, so when the 8051 is reset this
memory is cleared. The 128 bytes of internal ram is subdivided as shown on the memory map.
The first 8 bytes (00h - 07h) are "register bank 0". These alternative register banks are located in
internal RAM in addresses 08h through 1Fh.Bit memory actually resides in internal RAM, from
addresses 20h through 2Fh. The 80 bytes remaining of Internal RAM, from addresses 30h
through 7Fh, may be used by user variables that need to be accessed frequently or at high-speed.
This area is also utilized by the microcontroller as a storage area for the operating stack.

a) Register Banks:
Page 18

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE


The 8051 uses 8 "R" registers which are used in many of its instructions. These "R" registers are
numbered from 0 through 7 (R0, R1, R2, R3, R4, R5, R6, and R7).These registers are generally
used to assist in manipulating values and moving data from one memory location to another. The
concept of register banks adds a great level of flexibility to the 8051.

b) Bit Memory:
The 8051,being a communication oriented microcontroller, gives the user the ability to access a
number of bit variables. These variables may be either 1 or 0. There are 128 bit variables
available to the user, numbered 00h through 7Fh. The user may make use of these variables with
commands such as SETB and CLR. It is important to note that Bit Memory is really a part of
Internal RAM. In fact, the 128 bit variables occupy the 16 bytes of Internal RAM from 20h
through 2Fh.

c) Special Function Register (SFR) Memory:


Special Function Registers (SFRs) are areas of memory that control specific functionality of the
8051 processor. For example, four SFRs permit access to the 8051s 32 input/output lines.
Another SFR allows a program to read or write to the 8051s serial port .SFR is a part of Internal
Memory. This is not the case. When using this method of memory access (its called direct
address), any instruction that has an address of 00h through 7Fh refers to an Internal RAM
memory address; any instruction with an address of 80h through FFh refers to an SFR control
register.

2.7.1 Registers:
Page 19

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE


The Accumulator:
The Accumulator, as its name suggests, is used as a general register to accumulate the results of a
large number of instructions. It can hold an 8-bit (1-byte) value and is the most versatile register.

2.The "R" registers:


The "R" registers are a set of eight registers that are named R0, R1, etc. up to and including R7.
These registers are used as auxiliary registers in many operations.

3. The "B" Register:


The "B" register is very similar to the Accumulator in the sense that it may hold an 8-bit (1-byte)
value. The "B" register is only used by two 8051 instructions: MUL AB and DIV AB.

4.The Data Pointer (DPTR):


The Data Pointer (DPTR) is the 8051s only user-accessible 16-bit (2-byte) register. The
Accumulator, "R" registers, and "B" register are all 1-byte values. DPTR, as the name suggests,
is used to point to data. It is used by a number of commands which allow the 8051 to access
external memory.

5.The Program Counter (PC):


The Program Counter (PC) is a 2-byte address which tells the 8051 where the next instruction to
execute is found in memory. When the 8051 is initialized PC always starts at 0000h and is
incremented each time an instruction is executed.
.

6. The Stack Pointer (SP):

Page 20

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE


The Stack Pointer, like all registers except DPTR and PC, may hold an 8-bit (1-byte) value. The
Stack Pointer is used to indicate where the next value to be removed from the stack should be

7.Interrupts:
An interrupt is a special feature which allows the 8051 to provide the illusion of "multitasking,"
although in reality the 8051 is only doing one thing at a time.
.

8. Timers:
Timers are one of the categories of hardware time delays. Time delays are used to keep a system
into halting System or sleepy mode. We have two timers-timer0,timer1.Hardware time delays are
used to generate exact time delays.

9. Central Processing Unit:

Let add 3 more memory locations to a specific block that will have a built in capability to
multiply, divide, subtract, and move its contents from one memory location onto another. The
part we just added in is called "central processing unit" (CPU). Its memory locations are called
registers. Registers are therefore memory locations whose role is to help with performing various
mathematical operations or any other operations with data wherever data can be found. Look at
the current situation.
We have two independent entities (memory and CPU) which are interconnected, and thus any
exchange of data is hindered, as well as its functionality. If, for example, we wish to add the
contents of two memory locations and return the result again back to memory, we would need a
connection between memory and CPU. Simply stated, we must have some "way" through data
goes from one block to another.

Page 21

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE

Fig 2.7:- CPU

If, for example, we wish to add the contents of two memory locations and return the result again
back to memory, we would need a connection between memory and CPU. Simply stated, we
must have some "way" through data goes from one block to another.

Page 22

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE

Chapter-3

PCB DESIGNING &FABRICATION

3.1 PCB DESIGNING & FABRICATION:

In this section, we will look at some of the equipment that is used in modern PCB production.
Comprehensive Design Rules Checking with error annotation and on-screen highlighting.
Tightly integrated with the P-CAD Shape-Based Auto router.
Full range of manufacturing and assembly functions.
Tight integration to the SPECCTRA auto router, CAM350, and View logic products.
Integrated web-based request for PCB fabrication quotation feature.
IDF version 3 import and export options.
Extensive print and report options.
Block and sub selection allow portions of designs to be copied, moved, rotated and deleted.

Page 23

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE


Each development stage is carried out by a dedicated piece of equipment which may form part
of an assembly line. Depending on your application, note that some stages may be missing here.
For instance, a tinning stage is often included after etching to reduce copper layer oxidation. A
multi-layer PCB, too, requires a lamination stage to join the layers.

A multi-stage plate-through whole setup from Mega Electronics A raster plotter from Mega
Electronics serves as a replacement to the photo plotter described earlier. This plotter is capable
of creating a 5 micron spot. A laminator is used to apply the photoresist layer to the PCB. This
laminator is from Mega Electronics. UV units used to expose the photoresist on a PCB. There are
many different sorts of etching, developing, and stripping setups. This one is from Mega
Electronics and is a unit that sprays the chemicals over board panels, mounted inside. Different
units (of the same type) are typically used for each stage described, above.
P-CAD PCB (6/400) has the full range of advanced design features available with P-CAD PCB,
but with reduced design capacity. It is a Windows-based printed circuit board design system.
Differences between the two products have been noted throughout this manual with the symbol
you see in the left margin. The following chart provides a summary of those differences.The
figure shows the process of PCB Fabrication.

3.2 FLOW CHART FOR STEPS OF PCB DESIGN:

PCB Designing includes following step these are as follows on next page:-

Page 24

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE

Page 25

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE


Fig3.1-: PCB Fabrications

3.3 Populating and Soldering:Each of the two methods has advantages and disadvantages:
a)-Some parts cannot handle the thermal shock experienced by being passed through molten
solder.
b)-When wave soldering is used, it is necessary to hold components in place: glue.
c)-Wave soldering is FAST
.
d)-Reflow soldering does not really work with through-hole parts.
e)-Regardless of the method used, particular temperature profiles must be adhered to.
f)-To place components on a PCB, a Pick and Place unit can be used.
g)-Again, component placement information originates from the CAD package.
h)-An interesting home-brewed solution that shows many of the necessary steps in this process is
at Homebrew Surface Mount Pick and Place Taig Mill Conversion.

3.4 SINGLE AND DOUBLE SIDE PCB:


A single sided board is made from rigid laminate consisting of a woven glass epoxy base
material clad with copper on one side of varying thickness. Double sided boards are made from
Page 26

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE


the same type of base material clad with copper on two sides of varying thickness.

3.5 COPPER FOIL:


The copper foil used in circuit boards is typically in sheets of oz. and 1 oz. per square foot in
weight or 0.0007 and 0.00134 inches nominal thickness. In other words - one ounce of copper
will cover one square foot when it is rolled out to a thickness of 0.00134or 1.34 mils.

3.6 ETCHING:
Warm the jar of etchant in a bucket of warm water (or use an aquarium heater). Dont heats the
etchant above 115 degrees Fahrenheit or vapors may be released.
If desired, a very small aquarium pump can be used to provide aeration during etching. Aeration
greatly improves etching speed. Pumps and plastic aerating blocks can be purchased from
retailers that sell the etchant chemicals and copper boards.
Pour just enough etchant into a plastic tray that contains small plastic risers to prevent the circuit
board from sitting directly against the bottom of the tray. The circuit board should face down, so
that the copper drops off as it is etched. The tray may already contain a plastic block with holes
and a tube to an aquarium pump.
Using plastic tongs, place the circuit board into the tray. Turn on the aeration system (if desired).
Use the tongs to inspect the progress of the board and to agitate the board and tray if necessary.
With bubbling etchant and close board inspection, it should be clear why rubber gloves, goggles,
fresh air, and old clothes are necessary. Using all plastic parts when handling a metal-corroding
chemical should now seem obvious. Be sure to segregate all the parts that have been exposed to
etchant away from other uses. In other words, dont stick that etchant tray back into the kitchen
cupboard.
The etching should take 5 to 20 minutes depending on board size. If it takes much longer, the
etchant may have dissolved its fill of copper, and should be disposed of properly.
Page 27

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE


All exposed copper should now be etched away on the board, with only resist (blue film or toner)
remaining.

Fig3.2:- Etching PCB

3.7 CLEAN UP:


Im not sure of the legal and proper method of disposing of used-up etchant. I would be happy to
link to an EPA page or other official document if you run across one. Obviously, proper disposal
is going to depend on the type of etchant chemical. Whatever you do, dont pour it down into
anything with copper pipes!
For ferric chloride, Ive heard that you should neutralize the acid by adding a base (sodium
carbonate, sodium hydroxide, or calcium carbonate). This also solidifies the liquid, and after
drying, it can be disposed of as solid waste.
Store any partially-used (but still good) etchant in a recycled sealed plastic container separate
from the completely-unused fresh etchant (if any remains). Although you can always top-off a
partially-used batch of etchant with fresh etchant, you dont want to put partially-used etchant
back into the remaining fresh etchant.

Page 28

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE


It just seems like etchant spoils (becomes an ineffective sludge) a few months after being
exposed to copper.
Wash all the parts, trays, and circuit boards with plenty of fresh water.

3.8 DRILLING HOLES:


Some people like to drill the holes before etching. I prefer to etch first to allow the etchant to
carve starting center holes. The holes tend to guide the drill bit to the center of the via.
A drill press and a 1/32 bit works okay for most resistor and DIP holes. A #66 bit is even better.
Micro Mark sells #66 bits for $7.15 for a half-dozen (part #15172).
I used my Dermal drill press at low speed. I broke three bits. I guess I was supposed to use it at
high speed and also prevent the board from shifting. An expensive and inconvenient lesson.
You want to use standard high-speed steel or cobalt steel drill bits. Although carbide drill bits
theoretically stay sharper, they are brittle and break easily when used by hobbyists. Carbide only
lasts longer for professionals with rigid setups. You'll only get frustrated and waste money.
During drilling, I wore goggles to protect against flying debris and a filter mask to protect my
lungs from board dust.

Page 29

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE

Fig3.3 :- Drilling holes on PCB

3.9 FINAL PCB DESIGNING:


All process occur i.e., etching, cleaning, drilling, soldering masking etc. As shown in the figure:-

Fig3.4 :- PCB BOARD

Wash all the parts, trays, and circuit boards with plenty of fresh water. Although you can always
top-off a partially-used batch of etchant with fresh etchant, you dont want to put partially-used
etchant back into the remaining fresh etchant.

Page 30

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE

CHAPTER - 4

HARDWARE DESCRIPTION:

4.1 POWER SUPPLY:


Power supply is a reference to a source of electrical power. A device or system that supplies
electrical or other types of energy to an output load or group of loads is called a power supply
unit or PSU. The term is most commonly applied to electrical energy supplies, less often to
mechanical ones, and rarely to others. Here in our application we need a 5v DC power supply for
all electronics involved in the project. This requires step down transformer, rectifier, voltage
regulator, and filter circuit for generation of 5v DC power. Here a brief description of all the
components is given as follows:
CIRCUIT DIAGRAM OF POWER SUPPLY

Page 31

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE

Fig 4.1 Circuit Diagram of power supply

4.2 TRANSFORMER:
Transformer is a device that transfers electrical energy from one circuit to another through
inductively coupled conductors the transformer's coils or "windings". Except for air-core
transformers, the conductors are commonly wound around a single iron-rich core, or around
separate but magnetically-coupled cores. A varying current in the first or "primary" winding
creates a varying magnetic field in the core (or cores) of the transformer. This varying magnetic
field induces a varying electromotive force (EMF) or "voltage" in the "secondary" winding. This
effect is called mutual induction.

Page 32

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE

Fig 4.2 Transformer


If a load is connected to the secondary circuit, electric charge will flow in the secondary winding
of the transformer and transfer energy from the primary circuit to the load connected in the
secondary circuit.

The secondary induced voltage VS, of an ideal transformer, is scaled from the primary VP by a
factor equal to the ratio of the number of turns of wire in their respective windings:

By appropriate selection of the numbers of turns, a transformer thus allows an alternating


voltage to be stepped up by making
NS more than NP or stepped down, by making it

4.2.1 BASIC PARTS OF A TRANSFORMER

In its most basic form a transformer consists of:


Page 33

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE

A primary coil or winding.

A secondary coil or winding.

A core that supports the coils or windings.


Refer to the transformer circuit in figure as you read the following explanation: The primary
winding is connected to a 60-hertz ac voltage source. The magnetic field (flux) builds up
(expands) and collapses (contracts) about the primary winding.

The expanding and contracting magnetic field around the primary winding cuts the secondary
winding and induces an alternating voltage into the winding. This voltage causes alternating
current to flow through the load. The voltage may be stepped up or down depending on the
design of the primary and secondary windings.

Page 34

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE


Fig 4.3 winding of Transformer

4.2.2 THE COMPONENTS OF A TRANSFORMER


Two coils of wire (called windings) are wound on some type of core material. In some cases
the coils of wire are wound on a cylindrical or rectangular cardboard form. In effect, the core
material is air and the transformer is called an AIR-CORE TRANSFORMER. Transformers
used at low frequencies, such as 60 hertz and 400 hertz, require a core of low-reluctance
magnetic material, usually iron. This type of transformer is called an IRON-CORE
TRANSFORMER. Most power transformers are of the iron-core type. The principle parts of a
transformer and their functions are:

The CORE, which provides a path for the magnetic lines of flux.

The PRIMARY WINDING, which receives energy from the ac source.

The SECONDARY WINDING, which receives energy from the primary winding and
delivers it to the load.

The ENCLOSURE, which protects the above components from dirt, moisture, and
mechanical damage.

4.3 BRIDGE RECTIFIER:

Page 35

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE


A bridge rectifier makes use of four diodes in a bridge arrangement to achieve full-wave
rectification. This is a widely used configuration, both with individual diodes wired as shown
and with single component bridges where the diode bridge is wired internally.

4.3.1Basic operation:
According to the conventional model of current flow originally established by Benjamin Franklin
and still followed by most engineers today, current is assumed to flow through electrical
conductors from te positive to the negative pole. In actuality, free electrons in a conductor nearly
always flow from the negative to the positive pole. In the vast majority of applications, however,
the actual direction of current flow is irrelevant. Therefore, in the discussion below the
conventional model is retained.

In the diagrams be low, when the input connected to the left corner of the diamond is positive,
and the input connected to the right corner is negative, current flows from the upper supply
terminal to the right along the red (positive) pat h to the output, and returns to the lower supply
terminal via the blue (negative) path.

Fig 4.4(a) Bridge Rectifier

Page 36

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE


When the input connected to the left corner is negative, and the input connected to the right
corner is positive , current flows from the lower supply terminal to the right along the red path
to the output, and returns to the upper supply terminal via the blue path.

Fig 4.4(b) Bridge Rectifier

In each case, the upper right output remains positive and lower right output negative. Since this
is true whether t he input is AC or DC, this circuit not only produces a DC output from an AC
input, it can also provide what is sometimes called "reverse polarity protection".
That is, it permits normal functioning of DC-powered equipement when batteries have been
installed backwards, or when the leads (wires) from a DC power source have been reversed, and
protects the equipment from potential damage caused by reverse polarity.
Prior to availability of integrated electronics, such a bridge rectifier was alwa ys constructed
from discrete components. Since about 1950, a single four-terminal compo nent containing the
four diodes connected in the bridge configuration became a standard commercial component and
is now available with various voltage and current ratings.

4.3.2 OUTPUT SMOOTHING:


For many applications, especially with single phase AC where the full-wave bridge serves to
convert an AC in put into a DC output, the addition of a capacitor may be desired because the
Page 37

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE


bridge alone supplies an output of fixed polarity but continuously varying or "pulsating"
magnitude (see diagram above).

Fig 4.5 output smoothing of Bridge Rectifier

The function of this capacitor, known as a reservoir capacitor (or smoothing capacitor) is to
lessen the variation in (or 'smooth') the rectified AC output voltage waveform from the bridge.
One explanation of 'smoothing' is that the capacitor provides a low impedance path to the AC
component of the output, reducing the AC voltage across, and AC current through, the resistive
load. In less technical terms, any drop in the output voltage and current of the bridge tends to be
canceled by loss of charge in the capacitor.
This charge flows out as additional current through the load. Thus the change of load current and
voltage is reduced relative to what would occur without the capacitor. Increases of voltage
correspondingly store excess charge in the capacitor, thus moderating the change in output
voltage / current.
The simplified circuit shown has a well-deserved reputation for being dangerous, because, in
some applications, the capacitor can retain a lethal charge after the AC power source is removed.
If supplying a dangerous voltage, a practical circuit should include a reliable way to safely
discharge the capacitor. If the normal load cannot be guaranteed to perform this function, perhaps
because it can be disconnected, the circuit should include a bleeder resistor connected as close as
practical across the capacitor. This resistor should consume a current large enough to discharge
the capacitor in a reasonable time, but small enough to minimize unnecessary power waste.
Page 38

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE


Because a bleeder sets a minimum current drain, the regulation of the circuit, defined as
percentage voltage change from minimum to maximum load, is improved. However in many
cases the improvement is of insignificant magnitude.
The capacitor and the load resistance have a typical time constant = RC where C and R are the
capacitance and load resistance respectively. As long as the load resistor is large enough so that
this time constant is much longer than the time of one ripple cycle, the above configuration will
produce a smoothed DC voltage across the load.
In some designs, a series resistor at the load side of the capacitor is added. The smoothing can
then be improved by adding additional stages of capacitorresistor pairs, often done only for subsupplies to critical high-gain circuits that tend to be sensitive to supply voltage noise.
The idealized waveforms shown above are seen for both voltage and current when the load on
the bridge is resistive. When the load includes a smoothing capacitor, both the voltage and the
current waveforms will be greatly changed. While the voltage is smoothed, as described above,
current will flow through the bridge only during the time when the input voltage is greater than
the capacitor voltage. For example, if the load draws an average current of n Amps, and the
diodes conduct for 10% of the time, the average diode current during conduction must be 10n
Amps. This non-sinusoidal current leads to harmonic distortion and a poor power factor in the
AC supply.
In a practical circuit, when a capacitor is directly connected to the output of a bridge, the bridge
diodes must be sized to withstand the current surge that occurs when the power is turned on at
the peak of the AC voltage and the capacitor is fully discharged. Sometimes a small series
resistor is included before the capacitor to limit this current, though in most applications the
power supply transformer's resistance is already sufficient.

Page 39

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE


Output can also be smoothed using a choke and second capacitor. The choke tends to keep the
current (rather than the voltage) more constant. Due to the relatively high cost of an effective
choke compared to a resistor and capacitor this is not employed in modern equipment.
Some early console radios created the speaker's constant field with the current from the high
voltage ("B +") power supply, which was then routed to the consuming circuits, (permanent
magnets were then too weak for good performance) to create the speaker's constant magnetic
field. The speaker field coil thus performed 2 jobs in one: it acted as a choke, filtering the power
supply, and it produced the magnetic field to operate the speaker.

4.3.3REGULATOR IC (78XX)
It is a three pin IC used as a voltage regulator. It converts unregulated DC current into regulated
DC current.

Fig. 4.6 Regulator IC (78XX)

Page 40

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE


Normally we get fixed output by connecting the voltage regulator at the output of the filtered DC
(see in above diagram). It can also be used in circuits to get a low DC voltage from a high DC
voltage (for example we use 7805 to get 5V from 12V). There are two types of voltage regulators
1. fixed voltage regulators (78xx, 79xx) 2. variable voltage regulators (LM317) In fixed voltage
regulators there is another classification 1. +ve voltage regulators 2. -ve voltage regulators
POSITIVE VOLTAGE REGULATORS This include 78xx voltage regulators. The most
commonly used ones are 7805 and 7812. 7805 gives fixed 5V DC voltage if input voltage is in
(7.5V, 20V).

4.3.4The Capacitor Filter


The simple capacitor filter is the most basic type of power supply filter. The application of the
simple capacitor filter is very limited. It is sometimes used on extremely high-voltage, lowcurrent power supplies for cathode-ray and similar electron tubes, which require very little load
current from the supply. The capacitor filter is also used where the power-supply ripple
frequency is not critical; this frequency can be relatively high. The capacitor (C1) shown in
figure 4-15 is a simple filter connected across the output of the rectifier in parallel with the load.

Fig. 4.7 capacitor filter

When this filter is used, the RC charge time of the filter capacitor (C1) must be short and the RC
discharge time must be long to eliminate ripple action. In other words, the capacitor must charge
up fast, preferably with no discharge at all. Better filtering also results when the input frequency
Page 41

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE


is high; therefore, the full-wave rectifier output is easier to filter than that of the half-wave
rectifier because of its higher frequency.
For you to have a better understanding of the effect that filtering has on E avg, a comparison of a
rectifier circuit with a filter and one without a filter is illustrated in views A and B of figure 4-16.
The output waveforms in figure 4-16 represent the unfiltered and filtered outputs of the halfwave rectifier circuit. Current pulses flow through the load resistance (R L) each time a diode
conducts. The dashed line indicates the average value of output voltage.

For the half-wave rectifier, Eavg is less than half (or approximately 0.318) of the peak output
voltage. This value is still much less than that of the applied voltage. With no capacitor
connected across the output of the rectifier circuit, the waveform in view A has a large pulsating
component (ripple) compared with the average or dc component. When a capacitor is connected
across the output (view B), the average value of output voltage (E avg) is increased due to the
filtering action of capacitor C1.

4.3.5UNFILTERED:

Page 42

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE

Fig. 4.8 (a)Half-wave rectifier without filtering.

4.3.6 FILTERED:

Fig. 4.8(b) Half-wave rectifier with filtering.

The value of the capacitor is fairly large (several microfarads), thus it presents a relatively low
reactance to the pulsating current and it stores a substantial charge.

Page 43

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE


The rate of charge for the capacitor is limited only by the resistance of the conducting diode,
which is relatively low. Therefore, the RC charge time of the circuit is relatively short. As a
result, when the pulsating voltage is first applied to the circuit, the capacitor charges rapidly and
almost reaches the peak value of the rectified voltage within the first few cycles. The capacitor
attempts to charge to the peak value of the rectified voltage anytime a diode is conducting, and
tends to retain its charge when the rectifier output falls to zero. (The capacitor cannot discharge
immediately.) The capacitor slowly discharges through the load resistance (R L) during the time
the rectifier is non-conducting.

The rate of discharge of the capacitor is determined by the value of capacitance and the value of
the load resistance. If the capacitance and load-resistance values are large, the RC discharge time
for the circuit is relatively long.
A comparison of the waveforms shown in figure 4-16 (view A and view B) illustrates that the
addition of C1 to the circuit results in an increase in the average of the output voltage (E avg) and a
reduction in the amplitude of the ripple component (Er) which is normally present across the load
resistance.
Now, let's consider a complete cycle of operation using a half-wave rectifier, a capacitive filter
(C1), and a load resistor (RL). As shown in view A of figure 4-17, the capacitive filter (C1) is
assumed to be large enough to ensure a small reactance to the pulsating rectified current. The
resistance of RL is assumed to be much greater than the reactance of C1 at the input frequency.
When the circuit is energized, the diode conducts on the positive half cycle and current flows
through the circuit, allowing C1 to charge. C1 will charge to approximately the peak value of the
input voltage. (The charge is less than the peak value because of the voltage drop across the
diode (D1)). In view A of the figure, the charge on C1 is indicated by the heavy solid line on the
Page 44

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE


waveform. As illustrated in view B, the diode cannot conduct on the negative half cycle because
the anode of D1 is negative with respect to the cathode. During this interval, C1 discharges
through the load resistor (RL). The discharge of C1 produces the downward slope as indicated by
the solid line on the waveform in view B. In contrast to the abrupt fall of the applied ac voltage
from peak value to zero, the voltage across C1 (and thus across R L) during the discharge period
gradually decreases until the time of the next half cycle of rectifier operation. Keep in mind that
for good filtering, the filter capacitor should charge up as fast as possible and discharge as little
as possible.

Fig. 4.9A. - Capacitor filter circuit (positive and negative half cycles). POSITIVE HALF-CYCLE

Page 45

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE

Fig 4.9B. - Capacitor filter circuit (positive and negative half cycles). NEGATIVE HALF-CYCLE

Since practical values of C1 and RL ensure a more or less gradual decrease of the discharge
voltage, a substantial charge remains on the capacitor at the time of the next half cycle of
operation. As a result, no current can flow through the diode until the rising ac input voltage at
the anode of the diode exceeds the voltage on the charge remaining on C1. The charge on C1 is
the cathode potential of the diode. When the potential on the anode exceeds the potential on the
cathode (the charge on C1), the diode again conducts, and C1 begins to charge to approximately
the peak value of the applied voltage.
After the capacitor has charged to its peak value, the diode will cut off and the capacitor will start
to discharge. Since the fall of the ac input voltage on the anode is considerably more rapid than
the decrease on the capacitor voltage, the cathode quickly become more positive than the anode,
and the diode ceases to conduct.
Operation of the simple capacitor filter using a full-wave rectifier is basically the same as that
discussed for the half-wave rectifier. Referring to figure 4-18, you should notice that because one
of the diodes is always conducting on. Either alternation, the filter capacitor charges and

Page 46

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE


discharges during each half cycle. (Note that each diode conducts only for that portion of time
when the peak secondary voltage is greater than the charge across the capacitor.)

Fig 4.10. - Full-wave rectifier (with capacitor filter).

Another thing to keep in mind is that the ripple component (E r) of the output voltage is an ac
voltage and the average output voltage (Eavg) is the dc component of the output. Since the filter
capacitor offers a relatively low impedance to ac, the majority of the ac component flows
through the filter capacitor. The ac component is therefore bypassed (shunted) around the load
resistance, and the entire dc component (or E avg) flows through the load resistance. This
statement can be clarified by using the formula for XC in a half-wave and full-wave rectifier.
As you can see from the calculations, by doubling the frequency of the rectifier, you reduce the
impedance of the capacitor by one-half. This allow s the ac component to pass through the
capacitor more easily. As a result, a full-wave rectifier output is much easier to filter than that of
a half-wave rectifier. Remember, the smaller the X C of the filter capacitor with respect to the load
resistance, the better the filtering action. Since the largest possible capacitor will provide the best
filtering.
Remember, also, that the load resistance is an important consideration. If lo ad resistance is made
small, the load current increases, and the average value of output voltage (E avg) decreases. The
Page 47

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE


RC discharge time constant is a direct function of the value of the load resistance; therefore, the
rate of capacitor voltage discharge is a direct function of the current through the load.

The greater the load current, the more rapid the discharge of the capacitor, and the lower the
average value of output voltage. For this reason, the simple capacitive filter is seldom used with
rectifier circuits that must supply a relatively large load current. Using the simple capacitive filter
in conjunction with a full-wave or bridge rectifier provides improved filtering because the
increased ripple frequency decreases the capacitive reactance of the filter capacitor.

4.4DIODE:
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.

Diode 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).

APPLICATION:
Diodes: Rectification, free-wheeling, etc
Page 48

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE

Zener diode: Voltage control, regulator etc.


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

4.5 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 color 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.

Page 49

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE

4.5.1FUNCTION:
Resistor restrict the flow of electric current, for example a resistor is placed in series with a lightemitting diode(LED) to limit the current passing through the LED.

4.5.2TYPES OF RESISTORS
a)FIXED VALUE RESISTORS:
It includes two types of resistors as carbon film and metal film.
These two types are explained under-

b)CARBON FILM RESISTORS:


During manufacture, at in film of carbon is deposited onto a small ceramic rod. The resistive
coating is spiraled away in an automatic machine until the resistance between there two ends of
the rods is as close as possible to the correct value. Metal leads and end caps are added, the
Page 50

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE


resistors is covered with an insulating coating and finally painted with colored bands to indicate
the resistor value

Fig:4.11- Carbon Film Resistors

Another example for a Carbon 22000 Ohms or 22 Kilo-Ohms also known as 22K at 5%
tolerance: Band 1 = Red, 1st digit Band 2 = Red, 2nd digit Band 3 = Orange, 3rd digit, multiply
with zeros, in this case 3 zero's Band 4 = Gold, Tolerance, 5%

c)METAL FILM RESISTORS:


Metal film and metal oxides resistors are made in a similar way, but can be made more
accurately to within 2% or 1 % of their nominal vale there are some difference in performance
between these resistor types, but none which affects their use in simple circuit.

d)WIRE WOUND RESISTOR:


A wire wound resistor is made of metal resistance wire, and because of this, they can be
manufactured to precise values. Also, high wattage resistors can be made by using a thick wire
material. Wire wound resistors cannot be used for high frequency circuits. Coils are used in high
frequency circuit. Wire wound resistors in a ceramic case, strengthened with special cement.
They have very high power rating, from 1 or 2 watts to dozens of watts. These resistors can
become extremely hot when used for high power application, and this must be taken into account
when designing the circuit.
Page 51

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE

4.5.3TESTING:
Resistors are checked with an ohm meter/millimeter. For a defective resistor the ohm-meter
shows infinite high reading.

4.6 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.

4.6.1BASIC:
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.

Page 52

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE

When you connect a capacitor to a battery, heres what happens:


The plate on the capacitor that attaches to the negative terminal of the battery accepts electrons
that the battery is producing.
The plate on the capacitor that attaches to the positive terminal of the battery loses electrons to
the battery.

4.6.2 TESTING
Page 53

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE

To test the capacitors, either analog meters or special digital meters with the specified function
are used. The non-electrolyte capacitor can be tested by using the digital meter.
Multi meter mode Negative probe : occur) `OL` Result
Continuity Positive probe : One end
Second end Display : `0`(beep sound : Faulty OK)

4.7 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.

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
Page 54

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE


condition. The LEDs are available in the round shell and also in the flat shells. The positive leg is
longer than negative leg.

4.8 RS-232:
In telecommunications, RS-232 is a standard for serial binary data signals connecting between a
DTE (Data terminal equipment) and a DCE (Data Circuit-terminating Equipment)[14]. It is
commonly used in computer serial ports.
In RS-232, data is sent as a time-series of bits. Both synchronous and asynchronous
transmissions are supported by the standard. In addition to the data circuits, the standard defines
a number of control circuits used to manage the connection between the DTE and DCE [14].
Each data or control circuit only operates in one direction that is, signaling from a DTE to the
attached DCE or the reverse. Since transmit data and receive data are separate circuits, the
interface can operate in a full duplex manner, supporting concurrent data flow in both directions
[15]. The standard does not define character framing within the data stream, or character
encoding.
Page 55

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE

Fig:4.13Female 9 pin plug

4.9 RTS/CTS Handshaking


The standard RS-232 use of the RTS and CTS lines is asymmetrical. The DTE asserts RTS to
indicate a desire to transmit and the DCE asserts CTS in response to grant permission. This
allows for half-duplex modems that disable their transmitters when not required, and must
transmit a synchronization preamble to the receiver when they are re enabled [16]. There is no
way for the DTE to indicate that it is unable to accept data from the DCE. A non-standard
symmetrical alternative is widely used: CTS indicates permission from the DCE for the DTE to
transmit, and RTS indicates permission from the DTE for the DCE to transmit [17]. The "request
to transmit" is implicit and continuous. The standard defines RTS/CTS as the signaling protocol
for flow control for data transmitted from DTE to DCE. The standard has no provision for flow
control in the other direction. In practice, most hardware seems to have repurposed the RTS
signal for this function [18]. A minimal 3-wire RS-232 connection consisting only of transmits
data, receives data and ground, and is commonly used when the full facilities of RS-232 are not

Page 56

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE


required. When only flow control is required, the RTS and CTS lines are added in a 5-wire
version.

4.10 Specifying Baud Rate, Parity & Stop bits


Serial communication using RS-232 requires four parameters: the baud rate of the transmission,
the number of data bits encoding a character, the sense of the optional parity bit, and the number
of stop bits. Each transmitted character is packaged in a character frame that consists of a single
start bit followed by the data bits, the optional parity bit, and the stop bit or bits. A typical
character frame encoding the letter "m" is shown here.

Fig4.14 Baud rate specification

I specified the parameters as baud rate 9600 bps, 8 data bits, no parity, and 1 stop bit (9600-8
N-1). This was set in pre-operational phase while setting up the modem through the hyper
terminal, as per the serial transmission standards in 8051 microcontroller [19].

DCE Baud Rates


110,300,1200,2400,4800,9600,19200,38400,57600,115200,2304 00,460800,921600 (Possible
Baud Rates) Baud Rate Used
Power on default rate
Page 57

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE

Testing a DB-9 RS-232 serial port in HyperTerminal


This procedure explains how to troubleshoot a COM card using HyperTerminal. Before testing
my serial ports, I first hook up a loopback. A loopback connects the output signal (TXD) to the
input signal (RXD) in a single serial port connector to make it seem like there are two ports
connected together.

Making a loopback
Steps

Turn off the computer.

Connect RXD (pin 2) and TXD (pin 3) of the serial port. Use a loop-back connector if
available, or any kind of conductive wire, even a paper clip .

Turn on the computer. I am now ready to test the port.

Page 58

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE

DB9 interface

Running HyperTerminal

Step Procedure Description

Launch

HyperTerminal.

In

Windows,

select

Programs/

Accessories/

Communications/HyperTerminal.

Create a new session. When prompted, give the session any name I wish.

Select the COM # associated with the computer, I am now set up to test the port.

With the session open, type any text. If the text I type is echoed on the screen, the port
is functioning properly.

Close the session.

Initializations
Page 59

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE

The baud rate of the modem was set to be 9600 bps using the HyperTerminal, The ECHO from
the modem was turned off using the command ATE0 at the HyperTerminal. For serial
transmission and reception to be possible both the DTE and DCE should have same operational
baud rates. Hence to set the microcontroller at a baud rate of 9600bps, I set terminal count of
Timer 1 at 0FFh (clock frequency = 1.8432). The TCON and SCON registers were set
accordingly.

SOFTWARE DISCRIPTION

4.11VISION:
The Vision IDE is, for most developers, the easiest way to create embedded system programs.
This chapter describes commonly used Vision features and explains how to use them.

Page 60

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE


a)General Remarks and Concepts:
Before we start to describe how to use Vision, some general remarks, common to many
screens1 and to the behavior of the development tool, are presented. In our continuous effort to
deliver best-in-class development tools, supporting you in your daily work, Vision has been
built to resemble the look-and-feel of widespread applications. This approach decreases your
learning curve, such that you may start to work with Vision right away.
Based on the concept of windows:
Vision windows can be re-arranged, tiled, and attached to other screen areas or windows
respectively It is possible to drag and drop windows, objects, and variables, A Context Menu,
invoked through the right mouse button, is provided for most objects. You can use keyboard
shortcuts and define your own shortcuts. You can use the abundant features of a modern editor.
Menu items and Toolbar buttons are greyed out when not available in the Current context.

Page 61

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE

Page 62

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE


Fig 4.14 concept of u vision

The Project Windows area is that part of the screen in which, by default, the Project Window,
Functions Window, Books Window, and Registers Window are displayed.
Within the Editor Windows area, you are able to change the source code, view performance and
analysis information, and check the disassembly code.
The Output Windows area provides information related to debugging, memory, symbols, call
stack, local variables, commands, browse information, and find in files results.
If, for any reason, you do not see a particular window and have tried displaying/hiding it several
times, please invoke the default layout of Vision through the Window Reset Current Layout
Menu.

Positioning Windows:

The Vision windows may be placed onto any area of the screen, even outside of the Vision
frame, or to another physical screen.
Click and hold the Title Bar1 of a window with the left mouse button and Drag the window to
the preferred area, or onto the preferred control, and release the mouse button.
Please note, source code files cannot be moved outside of the Editor Windows2.\ Invoke the
Context Menu of the windows Title Bar to change the docking attribute of a window object. In
some cases, you must perform this action before you can drag and drop the window.
Vision displays docking helper controls3, emphasizing the area where the window will be
attached. The new docking area is represented by the section highlighted in blue. Snap the
Page 63

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE


window to the Multiple Document Interface (MDI) or to a Windows area by moving the mouse
over the preferred control.

b)Keil software converts the C-codes into the Intel Hex code.

Fig 4.15:A view of Keil uVision 3

Page 64

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE

Fig 4.16: A view of Keil uVision 3

4.12 8051 Burner Software:

Page 65

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE

Fig 4.17 8051 Burner software

4.13.1PRO 51:

Page 66

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE


PRO51 BURNER provides you with software burning tools for 8051 based Microcontrollers in
there Flash memory. The 51 BURNER tools, you can burn AT89SXXXX series of ATMEL
microcontrollers.

4.13.2 Features of PRO51:

Flash Programmer for 89C1051, 89C2051, 89C4051, 89S51, 89S52, 89C51 and 89C52
micros.

Operates on single 5V supply which can be taken from USB Port of PC.

User friendly windows based Graphics User Interface.

Interfaces with PC through COM1 or COM2 serial ports.

4.13.3 System Requirements :

PC with at least one serial and one USB ports and at least 600x800 VGA resolution.

If USB port is not available you need a regulated +5V supply.

Windows operating system.

Page 67

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE


4.13.4 Package Contents:

PRO51 unit

Interface Cable between PC and PRO51

CD containing PROG51 software

Getting Started

Install PROG51 programs using setup from the CD. This would normally create these
programs in a program group INFONICS. You may like to create a separate folder like
INFONICS on your disk where these programs will be installed.

Connect PRO51 to COM port and USB on your PC using the Y cable provided with PRO51.
Follow instruction given in the following sections.

4.13.5 PROG51 User Interface


Prog51 is used for programming the 89C1051, 89C2051 and 89C4051 Microcontrollers. User
interface includes:

Page 68

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE

Load Hex/Binary file in Buffer

Save Buffer as Binary File

Display / Specify Target Device to be Programmed.

Com Port Selection.

Identify Target Device with the device specified by you in the designated area.

Read Microcontroller Program in Buffer

Erase Microcontroller Program Memory

Check if Target Device is Erased

Program Buffer Contents in Target device

Verify the Device contents with data in the buffer

Lock Target Device. Once the device is locked it can not be read or verified.

Page 69

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE

Fig 4.18 interface of PRO51

4.13.6 Procedure to Program a Chip

Connect the PRO51 to COM port and USB port on your PC. USB is used for +5V power
supply only. You can use regulated 5V supply and connect it on pin 4 of the 9 Pin connector.

Start PROG51 from your program menu.

Select appropriate com port on your PC.

Insert desired device in the ZIF socket on PRO51. 20 Pin devices like 89C2051 should be
aligned with the bolltom side, i.e., pin 10 on the 89C2051 should be inserted in Pin 20 of the
socket.

Specify the device in the target device text box.

Page 70

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE

Click Identify button to check if the device inserted matches with the one you specified in the
Target Device text box.

Load Hex or Binary file generated using compiler or assembler in the buffer.

Click on Erase button to erase the contents of the flash memory of the microcontroller. Erase
process will automatically be followed by a blank check.

Click on Program button to write the buffer contents in to the program memory of the
microcontroller. Program action will automatically be followed by a verify cycle.

If you wish click on Lock button to secure the device.

Remove the device from ZIF socket

4.13.7 Pin description of 9 PIN male connector on PRO51:

Pin

Name

Description
Page 71

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE


1

NC

Not connected

RXD

Serial Port Receive Data. This pin should


be connected to TXD pin of COM port on
PC.

TXD

Serial Port Transmit Data. This pin should


be connected to RXD pin of COM port on
PC.

VCC

+5V supply for the PRO51. It must be


regulated supply. Cable supplied with the
device draws power from the USB port of
your PC. If you wish to use any other
source of power the same should be
connected to this pin.

GND

Signal and power ground for serial port


and 5V power supply.

RXDEN

If this pin is left open or pulled up (>3V)


then RXD signal received at PIN 2 above
is sent to the CPU. If you wish to disable
Page 72

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE

the RXD signal then this PIN should be


pulled Ve. With the standard cable
supplied by Infonics this pin is connected
to the DSR signal of COM port.
Therefore, the DSR must high to enable
the RXD.
7

NC

Not connected

RESET

A high (> 3V) on this pin will reset the


PRO51. With the standard cable supplied
by Infonics this pin is connected to the
RTS signal of COM port. Therefore, the
RTS must be kept low for proper
operation of the PRO51. A high pulse on
RTS can be used to reset the device.

NC

Not connected

Table 4.1 pin configuration of PRO51

Page 73

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE

CHAPTER - 5
PRECAUTION AND TESTING

5.1 PRECAUTIONS:
5.1.1 SOLDERING PRECAUTIONS:

The construction was carried out with care. The precautions taken during the soldering were:

The tip of soldering iron was kept clean with the help of a file from time to time.

The solder wire was of smaller thickness.

Extra solder was not used in order to avoid a cause of short circuit in the conductive path.
Page 74

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE

The overheating of components was avoided to prevent component damage as a result of


excessive heat on the components due to the heat from the soldering iron.

The leads of the components were kept clean before soldering, with the use of sand paper.

5.1.2 COMPONENTS PRECAUTION:

IR sensor used should be sensitive. Before using in the circuit it should be tested
with a multi-meter.

I.C should not be heated much while soldering; too much heat can destroy the I.C.
For safety and ease of replacement, the use of I.C socket is suggested.

While placing the I.C pin no 1 should be made sure at right hole.

Opposite polarity of battery can destroy I.C so please check the polarity before
switching ON the circuit. One should use diode in series with switch for safety
since diode allows flowing current in one direction only.

Each component was soldered neatly and clean.

We should use insulated wires.

5.2 TESTING OF PROJECT :


Page 75

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE

With the knowledge of operation of the system was tested step by step to the transistor output
and the load was connected across the collector terminal of the transistor.

5.3 ASSEMBLING :
The whole system was packed in a plastic casing and provision was made for the IR to sense
light from the outside.

CHAPTER- 6
APLLICATIONS, CONCLUSION & FUTURE SCOPES
6.1Advantages:

It is economical.
Less manpower required.
Time conscious, as less time required for voting & counting.
Avoids invalid voting.
Saves transportation cost due to its compact size.
Convenient on the part of voter.
Easy transportation, storage, and maintenance.
Easy and accurate counting without any mischief at the counting centre.
Eco friendly.

6.2 Dis-advantages:

Limited no. of candidates.


More candidates mean implies complicated circuit.
Page 76

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE

6.3 Application:

This could be used for voting purpose at any required place.


It is used in general elections for choosing candidates to represent people at various

stages.
It can be used in school ,college student union elections.
It can be used to find the general opinion of people on various issues.
Anywhere where majority opinion is to be found out.

6.4 Future Scopes :

Timer could be included, which could automatically end the voting after specific duration

of time.
Biometric Verification of voters, so that automatically it can be insured that one person is

voting once.
It can be made more interactive by adding sound effect (Speech) to it.
EEPROM can be used to store data permanently.
If we make more than one EVM, each to be used at different locations and final result
will be addition of result of all, we could think of connecting them to communicate with
each other and final result can be shown on one of the LCD.

Page 77

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE

6.5 BUDGET ANALYSIS:The budget of this project is around of rupees 4000/- each member of the group contributed
rupees 2000/We visited different electronic shops to acquire the part we needed.
Items that were purchases from different shops are:

RF tag
RF module

Ceramic capacitor

Resistor

Microcontroller 8051

Voltage regulator I.Cs.

LCD

PCB board

Transformer

Connectors

Capacitor

Page 78

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE

APENDIX
PROGRAM:
#include<reg52.h>
#define key P3
sbit EN=P1^7;
sbit RS=P1^6;
sbit s1=P1^0;
sbit s2=P1^1;
sbit s3=P1^2;
unsigned char card_id[12];
unsigned char s[]="4E00706E4212";
unsigned char t[]="04003BD0C629";
unsigned char u[]="010016B4FB58";
void show();
void delay(unsigned int count);
void ini();
void recieve();
void cmddata(unsigned char );
void senddata(unsigned char );
Page 79

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE


void stringdata(unsigned char *);
static int a,b=0,c=0,d=0,p,y,z,m,n,x=0,q;

void show()
{
cmddata(0x80);
stringdata("SHOW IDENTITY CARD");
cmddata(0x80);
cmddata(0xc0);
stringdata("FOR VERIFICATION");
recieve();
while(q<=5)
{
cmddata(0x01);
q++;
}
q=0;
if(u[1]==card_id[1])
{
m=b;
n=c;
y=m%10;
m=m/10;
z=m%10;
a=n%10;
n=n/10;
Page 80

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE


p=n%10;
stringdata("BJP

");

delay(5);
senddata(z+48);
senddata(y+48);
cmddata(0x80);
cmddata(0xC0);
stringdata("CONG

");

delay(5);
senddata(p+48);
senddata(a+48);
delay(4000);
while(s1==1&&s2==1&&s3==1);
}
else
{
cmddata(0x80);
stringdata("NOT REGISTERD ID ");
}
}
void ini()
{
cmddata(0x01);
delay(10);
cmddata(0x38);
delay(10);
Page 81

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE


cmddata(0x0E);
}
void cmddata(unsigned char k)
{

P2=k;
RS=0;
EN=1;
delay(10);
RS=1;
EN=0;
delay(10);
}
void senddata(unsigned char ch)
{
P2=ch;
RS=1;
EN=1;
delay(10);
RS=0;
EN=0;
delay(10);
}
void delay(unsigned int count)
{
unsigned int i;
while(count)
Page 82

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE


{
i=115;
while(i>0)
i--;
count--;
}
}
void stringdata(unsigned char *str)
{
unsigned int i=0;
while(str[i]!='\0')
{
senddata(str[i]);
i++;
}
}
void recieve()
{
int k=0;
for(k=0;k<12;k++)
{

while(RI==0);
card_id[k]=SBUF;
RI=0;

Page 83

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE


}
}
void main()
{

P1=0xff;
ini();
//loop:
TMOD=0x20; //Enable Timer 1
TH1=0XFD;
SCON=0x50;
TR1=1;
while(q<=5)
{
cmddata(0x01);
q++;
}
q=0;
loop:
while(q<=5)
{

cmddata(0x01);
q++;
}
Page 84

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE


q=0;
delay(100);
stringdata(" WELCOME TO EVM ");
delay(4000);
while(q<=5)
{
cmddata(0x01);
q++;
}

if(s3==0)
{
while(q<=5)
{
cmddata(0x01);
q++;
}
q=0;
show();
goto loop;
}
else
{
stringdata("SHOW YOUR ID");
delay(1000);
Page 85

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE


while(q<=5)
{
cmddata(0x01);
q++;
}
q=0;
recieve();

while(q<=5)
{
cmddata(0x01);
q++;
}
q=0;
delay(500);
if(s[0]==card_id[0])
{
x++;
}
else if(t[0]==card_id[0])
{
d++;
}
else
{
stringdata("NOT REGISTERED ID");
Page 86

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE


delay(1000);
goto loop;
}
delay(100);
if(x==1||d==1)

{
stringdata("YOU CAN VOTE");
delay(1000);
while(q<=5)
{
cmddata(0x01);
q++;
}
q=0;
stringdata("BJP

(1)");

cmddata(0x80);
cmddata(0xC0);
stringdata("CONG

(2)");

delay(1000);
while(q<=5)
{
cmddata(0x01);
q++;
Page 87

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE


}
q=0;
stringdata("PRESS THE SWITCH:");
while(s1==1&&s2==1&&s3==1);

if(s1==0)
{//static int b;
b=b+1;
while(q<=5)
{
cmddata(0x01);
q++;
}
q=0;
stringdata("YOU VOTE BJP");
delay(500);
cmddata(0x80);
cmddata(0xC0);
stringdata("THANK YOU");
delay(1000);
goto loop;
}
else
{
Page 88

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE


if(s2==0)
{//static int c;
c=c+1;
while(q<=5)
{
cmddata(0x01);
q++;
}
q=0;
stringdata("YOU VOTE CONG");
delay(500);
cmddata(0x80);
cmddata(0xC0);
stringdata("THANK YOU");
delay(1000);
goto loop;
}
}
}
Else
{
stringdata("YOUR ID IS NOT");
cmddata(0x80);
cmddata(0xC1);
stringdata("REGISTERED");
delay(1000);
Page 89

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE


delay(1000);
goto loop;
}
}
}

REFERENCES:
Text Books:
Muhammad Ali Mazidi THE 8051 MICROCONTROLLER AND EMBEDDED
SYSTEMS, Pearson education,
Ayala- INTRODUCTION TO 8051 MICROCONTROLLER

Websites:

www.howstuffworks.com
www.dnatechindia.com
http://students.iitk.ac.in/eclub/projects/2009/Electronic%20Voting%20Machine.pdf
http://www.projectsof8051.com/projects/05-electronic-voting-machine.html
http://www.scribd.com/doc/38586775/Embedded-Electronic-Voting-Machine-System
http://www.scribd.com/doc/36252360/Report-Electronic-voting-machine
http://www.scribd.com/doc/36395992/Flaws-in-Electronic-Voting-Machines-of-India
http://www.scribd.com/doc/36403613/REPORT-on-Electronic-Voting-Machine-Evm

Magazines:

Electronics for you


Electrikindia
Page 90

DEPARTMENT OF ECE

RFID BASED ELECTRONIC VOTING MACHINE

Page 91

DEPARTMENT OF ECE

Potrebbero piacerti anche