Professional Documents
Culture Documents
1.1. INTRODUCTION
Electronics Voting Machine is advanced voting system instead of manual voting. There is
no security arrangement in the manual voting. Voting process used in many purposes like
election, employee etc. Security is a prime concern in our day-to-day life. Everyone wants
to be as much secure as possible in voting. The Microcontroller based Voting Machine
system overcome that problem as well as provide the security for accurate voting. In our
Project we have LCD, power supply, Microcontroller etc. The system is fully controlled by
the 8 bit microcontroller AT89S52 which has an 8Kbytes of ROM for the program memory.
The Microcontroller will continuously monitors all the input users and two switches gives
commands to the controller taking input from the user and declare the result respectively.
LCD is used to display the result.
1. Election Transparency: all the processes of handling and counting ballots to be
completely open to public view. Nothing to be hidden or secret except, of course, each
individual's voting choices.
2. Trust of the voter in the EVM registering the vote : We plan to implement voter
verifiable paper record (VVPR) to which voter can look up instantly and decide on whether
the vote he casted is registered correctly in the system increasing the reliability of the
system.
We have made a module which interfaces with the voter and directs to the procedure of
voting. The Liquid Crystal Display unit provides the voter friendly interface guiding
through the procedure of voting. The keypad is used to enter the details and other actions to
be taken by the voter, which are integrated with the display unit.
We learnt a lot many aspects of design and especially SD card interfacing is the most
interesting part. Also the product can be used for several types of elections not only just the
State or Assembly Elections.
1
1.2. MODULAR DISCRIPTION OF THE PROJECT
Our project is electronic voting machine. It consists of three main units:
Microcontroller(AT89S52)
Liquid crystal display
Power supply
2
1.3. BLOCK DIAGRAM OF PROJECT
3
CHAPTER-2
PROJECT CIRCUIT DIAGRAM
4
CHAPTER-3
DETAILED DISCRIPTION OF PROJECT
5
3.1.2. PIN DIAGRAM OF MICROCONTROLLER
6
3.1.3. Pin Description
Vcc (Pin 40)
Provides voltage to the chip +5V
GND (Pin 20)
Ground
XTAL1 (Pin 19) and XTAL2 (Pin 18)
Crystal oscillator connected to pins 18,19. Two capacitors of 30 pf value. Time for
machine cycle: 11.0592/12=1.085 sec
RST (Pin 9)
RESET Pin
a) Active high: On applying a high pulse to this pin microcontroller will reset and
terminate all activities
b) INPUT pin
c) Minimum to machine cycles required to make RESET
External Access: EA 31
Connected to VCC for on chip ROM
Connected to Ground for external ROM containing the code input pin
Program Store Enable: PSEN 29
Output pin
In case of external ROM with code it is connected to the OE pin of the ROM
Address Latch Enable: ALE 30
Output pin, Active high
In case of external ROM, ALE is used to de multiplex (PORT 0) the address and data
bus by connecting to the G pin of 74LS373 chip
I/O ports pins and their Functions:
Four ports P0, P1,P2,P3 with 8 pins each, making a total of 32 input/output pins
On RESET all ports are configured as output. They need to be programmed to make
them function as inputs
PORT 0
Pins 32-39
Can be used as both input and output
External pull up resistors of 10K need to be connected
Dual role: 8051 multiplexes address and data through port 0 to save pins. AD0-AD7
ALE is used to de multiplex data and address bus
PORT 1
Pins 1 through 8
Both input and output
No dual function
Internal pull up resistors
PORT 2
7
Pins 21 through 28
No pull up resistors required
Both input and output
Dual function: Along with port 0 used to provide the 16-bit address for external
memory. It provides higher address A8-A16
PORT 3
Pins 10 through 17
No external pull up resistors required
9
3.2.1 PIN DESCRIPTION TABLE:
1 VSS Ground
6 E Enable
RS(Register select):
There are two very important registers inside the LCD. The RS pin is used for their
selection. If RS = 0, the instruction/command code register is selected, allowing the user to
send a command such as clear display, cursor at home, etc. If RS = 1 the data register is
selected, allowing the user to send data to be displayed on the LCD.
10
R/W(Read/Write):
R/W input allows the user to write information to the LCD or read information from it.
R/W = 1 when reading; R/W = 0 when writing.
E(Enable):
The enable pin is used by the LCD to latch information presented to its data pins. When
data is supplied to data pins, a high-to-low pulse must be applied to this pin in order for the
LCD to latch in the data present at the data pins. This pulse must be a minimum of 450 ns
wide.
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 letters and numbers, we send ASCII codes for
the letters A - Z, a - z, and numbers 0 - 9 to these pins while making RS = 1.
There are also instruction command codes that can be sent to the LCD to clear the display
or force the cursor to the home position or blink the cursor.
We also use RS = 0 to check the busy flag bit to see if the LCD is ready to receive
information. The busy flag is D7 and can be read when R/W = 1 and RS = 0; if R/W= 1, RS
= 0. When D7 = 1 (busy flag = 1), the LCD is busy taking care of internal operations and
will not accept any new information. When D7 = 0, the LCD is ready to receive new
information. It is recommended to check the busy flag before writing any data to the LCD.
Brief description of operation: Gives out well regulated +5V output, output current
capability of 100 mA
11
Availability of components: Easy to get, uses only very common basic components
Design testing: Based on datasheet example circuit, I have used this circuit
successfully as part of many electronics projects
3.3.2. INTRODUCTION
The +5 volt supply is useful for both analog and digital circuits. DTL, TTL, and CMOS ICs
will all operate nicely from a +5 volt supply. In addition, the +5 volt supply is useful for
circuits that use both analog and digital signals in various ways. More importantly for our
purposes, the +5 volt supply will be used as the primary reference for regulating all of the
other power supplies the we will build. We can do this very easily if we use operational
amplifiers as the controlling elements in the power supply circuits. We'll see how this
works after completing the basic +5 volt supply.
The 1000f capacitor serves as a "reservoir" which maintains a reasonable input voltage to
the 7805 throughout the entire cycle of the ac line voltage. The two rectifier diodes keep
12
recharging the reservoir capacitor on alternate half-cycles of the line voltage, and the
capacitor is quite capable of sustaining any reasonable load in between charging pulses.
The 10f and .01f capacitors serve to help keep the power supply output voltage constant
when load conditions change. The electrolytic capacitor smooths out any long-term or low
frequency variations. However, at high frequencies this capacitor is not very efficient.
Therefore, the .01f is included to bypass high-frequency changes, such as digital IC
switching effects, to ground.
The LED and its series resistor serve as a pilot light to indicate when the power supply is
on. I like to use a miniature LED here, so it will serve that function without being obtrusive
or distracting while I'm performing an experiment. I also use this LED to tell me when the
reservoir capacitor is completely discharged after power is turned off. Then I know it's safe
to remove or install components for the next experiment.
3.4. TRANSFORMER
13
3.4.1 Basic Principal of Transformer:
where,
a is the winding turns ratio, the value of these ratios being respectively higher and
lower than unity for step-down and step-up transformers,
VP designates source impressed voltage,
3.5. Diode:
A diode is a specialized electronic component with two electrodes called the anode and the
cathode. Most diodes are made with semiconductor materials such as silicon, germanium,
or selenium. Some diodes are comprised of metal electrodes in a chamber evacuated or
filled with a pure elemental gas at low pressure. Diodes can be used as rectifiers, signal
limiters, voltage regulators, switches, signal modulators, signal mixers, signal
demodulators, and oscillators.
14
Fig 3.7 Diode
The fundamental property of a diode is its tendency to conduct electric current in only one
direction. When the cathode is negatively charged relative to the anode at a voltage greater
than a certain minimum called forward break over, then current flows through the diode. If
the cathode is positive with respect to the anode, is at the same voltage as the anode, or is
negative by an amount less than the forward break over voltage, then the diode does not
conduct current. This is a simplistic view, but is true for diodes operating as rectifiers,
switches, and limiters. The forward break over voltage is approximately six tenths of a volt
(0.6 V) for silicon devices, 0.3 V for germanium devices, and 1 V for selenium devices.
3.6. Regulator:
7805 is a voltage regulator integrated circuit. It is a member of 78xx series of fixed linear
voltage regulator ICs. The voltage source in a circuit may have fluctuations and would not
give the fixed voltage output.
CHAPTER-4
COMPONENTS
1. Microcontroller (AT89S52) 1
2. Crystal (11.592MHZ) 1
3. PCB 1
4. Capacitor 10f,0.1f,330f 5
5. Resistor 1K, 10 K 2
6. Switches 7
9. Transformer (9v-0v-9v) 1
16
11. Wires 1
12. LED 1
17
4.2. DISCRIPTION OF COMPONENTS
4.2.1. DIODE:
A Diode is a semiconductor device which allows current to flow through it in only one
direction. Although a transistor is a semiconductor device, it does not operate the way a
diode does. A diode is specially made to allow current to flow through it only one direction.
Some ways in which the diode can be used are listed here.
A diode can be used as a rectifier that converts AC(Alternating Current) to DC.
Direct Current for a power supply.
Diodes can be used to separate the signals from radio frequencies.
Diode can be used as an ON/OFF switch that controls current.
When the small voltage is applied to the diode in the forward direction, current flows
easily. Because the diode has a certain amount of resistance, the voltage will drop slightly
as current flows through the diode. A typical diode causes a voltage drop of about 0.6-1
volt(VF).This voltage drop need to be taken into consideration in a circuit which uses many
diodes in series. Also, the amount of current passing through the diode must be considered.
When voltage is applied in the reverse direction through a diode, the diode will have a great
resistance to current flow. Different diodes have different characteristics when reverse
biased. Diode should be selected depending on how it will be used in the circuit. The
current that will flow through a diode biased in the reversed direction will vary from
several mA to just A, which is very small. The limiting voltages and currents permissible
must be considered on a case by case basis.
18
Fig 4.1 LEDs
The most common colors are red and green, but there are even blue ones. The device on the
LED one side is for the green, other side is for red LED. When both are turned on
simultaneously, it becomes orange. When an LED is new out of the package, the polarity of
the device can be determine by looking at the leads. The longer lead is anode side, and the
short one is cathode side. The polarity of an LED can also be determine by using a
resistance meter, or even a 1.5v battery. When using a test meter to determine polarity, set
the meter to a low resistance measurement range. Connect the probes of the meter to LED.
If the polarity is correct, the LED will glow. If the LED does not glow, switch the meter
probes to the opposite leads on the LED. The voltage drop of an LED is comparatively
stable at just about 2v.
4.2.3. RESISTORS
Resistor
The resistors function is to reduce the flow of electric current. There are two classes of
resistor; fixed resistor and variable resistors. They are also classified according to the
material from which they are made. The typical of resistor is made up of either carbon film
or metal film. There are other types as well, but these are the most common. The resistance
value of the resistor is not the only thing to consider when selecting a resistor for use in a
circuit . The tolerance when the electrical power rating of the resistor are also important.
The tolerance of a resistor are also important. the tolerance of a resistor denotes how it is to
the rated resistance value.
Fixed Resistors
A fixed resistor is one in which the value of fixed resistance cannot change.
Variable Resistors
There are two general ways in which variable resistors are used. One is the variable resistor
which value is easily changed, like the volume adjustment of Radio. The other is semi-fixed
resistor that is not meant to be adjusted by anyone but a technician. It is used to adjust the
operating condition of the circuit by the technician. Semi-fixed resistors are used to
compensate for the inaccuracies of the resistors,and to fine-turn a circuit. The rotation angle
of the variable resistor is usually about 300 degrees. Some variable resistors must be turned
many times to use the whole range of resistance they offer. This allows for very precise
19
adjustments of their value. These are called potentiometers or Trimmer Potentiometers.
4.2.4. CAPACITORS
The capacitors function is to store electricity, or electrical energy. The capacitor also
functions as a filter, passing alternating current (AC), and blocking direct current (DC).
This symbol F is used to indicate a capacitor in a circuit diagram. The capacitor is
constructed with two electrode plates facing each other, but separated by as insulator. When
DC voltage applied to the capacitor, an electric charge is stored on each electrode. While
the capacitor is charging up, current flows. The current will stop flowing when the
capacitor has fully charged.
Breakdown voltage
when using a capacitor, we must pay attention to the maximum voltage which can be used.
This is the breakdown voltage. The breakdown voltage depends on the kind of capacitor
being used. We must be especially careful with electrolytic capacitors because the
breakdown voltage is comparatively low. The breakdown of electrolytic capacitors is
displayed as working voltage. The breakdown voltage is the voltage that when exceeded
will cause the dielectric (insulator) inside the capacitor to break down and conduct. When
this happens, the failure can be catastrophic.
20
From the left to right:
1F (50) [ diameter 5 mm, high 12 mm] 47F (16V) [diameter 6 mm, high 5 mm]
100F (25V) [diameter 5 mm, high 11 mm]
220F (25V) [diameter 8 mm, high 12 mm]
1000F(50) [diameter 18 mm, high 40 mm]
The size of the capacitor sometimes depends on the manufacturer. So the sizes shown here
on this page are just examples.
Ceramic Capacitors
Ceramic capacitors are constructed with materials such as titanium acid barium used as the
dielectric. Internally, these capacitors are not constructed as a coil, so they can be used in
high frequency applications.
Variable capacitors
Variable capacitors are used for adjustment etc of frequency mainly. When adjusting the
value of a variable capacitor, it is advisable to be careful.
21
Fig 4.4 Variable capacitors
One of the components leads is connected to the adjustment screw of the capacitor. This
means that the value of capacitor is affected by the capacitance of the screw driver in our
hand. It is better to use a screw driver to adjust these components.
22
CHAPTER-5
ADVANTAGES AND APPLICATIONS
5.1. ADVANTAGES:
Low Cost
Easy to use
Used for voting purposes
Time saving
5.2. DISADVANTAGES:
Security issue is the main drawback of the electronic voting machine. The attacks
might be happened from the webpage, network, to the extent of servers database.
Inequality problem because for those people with low salary might not able to
afford the equipment for electronic voting.
5.3. APPLICATIONS:
It is used for election voting.
It is used for employee voting.
5.5. TROUBLESHOOT
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.
23
24
CHAPTER- 6
CONCLUSION
25
CHAPTER-7
DATA SHEETS
7.1. MICROCONTROLLER:
26
7.2 LCD DISPLAY:
27
28
29
CHAPTER-8
PROGRAM CODE
KEIL PROGRAMING
Open Kiel from the Start menu
The Figure below shows the basic names of the windows referred in this document
30
Select New Project from the Project Menu.
31
The device window will be displayed.
Select the part you will be using to test with. For now we will use the Dallas
Semiconductor part at89s52.
Double Click on the Atmel Semiconductor.
32
Scroll down and select the at89s52 Part
Click OK
33
Click File Menu and select New.
34
Copy the example to the Right into the new window. This file will
toggle Ports 1 and 2 with a delay.
ORG 0H
MOV A, #55H
AGAIN:
MOV P1, A
MOV P2, A
ACALL DELAY
CPL A
SJMP AGAIN
DELAY:
MOV R3, #200
OUTER: MOV R2, #0255
INNER: DJNZ R2, INNER
DJNZ R3, OUTER
RET
END
Click on File menu and select Save
35
Name the file Toggle.a51
Click the Save Button
36
Click on Project and select Targets, Groups, Files
Click on Groups/Add Files tab Under Available Groups select Source Group 1 Click Add
37
Expand the Source Group 1 in the Tree menu to ensure that the file was added to the project
38
Click on Target 1 in Tree menu Click on Project Menu and select Options for Target 1
39
Select Target Tab Change Xtal (Mhz) from 50.0 to 11.0592
40
Select Output Tab Click on Create Hex File check box Click OK Button
41
Click on Project Menu and select Rebuild all Target Files In the Build Window it should
report
0 Errors (s), 0 Warnings You are now ready to Program your Part
42
Comment out line ACALL DELAY by placing a Semicolon at the beginning. This will
allow you to see the port change immediately. Click on the File Menu and select Save
43
Click on Project Menu and select Rebuild all Target Files In the Build Window it should
report 0 Errors (s), 0 Warnings Click on Debug Menu and Select Start/Stop Debug
Session
44
The Keil Debugger should be now be Running.
45
Click on Peripherals. Select I/O Ports, Select Port 1
46
A new window should port will pop up. This represent the Port and
Pins
Step through the code by pressing F11 on the Keyboard. The Parallel Port 1 Box should
47
change as
you completely step through the code.
To exit out, Click on Debug Menu and Select Start/Stop Debug Session
CHAPTER-9
48
BIBLIOGRAPHY AND REFERENCES
www.alldatasheets.com
www.atmel.com
49