Sunteți pe pagina 1din 55

ADVANCE VOTING MACHINE

A PROJECT REPORT

Submitted by

S. BHARANIGESWARI 412316106005
B. ISHWARYA 412316106007
D. KEERTHANA 4123161060012
M. VANITHA 412316106029
In partial fulfilment for the award of the degree

Of

BACHELOR OF ENGINEERING
IN
ELECTRONICS AND COMMUNICATION ENGINEERING

SRI RAMANUJAR ENGINEERING COLLEGE, CHENNAI -127

ANNA UNIVERSITY, CHENNAI-25


BONAFIDE CERTIFICATE
Certified that this project report ”ADVANCE VOTING MACHINE” is the bonafide
work of

S. BHARANIGESWARI 412316106005

B. ISHWARYA 412316106007

D. KEERTHANA 4123161060012

M. VANITHA 412316106029

Who carried the project work under my supervision.

SIGNATURE SIGNATURE

MRS.P.SRIDEVI., M.E., MRS.A.SUGUNA PRIYA

HEAD OF THE DEPARTMENT SUPERVISIOR

ASSO PROFESSOR ASSO PROFESSOR

Department of ECE Department of ECE

Sri Ramanujar Engineering College Sri Ramanujar Engineeerig College

Nedunkundram, Kolapakkam, Nedunkundram, Kolapakkam,

Vandalur, Chennai-127. Vandalur, Chennai-127.

Submitted for the viva voice examination held on __________________.

INTERNAL EXAMINER EXTERNAL EXAMINER


ABSTRACT
The Internet of Things (IOT) is a recent technology where electronic devices,
software, sensors, vehicles, home appliances are interconnected with networks to
transfer data without human or computer interaction. The problem in the existing
system is, the electronic voting machines do not have any recent security measures by
which the voter can verify their identity before casting the vote due to false voters can
cast numerous duplicate or fake votes. So, the proposed system is Implemented using
RFID and IOT (Internet of Things) to improvise the security mechanisms. Here, an
active RFID tag is used in place of voter id where the system can scan the tag and
matches with the fingerprints collected in the Aadhar database. The voter has to scan
the RFID tag for the identification and further the voter has to confirm the identity
with the fingerprints. It includes active reading equipment (reader) for reading data in
RFID tag and finger print scanner is used in this voting machine for scanning finger
prints. If the prints matched against the database gathered, the individuals can
effectively cast their votes, if that’s not the case, the buzzer will be alarmed to avoid
casting of fake voters. An LCD is applicable in the process of displaying the
corresponding information of the voter from the database, thus illegal voting or
impersonating can be avoided since the finger prints is not the same for every
individual. Due to the fact that the process of voting is connected with the Aadhar
database, the system offers maximum security and efficiency.

iii
ACKNOWLEDGEMENT
At the juncture of presenting this project, we have immense pleasure in expressing
our heart- full thanks to various personnel who have helped us at various level to
complete this project successfully.

At the outset, we express our respectful and sincere thanks with deep sense of
gratitude to our beloved correspondent
THIRU.M.NITHYASUNDAR, M.COM. ,M.SC., M.PHIL., and our beloved
secretary THIRU.G.KAMARAJ,B.A. for providing us all the necessary facility and
guiding us in right path of life with their enlightened wisdom.

Words are inadequate to express our feelings of gratitude to thank our beloved
Principal DR.A.DHANAAPL, Ph.D., for his constant motivation and encouragement.

We feel greatly indebted to our HOD Prof. MRS. P.SRIDEVI, ME., for her
propellant guidance, kind advice and encouragement. We like to express our thanks to
project coordinator . MRS. P.SRIDEVI, ME., for her guidance, suggestion and
monitoring our performance throughout our project work.Our sincere thanks to our
project guide MRS.A.SUGUNAPRIYA, ASSISTANT PROFESSOR for her
scholarly idea, continual guidance and support with her suggestion for the successful
completion of the project.

One personal note, we would like to use this opportunity to extend our heartiest and
respectful thanks to all TEACHING and NON TEACHING FACULTY members of
our department, friends and all our well wishers, who helped in completing project
successfully.

Sincere thanks to our parents who stands behind our every step with abundant
blessings of the almighty.

iv
TABLES OF CONTENT
CHAPTER TITLES PAGES
NUMBER

ABSTRACT i

ACKNOWLEDGE ii

TABLE OF CONTENT iii

LIST OF FIGURES iv

LIST OF CHART v

1 INTRODUCTION

1.1 EMBEDDED SYSTEM


1.2 CLASSIFICATION OF EMBEDDED SYSTEM
1.3 BLOCK DIAGRAM OF EMBEDDED SYSTEM
1.4 EMBEDDED SYSTEM APPLICATION

2 LITERATURE SURVEY

3 SYSTEM ANALYSIS

3.1 EXSISTING SYSTEM

3.2 PROPOED SYSTEM

3.3 BLOCK DIAGRAM

3.4HARDWARE REQUIREMENTS

3.5 SOFTWARE REQUIREMENTS

4 HARDWARE COMPONENT DETAILS

v
4.1 ARDUINO UNO

4.1.1 POWER

4.1.2 MEMORY

4.1.3 PIN CONFIGURATION

4.1.3.1 USB OVERCURRENT PROTECTION

4.1.3.2 PHYSICAL CHARACTERSTICS

4.2 RFID

Fgh

4.2.1 WORKING

4.2.2 DEFINING RFID

4.2.3 MAIN COMPONENTS OF RFID SYSTEM

4.2.4 A BRIEF IDEA ABOUT HOW PASSIVE RFID


SYSTEMS WORK

4.2.4.1 A PASSIVE RFID SYSTEM USING


INDUCTION COUPLING METHOD

4.2.4.2 A PASSIVE RFID SYSTEM USING EM


WAVE PROPAGATION METHOD

4.2.5 AN IDEA ABOUT HOW THE ACTIVE RFID


SYSTEM WORKS

4.2.6 RFID TAGS AND SMART LABELS

4.2.7 RFID APPLICATIONS

4.3 FINGERPRINT

4.3.1 TYPES

4.3.2 OPTICAL REFLEXIVE

vi
4.3.3 CAPACITIVE

4.3.4 MECHANICAL

4.3.5 THERMAL

4.3.6 DYNAMIC OUTPUT

4.3.7 USES

4.4 NODE MCU ESP8266

4.4.1 BRIEF ABOUT NODE MCU ESP8266

4.4.2 POWER REQUIREMENT

4.4.3 PERIPHERALS AND I/O

4.4.4 ON-BOARD SWITCHES AND LED


INDICATOR

4.4.5 SERIAL COMMUNICAITON

4.4.6 ESP8266 NODE MCU PINOUT

4.4.6.1 POWER PINS

4.4.6.2 GND

4.4.6.3 I2C PINS

4.4.6.4 GPIO PINS

4.4.6.5 ADC CHANNELS

4.4.6.6 UART PINS

4.4.6.7 SPI PINS

4.4.6.8 SDIO PINS

4.4.6.9 PWM PINS

vii
4.4.6.10 CONTROL PINS

4.5 BUZZERS

4.5.1 TYPES

4.5.1.1 ELECTOMECHANICAL

4.5.1.2MECHANICAL

4.5.1.3 PEIZO ELECTRIC

4.5.2 APPLICATIONS

4.5.3 SIMPLE PIEZO BUZZER CIRCUIT DIAGRAM

4.5.3.1 CIRCUIT DIAGRAM AND CONSTRUCTION

4.5.4 PIEZO BUZZER CHARACTERISTICS

5 SOFTWARE REQUIREMENT DETAILS

5.1 EMBEDDED C

5.2 ARDUINO IDE

6 CONCLUSION

7 REFERENCES

viii
.

LIST OF FIGURES
FIGURE TITLE PAGE
NUMBER
1.1 EMBEDDED SYSTEM

1.2 CLASSIFICATION OF EMBEDDED SYSTEM

1.3 BLOCK DIAGRAM OF TYPICAL EMBEDDED


SYSTEM

4.1 ARDUINO UNO

4.2 PIN DIAGRAM OF ARDUINO UNO

4.3 RFID TAG

4.4 RFID READER

ix
4.5 PASSIVE RFID USING INDUCTIVE COUPLING

4.6 PASSIVE RFID USING EM WAVE


TRANSFORMATION

4.7 AN ACTIVE RFID SYSTEM

4.8 FINGER PRINT

4.9 NODE MCU DIAGRAM

4.10 SWITCH DIAGRAM

4.11 SERIAL COMMUNICATION DIAGRAM

4.12 PIN OUT DIAGRAM

4.13 BUZZER DIAGRAM

4.14 CIRCUIT DIAGRAM OF BUZZER

4.15 CONSTRUCTION OF BUZZER

5.1 BLOCK DIAGRAM OF EMBEDDED C

5.2 EMBEDDED C PROGRAM WITH EXAMBLES

5.3 ARDUINO IDE DIAGRAM

5.4 ARDUINO IDE SOFTWARE DIAGRAM

x
CHAPTER 1
INTRODUCTION
The Internet is a global communication of mass data, publicly used system of
communication networks. Via the interlinked computer systems, the internet allows
the users and organizations to transfer data, services and resources. This is due to the
fact that not a group or a single individual is capable of controlling the internet.
Moreover, it is impossible that some guidelines and rules are followed for the internet
to function efficiently. The internet or simply the Net is a global network environment
of computer networks. It is an interconnection of large and small network nodes all
over the planet.

The Electronic voting system can be operated with the application of


controllers, computers, and computerized voting tools in order to enhance the process
of casting ballots during an election. Mostly, this is applied in referring to the process
that happens through the internet around the globe. The voting frameworks can be
utilized to register participants, record votes and the tally ballots. The scheme can
further be organized this way. In part two, various forms of electronic voting system
and how they have been implementing have been analysed. In part three, the
evaluation of electronic voting schemes around the world has been done. In part from,
a detailed evaluation of advantages and disadvantages of the electronic voting systems
in contrast to the traditional paper voting scheme has been given. The concluding
section sums up the whole procedure. The Electronic Voting (which is known as the
E-Voting) is the microcontroller device designed to aid casting and counting votes that
are casted during the elections. This voting technique includes the punched card,
optical scan voting scheme and the designed voting kiosk (Which incorporates the
self-contained direct record electronic voting equipment, DRE).

1.1 EMBEDDED SYSTEM:

An embedded system is a controller programmed and controlled by a real-time


operating system (RTOS) with a dedicated function within a larger mechanical or
electrical system, often with real-time consumption of embedded systems
computing constraints.
  It is embedded as part of a complete device often including hardware and
mechanical parts. Embedded systems control many devices in common use today.

1
Ninety-eight percent of all microprocessors are manufactured to serve as embedded
system component.
Examples of properties of typical embedded computers when compared with
general-purpose counterparts are low power consumption, small size, rugged operating
ranges, and low per-unit cost. This comes at the price of limited processing resources,
which make them significantly more difficult to program and to interact with.
However, by building intelligence mechanisms on top of the hardware, taking
advantage of possible existing sensors and the existence of a network of embedded
units, one can both optimally manage available resources at the unit and network
levels as well as provide augmented functions, well beyond those available. For
example, intelligent techniques can be designed to manage power.

Fig 1.1 Embedded system

Embedded Computer Sub-Assembly for Electronic Voting Machine.


Embedded systems are commonly found in consumer, industrial, automotive,
medical, commercial and military applications.
Telecommunications systems employ numerous embedded systems
from telephone switches for the network to cell phones at the end user. Computer
networking uses dedicated routers and network bridges to route data.
Consumer electronics include MP3 players, mobile phones, video game
consoles, digital cameras, GPS receivers, and printers. Household appliances, such

2
as microwave ovens, washing machines and dishwashers, include embedded systems
to provide flexibility, efficiency and features.

1.2 CLASSIFICATIONS OF EMBDDED SYSTEMS:

Fig 1.2 Classification of Embedded system


Advanced HVAC systems use networked thermostats to more accurately and
efficiently control temperature that can change by time of day and season. Home
automation uses wired- and wireless-networking that can be used to control lights,
climate, security, audio/visual, surveillance, etc., all of which use embedded devices
for sensing and controlling.
Like traffic lights, factory controllers, and largely complex systems like hybrid
vehicles, MRI, and avionics Embedded systems range from portable devices such
as digital watches and MP3 players, to large stationary installations. Complexity varies
from low, with a single microcontroller
1.3 BLOCK DIAGRAM OF AN EMBEDDED SYSTEM:

An embedded system usually contains an embedded processor. Many


appliances that have a digital interface microwaves, VCRs, cars utilize embedded
systems. Some embedded systems include an operating system. Others are very
specialized resulting in the entire logic being implemented as a single program. These
systems are embedded into some device for some specific purpose other than to
provide general purpose computing.

3
Fig 1.3 Block diagram of a typical embedded system

1.4 EMBEDDED SYSTEMS APPLICATIONS:

 Embedded systems in automobiles include motor control, cruise control, body


safety, engine safety, robotics in an assembly line, car multimedia, car
entertainment, E-com access, mobiles etc.

 Embedded systems in telecommunications include networking, mobile


computing, and wireless communications, etc.

 Embedded system in smart cards include banking, telephone and security


systems.

 Embedded Systems in satellites and missiles include defence, communication,


and aerospace

 Embedded systems in computer networking & peripherals include image


processing, networking systems, printers, network cards, monitors and displays

 Embedded Systems in digital consumer electronics include set-top boxes,


DVDs, high definition TVs and digital cameras

CHAPTER 2

LITERATURE SURVEY

4
Khadija Hasta, Aditya Date, Aparna Shrivastava, Prajakta Jhade, S. N. Shelke,
"Fingerprint Based Secured Voting", 2019 International Conference on
Advances in Computing, Communication and Control (ICAC3).

In the current scenario, most of the countries of the world hold their elections
using Electronic Voting Machines, where your vote gets registered electronically with
the help of an Electronic Machine without using and wasting ballot paper to vote for
elections. As security is a major concern nowadays, ensuring that no person exercises
the right to vote twice is the main aspect. We can resolve this issue by introducing
Finger Print Based Voting, where a person can be authorized based on his Finger
Print. This will put an end to fake voting. The domain of the project is the Internet of
Things where we are building Fingerprint Based Biometric Voting Machine using
Arduino. We know that IoT is the system of interrelated computing devices,
mechanical and digital machines, objects, and the ability to transfer data over a
network without requiring human-to-human or human-to-computer interaction. Thus,
our Fingerprint online module is an application where the user is recognized by his
finger pattern. As we know that the minutiae feature on a finger of each human being
are different, the voter can be easily authenticated. The online system allows the voter
to vote through his fingerprint. The fingerprint of the voter is used to uniquely and
distinctively identify him/her using the fingerprint module. Also, the system promises
the right to vote a candidate only once, thus not allowing the voter to vote for the
second time. An admin is assigned to add all the candidates standing for the election.
Only the admin has the right to add a candidate name and photo who are nominated.
The Admin will also register the voter's name by verifying voter’s details. Admin will
authenticate the voter by verifying the voter’s identity and then admin will register the
voter. Once the user has got the voters id and password from the admin the user can
log in and vote for the candidates who were nominated. The system will allow the user
to vote for only one candidate. In the end, the election result is published by using the
election id. Even users can view the election result.

Shashank S Kadam, Shashank S Kadam, Sujay Dandekar, Debjeet Bardhan,


Prof. Namdeo B Vaidya, "Electronic Voting Machine with Enhanced Security",
Proceedings of the International Conference on Communication and Electronics
Systems (ICCES 2018).

Electronic Voting Machine (EVM) retains all the characteristics of voting by


ballot papers, while making polling a lot more expedient. Considerable amount of

5
time, man power and money is saved as it is extremely fast and reliable. Voting
secrecy is also maintained without use of ballot paper. VVPAT that is currently used
for voting machine is much more expensive than EVM to be created. The EVM is 100
per cent tamper proof. Results are available in the end just a click away. But these
EVM can be tampered with by changing the hardware connections. Hence a printed
acknowledgement is provided to the voter thus assuring him that vote has been casted
to candidate voter wanted. Here, we describe the design, construction and operation of
this voting machine using ATMEGA 32 microcontroller which has enhanced three
layered extra security.

Vaibhav Bhatia, Rahul Gupta, "A Novel Electronic Voting Machine Design with
Voter Information Facility Using Microcontroller ", 2014 International
Conference on Computing for Sustainable Global Development (INDIA Com).

This paper presents the design of a novel electronic voting machine using
microcontroller. Voter’s information facility has also been incorporated in the machine
design. The information about the number of voters present at the polling place is
stored in a register, which is later used to do various analyses. Infrared sensors have
been used for determining the voter’s information. The design proposed here has a
special option of voter rejection which is not present in the conventional systems. The
simulation of the system is done on Proteus Professional Software v8.0. Multiple vote
casting has been avoided by using software coding techniques. The design presented
in this paper is appropriate and the simulation is working properly under normal
conditions.

Dichou Karima, Pr. Tourtchine Victor, Dr. Rahmoune Faycal, "An Improved
Electronic Voting Machine Using a Microcontroller and a Smart Card", 2014 9th
International Design and Test Symposium.

In this paper, an improved electronic voting machine using a microcontroller


and a smart card is presented. The identity control that was done manually is
eliminated and replaced by a smart card. It also saves the elector’s card number,
number of electors, and the voting results while ensuring anonymity. The results are
only accessible for the administrator card. The simulation is done using Proteus
Professional Software V7. Microcontrollers are programmed in assembly language
under MPLAB IDE software V.8.56.

6
V. Kiruthika Priya, V. Vimaladevi, B. Pandimeenal, T. Dhivya, "Arduino based
Smart Electronic Voting Machine", International Conference on Trends in
Electronics and Informatics ICEI 2017.

The basic idea of this project is to create an electronic voting machine that will
help to eradicate defrauding of the manual voting systems and prior versions of
electronic voting. The thesis looks into and proposes a system that includes multiple
layers of verifications to ensure the reliability of the device. With the inclusion of
biometric fingerprint sensor, each voter is entered into the system only after being
recognized and checked with the given database of enlisted voters. Once the
corresponding fingerprint is matched with the information provided, the voter will be
allowed to proceed for choosing their preferred candidate from the panel of buttons.
The final vote is then displayed onto an LCD for the satisfaction of voters. The
proposed project displays transparency and also carries the feature of being
autonomous during the course of operation.

Atharva Jamkar, Omkar Kulkarni, Aarti Salunke, Dr. Anton Pljonkin


"Biometric Voting Machine Based on Fingerprint Scanner and Arduino ", 2019
2nd International Conference on Intelligent Communication and Computational
Techniques (ICCT).

This paper describes design of Biometric Voting Machine Using Fingerprint


Scanner and Arduino for voting in institutes and organizations. Indian constitution
empowers its citizen to exercise right to vote. Election decides the future of country,
so that the system used for voting should be trustworthy. The conventional system for
voting is ballot paper and Electronic voting machine too, has many flaws and trust
issues. To eradicate malpractice and defrauding of the above methods of voting, we
have designed an advanced system by using Arduino and Fingerprint module. In this
system, a person has to register a fingerprint ID with the system which will be
centrally stored in Arduino. In organizations, educational institutes, a co-operative
bank, maximum number of votes elect head of organization that holds the office of
public interest. For confirmation of voter, the name of the candidate will be displayed
on LCD for whom the voter has cast a vote. It has simple hardware design and it is
easily accessible. In case user wants to remove any of stored ID then the user needs to
press DEL key, after pressing DEL key, LED will ask to select ID that is to be deleted.

7
After pressing OK key, the selected ID will be deleted and LCD will display that
which ID has been deleted successfully. This system is flexible to use.

CHAPTER 3

EXISTING SYSTEM:
 In existing system, they are pic or 8051 microcontroller.it is difficult to handle
and the cost is high.
 The efficiency is low.
 The iot facility was not available in exist method.

PROPOSED SYSTEM:

 In this proposed system we are using an Arduino microcontroller to control all


the interfaced modules.
 Here we are implementing the iot facility to monitor the data with time and
date.
 Cost is low and good efficiency.

8
90

80

70

60

50

40
PIC
30 ARDUINO

20

10

0
ARDUINO
ST D
CO EE TY PIC
P
S ILI
NCY Y
IB IE OR
LEX FIC EM
F EF M

COMPARISON OF EXISTING AND PROPOSD SYSTEM

3.3 BLOCK DIAGRAM:

POWER SUPPLY

RFID READER ESP8266

WEB SERVER

ARDUINO UNO
FINGER
PRINT BUZZER
9
3.4 HARDWARE REQUIREMENTS:
 ARDUINO UNO
 FINGER PRINT
 RFID READER
 ESP8266 (IOT MODULE)
 BUZZER
3.5 SOFTWARE REQUIREMENTS:

 ARDUINO IDE
 EMBEDDED C

CHAPTER 4
HARDWARE COMPONENTS DETAILS

4.1 ARDUINO UNO:

The Arduino Uno is a microcontroller board based on the ATmega328


(datasheet). 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

10
microcontroller; simply connect it to a computer with a USB cable or power it with an
AC-to-DC adapter or battery to get started. The Uno differs from all preceding boards
in that it does not use the FTDI USB-to-serial driver chip. Instead, it features the
Atmega16U2 (Atmega8U2 up to version R2) programmed as a USB-to-serial
converter. Revision 2 of the Uno board has a resistor pulling the 8U2 HWB line to
ground, making it easier to put into DFU mode. Revision 3 of the board has the
following new features:

 1.0 pinout: added SDA and SCL pins that are near to the AREF pin and two other
new pins placed near to the RESET pin, the IOREF that allow the shields to adapt to
the voltage provided from the board. In future, shields will be compatible both with
the board that use the AVR, which operate with 5V and with the Arduino Due that
operate with 3.3V. The second one is a not connected pin, that is reserved for future
purposes.

 Stronger RESET circuit. At mega 16U2 replace the 8U2. "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.

4.1.1 POWER:

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.

11
Fig 4.1 Arduino Uno diagram

 3V 3. A 3.3-volt supply generated by the on-board regulator. Maximum current draw


is 50 mA.

 GND. Ground pins.

4.1.2 MEMORY:

The ATmega328 has 32 KB (with 0.5 KB used for the bootloader). It also has 2
KB of SRAM and 1 KB of EEPROM (which can be read and written with the
EEPROM library). 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 digital Read ()
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 Kilo 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.

12
 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,
labelled 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:

 TWI: A4 or SDA pin and A5 or SCL pin. Support TWI communication using the
Wire library. There are a couple of other pins on the board:

 AREF. Reference voltage for the analog inputs. Used with analog Reference ().

 Reset. Bring this line LOW to reset the microcontroller. Typically used to add a reset
button to shields which block the one on the board. 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. The ATmega328 also supports I2C
(TWI) and SPI communication. The Arduino software includes a Wire library to
simplify use of the I2C bus; see the documentation for details. For SPI
communication, use the SPI library.

4.1.3 PIN CONFIGURATION:

13
Fig 4.2 Pin diagram of Arduino Uno

4.1.3.1 USB Overcurrent Protection:

The Arduino Uno has a resettable poly fuse that protects your computer's USB
ports from shorts and overcurrent. 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.

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

4.2 RFID:

RFID is an acronym for “radio-frequency identification” and refers to a


technology whereby digital data encoded in RFID tags or smart labels (defined below)
are captured by a reader via radio waves. RFID is similar to barcoding in that data
from a tag or label are captured by a device that stores the data in a database. RFID,
however, has several advantages over systems that use barcode asset tracking
software. The most notable is that RFID tag data can be read outside the line-of-sight,
whereas barcodes must be aligned with an optical scanner. 

14
4.2.1 WORKING:

RFID belongs to a group of technologies referred to as Automatic Identification


and Data Capture (AIDC). AIDC methods automatically identify objects, collect data
about them, and enter those data directly into computer systems with little or no
human intervention. RFID methods utilize radio waves to accomplish this. At a simple
level, RFID systems consist of three components: an RFID tag or smart label, an RFID
reader, and an antenna. RFID tags contain an integrated circuit and an antenna, which
are used to transmit data to the RFID reader (also called an interrogator). The reader
then converts the radio waves to a more usable form of data. Information collected
from the tags is then transferred through a communications interface to a host
computer system, where the data can be stored in a database and analysed at a later
time.

4.2.3 Defining RFID:

RFID or Radio Frequency Identification System is a technology-based


identification system which helps identifying objects just through the tags attached to
them, without requiring any light of sight between the tags and the tag reader. All that
is needed is radio communication between the tag and the reader.

4.2.4 A Basic RFID System:

4.2.5 Main Components of a RFID System

 A RFID tag: It consists of a silicon microchip attached to a small antenna and


mounted on a substrate and encapsulated in different materials like plastic or glass
veil and with an adhesive on the back side to be attached to objects.

Fig 4.3 RFID Tag

15
 A reader: It consists of a scanner with antennas to transmit and receive signals
and is responsible for communication with the tag and receives the information
from the tag.

Fig 4.4 An RFID Reader

 A Processor or a Controller: It can be a host computer with a Microprocessor


or a microcontroller which receives the reader input and process the data.
2 Types of RFID Systems:

 Active RFID system: These are systems where the tag has its own power
source like any external power supply unit or a battery. The only constraint being
the life time of the power devices. These systems can be used for larger distances
and to track high value goods like vehicles.

 Passive RFID system: These are systems where the tag gets power through the
transfer of power from a reader antenna to the tag antenna. They are used for short
range transmission.
Here we are mostly concerned with the passive RFID system as it is most widely used
in regular applications like in retail market organizations.

4.2.6 A brief idea about How the Passive RFID System Works:

The tag can be powered either using inducting coupling method or through EM
wave capture method. Let’s us have a brief knowledge about the system using these
two methods.

16
4.2.6.1 A Passive RFID system using Induction coupling method:

 In this approach the RFID tag gets power from the reader through inductive
coupling method. The reader consists of a coil connected to an AC supply such that a
magnetic field is formed around it. The tag coil is placed in the vicinity of the reader
coil and an electromotive force is induced it by the virtue of Faraday’s law of
induction. The EMF causes a flow of current in the coil, thus producing a magnetic
field around it. By the virtue of Lenz law, the magnetic field of the tag coil opposes
the reader’s magnetic field and there will be a subsequent increase in the current
through the reader coil. The reader intercepts this as the load information. This system
is suitable for very short distance communication. The AC voltage appearing across
the tag coil is converted to DC using rectifier and filter arrangement. 

Fig 4.5 Passive RFID using Inductive Coupling

4.2.6.2 A Passive RFID system using EM wave propagation method: 

The antenna present in the reader transmits electromagnetic waves which are
received by the antenna present in the tag as potential difference across the dipole.
This voltage is rectified and filtered to get the DC power. The receiver antenna is kept
at different impedance which causes it to reflect a part of the received signal. This
reflected signal is received by the reader and monitored accordingly. 

17
Fig 4.6 Passive RFID using EM-wave transmission

4.2.7 An Idea about How the Active RFID System Works:

In the active RFID system, the reader sends signal to the tag using an antenna.
The tag receives this information and resends this information along with the
information in its memory. The reader receives this signal and transmits to the
processor for further processing.

Fig 4.7 An Active RFID system

4.2.8 RFID TAGS AND SMART LABELS:

As stated above, an RFID tag consists of an integrated circuit and an antenna.


The tag is also composed of a protective material that holds the pieces together and
shields them from various environmental conditions. The protective material depends
on the application. For example, employee ID badges containing RFID tags are
typically made from durable plastic, and the tag is embedded between the layers of
plastic. RFID tags come in a variety of shapes and sizes and are either passive or
active. Passive tags are the most widely used, as they are smaller and less expensive to
implement. Passive tags must be “powered up” by the RFID reader before they can
transmit data. Unlike passive tags, active RFID tags have an onboard power supply

18
(e.g., a battery), thereby enabling them to transmit data at all times. For a more
detailed discussion, refer to this article: Passive RFID Tags vs. Active RFID Tags.

Smart labels differ from RFID tags in that they incorporate both RFID and barcode
technologies. They’re made of an adhesive label embedded with an RFID tag inlay,
and they may also feature a barcode and/or other printed information. Smart labels can
be encoded and printed on-demand using desktop label printers, whereas programming
RFID tags are more time consuming and requires more advanced equipment.

4.2.9 RFID APPLICATIONS:

Although RFID technology has been in use since World War II, the demand for
RFID equipment is increasing rapidly, in part due to mandates issued by the U.S.
Department of Defence (DoD) and Wal-Mart requiring their suppliers to enable
products to be traceable by RFID.

Whether or not RFID compliance is required, applications that currently use


barcode technology are good candidates for upgrading to a system that uses RFID or
some combination of the two. RFID offers many advantages over the barcode,
particularly the fact that an RFID tag can hold much more data about an item than a
barcode can. In addition, RFID tags are not susceptible to the damages that may be
incurred by barcode labels, like ripping and smearing.

From the read distance to the types of tags available, RFID has come a long
way since World War II and there is a bright future ahead. Review the evolution of
RFID.

4.3 FINGER PRINT:

Fingerprint scanners are security systems of biometrics. They are used to unlock


doors and in other security applications. During the 2010s fingerprint scanners became
commonplace on mobile phones.

19
Fig 4.8 FINGER PRINT

4.3.1 TYPES:

4.3.2 Optical reflexive:

They are based on the oldest technique, that consists of placing your finger on a
glass surface or a prism that is illuminated by a led diode. When the ridges of
fingerprints touch the surface, the light is absorbed, while between these crests a total
reflection occurs. The resulting light and dark areas are recorded in an image sensor.

In practice there are some difficulties with this technique: the images obtained
with wet and dry fingers are very different and, in addition, the system is sensitive to
dust and dirt on the surface. The unit has a considerable size, impractical and
expensive. This system is easy to cheat and if the skin is damaged, the fingerprint is
not recognized correctly. The recognition of the fingerprint of older people is also
difficult to do because the skin is not elastic enough. In some circumstances this may
result in false recognition. If the stored fingerprint was taken with less pressure, false
acceptances may occur.

4.3.3 Capacitive:

The sensor is a silicon integrated circuit with a surface that is covered by a large
number of transducer elements (or pixels), with a typical resolution of 500 dpi. Each
element contains two adjacent metal electrodes. The capacity between the electrodes,
which forms a feedback path for an inverting amplifier, is reduced when the finger is
applied to said surface: it is further reduced when it detects ridges and less reduced
when it detects the space between them.

The sensor is susceptible to electrostatic discharge. These sensors only work


with normal healthy skins, they are not operative being used on skins with hard areas,
calluses or scars. Moisture, grease or dust can also affect its operation

4.3.4 Mechanical:

It consists of tens of thousands of tiny pressure transducers that are mounted on


the surface of the sensor. An alternative design uses switches that are closed when
pressed by a ridge, but that stay open when they are under a valley. This only provides
one bit of information per pixel, instead of working with a gray scale.

20
4.3.5 Thermal:

In this case the heat driven by the finger is detected, which is greater when there
is a ridge than when there is a valley. A silicon component has been developed with a
matrix of pixels called "Finger Chip", that is, "finger integrated circuit", each of which
is covered with a layer of pyroelectric material in which a change in temperature
translates into a change in the load distribution of its surface. The image is in the gray
scale that has the right quality even with the finger worn, with dirt, with grease or with
humidity. The sensor has a robust protective layer and can provide a dynamic output.

4.3.6 Dynamic output:

Most of the sensors described have been altered in the past. To avoid this, a new
operating mode has been added. Instead of simply placing your finger statically on the
sensor, the finger moves slowly along it. The sensor only has a narrow sensitive area,
and generates a complete sequence of images, which can be reassembled, by means of
a processor, in a complete image. The benefits are improved appreciably and the
elimination of any residual grease is guaranteed.

4.3.7 Uses:

The most important use area is in access control for computers. This is
especially important for laptops and PDAs. Thanks to the price falling, more and more
devices are equipped with sensors. Other devices with built-in fingerprint sensors
include USB hard drives, USB memory modules and card readers. They are also
available in mice and keyboards.

Sensors are increasingly used to secure financial transactions and change


machines for "online" banking. In the future, the owner's fingerprint will be stored
securely on identity cards and credit cards and may also be used for authentication of
emails using digital signatures.

Direct physical access to rooms and devices can also be ensured by coupling
fingerprint sensors with door opening systems.

4.4 NODE MCU ESP8266:

NodeMCU is an open-source Lua based firmware and development board

21
specially targeted for IoT based Applications. It includes firmware that runs on the
ESP8266 Wi-Fi SoC from Espressif Systems, and hardware which is based on the
ESP-12 module.

4.4.1 Brief About NodeMCU ESP8266:

The NodeMCU ESP8266 development board comes with the ESP-12E module
containing ESP8266 chip having Tensilica Xtensa 32-bit LX106 RISC
microprocessor. This microprocessor supports RTOS and operates at 80MHz to 160
MHz adjustable clock frequency. NodeMCU has 128 KB RAM and 4MB of Flash
memory to store data and programs. Its high processing power with in-built Wi-Fi /
Bluetooth and Deep Sleep Operating features make it ideal for IoT projects.

NodeMCU can be powered using Micro USB jack and VIN pin (External
Supply Pin). It supports UART, SPI, and I2C interface.

Fig 4.9 NodeMcu diagram

22
4.4.2 Power Requirement:

As the operating voltage range of ESP8266 is 3V to 3.6V, the board comes with
a LDO voltage regulator to keep the voltage steady at 3.3V. It can reliably supply up
to 600mA, which should be more than enough when ESP8266 pulls as much as 80mA
during RF transmissions. The output of the regulator is also broken out to one of the
sides of the board and labeled as 3V3. This pin can be used to supply power to
external components.

Power to the ESP8266 NodeMCU is supplied via the on-board MicroB USB
connector. Alternatively, if you have a regulated 5V voltage source, the VIN pin can
be used to directly supply the ESP8266 and its peripherals.

4.4.3 Peripherals and I/O:

The ESP8266 NodeMCU has total 17 GPIO pins broken out to the pin headers
on both sides of the development board. These pins can be assigned to all sorts of
peripheral duties, including:

 ADC channel – A 10-bit ADC channel.


 UART interface – UART interface is used to load code serially.
 PWM outputs – PWM pins for dimming LEDs or controlling motors.
 SPI, I2C & I2S interface – SPI and I2C interface to hook up all sorts of sensors
and peripherals.
 I2S interface – I2S interface if you want to add sound to your project.

4.4.4 On-board Switches & LED Indicator:

23
The ESP8266 NodeMCU features two buttons. One marked as RST located on
the top left corner is the Reset button, used of course to reset the ESP8266 chip. The
other FLASH button on the bottom left corner is the download button used while
upgrading firmware.

The board also has a LED indicator which is user programmable and is
connected to the D0 pin of the board.

Fig 4.10 Switch diagram

4.4.5 Serial Communication:

The board includes CP2102 USB-to-UART Bridge Controller from Silicon


Labs, which converts USB signal to serial and allows your computer to program and
communicate with the ESP8266 chip.

24
Fig 4.11 Serial communication diagram

If you have an older version of CP2102 driver installed on your PC, we


recommend upgrading now.

4.4.6 ESP8266 NodeMCU Pinout:

The ESP8266 NodeMCU has total 30 pins that interface it to the outside world.
The connections are as follows:

25
Fig 4.12 pin out diagram

For the sake of simplicity, we will make groups of pins with similar
functionalities.

4.4.6.1 Power Pins:

There are four power pins viz. one VIN pin & three 3.3V pins. The VIN pin
can be used to directly supply the ESP8266 and its peripherals, if you have a regulated
5V voltage source. The 3.3V pins are the output of an on-board voltage regulator.
These pins can be used to supply power to external components.

4.4.6.2 GND:

GND is a ground pin of ESP8266 NodeMCU development board.

4.4.6.3 I2C Pins:

I2C Pins are used to hook up all sorts of I2C sensors and peripherals in your
project. Both I2C Master and I2C Slave are supported. I2C interface functionality can
be realized programmatically, and the clock frequency is 100 kHz at a maximum. It
should be noted that I2C clock frequency should be higher than the slowest clock
frequency of the slave device.

4.4.6.4 GPIO Pins:

26
ESP8266 NodeMCU has 17 GPIO pins which can be assigned to various
functions such as I2C, I2S, UART, PWM, IR Remote Control, LED Light and Button
programmatically. Each digital enabled GPIO can be configured to internal pull-up or
pull-down, or set to high impedance. When configured as an input, it can also be set to
edge-trigger or level-trigger to generate CPU interrupts.

4.4.6.5 ADC Channel:

The NodeMCU is embedded with a 10-bit precision SAR ADC. The two
functions can be implemented using ADC viz. Testing power supply voltage of
VDD3P3 pin and testing input voltage of TOUT pin. However, they cannot be
implemented at the same time.

4.4.6.6 UART Pins:

ESP8266 NodeMCU has 2 UART interfaces, i.e. UART0 and UART1, which
provide asynchronous communication (RS232 and RS485), and can communicate at
up to 4.5 Mbps. UART0 (TXD0, RXD0, RST0 & CTS0 pins) can be used for
communication. It supports fluid control. However, UART1 (TXD1 pin) features only
data transmit signal so, it is usually used for printing log.

4.4.6.7 SPI Pins:

ESP8266 features two SPIs (SPI and HSPI) in slave and master modes. These
SPIs also support the following general-purpose SPI features:

27
 4 timing modes of the SPI format transfer
 Up to 80 MHz and the divided clocks of 80 MHz
 Up to 64-Byte FIFO

4.4.6.8 SDIO Pins:

ESP8266 features Secure Digital Input/Output Interface (SDIO) which is used


to directly interface SD cards. 4-bit 25 MHz SDIO v1.1 and 4-bit 50 MHz SDIO v2.0
are supported.

4.4.6.9 PWM Pins:

The board has 4 channels of Pulse Width Modulation (PWM). The PWM output
can be implemented programmatically and used for driving digital motors and LEDs.
PWM frequency range is adjustable from 1000 μs to 10000 μs, i.e., between 100 Hz
and 1 kHz.

4.4.6.10 Control Pins:

Control pins are used to control ESP8266. These pins include Chip Enable pin
(EN), Reset pin (RST) and WAKE pin.

 EN pin – The ESP8266 chip is enabled when EN pin is pulled HIGH. When
pulled LOW the chip works at minimum power.

28
 RST pin – RST pin is used to reset the ESP8266 chip.
 WAKE pin – Wake pin is used to wake the chip from deep-sleep.

4.5 BUZZER:

A buzzer or beeper is an audio signalling device, which may


be mechanical, electromechanical, or piezoelectric (piezo for short). Typical uses of
buzzers and beepers include alarm devices, timers, and confirmation of user input such
as a mouse click or keystroke.

Fig 4.13 Buzzer diagram

4.5.1 TYPES:

4.5.1.1 Electromechanical:

Early devices were based on an electromechanical system identical to


an electric bell without the metal gong. Similarly, a relay may be connected to
interrupt its own actuating current, causing the contacts to buzz. Often these units were
anchored to a wall or ceiling to use it as a sounding board. The word "buzzer" comes
from the rasping noise that electromechanical buzzers made.
4.5.1.2 Mechanical:
A joy buzzer is an example of a purely mechanical buzzer and they require
drivers. Other examples of them are doorbells.
4.5.1.3 Piezoelectric:
A piezoelectric element may be driven by an oscillating electronic circuit or
other audio signal source, driven with a piezoelectric audio amplifier. Sounds
commonly used to indicate that a button has been pressed are a click, a ring or a beep.

29
A piezoelectric buzzer/beeper also depends on acoustic cavity resonance
or Helmholtz resonance to produce an audible beep.
4.5.2 APPLICATIONS:
While technological advancements have caused buzzers to be impractical and
undesirable, there are still instances in which buzzers and similar circuits may be used.
Present day applications include:

 Novelty uses
 Judging panels
 Educational purposes
 Annunciator panels
 Electronic metronomes
 Game show lock-out device
 Microwave ovens and other household appliances
 Sporting events such as basketball games
 Electrical alarms
 Joy buzzer (mechanical buzzer used for pranks)

4.5.3 SIMPLE PIEZO BUZZER CIRCUIT DIAGRAM:


Piezo buzzers are one of the most common buzzers available around, they got
their name from the piezoelectric material used as the active element.

These buzzers are usually driven at a relatively higher voltage but low current,
consumes a little power, but still capable of producing very high sound.

The Piezo element must be a three terminal one, like in the picture.

Fig 4.14 Circuit diagram of Buzzer

30
The blue wire is connected to feedback(F) terminal, red wire to the main (M)
terminal and the black wire to the piezo element’s ground(G) plate.

The inductor coil’s value and shape are not crucial. You can use any coil
from 1mH to 10mH or more, or even no measured value at all. I used a 40-turn coil
on a small ferrite toroid in the final design.

4.5.3.1 Circuit diagram and construction:

Let’s have a look at the circuit diagram,

Fig 4.15 Construction diagram of Buzzer

Note the piezoelectric element’s pinout, M is the main terminal, F is the


feedback terminal and G is the ground plate.

The circuit is fairly simple, you can use a little piece of strip board to make it.
As this piezo buzzer circuit uses very few components, so it also could be constructed
by soldering the components to each other.

When A voltage is applied to the electrodes of the piezo element, they produce
flex in either way. This flex force bends the ground plate up and down.

The exact opposite thing happens too, when a piezoelectric element is subjected
to varying pressure, it produces voltage.

As you’ve seen before, self-drive piezo buzzers are constructed with an extra
electrically isolated feedback electrode. The voltage created by the flex force is
available in the feedback terminal.

31
The piezo buzzer is placed in a resonant cavity, there is a hole in the opposite side of
the resonant cavity from where the buzzing sound comes out.

The driver circuit and piezo buzzer co-operates soon between themselves and they
start oscillating on the resonant frequency of the piezo buzzer.

4.5.4 Piezo Buzzer Characteristics:

 Wide operating voltage: 3~250 V


 Lower current consumption: less than 30 mA higher rated frequency
 Larger footprint
 Higher sound pressure

CHAPTER 5

SOFTWART REQUIREMENTS DETAILS

5.1 EMBEDDED C:

Embedded C is most popular programming language in software field for


developing electronic gadgets. Each processor used in electronic system is associated
with embedded software.

Embedded C programming plays a key role in performing specific function by


the processor. In day-to-day life we used many electronic devices such as mobile
phone, washing machine, digital camera, etc. These all device working is based on
microcontroller that are programmed by embedded C.

32
Fig 5.1 Block diagram of Embedded C

The Embedded C code written in above block diagram is used for blinking the
LED connected with Port0 of microcontroller.

In embedded system programming C code is preferred over other language.


Due to the following reasons:

 Easy to understand
 High Reliability
 Portability
 Scalability

Function is a collection of statements that is used for performing a specific task


and a collection of one or more functions is called a programming language.

Most consumers are familiar with application software that provide


functionality on a computer. Embedded software however is often less visible, but no
less complicated. Unlike application software, embedded software has fixed hardware
requirements and capabilities, and addition of third-party hardware or software is
strictly controlled.
Embedded software needs to include all needed device drivers at manufacturing
time, and the device drivers are written for the specific hardware. The software is
highly dependent on the CPU and specific chips chosen. Most embedded software
engineers have at least a passing knowledge of reading schematics, and reading data
sheets for components to determine usage of registers and communication system.
Conversion between decimal, hexadecimal and binary is useful as well as using bit
manipulation.

33
Web applications are rarely used, although XML files and other output may be
passed to a computer for display. File systems with folders are typically absent as are
SQL databases.

Software development requires use of a cross compiler, which runs on a


computer but produces executable code for the target device. Debugging requires use
of an in-circuit emulator, JTAG or SWD. Software developers often have access to the
complete kernel (OS) source code.
Size of the storage memory and RAM can vary significantly. Some systems run
in 16 KB of Flash and 4 KB of RAM with a CPU operating at 8 MHz, other systems
can rival contemporary computers.[8] These space requirements lead to more work
being done in C or embedded C++, instead of C++. Interpreted languages
like BASIC (while e.g. Parallax Propeller can use compiled BASIC) and Java (Java
ME Embedded is available for e.g. ARM Cortex-M4, Cortex-M7 microcontrollers and
older ARM11used in Raspberry Pi and Intel Galileo Gen. 2) are not commonly used;
while an implementation of the interpreted Python 3 language – MicroPython – is
however available expressly for microcontroller use, e.g. 32-bit ARM-based (such as
BBC micro:bit) and 16-bit PIC microcontrollers.
Communications between processors and between one processor and other
components are essential. Besides direct memory addressing, common protocols
include I²C, SPI, serial ports, and USB.
Communications protocols designed for use in embedded systems are available
as closed source from companies including InterNiche Technologies and CMX
Systems. Open-source protocols stem from uIP, lwip, and others

 This program explains how to use structure within structure in C using normal
variable. “student_college_detail’ structure is declared inside “student_detail”
structure in this program. Both structure variables Please note that members of
“student_college_detail” structure are accessed by 2 dot(.) operator and members
of “student are normal structure variables.

 _detail” structure are accessed by single dot(.) operator.

34
Fig 5.2 Embedded C program with examples

A Keyword is a special word with a special meaning to the compiler (a C


Compiler for example, is a software that is used to convert program written in C to
Machine Code). For example, if we take the Keil’s Cx51 Compiler (a popular C
Compiler for 8051 based Microcontrollers) the following are some of the keywords:

 bit
 sbit
 sfr
 small
 large

These are few of the many keywords associated with the Cx51 C Compiler along with
the standard C Keywords.

5.2 ARDUINO IDE:

Arduino is an open-source platform used for building electronics projects.


Arduino consists of both a physical programmable circuit board (often referred to as
a microcontroller) and a piece of software, or IDE (Integrated Development
Environment) that runs on your computer, used to write and upload computer code to
the physical board.
The Arduino platform has become quite popular with people just starting out
with electronics, and for good reason. Unlike most previous programmable circuit
boards, the Arduino does not need a separate piece of hardware (called a programmer)
in order to load new code onto the board – you can simply use a USB cable.

35
Additionally, the Arduino IDE uses a simplified version of C++, making it easier to
learn to program. Finally, Arduino provides a standard form factor that breaks out the
functions of the micro-controller into a more accessible package.

The Arduino hardware and software were designed for artists, designers,
hobbyists, hackers, newbies, and anyone interested in creating interactive objects or
environments. Arduino can interact with buttons, LEDs, motors, speakers, GPS units,
cameras, the internet, and even your smart-phone or your TV! This flexibility
combined with the fact that the Arduino software is free, the hardware boards are
pretty cheap, and both the software and hardware are easy to learn has led to a large
community of users who have contributed code and released instructions for
a huge variety of Arduino-based projects

There are many varieties of Arduino boards (explained on the next page) that
can be used for different purposes. Some boards look a bit different from the one
below, but most Arduinos have the majority of these components in common:

Fig 5.3 Arduino IDE Diagram

Programs written using Arduino Software (IDE) are called sketches. These


sketches are written in the text editor and are saved with the file extension .ino. The
editor has features for cutting/pasting and for searching/replacing text. The message
area gives feedback while saving and exporting and also displays errors. The console
displays text output by the Arduino Software (IDE), including complete error
messages and other information. The bottom righthand corner of the window displays

36
the configured board and serial port. The toolbar buttons allow you to verify and
upload programs, create, open, and save sketches, and open the serial monitor
The Arduino IDE is incredibly minimalistic, yet it provides a near-complete
environment for most Arduino-based projects. The top menu bar has the standard
options, including “File” (new, load save, etc.), “Edit” (font, copy, paste, etc.),
“Sketch” (for compiling and programming), “Tools” (useful options for testing
projects), and “Help”. The middle section of the IDE is a simple text editor that
where you can enter the program code. The bottom section of the IDE is dedicated
to an output window that is used to see the status of the compilation, how much
memory has been used, any errors that were found in the program, and various
other useful messages.
Projects made using the Arduino are called sketches, and such sketches are
usually written in a cut-down version of C++ (a number of C++ features are not
included). Because programming a microcontroller is somewhat different from
programming a computer, there are a number of device-specific libraries (e.g.,
changing pin modes, output data on pins, reading analog values, and timers). This
sometimes confuses users who think Arduino is programmed in an “Arduino
language.” However, the Arduino is, in fact, programmed in C++. It just uses
unique libraries for the device.

Fig 5.4 Arduino IDE Software diagram

The Arduino IDE supports the languages C and C++ using special rules of code


structuring. The Arduino IDE supplies a software library from the Wiring project,
which provides many common input and output procedures. User-written code only
requires two basic functions, for starting the sketch and the main program loop, that
are compiled and linked with a program stub main() into an executable cyclic

37
executive program with the GNU toolchain, also included with the IDE distribution.
The Arduino IDE employs the program avrdude to convert the executable code into a
text file in hexadecimal encoding that is loaded into the Arduino board by a loader
program in the board's firmware.

FLOW CHART

38
CODING

#include<SoftwareSerial.h>

SoftwareSerial mySerial(6,7); //2-rx,3-tx

String x,y;

int j=0;

int authorised1=0;

int authorised2=0;

int authorised3=0;

int authorised4=0;

int buzzer=13;

void setup()

Serial.begin(9600);

mySerial.begin(9600);

pinMode(buzzer,OUTPUT);

void loop()

if(mySerial.available()>0)

39
String a=mySerial.readString();

x=a;

y=a;

Serial.println(a);

if(Serial.available()>0)

String s=Serial.readString();

Serial.println(s);

if((s=="1")&& (authorised1==0))

if(x=="2B00E22D51B5")

Serial.println("*");

Serial.println("NAME ASHOK ,VOTERS ID:235455");

Serial.println("25% VOTED");

Serial.println("#");

x="0";

authorised1=1;

else if(authorised1==1)

{ Serial.println("else");

digitalWrite(buzzer,HIGH);

40
delay(1000);

digitalWrite(buzzer,LOW);

delay(1000);

if((s=="2")&& (authorised2==0))

if(x=="2B00E21A1FCC")

Serial.println("*");

Serial.println("NAME KUMAR ,VOTERS ID:987525");

Serial.println("50% VOTED");

Serial.println("#");

x="0";

authorised2=1;

else if(authorised2==1)

digitalWrite(buzzer,HIGH);

delay(1000);

digitalWrite(buzzer,LOW);

delay(1000);

if((s=="3")&&(authorised3==0))

41
{

if(x=="2B00E2425ED5")

Serial.println("*");

Serial.println("NAME VINAY ,VOTERS ID:547525");

Serial.println("75% VOTED");

Serial.println("#");

x="0";

authorised3=1;

else if(authorised3==1)

digitalWrite(buzzer,HIGH);

delay(1000);

digitalWrite(buzzer,LOW);

delay(1000);

if((s=="4")&&(authorised4=0))

if(x=="2B00E17F5AEF")

Serial.println("*");

Serial.println("NAME SAI ,VOTERS ID:147525");

42
Serial.println("100% VOTED");

Serial.println("#");

x="0";

authorised4=1;

else if(authorised4==1)

digitalWrite(buzzer,HIGH);

delay(1000);

digitalWrite(buzzer,LOW);

delay(1000);

OUTPUT

43
CHAPTER 6

CONCLUSION

Implementation of fingerprint-based voting system using Rfid based on Internet


of Things had been proposed. The proposed schemes are very suitable for real time
management. The fingerprint-based voting system is accurate and it avoids the fake
votes and problems in machine. This voting system is more accuracy and fairness,
eligible candidate only can poll the vote. The fingerprint recognition techniques
provide more privacy to the voting system. In case any unauthenticated individuals try
to cast their votes, the buzzer is capable of alerting the presiding officer as soon as
possible. The voting scheme is considerable designed for 99% of users. The remaining
1% is for the physically challenged users.

44
CHAPTER 7

REFERENCES

[1]. D. Maio, D. Maltoni, A. K. Jain, and S. Prabhakar (2003). Handbook of


Fingerprint Recognition. Springer Verlag.

[2]. Jain, K, Ross, A, Prabhakar, S (2004). An Introduction to Biometric Recognition.


New York, USA.

[3]. Farah Azirar, (2011). Fingerprint Recognition. Bachelor Thesis. School of


Electronics and Physical Sciences, Department of Electronic Engineering, University
of Surrey.

[4]. Jawad Nagi, (2009). Design of an Efficient High-speed fingerprint Recognition


System.

[5]. A. Ross, S. Dass, and A. K. Jain (2010). A deformable model for fingerprint
matching, Pattern Recognition. University of Michigan.

[6]. Z. Pan, H. Bolouri (2010). figerprint matching on Discrete Cosine Transform and
Neural Networks. University of Hertfordshire, Herts, United Kingdom.

[7]. Ren, Zujie, et al. "iGen: A Realistic Request Generator for Cloud File Systems
Benchmarking

45

S-ar putea să vă placă și