Major Project Report
Major Project Report
Major Project Report
CHAPTER 1
INTRODUCTION
Voter identification is required during two phases of the electoral process: first for
voter registration in order to establish the right to vote and afterwards, at voting time, to
allow a citizen to exercise their right to vote by verifying if the person satisfies all the
requirements needed to vote (authentication).
Security is a heart of e-voting process. Therefore the necessity of designing a
secure e-voting system is very important. Usually, mechanisms that ensure the security
and privacy of an election can be time consuming, expensive for election administrators,
and inconvenient for voters. There are different levels of e-voting security. Therefore
serious measures must be taken to keep it out of public domain. Also, security must be
applied to hide votes from publicity. There is no measurement for acceptable security
level, because the level depends on type of the information. An acceptable security level
is always a compromise between usability and strength of security method.
The secured e-voting process can be done by linking the voting machines with the
Aadhaar, an Indian citizen identification data base with a unique identification number for
each citizen. The Aadhaar based EVM will result in secured e-voting process. Because no
two or more voter’s data will match as this system uses biometrics.
Biometrics is the science and technology of measuring and analyzing biological
data. In information technology, biometrics refers to technologies that measure and
analyze human body characteristics, such as DNA, fingerprints, eye retinas and irises,
voice patterns, facial patterns and hand measurements, for authentication purposes. In this
paper we have used thumb impression for the purpose of voter identification or
authentication. As the thumb impression of every individual is unique, it helps in
maximizing the accuracy.
Aadhaar database is created containing the thumb impressions of all the voters in
the constituency. Illegal votes and repetition of votes is checked for in this system. Hence
if this system is employed the elections would be fair and free from rigging.
CHAPTER-2
EMBEDDED SYSTEMS
This chapter introduces the world of embedded systems. Everything that we look
around us today is electronic. The days are gone where almost everything was manual.
Now even the food that we eat is cooked with the assistance of a microchip (oven) and
the ease at which we wash our clothes is due to the washing machine. This world of
electronic items is made up of embedded system. In this chapter we will understand the
basics of embedded system right from its definition.
Since the embedded system is dedicated to specific tasks, design engineers can
optimize it to reduce the size and cost of the product and increase the reliability and
performance. Some embedded systems are mass-produced, benefiting from economies of
scale.
Department of Electronics & Communication Engineering 3
AADHAAR BASED ELECTRONIC VOTING MACHINE
Embedded systems range from portable devices such as digital watches and MP3 players,
to large stationary installations like traffic lights, factory controllers, and largely complex
systems like hybrid vehicles, MRI, and avionics. Complexity varies from low, with a
single microcontroller chip, to very high with multiple units, peripherals and networks
mounted inside a large chassis or enclosure.
Embedded systems range from no user interface at all, in systems dedicated only
to one task, to complex graphical user interfaces that resemble modern computer desktop
operating systems. Simple embedded devices use buttons, LEDs, graphic or
character LCDs(HD44780 LCD for example) with a simple menu system.
In certain applications, where small size or power efficiency are not primary
concerns, the components used may be compatible with those used in general purpose
x86 personal computers. Boards such as the VIA EPIA range help to bridge the gap by
being PC-compatible but highly integrated, physically smaller or have other attributes
making them attractive to embedded engineers. The advantage of this approach is that
low-cost commodity components may be used along with the same software development
tools used for general software development.
Systems built in this way are still regarded as embedded since they are integrated
into larger devices and fulfill a single role. Examples of devices that may adopt this
approach are ATMs and arcade machines, which contain code specific to the application.
However, most ready-made embedded systems boards are not PC-centered and do
not use the ISA or PCI busses. When a System-on-a-chip processor is involved, there may
be little benefit to having a standardized bus connecting discrete components, and the
environment for both hardware and software tools may be very different.
One common design style uses a small system module, perhaps the size of a
business card, holding high density BGA chips such as an ARM-based System-on-a-
chip processor and peripherals, external flash memory for storage, and DRAM for
runtime memory. The module vendor will usually provide boot software and make sure
there is a selection of operating systems, usually including Linux and some real time
choices. These modules can be manufactured in high volume, by organizations familiar
with their specialized testing issues, and combined with much lower volume custom main
boards with application-specific external peripherals.
2.4.4 PERIPHERALS
Embedded Systems talk with the outside world via peripherals, such as:
2.4.5 TOOLS
As the complexity of embedded systems grows, higher level tools and operating
systems are migrating into machinery where it makes sense. For
example, cellphones, personal digital assistants and other consumer computers often need
significant software that is purchased or provided by a person other than the manufacturer
of the electronics. In these systems, an open programming environment such
as Linux, NetBSD, OSGi or Embedded Java is required so that the third-party software
provider can sell to a large market.
2.4.6 DEBUGGING
Interactive resident debugging, using the simple shell provided by the embedded
operating system (e.g. Forth and Basic)
External debugging using logging or serial port output to trace operation using
either a monitor in flash or using a debug server like the Remedy Debugger which
even works for heterogeneous multi core systems.
Unless restricted to external debugging, the programmer can typically load and
run software through the tools, view the code running in the processor, and start or stop
its operation. The view of the code may be as HLL source-code, assembly code or
mixture of both. Because an embedded system is often composed of a wide variety of
elements, the debugging strategy may vary. For instance, debugging a software (and
microprocessor) centric embedded system is different from debugging an embedded
system where most of the processing is performed by peripherals (DSP, FPGA, and co-
processor). An increasing number of embedded systems today use more than one single
processor core. A common problem with multi-core development is the proper
synchronization of software execution. In such a case, the embedded system design may
wish to check the data traffic on the busses between the processor cores, which requires
very low-level debugging, at signal/bus level, with a logic analyzer, for instance.
2.4.8 RELIABILITY
Embedded systems often reside in machines that are expected to run continuously
for years without errors, and in some cases recover by themselves if an error occurs.
Therefore the software is usually developed and tested more carefully than that for
personal computers, and unreliable mechanical moving parts such as disk drives, switches
or buttons are avoided.
Department of Electronics & Communication Engineering 11
AADHAAR BASED ELECTRONIC VOTING MACHINE
The system cannot safely be shut down for repair, or it is too inaccessible to
repair. Examples include space systems, undersea cables, navigational beacons, bore-
hole systems, and automobiles.
The system must be kept running for safety reasons. "Limp modes" are less
tolerable. Often backups are selected by an operator. Examples include aircraft
navigation, reactor control systems, safety-critical chemical factory controls, train
signals.
The system will lose large amounts of money when shut down: Telephone
switches, factory controls, bridge and elevator controls, funds transfer and market
making, automated sales and service.
watchdog timer that resets the computer unless the software periodically notifies
the watchdog
subsystems with redundant spares that can be switched over to
software "limp modes" that provide partial function
Designing with a Trusted Computing Base (TCB) architecture ensures a highly
secure & reliable system environment.
A Hypervisor designed for embedded systems, is able to provide secure
encapsulation for any subsystem component, so that a compromised software
component cannot interfere with other subsystems, or privileged-level system
software. This encapsulation keeps faults from propagating from one subsystem to
another, improving reliability. This may also allow a subsystem to be automatically
shut down and restarted on fault detection.
Immunity Aware Programming.
In this design, the software simply has a loop. The loop calls subroutines, each of
which manages a part of the hardware or software.
These kinds of systems are used if event handlers need low latency, and the event
handlers are short and simple. Usually, these kinds of systems run a simple task in a main
loop also, but this task is not very sensitive to unexpected delays. Sometimes the interrupt
handler will add longer tasks to a queue structure. Later, after the interrupt handler has
finished, these tasks are executed by the main loop. This method brings the system close
to a multitasking kernel with discrete processes.
The advantages and disadvantages are similar to that of the control loop, except
that adding new software is easier, by simply writing a new task, or adding to the queue.
In this type of system, a low-level piece of code switches between tasks or threads
based on a timer (connected to an interrupt). This is the level at which the system is
generally considered to have an "operating system" kernel. Depending on how much
functionality is required, it introduces more or less of the complexities of managing
multiple tasks running conceptually in parallel.
As any code can potentially damage the data of another task (except in larger
systems using an MMU) programs must be carefully designed and tested, and access to
shared data must be controlled by some synchronization strategy, such as message
queues, semaphores or a non-blocking synchronization scheme. Because of these
complexities, it is common for organizations to use a real-time operating system (RTOS),
CHAPTER 3
LITERATURE SURVEY
There are many types of problems with EVM which is currently in use they are:
1. Accuracy: It is not possible for a vote to be altered e laminated the invalid vote
cannot be counted from the finally tally.
2. Democracy: It permits only eligible voters to vote and, it ensures that eligible
voters vote only once.
Department of Electronics & Communication Engineering 15
AADHAAR BASED ELECTRONIC VOTING MACHINE
3. Security Problems - One can change the program installed in the EVM and tamper
the results after the polling. By replacing a small part of the machine with a look-
alike component that can be silently instructed to steal a percentage of the votes in
favor of a chosen candidate. These instructions can be sent wirelessly from a
mobile phone.
4. Illegal Voting (Rigging) - The very commonly known problem Rigging which is
faced in every electoral procedure. One candidate casts the votes of all the
members or few amounts of members in the electoral list illegally. This results in
the loss of votes for the other candidates participating and also increases the
number votes to the candidate who performs this action. This can be done
externally at the time of voting.
5. Privacy: Neither authority nor anyone else can link any ballot to the voter
6. Verifiability: Independently verification of that all votes have been counted
correctly.
7. Resistance: No electoral entity (any server participating in the e lection) or group
of entities, running the election can work in a conspiracy to introduce votes or to
prevent voters from voting.
8. Availability: The system works properly as long as the poll stands and any voter
can have access to it from the beginning to the end of the poll.
9. Resume Ability: The system allows any voter to interrupt the voting process to
resume it or restart it while the poll stands. The existing elections were done in
traditional way, using ballot, ink and tallying the votes later. But the proposed
system prevents the election from being accurate.
In this method, the details of the voter will get from the AADHAR card database.
It was a newly developed database which is having all the information about the people.
By using this database we took the voter’s information will be stored in the Personal
Computer. At the time of e lections, for finger print accessing we use finger sensing
module.
Fingerprint recognition or fingerprint authentication refers to the automated
method of verifying a match between two human fingerprints. Fingerprints are one of
Department of Electronics & Communication Engineering 16
AADHAAR BASED ELECTRONIC VOTING MACHINE
many forms of biometrics used to identify individuals and verify their identity. A
fingerprint looks at the patterns found on a fingertip. There are a variety of approaches to
fingerprint verification. Some e mu late the traditional police method of matching pattern;
others use straight minutiae matching devices and still others are a bit more unique,
including things like moiré fringe patterns and ultrasonic. A greater variety of fingerprint
devices are available than for any other biometric.
Fingerprint verification may be a good choice for in e-voting systems, where you
can give users adequate explanation and training, and where the system operates in a
controlled environment. It is not surprising that the work-station access application area
see ms to be based almost exclusively on finger prints, due to the relatively low cost,
small size, and ease of integration of fingerprint authentication devices Capture the finger
vein image and compare or match to database, capture finger vein and database finger
vein matched means this person will be valid for polling section and if condition is
satisfied automatically, E-voting machine buttons will be activate otherwise deactivate
buttons After the E-voting machine buttons are activated, the voter cast his/her vote. After
completion of his/her voting process, a “voting process completed” message will be
displayed on the screen. The number of votes is counted by the E-Voting machine and the
information will be sent to the Server through the web technology.
The main goal of a secure e-voting is to ensure the privacy of the voters and of the
votes. A secure e-voting system are satisfies the following requirements,
CHAPTER 3
DESIGN AND IMPLEMENTATION
The design of Aadhaar based EVM consisting of the following components
connected together as shown in figure. They are
1. Power Supply
2. Arduino Uno
3. Keypad
4. I2C
5. Liquid Crystal Display
6. Security Alarm (Buzzer)
7. Switches
8. Finger print module
9. Raspberry Pi
The above components can be explained in detail as given below
1. Power Supply
The input power supply applied to the circuit is from the regulated power supply
which supplies constant 5V to the microcontroller. The A.C input of 230V from the mains
supply is fed to the step down transformer to step down the voltage to 12V which is
supplied as input to the rectifier. The output obtained from the rectifier is a pulsating D.C
voltage. Now in order to obtain pure D.C voltage, the output voltage from the rectifier is
fed to a filter to remove any A.C components present even after rectification. This voltage
is given to a voltage regulator (7805) to obtain a pure constant 5V dc voltage. The block
diagram of regulated power supply is shown in the figure 4.1
2. Arduino Uno
The Arduino Uno is a microcontroller board based on the ATmega328. It has 14
digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a
16 MHz ceramic resonator, a USB connection, a power jack, an ICSP header, and a reset
button. It contains everything needed to support the microcontroller; simply connect it to
a computer with a USB cable or power it with a AC-to-DC adapter or battery to get
started.
The microcontroller is used for controlling purpose and is connected to the controlling
unit. The ATMEGA328p is used in the Arduino Uno because of the following features
like
All other equipment’s (like fingerprint scanner, LED glow, switches, LCD etc.)
function is controlled by the programming the microcontroller. The fingerprint
verification of the voters with the already stored data in its database is done inside the
microcontroller. Pin mapping of ATmega328 and Arduino is shown in the figure 4.2
"Uno" means one in Italian and is named to mark the upcoming release of Arduino
1.0. The Uno and version 1.0 will be the reference versions of Arduino, moving forward.
The Uno is the latest in a series of USB Arduino boards, and the reference model for the
Arduino platform; for a comparison with previous versions, see the index of Arduino
boards.
Summary of arduino:
Microcontroller ATmega328
Operating Voltage 5V
Input Voltage
7-12V
(recommended)
Input Voltage (limits) 6-20V
Digital I/O Pins 14 (of which 6 provide PWM output)
Analog Input Pins 6
DC Current per I/O Pin 40 Ma
DC Current for 3.3V Pin 50 Ma
32 KB (ATmega328) of which 0.5 KB used by
Flash Memory
bootloader
SRAM 2 KB (ATmega328)
EEPROM 1 KB (ATmega328)
25 g
Weight
Power:
The Arduino Uno can be powered via the USB connection or with an external power
supply. The power source is selected automatically.
External (non-USB) power can come either from an AC-to-DC adapter (wall-wart) or
battery. The adapter can be connected by plugging a 2.1mm center-positive plug into the
board's power jack. Leads from a battery can be inserted in the Gnd and Vin pin headers
of the POWER connector.
The board can operate on an external supply of 6 to 20 volts. If supplied with less than
7V, however, the 5V pin may supply less than five volts and the board may be unstable. If
using more than 12V, the voltage regulator may overheat and damage the board. The
recommended range is 7 to 12 volts.
VIN. The input voltage to the Arduino board when it's using an external power
source (as opposed to 5 volts from the USB connection or other regulated power source).
You can supply voltage through this pin, or, if supplying voltage via the power jack,
access it through this pin.
5V.This pin outputs a regulated 5V from the regulator on the board. The board can
be supplied with power either from the DC power jack (7 - 12V), the USB connector
(5V), or the VIN pin of the board (7-12V). Supplying voltage via the 5V or 3.3V pins
bypasses the regulator, and can damage your board. We don't advise it.
3V3. A 3.3 volt supply generated by the on-board regulator. Maximum current
draw is 50 mA.
GND. Ground pins.
IOREF. This pin on the Arduino board provides the voltage reference with which
the microcontroller operates. A properly configured shield can read the IOREF pin
voltage and select the appropriate power source or enable voltage translators on the
outputs for working with the 5V or 3.3V.
Memory
Input and Output:Each of the 14 digital pins on the Uno can be used as an input or output,
using pin Mode(), digital Write(), and digitalRead() functions. They operate at 5 volts.
Each pin can provide or receive a maximum of 40 mA and has an internal pull-up resistor
(disconnected by default) of 20-50 k Ohms. In addition, some pins have specialized
functions:
Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial
data. These pins are connected to the corresponding pins of the ATmega8U2 USB-to-
TTL Serial chip.
External Interrupts: 2 and 3. These pins can be configured to trigger an interrupt
on a low value, a rising or falling edge, or a change in value. See the attach
Interrupt() function for details.
PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analog
Write() function.
SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI
communication using the SPI library.
LED: 13. There is a built-in LED connected to digital pin 13. When the pin is
HIGH value, the LED is on, when the pin is LOW, it's off.
The Uno has 6 analog inputs, labeled A0 through A5, each of which provide 10 bits of
resolution (i.e. 1024 different values). By default they measure from ground to 5 volts,
though is it possible to change the upper end of their range using the AREF pin and
the analog Reference() function. Additionally, some pins have specialized functionality:
See also the mapping between Arduino pins and ATmega328 ports. The mapping for the
Atmega8, 168, and 328 is identical.
Communication:
The Arduino Uno has a number of facilities for communicating with a computer, another
Arduino, or other microcontrollers. The ATmega328 provides UART TTL (5V) serial
communication, which is available on digital pins 0 (RX) and 1 (TX).
An ATmega16U2 on the board channels this serial communication over USB and appears
as a virtual com port to software on the computer. The '16U2 firmware uses the standard
USB COM drivers, and no external driver is needed. However, on Windows, a .inf file is
required. The Arduino software includes a serial monitor which allows simple textual
data to be sent to and from the Arduino board. The RX and TX LEDs on the board will
flash when data is being transmitted via the USB-to-serial chip and USB connection to
the computer (but not for serial communication on pins 0 and 1). A Software Serial
library allows for serial communication on any of the Uno's digital pins.
Programming
The Arduino Uno can be programmed with the Arduino software (download). Select
"Arduino Uno from the Tools > Board menu (according to the microcontroller on your
board). For details, see the reference and tutorials.
The ATmega328 on the Arduino Uno comes preburned with a bootloader that allows you
to upload new code to it without the use of an external hardware programmer. It
communicates using the original STK500 protocol (reference, C header files).
You can also bypass the bootloader and program the microcontroller through the ICSP
(In-Circuit Serial Programming) header using Arduino ISP or similar; see these
instructions for details.
The ATmega16U2 (or 8U2 in the rev1 and rev2 boards) firmware source code is available
. The ATmega16U2/8U2 is loaded with a DFU bootloader, which can be activated by:
On Rev1 boards: connecting the solder jumper on the back of the board (near the
map of Italy) and then resetting the 8U2.
On Rev2 or later boards: there is a resistor that pulling the 8U2/16U2 HWB line to
ground, making it easier to put into DFU mode.
Rather than requiring a physical press of the reset button before an upload, the Arduino
Uno is designed in a way that allows it to be reset by software running on a connected
computer. One of the hardware flow control lines (DTR) of theATmega8U2/16U2 is
connected to the reset line of the ATmega328 via a 100 nano farad capacitor. When this
line is asserted (taken low), the reset line drops long enough to reset the chip. The
Arduino software uses this capability to allow you to upload code by simply pressing the
upload button in the Arduino environment. This means that the bootloader can have a
shorter timeout, as the lowering of DTR can be well-coordinated with the start of the
upload.
This setup has other implications. When the Uno is connected to either a computer
running Mac OS X or Linux, it resets each time a connection is made to it from software
(via USB). For the following half-second or so, the bootloader is running on the Uno.
While it is programmed to ignore malformed data (i.e. anything besides an upload of new
code), it will intercept the first few bytes of data sent to the board after a connection is
opened. If a sketch running on the board receives one-time configuration or other data
when it first starts, make sure that the software with which it communicates waits a
second after opening the connection and before sending this data.
The Uno contains a trace that can be cut to disable the auto-reset. The pads on either side
of the trace can be soldered together to re-enable it. It's labeled "RESET-EN". You may
also be able to disable the auto-reset by connecting a 110 ohm resistor from 5V to the
reset line; see this forum thread for details.
USB Over current Protection: The Arduino Uno has a resettable poly fuse that protects
your computer's USB ports from shorts and over current. Although most computers
provide their own internal protection, the fuse provides an extra layer of protection. If
more than 500 mA is applied to the USB port, the fuse will automatically break the
connection until the short or overload is removed.
Physical Characteristics
The maximum length and width of the Uno PCB are 2.7 and 2.1 inches respectively, with
the USB connector and power jack extending beyond the former dimension. Four screw
holes allow the board to be attached to a surface or case. Note that the distance between
digital pins 7 and 8 is 160 mil (0.16"), not an even multiple of the 100 mil spacing of the
other pins.
3. Keypad
In this project we use membrane switch, which is an electrical switch for turning a
circuit on and off. It differs from a mechanical switch, which is usually made of copper
and plastic parts: a membrane switch is a circuit printed on PET or ITO. The ink used for
screen printing is usually copper / silver /graphite filled and therefore conductive.
Membrane switches are user-equipment interface utilities that allow for the
communication of commands from users to electronic devices. Membrane switches can
be thought of as one category of interface utilities alongside touch screens, plastic
keyboards, toggle switches and many other kinds of control systems. Interface utilities
can be as simple as tactile switches for controlling lighting, and they can be as
complicated as membrane keyboards and switch panels for use with computers.
As can be seen from the diagram below, the membrane keyboard basically consists of
three layers; two of these are membrane layers containing conductive traces. The center
layer is a "spacer" containing holes wherever a "key" exists. It keeps the other two layers
apart.
The thickness of the bottom three layers has been exaggerated for clarity; in
reality, they are not much thicker than pieces of paper or thin cardstock.
Under normal conditions, the switch (key) is open, because current cannot cross the non-
conductive gap between the traces on the bottom layer. However, when the top layer is
pressed down (with a finger), it makes contact with the bottom layer. The conductive
traces on the underside of the top layer can then bridge the gap, allowing current to flow.
The switch is now "closed", and the parent device registers a key-press.
4. I2C Controller
Since October 10, 2006, no licensing fees are required to implement the I²C protocol.
However, fees are still required to obtain I²C slave addresses allocated by NXP.
SM Bus, defined by Intel in 1995, is a subset of I²C that defines the protocols more
strictly. One purpose of SM Bus is to promote robustness and interoperability.
Accordingly, modern I²C systems incorporate policies and rules from SM Bus, sometimes
supporting both I²C and SM Bus, requiring only minimal reconfiguration.
Design:
I²C uses only two bidirectional open-drain lines, Serial Data Line (SDA) and Serial Clock
Line (SCL), pulled up with resistors. Typical voltages used are +5 V or +3.3 V although
systems with other voltages are permitted.
Note the bit rates are quoted for the transactions between master and slave without clock
stretching or other hardware overhead. Protocol overheads include a slave address and
perhaps a register address within the slave device as well as per-byte ACK/NACK bits.
Thus the actual transfer rate of user data is lower than those peak bit rates alone would
imply. For example, if each interaction with a slave inefficiently allows only 1 byte of
data to be transferred, the data rate will be less than half the peak bit rate.
The maximum number of nodes is limited by the address space, and also by the total
bus capacitance of 400 pF, which restricts practical communication distances to a few
meters.
I²C defines basic types of messages, each of which begins with a START and ends
with a STOP:
In a combined message, each read or write begins with a START and the slave address.
After the first START in a combined message these are also called repeated START bits.
Repeated START bits are not preceded by STOP bits, which is how slaves know the next
transfer is part of the same message.
Any given slave will only respond to certain messages, as specified in its product
documentation.
Pure I²C systems support arbitrary message structures. SM Bus is restricted to nine of
those structures, such as read word N and writes word N, involving a single slave. PM
Bus extends SM Bus with a Group protocol, allowing multiple such SM Bus transactions
to be sent in one combined message. The terminating STOP indicates when those grouped
actions should take effect. For example, one PM Bus operation might reconfigure three
power supplies (using three different I2C slave addresses), and their new configurations
would take effect at the same time: when they receive that STOP.
With only a few exceptions, neither I²C nor SM Bus define message semantics, such as
the meaning of data bytes in messages. Message semantics are otherwise product-
specific. Those exceptions include messages addressed to the I²C general call address
(0x00) or to the SM Bus Alert Response Address; and messages involved in the SM Bus
Address Resolution Protocol (ARP) for dynamic address allocation and management.
In practice, most slaves adopt request/response control models, where one or more bytes
following a write command are treated as a command or address. Those bytes determine
how subsequent written bytes are treated and/or how the slave responds on subsequent
reads. Most SM Bus operations involve single byte commands.
Timing diagram
1. Data Transfer is initiated with a START bit (S) signaled by SDA being pulled low
while SCL stays high.
2. SDA sets the 1st data bit level while keeping SCL low (during blue bar time.)
3. The data is sampled (received) when SCL rises (green) for the first bit (B1).
4. This process repeats, SDA transitioning while SCL is low, and the data being read
while SCL is high (B2, Bn).
5. A STOP bit (P) is signaled when SDA is pulled high while SCL is high.
In order to avoid false marker detection, SDA is changed on the SCL falling edge and is
sampled and captured on the rising edge of SCL.
I²C is appropriate for peripherals where simplicity and low manufacturing cost are more
important than speed. Common applications of the I²C bus are:
Changing contrast, hue, and color balance settings in monitors (Display Data
Channel).
Changing sound volume in intelligent speakers.
Controlling OLED/LCD displays, like in a cell phone.
Reading hardware monitors and diagnostic sensors, like a CPU thermistor fan
speed.
Reading real-time clocks.
Turning on and turning off the power supply of system components.
5. LCD
An LCD or a liquid crystal display consists of liquid crystals between electrodes.
The arrangement consists of polarization filters which are aligned perpendicular to each
other. This arrangement doesn’t allow any visible light if there was no liquid crystal
between the filters. This arrangement is aligned in between transparent conductors.
When sufficient voltage is applied to a certain pixel, the crystal at that pixel aligns
such that no light passes through it. Therefore that particular pixel appears dark. if such
an electric field is applied for a longer period, the alignment of the crystal change, and
the quality of LCD degrades. In a bigger LCD display, to provide voltage sources to
each pixel, the rows and column lines are multiplexed.
The command register stores the command instructions given to the LCD. A
command is an instruction given to LCD to do a predefined task like initializing it,
clearing its screen, setting the cursor position, controlling display etc. The data register
stores the data to be displayed on the LCD. The data is the ASCII value of the character
to be displayed on the LCD
Microcontroller
P
O
R
T
P
I
N
S
The LCD is generally interfaced in 8-bit mode or 4-bit mode. In this project LCD is
connected in 4-bit mode the interface connections of LCD with microcontroller are as
follows
In 8-bit mode, the complete ASCII code is sent at once along with the control
signals. But in 4-bit mode, the data is divided into two parts, i.e. Msb&Lsb, and are called
upper nibble & lower nibble.
The control signals are RS, R/W & E. RS is used to select the internal registers i.e.
data register & command register. R/W is used to set the mode of LCD to read mode or
write mode. e is used as chip select and is used to push the data internally to the
corresponding registers.
To transfer the data/command in 8-bit mode, the data is written to the 8-bit data bus
after selecting the required register and setting the mode to write mode. The e signal pin
is then given a high to low signal to transfer the data.
To transfer the data/command in 4-bit mode, the higher nibble is first written to the
MSB of the data port and the e is given a high to low signal. After a little delay or when
the LCD is not busy, the lower nibble is transferred in the same procedure.
16×2 LCD module has a set of preset command instructions. Each command will
make the module to do a particular task. The commonly used commands and their
function are given in the table below.
LCD commands
8.
The Foundation provides Debian and Arch Linux ARM distributions for
download. Tools are available for Python as the main programming language, with
support for BBC BASIC (via the RISC OS image or the Brandy Basic clone for Linux),
C, Java and Perl.
The idea behind a tiny and affordable computer for kids came in 2006, when Eben
Upton, Rob Mullins, Jack Lang and Alan Mycroft, based at the University of
Cambridge’s Computer Laboratory, became concerned about the year-on-year decline in
the numbers and skills levels of the A Level students applying to read Computer Science.
From a situation in the 1990s where most of the kids applying were coming to interview
as experienced hobbyist programmers, the landscape in the 2000s was very different; a
typical applicant might only have done a little web design. Something had changed the
way kids were interacting with computers. A number of problems were identified:
majority of curriculums with lessons on using Word and Excel, or writing webpages; the
end of the dot-com boom; and the rise of the home PC and games console to replace the
Amigas, BBC Micros, Spectrum ZX and Commodore 64 machines that people of an
earlier generation learned to program on.
There isn’t much any small group of people can do to address problems like an
inadequate school curriculum or the end of a financial bubble. But those students felt that
they could try to do something about the situation where computers had become so
expensive and arcane that programming experimentation on them had to be forbidden by
parents; and to find a platform that, like those old home computers, could boot into a
programming environment. Thus came the idea of creating the device which kids could
buy and learn programming or hardware on – The Raspberry Pi.
From 2006 to 2008 they created many designs and prototypes of what we now
know as the Raspberry Pi. One of the earliest prototypes is shown below:
Hardware Layout:
GPIO pins have no special purpose defined, and go unused by default. The idea is
that sometimes the system designer building a full system that uses the chip might find it
useful to have a handful of additional digital control lines, and having these available
from the chip can save the hassle of having to arrange additional circuitry to provide
them.
5) DSI Connector
The Display Serial Interface (DSI) is a specification by the Mobile Industry
Processor Interface (MIPI) Alliance aimed at reducing the cost of display
controllers in a mobile device. It is commonly targeted at LCD and similar display
technologies. It defines a serial bus and a communication protocol between the
host (source of the image data) and the device (destination of the image data). A
DSI compatible LCD screen can be connected through the DSI connector,
although it may require additional drivers to drive the display.
6) RCA Video
RCA Video outputs (PAL and NTSC) are available on all models of Raspberry Pi.
Any television or screen with a RCA jack can be connected with the RPi.
7) Audio Jack
A standard 3.5 mm TRS connector is available on the RPi for stereo audio output.
Any headphone or 3.5mm audio cable can be connected directly. Although this
jack cannot be used for taking audio input, USB mics or USB sound cards can be
used.
8) Status LEDs
There are 5 status LEDs on the RPi that show the status of various activities as
follows:
“OK” - SDCard Access (via GPIO16) - labelled as "OK" on Model B
Rev1.0 boards and "ACT" on Model B Rev2.0 and Model A boards
“POWER” - 3.3 V Power - labelled as "PWR" on all boards
“FDX” - Full Duplex (LAN) (Model B) - labelled as "FDX" on all boards
“LNK” - Link/Activity (LAN) (Model B) - labelled as "LNK" on all
boards
“10M/100” - 10/100Mbit (LAN) (Model B) - labelled (incorrectly) as
"10M" on Model B Rev1.0 boards and "100" on Model B Rev2.0 and
Model A boards
SoC: Broadcom BCM2835 (CPU, GPU, DSP, SDRAM, and single USB
port)
USB 2.0 ports: 1 (direct from 2 (via the on-board 4 (via the on-board 5-
BCM2835 chip) 3-port USB hub) port USB hub)
Video input: 15-pin MIPI camera interface (CSI) connector, used with the
Raspberry Pi Camera Addon.
Video outputs: Composite RCA (PAL and NTSC) –in model B+ via 4-pole 3.5 mm
jack, HDMI (rev 1.3 & 1.4), raw LCD Panels via DS
Audio outputs: 3.5 mm jack, HDMI, and, as of revision 2 boards, I²S audio (also
potentially for audio input)
Onboard SD / MMC / SDIO card slot (3.3 V card MicroSD
storage: power support only)
Onboard None 10/100 Mbit/s Ethernet (8P8C) USB adapter
network: on the third/fifth port of the USB hub
Low-level 8× GPIO, UART, I²C bus, SPI bus with 17× GPIO
peripherals: two chip selects, I²S audio +3.3 V, +5 V,
ground
Power ratings: 300 mA (1.5 W) 700 mA (3.5 W) 600 mA (3.0 W)
Power source: 5 V via MicroUSB or GPIO header
Size: 85.60 mm × 56 mm (3.370 in × 2.205 in) – not including protruding
connectors
Weight: 45 g (1.6 oz)
Table 1 Specifications
Since smartphones and tablets are basically smaller computers, they require pretty
much the same components we see in desktops and laptops in order to offer us all the
amazing things they can do (apps, music and video playing, 3D gaming support,
advanced wireless features, etc).
But smartphones and tablets do not offer the same amount of internal space as
desktops and laptops for the various components needed such as the logic board, the
processor, the RAM, the graphics card, and others. That means these internal parts need
to be as small as possible, so that device manufacturers can use the remaining space to fit
the device with a long-lasting battery life.
Accessories
Raspberry Pi being a very cheap computer has attracted millions of users around
the world. Thus it has a large user base. Many enthusiasts have created accessories and
peripherals for the Raspberry Pi. This range from USB hubs, motor controllers to
temperature sensors. There are some official accessories for the Raspberry Pi as follows:
Camera – On 14 May 2013, the foundation and the distributors RS Components &
Premier Farnell/Element 14 launched the Raspberry Pi camera board with a firmware
update to support it. The Raspberry Pi camera board contains a 5 MPixel sensor, and
connects via a ribbon cable to the CSI connector on the Raspberry Pi. In Raspbian support
can be enabled by the installing or upgrading to the latest version of the OS and then
running Raspi-config and selecting the camera option. The cost of the camera module is
20 EUR in Europe (9 September 2013). and supports 1080p, 720p, 640x480p video. The
footprint dimensions are 25 mm x 20 mm x 9 mm.
USB Hub – Although not an official accessory, it is a highly recommended accessory for
the Pi. A powered USB Hub with 7 extra ports is available at almost all online stores. It is
compulsory to use a USB Hub to connect external hard disks or other accessories that
draw power from the USB ports, as the Pi cannot give power to them.
Software
Operating System
Archlinux ARM
OpenELEC
Pidora (Fedora Remix)
Raspbmc and the XBMC open source digital media center
RISC OS – The operating system of the first ARM-based computer
Boot Process
The Raspberry Pi does not boot as a traditional computer. The VideoCore i.e. the
Graphics processor actually boots before the ARM CPU.
When the power is turned on, the first bits of code to run is stored in a ROM chip
in the SoC and is built into the Pi during manufacture. This is the called the first-
stage bootloader.
The SoC is hardwired to run this code on startup on a small RISC Core (Reduced
Instruction Set Computer). It is used to mount the FAT32 boot partition in the SD
Card so that the second-stage bootloader can be accessed. So what is this ‘second-
stage bootloader’ stored in the SD Card? It’s ‘bootcode.bin’. This file can be seen
while mount process of an operating system on the SD Card in windows.
Now here’s something tricky. The first-stage bootloader has not yet initialized the
ARM CPU (meaning CPU is in reset) or the RAM. So, the second-stage
bootloader also has to run on the GPU. The bootloader.bin file is loaded into the
128K 4 way set associative L2 cache of the GPU and then executed. This enables
the RAM and loads start.elf which is also in the SD Card. This is the third-stage
bootloader and is also the most important. It is the firmware for the GPU, meaning
it contains the settings or in our case, has instructions to load the settings from
config.txt which is also in the SD Card. We can think of the config.txt as the
‘BIOS settings’.
The start.elf also splits the RAM between the GPU and the ARM CPU. The ARM
only has access the to the address space left over by the GPU address space. For
example, if the GPU was allocated addresses from 0x000F000 – 0x0000FFFF, the
ARM has access to addresses from 0x00000000 – 0x0000EFFF.
The physical addresses perceived by the ARM core is actually mapped to another
address in the VideoCore (0xC0000000 and beyond) by the MMU (Memory
Management Unit) of the Video Core.
The config.txt is loaded after the split is done so the splitting amounts cannot be
specified in the config.txt. However, different .elf files having different splits exist
in the SD Card. So, depending on the requirement, the file can be renamed to
start.elf and boot the Pi. In the Pi, the GPU is King!
Other than loading config.txt and splitting RAM, the start.elf also loads
cmdline.txt if it exists. It contains the command line parameters for whatever
kernel that is to be loaded. This brings us to the final stage of the boot process.
The start.elf finally loads kernel.img which is the binary file containing the OS
kernel and releases the reset on the CPU. The ARM CPU then executes whatever
instructions in the kernel.img thereby loading the operating system.
After starting the operating system, the GPU code is not unloaded. In fact, start.elf
is not just firmware for the GPU, It is a proprietary operating system called
VideoCore OS (VCOS). When the normal OS (Linux) requires an element not
directly accessible to it, Linux communicates with VCOS using the mailbox
messaging system.
Power On
Mount bootcode.bin from FAT32 boot partition from SD Card to L2 cache of GPU.
The Raspberry Pi package only comes with the main board and nothing else. It
does not come shipped with an operating system. Operating systems are loaded on a SD
card from a computer and then the SD card is inserted in the Pi which becomes the
primary boot device.
Installing operating system can be easy for some enthusiasts, but for some
beginners working with image files of operating systems can be difficult. So the
Raspberry Pi foundation made a software called NOOBS – New Out Of Box Software
which eases the process of installing an operating system on the Pi.
The NOOBS installer can be downloaded from the official website. A user only
needs to connect a SD card with the computer and just run the setup file to install
NOOBS on the SD card. Next, insert the card on the Raspberry Pi. On booting the first
time, the NOOBS interface is loaded and the user can select from a list of operating
systems to install. It is much convenient to install the operating system this way. Also
once the operating system is installed on the card with the NOOBS installer, every time
the Pi boots, a recovery mode provided by the NOOBS can be accessed by holding the
shift key during boot. It also allows editing of the config.txt file for the operating system.
Packages)
PiMAME Linux
PiBox Linux/Buildroot
pipaOS Raspbian ~32 MiB 37.500
Raspberry WebKiosk Raspbian
Volumio Raspbian
Nard SDK Embedded Linux ~40 MB
Software Programming
When the Raspberry is connected with modem, modem will assign the IP address
to the Raspberry Pi, that IP we will give in Host name in Putty configuration. The
connection type is in SSH mode. The SSH or Secure Shell is a cryptographic network
protocol for initiating text-based shell sessions on remote machines in a secure way.
After setting connection type, we are click on open. Then the window will appear like
below
We can login into Raspberry Pi using username and password. After entering the
username and password the window will appear like below.
LS:
Lists the content of the current directory (or one that is specified). Can be used with
the -l flag to display additional information (permissions, owner, group, size, date and
timestamp of last edit) about each file and directory in a list format. The -a flag allows
CD:
Changes the current directory to the one specified. Can use relative (i.e. cd directoryA )
PWD:
Displays the name of the current working directory, i.e. pwd will output something
like /home/pi.
MKDIR:
Makes a new directory, e.g. mkdir newDir would create the directory newDir in the
present working directory.
RMDIR:
Remove empty directories, e.g. rmdir oldDir will remove the directory oldDir only if it
is empty.
RM:
Removes the specified file (or recursively from a directory when used with -r ). Be
careful with this! Files deleted in this way are mostly gone for good!
CP:
Makes a copy of a file and places it at the specified location (essentially doing a 'copy-
paste'), for example - cp ~/fileA /home/otherUser/ would copy the file fileA from your
home directory to that of the user otherUser (assuming you have permission to copy it
there!). This command can either take FILE FILE ( cp fileA fileB ), FILE DIR ( cp
fileA /directoryB/ ) or -r DIR DIR (which recursively copies the contents of directories)
as arguments.
Department of Electronics & Communication Engineering 54
AADHAAR BASED ELECTRONIC VOTING MACHINE
MV:
Moves a file and places it at the specified location (so where cp performs a 'copy-
/home/otherUser/ would move the file fileA from your home directory to that of the
user otherUser. This command can either take FILE FILE ( mv fileA fileB ), FILE
TOUCH:
Either sets the last modified time-stamp of the specified file(s) or creates it if it does not
already exist.
CAT:
Lists the contents of file(s), e.g. cat thisFile will display the contents of thisFile . Can
be used to list the contents of multiple files, i.e. cat *.txt will list the contents of
HEAD:
Displays the beginning of a file. Can be used with -n to specify the number of lines to
show (by default 10), or with -c to specify the number of bytes.
TAIL:
Displays the end of a file. The starting point in the file can be specified either through -
b for 512 byte blocks, -c for bytes, or -n for number of lines.
SSH:
Secure shell. Connect to another computer using an encrypted network connection. For
more details see SSH (secure shell)
SCP:
Copies a file from one computer to another using ssh. For more details see SCP
SUDO:
Run a command as a superuser, or another user. Use sudo -s for a superuser shell. For
more details see Root user / sudo
DD:
Copies a file converting the file as specified. It is often used to copy an entire disk to a
single file or back again eg. dd if=/dev/sdd of=backup.img will create a backup image
from an SD card or USB disk drive at /dev/sdd. Make sure to use the correct drive when
copying an image to the SD card as it can overwrite the entire disk.
DF:
Display the disk space available and used on the mounted filesystems. Use df -h to see
the output in a human readable format using M for MBs rather than showing number of
bytes.
UNZIP:
TAR:
Store or extract files from a tape archive file. It can also reduce the space required by
compressing the file similar to a zip file.
To create a compressed file use tar -cvzf *filename.tar.gz* *directory/* To extract the
contents of a file use tar -xvzf *filename.tar.gz*
PIPES:
A pipe allows the output from one command to be used as the input for another
command. The pipe symbol is a vertical line | . For example to only show the first 10
entries of the ls command it can be piped through the head command ls | head
TREE:
Show a directory and all subdirectories and files indented as a tree structure.
Run a command in the background freeing up the shell for future commands.
WGET:
Download a file from the web directly to the computer e.g. wget
http://www.raspberrypi.org/documentation/linux/usage/commands.md will download
this file to your computer as commands.md
CURL:
Download or upload a file to/from a server. By default it will output the file contents of
the file to the screen.
MAN:
Show the manual page for a file. To find out more run man man to view the manual
page of the man command.
GREP:
Search inside files for certain search patterns e.g. grep "search" *.txt will look in all the
files in the current directory ending with .txt for the string search.
AWK:
FIND:
WHEREIS:
Finds the location or a command. Looks through standard program locations until it finds
the requested command.
CHAPTER 3
SYSTEM OPERATION
In earlier days the election process is in such a way that there will a ballot box and a
paper with all the political parties list. While voting the voter needs to put a stamp over
the party symbol of his/her desired candidate in a particular consistency. This is a long
time consuming process and very much prone to errors. Also the chances for rigging were
more in this traditional method. To overcome all these ballot papers, stamps, boxes etc.,
we are going for Aadhaar based EVM. So that, we overcome time consumption, Rigging,
insecurities etc.,
Here in Aadhaar based EVM, we are using the data based server for Aadhaar
details, Raspberry-pi for the web technology and arduino is used for interfacing
Raspberry-pi. The voter is allowed into election booth with Aadhaar card ID. Here the
voter first gives his Aadhaar card for QR reading/Keypad operator. The voter is allowed
into the ballot box room after the QR reading/UID authentication is done successfully by
the operator. After Authentication the LCD in EVM displays as “welcome voter”. The
voter needs to scan his thumb using the biometric and only if the thumb information that
is scanned is matched with the pre-loaded server data the voter will allow to cast the vote.
Otherwise the Authentication will fail and voter will not be able to cast the vote. Once the
voter is authenticated the switches of parties will enable and also the information of voter
will be shown on display of EVM. After casting the vote the switches will be disabled
until next voter is authenticated and EVM shows a message as “thank you for voting”. At
the same time the printer connected to EVM will print the casted vote information along
with a message “Please drop the token into ballot box”. The token is also useful to verify
the vote casted by the voter. And finally the voter will check the token and drop it into the
ballot box. The total information of casted votes is sent to the server using web
technology so that the results can be declared among all the consistencies.
- To avoid Rigging
- To avoid time consumption
- To keep the voter’s information more secured.
-
Block Diagram:
Flow Chart:
Programming Code:
//#include <LiquidCrystal.h>
#include <Adafruit_Fingerprint.h>
#include <SoftwareSerial.h>
#include <Keypad.h>
#include <Wire.h>
#include <EEPROM.h>
#include <LiquidCrystal_I2C.h>
int break1;
int getFingerprintIDez();
int a = 0;
int i = 0, j, count = 0;
int buz = 9;
int z;
int addr = 0;
char test[4];
char keys[ROWS][COLS] = {
},
},
},
};
byte rowPins[ROWS] = {
5, 4, 3, 2
byte colPins[COLS] = {
8, 7, 6
char clr[]="#####";
char res[]="*****";
void setup()
lcd.init();
pinMode(buz,OUTPUT);
Serial.begin(9600);
// lcd.begin(16, 2);
//Serial.println("fingertest");
finger.begin(57600);
if (finger.verifyPassword()) {
else {
while (1);
pinMode(MrA, INPUT);
pinMode(MrB, INPUT);
pinMode(MrC, INPUT);
void loop()
while(1)
//lcd.setCursor(16,1);
delay(100);
if (key)
//Serial.println("Test Point:");
delay(100);
//Serial.print(key);
test[i] = key;
//lcd.print(key);
delay(100);
lcd.clear();
lcd.print(test);
//delay(400);
//lcd.clear();
i++;
if (i == 5)
//Serial.print(test[j]);
delay(100);
if (test[j] == clr[j])
EEPROM.write(i, 0);
lcd.clear();
lcd.print("votes cleared");
if (test[j] == test1[j])
temp1++;
if (test[j] == test2[j])
temp2++;
if (test[j] == test3[j])
temp3++;
if (test[j] == res[j])
lcd.clear();
lcd.print("AAP:");
addr=1;
MrA1 = EEPROM.read(addr);
lcd.print(MrA1);
lcd.print(" BJP:");
addr=2;
MrB1 = EEPROM.read(addr);
lcd.print(MrB1);
lcd.setCursor(16,2);
lcd.print(" JNP:");
addr=3;
MrC1 = EEPROM.read(addr);
lcd.print(MrC1);
lcd.print(" TRS:");
addr=4;
MrC1 = EEPROM.read(addr);
lcd.print(MrC1);
while(1);
if (temp1 == 5)
int vot;
vot=EEPROM.read(11);
if(vot==0){
lcd.clear();
lcd.print("welcome subbu");
delay(100);
lcd.setCursor(16,2);
count = 1;
while (break1<100)
getFingerprintIDez();
cvote=0;
delay(50);
break1++;
if (break1 == 100)
break;
else{
lcd.clear();
lcd.print("already voted");
buz=9;
digitalWrite(buz,HIGH);
delay(3000);
digitalWrite(buz,LOW);
delay(200);
break;
if (temp2 == 5)
{ int vot;
vot=EEPROM.read(12);
if(vot==0){
lcd.clear();
lcd.print("welcome praveen");
delay(100);
lcd.setCursor(16,2);
count = 2;
while (break1<100)
getFingerprintIDez();
delay(50);
cvote=0;
break1++;
if (break1 == 100)
break;
else{
lcd.clear();
lcd.print("already voted");
buz=9;
digitalWrite(buz,HIGH);
delay(3000);
digitalWrite(buz,LOW);
delay(200);
break;
if (temp3 == 5)
int vot;
vot=EEPROM.read(13);
if(vot==0){
lcd.clear();
lcd.print("welcome Mahesh");
delay(100);
lcd.setCursor(16,2);
count = 3;
while (break1<100)
getFingerprintIDez();
cvote=0;
delay(50);
break1++;
if (break1 == 100)
break;
else{
lcd.clear();
lcd.print("already voted");
buz=9;
digitalWrite(buz,HIGH);
delay(3000);
digitalWrite(buz,LOW);
delay(200);
break;
uint8_t getFingerprintID() {
uint8_t p = finger.getImage();
switch (p) {
case FINGERPRINT_OK:
Serial.println("Image taken");
break;
case FINGERPRINT_NOFINGER:
return p;
case FINGERPRINT_PACKETRECIEVEERR:
Serial.println("Communication error");
return p;
case FINGERPRINT_IMAGEFAIL:
Serial.println("Imaging error");
return p;
default:
Serial.println("Unknown error");
return p;
// OK success!
p = finger.image2Tz();
switch (p) {
case FINGERPRINT_OK:
Serial.println("Image converted");
break;
case FINGERPRINT_IMAGEMESS:
return p;
case FINGERPRINT_PACKETRECIEVEERR:
Serial.println("Communication error");
return p;
case FINGERPRINT_FEATUREFAIL:
return p;
case FINGERPRINT_INVALIDIMAGE:
return p;
default:
Serial.println("Unknown error");
return p;
// OK converted!
p = finger.fingerFastSearch();
if (p == FINGERPRINT_OK) {
} else if (p == FINGERPRINT_PACKETRECIEVEERR) {
Serial.println("Communication error");
return p;
} else if (p == FINGERPRINT_NOTFOUND) {
return p;
} else {
Serial.println("Unknown error");
return p;
// found a match!
int getFingerprintIDez()
uint8_t p = finger.getImage();
p = finger.image2Tz();
p = finger.fingerFastSearch();
while (count == 1)
delay(1000);
a = finger.fingerID;
if (a == 1)
lcd.clear();
delay(500);
while (cvote == 0)
{
Department of Electronics & Communication Engineering 74
AADHAAR BASED ELECTRONIC VOTING MACHINE
addr=1;
MrA1 = EEPROM.read(addr);
MrA1 = MrA1 + 1;
EEPROM.write(addr, MrA1);
lcd.clear();
lcd.print("vote counted");
EEPROM.write(11, 1);
delay(100);
cvote = 1;
break;
//Serial.println(readb);
//Serial.print("cond matched");
addr=2;
MrB1 = EEPROM.read(addr);
MrB1 = MrB1 + 1;
EEPROM.write(addr, MrB1);
lcd.clear();
lcd.print("vote counted");
//Serial.println(MrB1,DEC);
delay(1000);
EEPROM.write(11, 1);
cvote = 1;
Department of Electronics & Communication Engineering 75
AADHAAR BASED ELECTRONIC VOTING MACHINE
break;
addr=3;
MrC1 = EEPROM.read(addr);
MrC1 = MrC1 + 1;
EEPROM.write(addr, MrC1);
lcd.clear();
lcd.print("vote counted");
delay(1000);
cvote = 1;
EEPROM.write(11, 1);
break;
for(int s=1;s<4;s++)
int k=EEPROM.read(s);
Serial.print(k);
Serial.print(" ");
Serial.println();
delay(100);
break;
Department of Electronics & Communication Engineering 76
AADHAAR BASED ELECTRONIC VOTING MACHINE
else
lcd.clear();
lcd.print("Access Failed");
digitalWrite(buz,HIGH);
delay(1000);
digitalWrite(buz,LOW);
delay(200);
break;
while (count == 2)
delay(1000);
a = finger.fingerID;
if (a == 2)
lcd.clear();
delay(500);
while (cvote == 0)
addr=1;
MrA1 = EEPROM.read(addr);
MrA1 = MrA1 + 1;
EEPROM.write(addr, MrA1);
lcd.clear();
lcd.print("vote counted");
delay(100);
EEPROM.write(12, 1);
cvote = 1;
break;
addr=2;
MrB1 = EEPROM.read(addr);
MrB1 = MrB1 + 1;
EEPROM.write(addr, MrB1);
lcd.clear();
lcd.print("vote counted");
delay(1000);
cvote = 1;
EEPROM.write(12, 1);
break;
addr=3;
MrC1 = EEPROM.read(addr);
MrC1 = MrC1 + 1;
EEPROM.write(addr, MrC1);
lcd.clear();
lcd.print("vote counted");
EEPROM.write(12, 1);
delay(100);
cvote = 1;
break;
//Serial.print("inside");
for(int s=1;s<4;s++)
int k=EEPROM.read(s);
Serial.print(k);
Serial.print(" ");
Serial.println();
}
Department of Electronics & Communication Engineering 79
AADHAAR BASED ELECTRONIC VOTING MACHINE
delay(100);
break;
else
lcd.clear();
lcd.print("Access Failed");
digitalWrite(buz,HIGH);
delay(1000);
digitalWrite(buz,LOW);
delay(200);
break;
while (count == 3)
//Serial.println("Inside While");
delay(1000);
a = finger.fingerID;
if (a == 3)
//Serial.print(finger.confidence);
lcd.clear();
delay(500);
//Serial.println(reada);
//Serial.println(readb);
//Serial.println(readc);
while (cvote == 0)
// Serial.println(reada);
// Serial.println("cond matched");
addr=1;
MrA1 = EEPROM.read(addr);
MrA1 = MrA1 + 1;
EEPROM.write(addr, MrA1);
//Serial.println(MrA1,DEC);
lcd.clear();
lcd.print("vote counted");
delay(1000);
EEPROM.write(13, 1);
cvote = 1;
break;
}
Department of Electronics & Communication Engineering 81
AADHAAR BASED ELECTRONIC VOTING MACHINE
//Serial.println(readb);
//Serial.print("cond matched");
addr=2;
MrB1 = EEPROM.read(addr);
MrB1 = MrB1 + 1;
EEPROM.write(addr, MrB1);
lcd.clear();
lcd.print("vote counted");
//Serial.println(MrB1,DEC);
delay(1000);
EEPROM.write(13, 1);
cvote = 1;
break;
//Serial.println(reada);
//Serial.println(readb);
//Serial.println(readc);
//Serial.print("cond matched");
addr=3;
MrC1 = EEPROM.read(addr);
MrC1 = MrC1 + 1;
EEPROM.write(addr, MrC1);
lcd.clear();
lcd.print("vote counted");
//Serial.println(MrC1,DEC);
delay(1000);
EEPROM.write(13, 1);
cvote = 1;
break;
for(int s=1;s<4;s++)
int k=EEPROM.read(s);
Serial.print(k);
Serial.print(" ");
Serial.println();
delay(100);
break;
else
lcd.clear();
lcd.print("Access");
lcd.setCursor(16,2);
lcd.print(" Failed");
delay(1000);
digitalWrite(buz,HIGH);
delay(1000);
digitalWrite(buz,LOW);
delay(200);
break;
}}
Raspberry code:
import serial as io
import time
ser=io.Serial('/dev/ttyUSB6',9600);
while 1:
a=ser.readline();
time.sleep(5);
f=open('data1.txt','w');
f.write(a);
f.write('\n');
f.close();
website code:
<!DOCTYPE html>
<html>
<head>
<?php
$url1=$_SERVER['REQUEST_URI'];
header("Refresh: 5; URL=$url1");
?>
<?php
$filename="/home/pi/subbu/res.txt";
$file=fopen($filename,"r");
$filesize=filesize($filename);
$filetext=fread($file,$filesize);
fclose($file);
$i=0;
$a=$filetext[0];
$b=$filetext[2];
$c=$filetext[4];
?>
</head>
<body style="background:#E3F6CE;">
<center>
</center>
<div>
<tbody>
<tr>
<th><h4>PARTY</h4><th>
<th><h4>NO. OF VOTES</h4><th>
<tr>
<tr>
<th style="color:RED;font-size:32pt">JSP<th>
<th>
<script>
document.write(a);
</script>
</th>
</tr>
<tr>
<th style="color:ORANGE;font-size:32pt">BJP<th>
<th><script>
document.write(b);
</script>
</th>
</tr>
<tr>
<th style="color:PINK;font-size:32pt">TRS<th>
<th><script>
document.write(c);
</script>
</th>
</tr>
</tbody>
</table>
</div>
</body>
</html>
CHAPTER 4
CONCLUSION
This review discussed introduction about EVM and its variation, Issues of EVM,
Taxonomy, and Biometric based EVM. Our efforts to understand electronic voting
systems leave us optimistic, but concerned. This paper suggest that the EVM system has
to be further studied and innovated to reach all level of community, so that the voter
confidence will increase and election officials will make more involvement in purchasing
the innovated EVM’s for conduct smooth, secure, tamper- resistant Elections.