Download as pdf or txt
Download as pdf or txt
You are on page 1of 82

A STEP TOWARDS SMART RATION CARD SYSYTEM

USING RFID & IOT


A Major Project Report submitted to JNTU Kakinada in partial fulfillment of the
requirements for the award of the degree

BACHELOR OF TECHNOLOGY

In

ELECTRONICS AND COMMUNICATION ENGINEERING

Submitted by

K. Mani Kumar 187W5A0402

T. Amara Bhargavi 177W1A0478

Y. Meenakshi 177W1A0483

Under the Guidance of

Mr. SK. MAHABOOB SUBANI


B. Tech, M. Tech (ES)

ASSISTANT PROFESSOR

DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING


MALINENI PERUMALLU EDUCATIONAL SOCIETY’S GROUP
OF INSTITUTIONS
(Approved by AICTE, New Delhi & Affiliated to JNTU Kakinada)
2017 – 2021
I
MALINENI PERUMALLU
EDUCATIONAL SOCIETY’S GROUP OF INSTITUTIONS
(Affiliated to J.N.T.U Kakinada, Approved by A.I.C.T.E.)
Pulladigunta (v) 522017, Guntur (DT)

DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING

CERTIFICATE

This is to certify that, the mini project entitled “A STEP TOWARDS SMART RATION
CARD USING RFID & IOT” has been submitted by K. Mani Kumar, T. Amara Bhargavi,
Y. Meenakshi in partial fulfillment of the requirements for the award of BACHELOR OF
TECHNOLOGY in ELECTRONICS & COMMUNICATION ENGINEERING . This
record of Bonafede work carried out by them under my guidance and supervision. The result embodied in
this mini project report has not been submitted to any other University or Institute for the award of any
degree.

PROJECT GUIDE HEAD OF THE DEPARTMENT


Mr. SK. Mahaboob Subani B. Tech, M. Tech. Dr. D Vijaya Saradhi M.E, Ph.D.
Assistant Professor Head of the Department
MPES, Pulladigunta. MPES, Pulladigunta.

External Examiner
II
ACKNOWLEDGEMENT

We take this opportunity to remember and acknowledge the cooperation, good will and support
both moral and technical extended by several individuals out of which my technical seminar has
evolved. I shall always cherish my association with them.
We greatly thankful to our, Dr. D. Srinivas Kumar M. Tech, Ph.D., Director of our college, for
extending his help. I shall forever cherish my association with him for his encouragement,
approachability, absolute freedom of thought and action.
Our sincere thanks to Dr. D. Vijaya Saradhi M. Tech, Ph.D., Head of the Department of ECE for
his co-operation.
We would be thankful to My Guide Mr. SK. Mahaboob Subani M. tech, for his encouragement,
suggestions and support in completing my technical seminar.
We are thankful to the Teaching and non-Teaching staff of ECE department for their direct as well
as indirect help in my technical seminar.

Submitted By

K. MANI KUMAR (187W5A0402)

T. AMARA BHARGAVI (177W1A0478)

Y. MEENAKSHI (177W1A0483)

III
A STEP TOWARDS SMART RATION
CARD SYASTEM USING
RFID & IOT

IV
ABSTRACT

The main objective of this project is to detect the faults and abnormalities occurring in underground
cables using an Arduino. The basic idea behind the working of this project.

At the feeder end, when a DC voltage is applied, based on the location of fault in the cable.
The value of current also changes. So, in case of a short circuit fault like L- G or L-L fault the
change in voltage value measured across the sensor is then fed to the in-built ADC of the Arduino.

This value is processed by the Arduino and the fault is calculated in terms of distance from
the base station. This value is sent to the LCD interfaced to the Arduino board and it displays exact
location of the fault from the base station in kilometers for all the three phases.

This project is arranged with a set of resistors which represent the length of the cable. At all
known kilometer fault switches are placed to induce faults manually. Finally, the fault distance
can be determined.

This project uses regulated 5V, 500mA power supply. 7805 three terminal voltage regulator
is used for voltage regulation. Bridge type full wave rectifier is used to rectify the ac output of
secondary of 230/12V step down transformer.

V
INDEX
Chapter Page No.

ABSTRACT V
LIST OF FIGURES X
LIST OF TABLES XIII
1. EMBEDDED SYSTEM 1
1.1. Introduction to Embedded Systems 1
1.2. Characteristics of Embedded Systems 2
1.3. Applications of Embedded Systems 2
1.4. Microcontroller Vs Microprocessor 3
1.5. Microcontroller for Embedded Systems 3

2. INTRODUCTION TO PROJECT 5
2.1. Introduction 5
2.2. Block Diagram 6

3. ARDUINO UNO 7
3.1. Microcontroller 7
3.1.1. Introduction 7
3.1.2. Arduino UNO Microcontroller 7
3.1.3. Memory 8
3.1.4. Input and Output 8
3.1.5. Communication 9
3.2. Arduino UNO Board 10
3.3. Technical Specifications 11
3.4. Pin Description 13

4. HARDWARE COMPONENTS 16
4.1. Power Supply Unit 16
4.1.1. Transformer 16
4.1.2. Diodes 17
4.1.3. Rectifier 18
4.2. The Half-Wave Rectifier 18
4.3. The Full-Wave Bridge Rectifier 19
4.4. Capacitor Filter 20
4.5. Voltage Regulator 20
VI
INDEX
Chapter Page No.

4.6. RFID 21
4.6.1. RFID Technology and Architecture 22
4.6.2. RFID Frequencies 23
4.6.3. RFID Design Approach 23
4.6.4. Near-Field RFID 23
4.6.5. Far-Field RFID 25
4.6.6. RFID Module and Principle of Working 27
4.7. Features of RFID 28
4.7.1. Reading Allocated Tags 28
4.7.2. Enabling a Distributed Memory Revolution 28
4.7.3. RFID that Incorporates Sensing 29
4.7.4. Privacy Concerns 29
4.7.5. Application Areas 29
4.8. Current and Potential uses of RFID 30
4.8.1. Asset Tracking 30
4.8.2. Security and Access Control 30
4.8.3. People Tracking 31
4.8.4. Document Tracking 31
4.8.5. Government Library 31
4.8.6. Health Care 31
4.8.7. Transportation Payments 32
4.8.8. Promotion Tracking 32
4.9. Manufacturing 32
4.10. Supply Chain Management 32
4.11. Retailing 32
4.12. The Future of RFID 33
4.13. Keypad (Matrix) 33
4.13.1. Introduction 33
4.13.2. Constructing a Matrix Keypad 33
4.13.3. Scanning a Matrix Keypad 34
4.13.4. Schematic 35
4.13.5. Applications 37
4.13.6. Uses 37
VII
INDEX
Chapter Page No.

4.14. LCD 37
4.14.1. Description of 16X2 37
4.14.2. Schematic Diagram 38
4.14.3. 16X2 Alphanumeric LCD Module Features 39
4.14.4. 16X2 Alphanumeric LCD Module Specification 40
4.15. Features 40
4.16. Power Supply for LCD Driving 42
4.17. Pin Description LCD 42
4.18. Control Lines 43
4.19. Logic Status on Control Lines 44
4.20. Contrast Control 44
4.21. Potentiometer 44
4.22. Present 44
4.23. Switches 45
4.24. Uses 47
4.25. DC Motor 47
4.25.1. Introduction 47
4.26. L293D-Dc Motor Driver IC 49
4.26.1. Features 49
4.26.2. Description 50
4.27. ESP8266 WIFI Module 52
4.28. ESP8266 Pin Configuration 53
4.29. ESP8266-01 Features 54
4.30. Where to Use the ESP8266-01 54
4.31. How to Use ESP8266 Module 54
4.32. Applications 55
4.33. 2D-Model 55

5. SOFTWARES 56
5.1. Introduction to Arduino IDE 56
5.2. Arduino Data types 56
5.2.1. Void 57
5.2.2. Boolean 57
VIII
INDEX
Chapter Page No.

5.2.3. Char 57
5.2.4. Unsigned Char 58
5.2.5. Byte 58
5.2.6. Int 58
5.2.7. Unsigned Int 58
5.2.8. Word 59
5.2.9. Long 59
5.2.10. Unsigned Long 59
5.2.11. Short 59
5.2.12. Float 59
5.3. Double 60
5.4. Arduino Programming Structure 65
5.4.1. Sketch 65
5.4.2. Structure 65
5.4.3. Purpose 66

6. RESULTS 67
6.1. Results 67

7. CONCLUTION AND FUTURE SCOPE 68


7.1. Conclusion 68
7.2. References 69

IX
LIST OF FIGURES

Fig. No. Figure name Page no.


2.1 Block Diagram 6

3.1 Arduino UNO Board 10

3.2 Microcontroller Pin Diagram 13

4.1 Power Supply 16

4.2 Transformers 17

4.3 Diode Symbol 17

4.4 Half-Wave Rectifier 18

4.5 Half-Wave Rectifier 18

4.6 Full-Wave Rectifier 19

4.7 Full-Wave Rectifier 19

4.8 Centered Tapped Full Wave Rectifier 20

with a Capacitor Filter

4.9 Regulator 21

4.10 Active and Passive Tag 21

4.11 RFID Technology & Architecture 22

4.12 Near Field Power 24

4.13 Far Field RFID 25

4.14 Far Field Power 26

4.15 RFID Module 27

4.16 EM-18 RFID Module 28

4.17 Matrix Keypad on PCB Board 33

4.18 Internal Arrangement of the Keypad 34


X
LIST OF FIGURES

Fig. No. Figure name Page no.


4.19 Internal Key Connections 34

4.20 Keypad Arrangement 35

4.21 Interface Keypad 35

4.22 Key Scan Routine 36

4.23 LCD Display 38

4.24 Schematic Diagram 38

4.25 Electrical Block Diagram 41

4.26 Power Supply for LCD 42

4.27 Pin Diagram of LCD 42

4.28 Pin Diagram of 1X6 LCD 42

4.29 Pin Specifications 43

4.30 Variable Resister 44

4.31 Potentiometer Symbol 44

4.32 Preset Symbol 45

4.33 Switches LCD 46

4.34 H-Bride Theory 47

4.35 Motor 48

4.36 Motor Current Flow 48

4.37 Pin Diagram 49

4.38 Block Diagram 50

4.39 Function Table 51

4.40 Logic Diagram 51

XI
LIST OF FIGURES

Fig. No. Figure name Page no.


4.41 Truth Table 51

4.42 ESP8266 WIFI Module 52

4.43 ESP8266 Pinout 53

4.44 Circuit Diagram ESP8266-01 55

4.45 2D-Module 55

5.1 USB Cable 60

5.2 Downloading Page 61

5.3 Lunching Page 61

5.4 Creating New Project 62

5.5 Process Blink LED 62

5.6 Arduino UNO Tutorial 63

5.7 Arduino UNO Com 3 64

5.8 Symbols 64

5.9 Void Setup 65

6.1 Photocopy of Arduino UNO Board 67

XII
LIST OF TABLES

Table No. Table Name Page no


3.1 Arduino UNO Specifications 11

4.1 Functions of Alphanumeric 40

4.2 Address Location for a 1X6 Line LCD 41

4.3 Pin Name and Its Uses 53

XIII
A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

CHAPTER 1

EMBEDDED SYSTEMS

1.1. INTRODUCTION TO EMBEDDED SYSTEMS


An embedded system is a special-purpose computer system designed to perform one or a few
dedicated functions, sometimes with real-time computing constraints. It is usually embedded
as part of a complete device including hardware and mechanical parts. In contrast, a general-
purpose computer, such as a personal computer, can do many different tasks depending on
programming. Embedded systems have become very important today as they control many of
the common devices we use.

Since the embedded system is dedicated to specific tasks, design engineers can optimize
it, reducing the size and cost of the product, or increasing the reliability and performance. Some
embedded systems are mass-produced, benefiting from economies of scale.

Physically embedded systems range from portable devices such as digital watches and
MP3 players, to large stationary installations like traffic lights, factory controllers, or the
systems controlling nuclear power plants. 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.

In general, "embedded system" is not an exactly defined term, as many systems have
some element of programmability. For example, Handheld computers share some elements
with embedded systems — such as the operating systems and microprocessors which power
them — but are not truly embedded systems, because they allow different applications to be
load and peripherals to be connected.

An embedded system is some combination of computer hardware and software, either


fixed in capability or programmable, that is specifically designed for a particular kind of
application device. Industrial machines, automobiles, medical equipment, cameras, household
appliances, airplanes, vending machines, and toys (as well as the more obvious cellular phone
and PDA) are among the myriad possible hosts of an embedded system.

MPES ECE Page 1


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

Embedded systems that are programmable are provided with a programming interface,
and embedded systems programming is a specialized occupation. Certain operating systems or
language platforms are tailored for the embedded market, such as Embedded Java and
Windows XP Embedded.

However, some low-end consumer products use very inexpensive microprocessors and
limited storage, with the application and operating system both part of a single program. The
program is written permanently into the system's memory in this case, rather than being loaded
into RAM (random access memory), as programs on a personal computer are.

1.2. CHARACTERISTIC OF EMBEDDED SYSTEM


 Speed (bytes/sec): Should be high speed
 Power (watts): Low power dissipation
 Size and weight: As far as possible small in size and low weight
 Accuracy (%error): Must be very accurate
 Adaptability: High adaptability and accessibility
 Reliability: Must be reliable over a long period of time

1.3. APPLICATIONS OF EMBEDDED SYSTEMS


We are living in the Embedded World. You are surrounded with many embedded products and
your daily life largely depends on the proper functioning of these gadgets. Television, Radio,
CD player of your living room, Washing Machine or Microwave Oven in your kitchen, Card
readers, Access Controllers, Palm devices of your work space enable you to do many of your
tasks very effectively. Apart from all these, many controllers embedded in your car take care
of car operations between the bumpers and most of the times you tend to ignore all these
controllers.
 Robotics: industrial robots, machine tools, Robocop soccer robots
 Automotive: cars, trucks, trains
 Aviation: airplanes, helicopters
 Home and Building Automation
 Aerospace: rockets, satellites
 Energy systems: windmills, nuclear plant
 Medical systems: prostheses, revalidation machine.

MPES ECE Page 2


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

1.4. MICROCONTROLLER VERSUS MICROPROCESSOR


What is the difference between a Microprocessor and Microcontroller? By microprocessor is
meant the general-purpose Microprocessors such as Intel's X86 family (8086, 80286, 80386,
80486, and the Pentium) or Motorola's 680X0 family (68000, 68010, 68020, 68030, 68040,
etc.) These microprocessors contain no RAM, no ROM, and no I/O ports on the chip itself. For
this reason, they are commonly referred to as general-purpose Microprocessors.

A system designer using a general-purpose microprocessor such as the Pentium or the


68040 must add RAM, ROM, I/O ports, and timers externally to make them functional.
Although the addition of external RAM, ROM, and I/O ports makes these systems bulkier and
much more expensive, they have the advantage of versatility such that the designer can decide
on the amount of RAM, ROM and I/O ports needed to fit the task at hand. This is not the case
with Microcontrollers.

A Microcontroller has a CPU (a microprocessor) in addition to a fixed amount of RAM,


ROM, I/O ports, and a timer all on a single chip. In other words, the processor, the RAM,
ROM, I/O ports and the timer are all embedded together on one chip; therefore, the designer
cannot add any external memory, I/O ports, or timer to it. The fixed amount of on-chip ROM,
RAM, and number of I/O ports in Microcontrollers makes them ideal for many applications in
which cost and space are critical.

In many applications, for example a TV remote control, there is no need for the
computing power of a 486 or even an 8086 microprocessor. These applications most often
require some I/O operations to read signals and turn on and off certain bits.

1.5. MICROCONTROLLERS FOR EMBEDDED SYSTEMS


In the Literature discussing microprocessors, we often see the term Embedded System.
Microprocessors and Microcontrollers are widely used in embedded system products.
An embedded system product uses a microprocessor (or Microcontroller) to do one task
only. A printer is an example of embedded system since the processor inside it performs one
task only; namely getting the data and printing it. Contrast this with a Pentium based PC.
A PC can be used for any number of applications such as word processor, print-server,
bank teller terminal, Video game, network server, or Internet terminal. Software for a variety
of applications can be loaded and run.
MPES ECE Page 3
A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

Of course, the reason a pc can perform myriad tasks is that it has RAM memory and an
operating system that loads the application software into RAM memory and lets the CPU run
it.
In this robot as the fire sensor senses the fire, it senses the signal to microcontroller. In
an Embedded system, there is only one application software that is typically burned into ROM.
An x86 PC contains or is connected to various embedded products such as keyboard, printer,
modem, disk controller, sound card, CD-ROM drives, mouse, and so on. Each one of these
peripherals has a Microcontroller inside it that performs only one task.

MPES ECE Page 4


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

CHAPTER 2

INTRODUCTION TO PROJECT

2.1. INTRODUCTION
 Ration cards, they are an important subsistence tool for the poor, providing proof of
identity and a connection with government databases. India's public distribution system
(PDS) is based on the ration card, which it uses to establish identity, eligibility, and
entitlement.

 The distribution of ration is directly controlled and monitored by both the central
government and the state government authorities.

 While the central government is responsible for procurement, storage, transportation,


and bulk allocation of food grains, state governments hold the responsibility for
distributing the same to the consumers through the established network of FPSs.

 The process of allocating and identifying families below poverty line, issuing ration
cards, supervising and monitoring the functioning of FPSs is done by State
Governments. Under PDS scheme, each family below the poverty line is eligible for 35
kg of rice or wheat every month, while a household above the poverty line is entitled to
15 kg of food grain on a monthly basis .

 India’s Public Distribution System (PDS) is the largest retail system in the world.
System of Public Distribution System provides a ration card issued under an order or
authority of the state government for the buy of essential consumer materials like Rice,
Wheat, Kerosene and Oil. State Government issues distinctive ration identity cards like
yellow ration card, Saffron (Orange) ration card and White ration card depending on
family annual income.

 The consumer material is feeding to ration card holders in the first week of every month
by ration shop keeper. System of Public Distribution is one of the widely disputable
issues that involve malpractice.

MPES ECE Page 5


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

 The manuscript intervention in weighing of the materials leads to incorrect


measurements and/or it may happen, the ration shop owner illegally uses consumer
materials (Rice, Wheat, Kerosene) without previously knowledge of ration card
holders.

 In the existing system, tasks like product distribution, Ration card entry, product
weighing and delivery of the product are carried out manually by FPS (Fair providing
service) agent. However, a present system has diverse drawbacks involved, developing
irregularities in the system. Some of the irregularities include replacing actual products
dispensed by the government with measure quality product and supplying the same for
the beneficiaries, diverting food grains to open market to make profit, false entries in
the stock registers that FPS agent needs to maintain and false announcement of deceit.

2.2. BLOCK DIAGRAM

Figure.2.1. Block Diagram

MPES ECE Page 6


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

CHAPTER 3
ARDUINO UNO

3.1 Microcontroller:
3.1.1 Introduction:
Microcontroller as the name suggest, a small controller. They are like single chip
computers that are often embedded into other systems to function as processing/controlling
unit. For example, the control you are using probably has microcontrollers inside that do
decoding and other controlling functions. They are also used in automobiles, washing
machines, microwaves ovens, toys…. etc., where automation is needed.

3.1.2 Arduino Uno Microcontroller:


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 crystal oscillator, 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 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 Atmega8U2 programmed as a USB-to-serial
converter. "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.

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.

MPES ECE Page 7


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

If supplied with less than 7V, however, the 5Vpin 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.
The power pins are as follows: -

 VIN. The input voltage to the Arduino board when it's using an external power
source (as opposed to5 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. The regulated power supply used to power the microcontroller and other
components on the board. This can come either from VIN via an on-board
regulator, or be supplied by USB or another regulated 5V supply.
 3.3V.A 3.3-volt supply generated by the on-board regulator. Maximum current
draw is 50 mA.
 GND. Ground pins.

3.1.3 Memory:
The Atmega328 has 32 KB of flash memory for storing code (of which 0,5 KB is used
for the bootloader); It has also 2 KB of SRAM and 1 KB of EEPROM (which can be read and
written with the EEPROM library).

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

MPES ECE Page 8


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

 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, which although provided by the underlying hardware, is not currently
included in the Arduino language.
 LED: 13. There is a built-in LED connected to digital pin 13. When the pin is HIGH
value, the LED icon, when the pin is LOW, it's off.
The Uno has 6 analog inputs, 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:
 I2C: 4 (SDA) and 5 (SCL). Support I2C (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.

3.1.5 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 ATmega8U2 on the
board channels this serial communication over USB and appears as a virtual com port to
software on the computer. The '8U2 firmware uses the standard USBCOM drivers, and no
external driver is needed. However, on Windows, an *.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 support I2C (TWI) and SPI communication. The Arduino software
includes a Wire library to simplify use of the I2C bus.

MPES ECE Page 9


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

3.2 ARDUINO UNO BOARD:

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 an AC-to-DC adapter or battery to get started.

Figure 3.1: Arduino uno board

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

MPES ECE Page 10


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

3.3 Technical Specifications:

Table 3.1: Arduino uno specifications

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.
1.USB Interface:
Arduino board can be powered by using the USB cable from your computer. All you
need to do is connect the USB cable to the USB connection
2.External power supply:
Arduino boards can be powered directly from the AC mains power supply by
connecting it to the power supply (Barrel Jack)
3.Voltage Regulator:
The function of the voltage regulator is to control the voltage given to the Arduino
board and stabilize the DC voltages used by the processor and other elements.

MPES ECE Page 11


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

4.Crystal Oscillator:
The crystal oscillator helps Arduino in dealing with time issues. How does Arduino
calculate time? The answer is, by using the crystal oscillator. The number printed on top of the
Arduino crystal is 16.000H9H. It tells us that the frequency is 16,000,000 Hertz or 16 MHz
5-17. Arduino Reset:
It can reset your Arduino board, i.e., start your program from the beginning. It can reset
the UNO board in two ways. First, by using the reset button (17) on the board. Second, you can
connect an external reset button to the Arduino pin labelled RESET (5).
6-9. Pins (3.3, 5, GND, Vin):
 3.3V (6): Supply 3.3 output volt
 5V (7): Supply 5 output volt
 Most of the components used with Arduino board works fine with 3.3 volt
and 5 volts.
 GND (8) (Ground): There are several GND pins on the Arduino, any of which can
be used to ground your circuit.
 Vin (9): This pin also can be used to power the Arduino board from an
external power source, like AC mains power supply.
10.Analog pins:
The Arduino UNO board has five analog input pins A0 through A5. These pins can
read the signal from an analog sensor like the humidity sensor or temperature sensor and
convert it into a digital value that can be read by the microprocessor.
11.Main microcontroller:
Each Arduino board has its own microcontroller (11). You can assume it as the brain
of your board. The main IC (integrated circuit) on the Arduino is slightly different from board
to board. The microcontrollers are usually of the ATMEL Company. You must know what IC
your board has before loading up a new program from the Arduino IDE. This information is
available on the top of the IC. For more details about the IC construction and functions, you
can refer to the data sheet.

The Atmega8U2 programmed as a USB-to-serial converter. "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.

MPES ECE Page 12


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

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.

Figure 3.2: Pin diagram

3.4 Pin Description:


VCC: Digital supply voltage.
GND: Ground.
Port B (PB [7:0]) XTAL1/XTAL2/TOSC1/TOSC2:
Port B is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each
bit). The Port B output buffers have symmetrical drive characteristics with both high sink and
source capability. As inputs, Port B pins that are externally pulled low will source current if
the pull-up resistors are activated. The Port B pins are tri-stated when a reset condition becomes
active, even if the clock is not running.
Depending on the clock selection fuse settings, PB6 can be used as input to the inverting
Oscillator amplifier and input to the internal clock operating circuit.
Depending on the clock selection fuse settings, PB7 can be used as output from the
inverting Oscillator amplifier.
If the Internal Calibrated RC Oscillator is used as chip clock source, PB [7:6] is used
as TOSC [2:1] input for the Asynchronous Timer/Counter2 if the AS2 bit in ASSR is set.
MPES ECE Page 13
A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

Port C (PC [5:0]):


Port C is a 7-bit bi-directional I/O port with internal pull-up resistors (selected for each
bit). The PC [5:0] output buffers have symmetrical drive characteristics with both high sink
and source capability. As inputs, Port C pins that are externally pulled low will source current
if the pull-up resistors are activated. The Port C pins are tri-stated when a reset condition
becomes active, even if the clock is not running.
PC6/RESET:
If the RSTDISBL Fuse is programmed, PC6 is used as an I/O pin. Note that the
electrical characteristics of PC6 differ from those of the other pins of Port C.
If the RSTDISBL Fuse is unprogrammed, PC6 is used as a Reset input. A low level on
this pin for longer than the minimum pulse length will generate a Reset, even if the clock is not
running. Shorter pulses are not guaranteed to generate a Reset.
Port D (PD [7:0]):
Port D is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each
bit). The Port D output buffers have symmetrical drive characteristics with both high sink and
source capability.
As inputs, Port D pins that are externally pulled low will source current if the pull-up
resistors are activated. The Port D pins are tri-stated when a reset condition becomes active,
even if the clock is not running.
AVCC: AVCC is the supply voltage pin for the A/D Converter, PC [3:0], and PE [3:2]. It
should be externally connected to VCC, even if the ADC is not used. If the ADC is used, it
should be connected to VCC through a low-pass filter. Note that PC [6:4] use digital supply
voltage, VCC.
AREF: AREF is the analog reference pin for the A/D Converter.
ADC [7:6] (TQFP and VFQFN Package Only): In the TQFP and VFQFN package,
ADC [7:6] serve as analog inputs to the A/D converter. These pins are powered from the analog
supply and serve as 10-bit ADC channels.
12. ICSP pin: Mostly, ICSP (12) is an AVR, a tiny programming header for the Arduino
consisting of MOSI, MISO, SCK, RESET, VCC, and GND. It is often referred to as an SPI
(Serial Peripheral Interface), which could be considered as an "expansion" of the output.
Actually, you are slaving the output device to the master of the SPI bus.

MPES ECE Page 14


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

13. Power LED indicator: This LED should light up when you plug your Arduino into a
power source to indicate that your board is powered up correctly. If this light does not turn on,
then there is something wrong with the connection.
14. TX and RX LEDs: On your board, you will find two labels: TX (transmit) and RX
(receive). They appear in two places on the Arduino UNO board. First, at the digital pins 0 and
1, to indicate the pins responsible for serial communication.
Second, the TX and RX led (13). The TX led flashes with different speed while sending
the serial data. The speed of flashing depends on the baud rate used by the board. RX flashes
during the receiving process.
15. Digital I / O: The Arduino UNO board has 14 digital I/O pins (15) (of which 6 provide
PWM (Pulse Width Modulation) output. These pins can be configured to work as input digital
pins to read logic values (0 or 1) or as digital output pins to drive different modules like LEDs,
relays, etc. The pins labeled “~” can be used to generate PWM.
16. AREF: AREF stands for Analog Reference. It is sometimes, used to set an external
reference voltage (between 0 and 5 Volts) as the upper limit for the analog input pins working.

MPES ECE Page 15


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

CHAPTER 4

HARDWARE COMPONENTS

4.1. POWER SUPPLY UNIT

The power supply for this system is shown below.

Figure.4.1. power supply

4.1.1 Transformer:
Transformer is a static device used to convert the voltage from one level to another level
without change its frequency. There are two types of transformers
1. Step-up transformer
2. Step-down transformer
Step-up transformer converts low voltage level into high voltage level without change its
frequency.
Step-down transformer converts high voltage level into low voltage level without change its
frequency.
In this project we using step-down transformer which converts 230V AC to 12V AC [or] 230V
AC to 5V as shown below.

MPES ECE Page 16


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

Figure.4.2. Transformers

4.1.2. Diodes:
Diodes allow electricity to flow in only one direction. The arrow of the circuit symbol shows
the direction in which the current can flow. Diodes are the electrical version of a valve and
early diodes were actually called valves.

Figure.4.3. Diode Symbol

A diode is a device which only allows current to flow through it in one direction. In this
direction, the diode is said to be 'forward-biased' and the only effect on the signal is that there
will be a voltage loss of around 0.7V. In the opposite direction, the diode is said to be 'reverse-
biased' and no current will flow through it.

MPES ECE Page 17


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

4.1.3. Rectifier
The purpose of a rectifier is to convert an AC waveform into a DC waveform (OR) Rectifier
converts AC current or voltages into DC current or voltage. There are two different rectification
circuits, known as 'half-wave' and 'full-wave' rectifiers. Both use components called diodes
to convert AC into DC.

4.2 The Half-wave Rectifier


The half-wave rectifier is the simplest type of rectifier since it only uses one diode, as shown
in figure.

Figure.4.4 Half Wave Rectifier


Figure 2 shows the AC input waveform to this circuit and the resulting output. As you can see,
when the AC input is positive, the diode is forward-biased and lets the current through. When
the AC input is negative, the diode is reverse-biased and the diode does not let any current
through, meaning the output is 0V. Because there is a 0.7V voltage loss across the diode, the
peak output voltage will be 0.7V less than Vs.

Figure.4.5 Half-Wave Rectification wave form

MPES ECE Page 18


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

While the output of the half-wave rectifier is DC (it is all positive), it would not be suitable as
a power supply for a circuit. Firstly, the output voltage continually varies between 0V and Vs-
0.7V, and secondly, for half the time there is no output at all.
4.3 The Full-wave Bridge Rectifier
The circuit in figure 3 addresses the second of these problems since at no time is the output
voltage 0V. This time four diodes are arranged so that both the positive and negative parts of
the AC waveform are converted to DC. The resulting waveform is shown in figure 4.

Figure.4.6. Full-Wave Rectifier

Figure.4.7. Full-Wave Rectification wave form


When the AC input is positive, diodes A and B are forward-biased, while diodes C and D are
reverse-biased. When the AC input is negative, the opposite is true - diodes C and D are
forward-biased, while diodes A and B are reverse-biased.
While the full-wave rectifier is an improvement on the half-wave rectifier, its output still isn't
suitable as a power supply for most circuits since the output voltage still varies between 0V
and Vs-1.4V. So, if you put 12V AC in, you will 10.6V DC out.

MPES ECE Page 19


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

4.4 Capacitor Filter


The capacitor-input filter, also called "Pi" filter due to its shape that looks like the Greek
letter pi, is a type of electronic filter. Filter circuits are used to remove unwanted or undesired
frequencies from a signal.
A typical capacitor input filter consists of a filter capacitor C1, connected across the rectifier
output. The capacitor C1 offers low reactance to the AC component of the rectifier output while
it offers infinite reactance to the DC component. As a result, the AC components are going to
ground. At that time DC components are feed to Regulator.

Figure.4.8. Centered Tapped Full-Wave Rectifier with a Capacitor Filter

4.5. Voltage Regulator:


A voltage regulator is an electrical regulator designed to automatically maintain a constant
voltage level. It may use an electromechanical mechanism, or passive or active electronic
components. Depending on the design, it may be used to regulate one or more AC or DC
voltages. There are two types of regulators are they.
 Positive Voltage Series (78xx) and
 Negative Voltage Series (79xx)
78xx:’78’ indicate the positive series and ‘xx’ indicates the voltage rating. Suppose 7805
produces the maximum 5V.’05’indicates the regulator output is 5V.
79xx:’78’ indicate the negative series and ‘xx’ indicates the voltage rating. Suppose 7905
produces the maximum -5V.’05’indicates the regulator output is -5V.
These regulators consist the three pins there are
Pin1: It is used for input pin.

MPES ECE Page 20


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

Pin2: This is ground pin for regulator


Pin3: It is used for output pin. Through this pin we get the output.

Figure.4.9. Regulator

4.6 RFID: RFID principles

Many types of RFID exist, but at the highest level, we can divide RFID devices into
two classes:

Figure.4.10. Active and Passive Tag.

1. Active tags require a power source i.e., they are either connected to a powered
infrastructure or use energy stored in an integrated battery. In the latter case, a tag’s
lifetime is limited by the stored energy, balanced against the number of read operations
the device must undergo. However, batteries make the cost, size, and lifetime of active
tags impractical for the retail trade.

2. Passive RFID is of interest because the tags don’t require batteries or maintenance. The
tags also have an indefinite operational life and are small enough to fit into a practical
adhesive label.

MPES ECE Page 21


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

3. A passive tag consists of three parts: an antenna, a semiconductor chip attached to the
antenna and some form of encapsulation. The tag reader is responsible for powering
and communicating with a tag. The tag antenna captures energy and transfers the tag’s
ID (the tag’s chip coordinates this process). The encapsulation maintains the tag’s
integrity and protects the antenna and chip from environmental conditions or reagents.

4.6.1 RFID Technology and Architecture.

Before RFID can be understood completely, it is essential to understand how Radio Frequency
communication occurs.

RF (Radio Frequency) communication occurs by the transference of data over electromagnetic


waves. By generating a specific electromagnetic wave at the source, its effect can be noticed at
the receiver far from the source, which then identifies it and thus the information.

In an RFID system, the RFID tag which contains the tagged data of the object generates a signal
containing the respective information which is read by the RFID reader, which then may pass this
information to a processor for processing the obtained information for that particular application.

Thus, an RFID System can be visualized as the sum of the following three components:

 RFID tag or transponder


 RFID reader or transceiver
 Data processing subsystem

Figure.4.11. RFID Technology and Architecture

An RFID tag is composed of an antenna, a wireless transducer and an encapsulating material.


These tags can be either active or passive. While the active tags have on-chip power, passive
tags use the power induced by the magnetic field of the RFID reader.

MPES ECE Page 22


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

Thus, passive tags are cheaper but with lower range (<10mts) and more sensitive to regulatory
and environmental constraints, as compared to active tags.

An RFID reader consists of an antenna, transceiver and decoder, which sends periodic signals
to inquire about any tag in vicinity. On receiving any signal from a tag, it passes on that
information to the data processor. The data processing subsystem provides the means of
processing and storing the data.

4.6.2 RFID Frequencies:

Much like tuning into the favorite radio station, RFID tags and readers must be tuned into the
same frequency to enable communications. RFID systems can use a variety of frequencies to
communicate, but because radio waves work and act differently at different frequencies, a
frequency for a specific RFID system is often dependent on its application. High frequency
RFID systems (850 MHz to 950 MHz and 2.4 GHz to 2.5 GHz) offer transmission ranges of
more than 90 feet, although wavelengths in the 2.4 GHz range are absorbed by water, which
includes the human body and therefore has limitations.

4.6.3 RFID Design Approach:


Two fundamentally different RFID design approaches exist for transferring power from the
reader to the tag: magnetic induction and electromagnetic (EM) wave capture. These two
designs take advantage of the EM properties associated with an RF antenna—the near field
and the far field. Both can transfer enough power to a remote tag to sustain its operation—
typically between 10 _W and 1 MW, depending on the tag type.

4.6.4 Near-field RFID


Faraday’s principle of magnetic induction is the basis of near-field coupling between a reader
and tag. A reader passes a large alternating current through a reading coil, resulting in an
alternating magnetic field in its locality. If you place a tag that incorporates a smaller coil (see
figure 3) in this field, an alternating voltage will appear across it.
If this voltage is rectified and coupled to a capacitor, a reservoir of charge accumulates, which
you can then use to power the tag chip.
Tags that use near-field coupling send data back to the reader using load modulation.

MPES ECE Page 23


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

Because any current drawn from the tag coil will give rise to its own small magnetic field—
which will oppose the reader’s field—the reader coil can detect this as a small increase in
current flowing through it. This current is proportional to the load applied to the tag’s coil
(hence load modulation).
Thus, if the tag’s electronics applies a load to its own antenna coil and varies it over time, a
signal can be encoded as tiny variations in the magnetic field strength representing the tag’s
ID. The reader can then recover this signal by monitoring the change in current through the
reader coil.

Figure.4.12. Communication mechanism of RFID.

The range for which we can use magnetic induction approximates to c/2πf, where c is
a constant (the speed of light) and f is the frequency. Thus, as the frequency of operation
increases, the distance over which near-field coupling can operate decreases. A further
limitation is the energy available for induction as a function of distance from the reader coil.

MPES ECE Page 24


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

The magnetic field drops off at a factor of 1/r3, where r is the separation of the tag and
reader, along a center line perpendicular to the coil’s plane. These design pressures have led to
new passive RFID designs based on far-field communication.

4.6.5 Far-field RFID


RFID tags based on far-field emissions capture EM waves propagating from a dipole
antenna attached to the reader. A smaller dipole antenna in the tag receives this energy as an
alternating potential difference that appears across the arms of the dipole. A diode can rectify
this potential and link it to a capacitor, which will result in an accumulation of energy in order
to power its electronics. However, unlike the inductive designs, the tags are beyond the range
of the readers near field, and information can’t be transmitted back to the reader using load
modulation.

Figure.4.13. Far field RFID

The technique, the designers use for commercial far-field RFID tags, is back scattering. If an
antenna is designed with precise dimensions, it can be tuned to a particular frequency and
absorb most of the energy that reaches it at that frequency. However, if an impedance mismatch
occurs at this frequency, the antenna will reflect back some of the energy (as tiny waves) toward
the reader, which can then detect the energy using a sensitive radio receiver.
By changing the antenna’s impedance over time, the tag can reflect back more or less
of the incoming signal in a pattern that encodes the tag’s ID.

As a rough design guide, tags that use far-field principles operate at greater than 100

MPES ECE Page 25


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

MHz typically in the ultra-high-frequency (UHF) band (such as 2.45 GHz).

Figure.4.14. Far field power

A far-field system’s range is limited by the amount of energy that reaches the tag from
the reader and by how sensitive the reader’s radio receiver is to the reflected signal. The actual
return signal is very small, because it’s the result of two attenuations, each based on an inverse
square law. The first attenuation occurs as EM waves radiate from the reader to the tag and the
second when reflected waves travel back from the tag to the reader. Thus, the returning energy
is 1/r4 (again, r is the separation of the tag and reader).

It is the advancement of the technology by Moore’s law and the shrinking feature size
of semiconductor manufacturing that the energy required to power a tag at a given frequency
continues to decrease (currently as low as a few microwatts).

So, with modern semiconductors, tags that can be read at increasingly greater distances
can be designed than that of were possible a few years ago. Furthermore, inexpensive radio
receivers have been developed with improved sensitivity so they can now detect signals, for a
reasonable cost, with power levels on the order of –100 dBm in the 2.4-GHz band.

MPES ECE Page 26


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

A typical far field reader can successfully interrogate tags to a distance of 3m away and some
RFID companies claim their products have read ranges of up to 6 m.

4.6.6 RFID Module and Principle of working


RFID Reader Module, are also called as interrogators. They convert radio waves returned from
the RFID tag into a form that can be passed on to Controllers, which can make use of it. RFID
tags and readers have to be tuned to the same frequency in order to communicate. RFID systems
use many different frequencies, but the most common and widely used & supported by our
Reader is 125 KHz.

Figure.4.15. RFID Module

An RFID system consists of two separate components: a tag and a reader. Tags are
analogous to barcode labels and come in different shapes and sizes. The tag contains an antenna
connected to a small microchip containing up to two kilobytes of data. The reader or scanner
functions similarly to a barcode scanner. However, while a barcode scanner uses a laser beam
to scan the barcode, an RFID scanner uses electromagnetic waves. To transmit these waves,
the scanner uses an antenna that transmits a signal communicating with the tag’s antenna. The
tag’s antenna receives data from the scanner and transmits its particular chip information to the
scanner.
The data on the chip is usually stored in one of two types of memory. The most common
is Read-Only Memory (ROM), as its name suggests, read-only memory cannot be altered once
programmed onto the chip during the manufacturing process.

The second type of memory is Read/Write Memory, though it is also programmed


during the manufacturing process, it can later be altered by certain devices.

MPES ECE Page 27


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

Figure.4.16. EM-18 RFID Module

4.7 Features of RFID:


4.7.1 Reading collocated tags
One commercial objective of RFID systems is to read and charge for all tagged goods in a
standard supermarket shopping cart as it is pushed through an instrumented checkout aisle.
Such a system would speed up the checkout process and reduce operational costs.

4.7.2 Enabling a distributed memory revolution


Another distinguishing feature of modern RFID is that tags can contain far more information
than a simple ID. They can incorporate additional read only or read-write memory, which a
reader can then further interact with. Read-only memory might contain additional product
details that don’t need to be read every time a tag is interrogated but are available when
required. For example, the tag memory might contain a batch code, so if some products are
found to be faulty, the code can help find other items with the same defects.

Tag memory can also be used to enable tags to store self-describing information. Although a
tag’s unique ID can be used to recover its records in an online database, communication with
the database might not always be possible. For example, if a package is misdirected during
transportation, the receiving organization might not be able to determine its correct destination.
MPES ECE Page 28
A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

Additional destination information written into the tag would obviate the need and cost of a
fully networked tracking system.

4.7.3 RFID that incorporates sensing


One of the most intriguing aspects of modern RFID tags is that they can convey
information that extends beyond data stored in an internal memory and include data that
onboard sensors created
dynamically. Commercial versions of RFID technology can already ensure that critical
environmental parameters haven’t been exceeded. For example, if a package is dropped on the
floor, the impact might have damaged the enclosed product. A passive force sensor can supply
a single bit of information that can be returned along with an RFID tag’s ID, alerting the system
about the problem.

4.7.4 Privacy concerns


RFID has received much attention in recent years as journalists, technologists and
privacy advocates have debated the ethics of its use. Privacy advocates are concerned that even
though many of the corporations considering RFID use for inventory tracking have honorable
intentions, without due care, the technology might be unwittingly used to create undesirable
outcomes for many customers.

4.7.5 Application Areas:


RFID, Radio Frequency Identification is a technology, which includes wireless data
capture and transaction processing. Proximity (short range) and Vicinity (long range) are two
major application areas where RFID technology is used. Track and trace applications are long
range or vicinity applications. This technology provides additional functionality and benefits
for product authentication. Access control applications are short range or proximity type of
applications.

Agile Sense Technologies is focused on delivering innovative, high value RFID


solutions assisting company’s track assets, people and documents. Agile Sense provides robust
and complete RFID solutions built on top of its extensible middleware/framework for
Government, Healthcare, Manufacturing and Aerospace industries.

MPES ECE Page 29


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

4.8 Current and Potential Uses of RFID:

4.8.1 Asset Tracking:


Static or in-motion assets tracking or locating like a healthcare facility, wheelchairs or
IV pumps in, laptops in a corporation and servers in a data center was not so easy task.
User can instantly determine the general location of tagged assets anywhere within the facility
with the help of active RFID technology. Control point detection zones at strategic locations
throughout the facility allow the user to define logical zones and monitor high traffic areas.
Tagged assets moving through these control points provide instant location data.
Asset tracking applications will see an almost vertical growth curve in the coming years and
the growth rate in this area will be much higher than the growth rate of general RFID market.
Passports

The first RFID passports ("E-passport") were issued by Malaysia in 1998. In addition
to information also contained on the visual data page of the passport, Malaysian e-passports
record the travel history (time, date and place) of entries and exits from the country. Standards
for RFID passports are determined by the International Civil Aviation Organization (ICAO).
ICAO refers to the ISO/IEC 14443 RFID chips in e-passports as "contactless integrated
circuits". ICAO standards provide for e-passports to be identifiable by a standard e-passport
logo on the front cover.

4.8.2 Security and Access Control


RFID has long been used as an electronic key to control who has access to office
buildings or areas within office buildings. The first access control systems used low-frequency
RFID tags. Recently, vendors have introduced 13.56 MHz systems that offer longer read range.
The advantage of RFID is it is convenient (an employee can hold up a badge to unlock a door,
rather than looking for a key or swiping a magnetic stripe card) and because there is no contact
between the card and reader, there is less wear and tear, and therefore less maintenance.

As RFID technology evolves and becomes less expensive and more robust, it's likely
that companies and RFID vendors will develop many new applications to solve common and
unique business problems.

MPES ECE Page 30


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

4.8.3 People Tracking:


People tracking system are used just as asset tracking system. Hospitals and jails are most
general tracking required places. Hospital uses RFID tags for tracking their special patients. In
emergency patient and other essential equipment can easily track. It will be mainly very useful
in mental care hospitals where doctors can track each and every activity of the patient.

Hospitals also use these RFID tags for locating and tracking all the activities of the
newly born babies. The best use of the people tracking system will be in jails. It becomes an
easy tracking system to track their inmates. Many jails of different US states like Michigan,
California, and Arizona are already using RFID-tracking systems to keep a close eye on jail
inmates.

4.8.4 Document tracking:


This is most common problem. Availability of large amount of data and documents brings
lots of problem in document management system. An RFID document-tracking system saves
time and money by substantially reducing:
 Time spent searching for lost document
 The financial and legal impact associated with losing documents.

4.8.5 Government Library:


Many government libraries use barcode and electromagnetic strips to track various
assets. RFID technology uses for reading these barcodes unlike the self-barcode reader RFID
powered barcode reader can read multiple items simultaneously. This reduces queues and
increases the number of customers using self-check, which in turn will reduce the staff
necessary at the circulation desks.

4.8.6 Healthcare:
Patient safety is a big challenge of healthcare vertical. Reducing medication errors,
meeting new standards, staff shortages, and reducing costs are the plus points of use of RFID
solutions. RFID wristbands containing patient records and medication history address several
of these concerns.

MPES ECE Page 31


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

4.8.7 Transportation payments


Governments use RFID applications for traffic management, while automotive
companies use various RFID tracking solutions for product management. Many of these
solutions may work together in the future, though privacy regulations prevent many initiatives
from moving forward at the same pace that technology allows.

4.8.8 Promotion tracking


Manufacturers of products sold through retailers promote their products by offering
discounts for a limited period on products sold to retailers with the expectation that the retailers
will pass on the savings to their customers. However, retailers typically engage in forward
buying, purchasing more product during the discount period than they intend to sell during the
promotion period. Some retailers engage in a form of arbitrage, reselling discounted product to
other retailers, a practice known as diverting. To combat this practice, manufacturers are
exploring the use of RFID tags on promoted merchandise so that they can track exactly which
product has sold through the supply chain at fully discounted prices.

4.9Manufacturing

RFID has been used in manufacturing plants for more than a decade. It's used to track
parts and work in process and to reduce defects, increase throughput and manage the production
of different versions of the same product.

4.10 Supply Chain Management

RFID technology has been used in closed loop supply chains or to automate parts of
the supply chain within a company's control for years. As standards emerge, companies are
increasingly turning to RFID to track shipments among supply chain partners.

4.11Retailing
Retailers such as Best Buy, Metro, Target, Tesco and Wal-Mart are in the forefront of RFID
adoption. These retailers are currently focused on improving supply chain efficiency and
making sure product is on the shelf when customers want to buy it.

MPES ECE Page 32


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

4.12 The Future of RFID

RFID is said by many in the industry to be the frontrunner technology for automatic
identification and data collection. The biggest, as of yet unproven, benefit would ultimately be
in the consumer goods supply chain where an RFID tag attached to a consumer product could
be tracked from manufacturing to the retail store right to the consumer's home.

Many see RFID as a technology in its infancy with an untapped potential. While we may talk
of its existence and the amazing ways in which this technology can be put to use, until there
are more standards set within the industry and the cost of RFID technology comes down, we
won't see RFID systems reaching near their full potential anytime soon.

4.13 Keypad (matrix)

4.13.1 INTRODUCTION:

A keypad is a set of buttons arranged in a block or "pad" which usually bear digits and
other symbols and usually a complete set of alphabetical letters. If it mostly contains numbers
then it can also be called a numeric keypad.

Keypads are found on many alphanumeric keyboards and on other devices such as
calculators, push-button telephones, combination locks, and digital door locks, which require
mainly numeric input. In keypad we have keys arrays in which keys can be arranged in different
combinations and the matrix keypad in which keys are arrange in a particular rows and
columns.

Figure:4.17 Matrix keypad on PCB board.


4.13.2 CONSTRUCTING A MATRIX KEYPAD
Construction of a keypad is really simple. As per the outline shown in the figure
below, we have four rows and four columns. In between each overlapping row and column
line there is a key.

MPES ECE Page 33


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

Figure:4.18 Internal arrangement of the keypad

So, keeping this outline we can construct a keypad using simple SPST Switches as shown
below:

Figure:4.19 Internal key connections

Now our keypad is ready, all we have to do is connect the rows and columns to a port of
microcontroller and program the controller to read the input.

4.13.3 SCANNING A MATRIX KEYPAD


There are many methods depending on how you connect your keypad with your controller,
but the basic logic is same. We make the columns as I/p and we drive the rows making them
o/p, this whole p,rocedure of reading the keyboard is called scanning.
In order to detect which key is pressed from the matrix, we make row lines low one by
one and read the columns. Let’s say we first make Row1 low, and then read the columns.

MPES ECE Page 34


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

If any of the key in row1 is pressed will make the corresponding column as low i.e., if
second key is pressed in Row1, then column2 will give low. So, we come to know that key 2
of Row1 is pressed. This is how scanning is done.
So, to scan the keypad completely, we need to make rows low one by one and read the
columns. If any of the button is pressed in a row, it will take the corresponding column to a
low state which tells us that a key is pressed in that row. If button 1 of a row is pressed then
Column 1 will become low, if button 2 then column2 and so on...
4.13.4 SCHEMATIC

Figure:4.20 keypad arrangement

The internal arrangement of the keys in a matrix keypad can be seen in the above figure.
We can arrange them in the particular columns and particular rows. Interface of the key pad to
the micro controller is shown the figure below. Depending on the number of keys required for
the application the matrix form is prepared. So, for each key has two terminals one for the
ground and one is for the port pins. Each key need port allotment.

Figure:4.21 Interface keypad

MPES ECE Page 35


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

Matrix keypad of 4*4 (four rows and four columns) for that one column ground
terminals are connected commonly and that is given to the one port pin. Input terminal of the
keys according to the one row all are connected commonly and that is given to the one port
pins.
Like for 4*4 matrix keypad one port of micro controller totally used. Four pins for
the ground purpose and four pins for the input purpose.

Figure:4.22 Key Scan Routine

MPES ECE Page 36


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

4.13.5 APPLICATION
 Key pad is used for the telephones, mobile phones
 Key pads are used at the bank locker system.
 There used the companies to enter the id numbers of the particular employee.

4.13.6 USES
 The keypad of a calculator contains the digits 0 through 9, from bottom upwards,
together with the four arithmetic operations.
 Keypads are also a feature of some combination locks. This type of lock is often used
on doors, such as that found at the main entrance to some offices.

 Many laptop computers have special function keys which turn part of the alphabetical
keyboard into a numerical keypad as there is insufficient space to allow a separate
keypad to be built into the laptop's chassis. Separate external plug-in keypads can be
purchased.

1.14 LCD (Liquid Cristal Display):


A liquid crystal display (LCD) is a thin, flat display device made up of any number of
color or monochrome pixels arrayed in front of a light source or reflector. Each pixel consists
of a column of liquid crystal molecules suspended between two transparent electrodes, and two
polarizing filters, the axes of polarity of which are perpendicular to each other. Without the
liquid crystals between them, light passing through one would be blocked by the other. The
liquid crystal twists the polarization of light entering one filter to allow it to pass through the
other.
A program must interact with the outside world using input and output devices that
communicate directly with a human being. One of the most common devices attached to a
controller is an LCD display. Some of the most common LCDs connected to the controllers are
16X1, 16x2 and 20x2 displays. This means 16 characters per line by 1 line 16 characters per
line by 2 lines and 20 characters per line by 2 lines, respectively.
Many microcontroller devices use 'smart LCD' displays to output visual information.

LCD displays designed around LCD NT-C1611 module, are inexpensive, easy to use,
and it is even possible to produce a readout using the 5X7 dots plus cursor of the display.

MPES ECE Page 37


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

They have a standard ASCII set of characters and mathematical symbols. For an 8-bit
data bus, the display requires a +5V supply plus 10 I/O lines (RS, RW, D7, D6, D5, D4, D3,
D2, D1, D0).
For a 4-bit data bus it only requires the supply lines plus 6 extra lines (RS, RW, D7,
D6, D5, D4). When the LCD display is not enabled, data lines are tri-state and they do not
interfere with the operation of the microcontroller.
4.14.1 Description Of 16x2:

Figure:4.23 LCD Display


This is the first interfacing example for the Parallel Port. We will start with something simple.
This example doesn’t use the Bi-directional feature found on newer ports, thus it should work
with most, if no all-Parallel Ports. It however doesn’t show the use of the Status Port as an input.
So, what are we interfacing? A 16 Character x 2 Line LCD Module to the Parallel Port. These
LCD Modules are very common these days and are quite simple to work with, as all the logic
required to run them is on board.
4.14.2 Schematic Diagram:

Figure:4.24 Schematic Diagram


MPES ECE Page 38
A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

 Above is the quite simple schematic. The LCD panel's Enable and Register Select is
connected to the Control Port.
 The Control Port is an open collector / open drain output. While most Parallel Ports
have internal pull-up resistors, there are a few which don't. Therefore, by incorporating
the two 10K external pull up resistors, the circuit is more portable for a wider range of
computers, some of which may have no internal pull up resistors.
 We make no effort to place the Data bus into reverse direction. Therefore, we hard wire
the R/W line of the LCD panel, into write mode. This will cause no bus conflicts on the
data lines. As a result, we cannot read back the LCD's internal Busy Flag which tells us
if the LCD has accepted and finished processing the last instruction. This problem is
overcome by inserting known delays into our program.
 The 10k Potentiometer controls the contrast of the LCD panel. Nothing fancy here. As
with all the examples, I've left the power supply out. You can use a bench power supply
set to 5v or use an onboard +5 regulator. Remember a few de-coupling capacitors,
especially if you have trouble with the circuit working properly.
 The 2line x 16character LCD modules are available from a wide range of manufacturers
and should all be compatible with the HD44780.
 The one I used to test this circuit was a Power tip PC-1602F and an old Philips
LTN211F-10 which was extracted from a Poker Machine! The diagram to the right,
shows the pin numbers for these devices. When viewed from the front, the left pin is
pin 14 and the right pin is pin 1.

4.14.3. 16 x 2 Alphanumeric LCD Module Features:

 Intelligent, with built-in Hitachi HD44780 compatible LCD controller and RAM
providing simple interfacing
 61 x 15.8 mm viewing area
 5 x 7 dot matrix format for 2.96 x 5.56 mm characters, plus cursor line
 Can display 224 different symbols
 Low power consumption (1 mA typical)
 Powerful command set and user-produced characters
 TTL and CMOS compatible
 Connector for standard 0.1-pitch pin headers

MPES ECE Page 39


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

4.14.4 16 x 2 Alphanumeric LCD Module Specifications:

Symbol Level Function


Pin
1 VSS - Power, GND
2 VDD - Power, 5V
3 Vo - Power, for LCD Drive
Register Select Signal
4 RS H/L H: Data Input
L: Instruction Input
H: Data Read (LCD->MPU)
5 R/W H/L
L: Data Write (MPU->LCD)
6 E H, H->L Enable
7-14 DB0-DB7 H/L Data Bus; Software selectable 4- or 8-bit mode
15 NC - NOT CONNECTED
16 NC - NOT CONNECTED

Table: 4.1 Functions of Alphanumeric

4.15 FEATURES:
• 5 x 8 dots with cursor
• Built-in controller (KS 0066 or Equivalent)
• + 5V power supply (Also available for + 3V)
• 1/16 duty cycle
• B/L to be driven by pin 1, pin 2 or pin 15, pin 16 or A.K (LED)
• N.V. optional for + 3V power supply

MPES ECE Page 40


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

Data can be placed at any location on the LCD. For 16×1 LCD, the address locations
are:

Table:4.2 Address locations for a 1x16 line LCD


Even limited to character-based modules, there is still a wide variety of shapes and sizes
available. Line lengths of 8,16,20,24,32 and 40 characters are all standard, in one-, two- and
four-line versions.
Several different LC technologies exists. “supertwist” types, for example, offer
Improved contrast and viewing angle over the older “twisted nematic” types. Some modules
are available with back lighting, so that they can be viewed in dimly-lit conditions. The back
lighting may be either “electro-luminescent”, requiring a high voltage inverter circuit, or simple
LED illumination.

Figure:4.25 Electrical Block Diagram

MPES ECE Page 41


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

4.16 Power supply for LCD driving:

Figure: 4.26 Power supply for LCD

4.17 PIN DESCRIPTION:

Figure:4.27 Pin Diagram of LCD

Most LCDs with 1 controller have 14 Pins and LCDs with 2 controllers has 16 Pins (two pins
are extra in both for back-light LED connections).

Figure:4.28 Pin diagram of 1x16 lines LCD

MPES ECE Page 42


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

Figure:4.29 Pin specifications

4.18 CONTROL LINES:


EN: Line is called "Enable." This control line is used to tell the LCD that you are sending it
data. To send data to the LCD, your program should make sure this line is low (0) and then set
the other two control lines and/or put data on the data bus. When the other lines are completely
ready, bring EN high (1) and wait for the minimum amount of time required by the LCD
datasheet (this varies from LCD to LCD), and end by bringing it low (0) again.
RS: Line is the "Register Select" line. When RS is low (0), the data is to be treated as a
command or special instruction (such as clear screen, position cursor, etc.). When RS is high
(1), the data being sent is text data which should be displayed on the screen. For example, to
display the letter "T" on the screen you would set RS high.
RW: Line is the "Read/Write" control line. When RW is low (0), the information on the data
bus is being written to the LCD. When RW is high (1), the program is effectively querying (or
reading) the LCD. Only one instruction ("Get LCD status") is a read command. All others are
writing commands, so RW will almost always be low.
Finally, the data bus consists of 4 or 8 lines (depending on the mode of operation selected by
the user). In the case of an 8-bit data bus, the lines are referred to as DB0, DB1, DB2, DB3,
DB4, DB5, DB6, and DB7.

MPES ECE Page 43


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

4.19 LOGIC STATUS ON CONTROL LINES

 E - 0 Access to LCD disabled.


1 Access to LCD enabled.
 R/W - 0 Writing data to LCD.
1 Reading data from LCD
 RS - 0 Instructions.
1 Character

4.20 CONTRAST CONTROL


To have a clear view of the characters on the LCD, contrast should be adjusted. To adjust the
contrast, the voltage should be varied. For this, a preset is used which can behave like a variable
voltage device. As the voltage of this preset is varied, the contrast of the LCD can be adjusted.

Figure.4.30 Variable resistor


4.21 Potentiometer
Variable resistors used as potentiometers have all three terminals connected. This
arrangement is normally used to vary voltage, for example to set the switching point of a circuit
with a sensor, or control the volume (loudness) in an amplifier circuit. If the terminals at the
ends of the track are connected across the power supply, then the wiper terminal will provide
a voltage which can be varied from zero up to the maximum of the supply.

Figure 4.31. Potentiometer symbol

4.22 Presets
These are miniature versions of the standard variable resistor. They are designed to be mounted
directly onto the circuit board and adjusted only when the circuit is built.
MPES ECE Page 44
A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

For example, to set the frequency of an alarm tone or the sensitivity of a light-sensitive circuit,
a small screwdriver or similar tool is required to adjust presets. Presets are much cheaper than
standard variable resistors so they are sometimes used in projects where a standard variable
resistor would normally be used.
Multiturn presets are used where very precise adjustments must be made. The screw must be
turned many times (10+) to move the slider from one end of the track to the other, giving very
fine control.

Figure.4.32. Preset symbol

4.23 SWITCHES:
The switches must be the type where on = 0, so that when they are turned to the zero
position, all four outputs are shorted to the common pin, and in position “F”, all four outputs are
open circuit.
All the available characters that are built into the module are shown in Table 3. Studying
the table, you will see that codes associated with the characters are quoted in binary and
hexadecimal, most significant bits (“left-hand” four bits) across the top, and least significant
bits (“right-hand” four bits) down the left.

Most of the characters conform to the ASCII standard, although the Japanese and Greek
characters (and a few other things) are obvious exceptions.

Since these intelligent modules were designed in the “Land of the Rising Sun,” it seems
only fair that their Katakana phonetic symbols should also be incorporated. The more extensive
Kanji character set, which the Japanese share with the Chinese, consisting of several thousand
different characters, is not included!

Using the switches, of whatever type, and referring to Table 3, enter a few characters
onto the display, both letters and numbers. The RS switch (S10) must be “up” (logic 1) when
sending the characters, and switch E (S9) must be pressed for each of them.

MPES ECE Page 45


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

Thus, the operational order is: set RS high, enter character, trigger E, leave RS high,
enter another character, trigger E, and so on.

The first 16 codes in Table 3, 00000000 to 00001111, ($00 to $0F) refer to the CGRAM.
This is the Character Generator RAM (random access memory), which can be used to hold user-
defined graphics characters. This is where these modules really start to show their potential,
offering such capabilities as bar graphs, flashing symbols, even animated characters. Before the
user-defined characters are set up, these codes will just bring up strange looking symbols.

Codes 00010000 to 00011111 ($10 to $1F) are not used and just display blank
characters. ASCII codes “proper” start at 00100000 ($20) and end with 01111111 ($7F). Codes
10000000 to 10011111 ($80 to $9F) are not used, and 10100000 to 11011111 ($A0 to $DF) are
the Japanese characters.

Figure: 4.33 Switches LCD

MPES ECE Page 46


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

4.24. USES

The LCD s used exclusively in watches, calculators and measuring instruments is the
simple seven-segment displays, having a limited amount of numeric data. The recent advances
in technology have resulted in better legibility, more information displaying capability and a
wider temperature range. These have resulted in the LCD s being extensively used in
telecommunications and entertainment electronics.

The LCD s has even started replacing the cathode ray tubes (CRTs) used for the display
of text and graphics, and also in small TV applications.

4.25 DC MOTOR
4.25.1 Introduction:
A DC motor is designed to run on DC electric power. Two examples of pure DC designs
are Michael Faraday's homopolar motor (which is uncommon), and the ball bearing motor,
which is (so far) a novelty. By far the most common DC motor types are the brushed and
brushless types, which use internal and external commutation respectively to create an
oscillating AC current from the DC source -- so they are not purely DC machines in a strict
sense.

Figure:4.34 H-Bridge Theory:

An H-Bridge is an electronic circuit which enables a voltage to be applied across a load


in either direction. These circuits are often used in robotics and other applications to allow DC
motors to run forwards and backwards. H-bridges are available as integrated circuits, or can be
built from discrete components. Let's start with the name, H-bridge. Sometimes called a "full
bridge" the H-bridge is so named because it has four switching elements at the "corners" of the
H and the motor forms the cross bar. The basic bridge is shown in the figure to the right.

MPES ECE Page 47


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

Figure:4.35 Motor

The key fact to note is that there are, in theory, four switching elements within the
bridge. These four elements are often called, high side left, high side right, low side right, and
low side left (when traversing in clockwise order).

The switches are turned on in pairs, either high left and lower right, or lower left and
high right, but never both switches on the same "side" of the bridge. If both switches on one
side of a bridge are turned on it creates a short circuit between the battery plus and battery
minus terminals. This phenomenon is called shoot through in the Switch-Mode Power Supply
(SMPS) literature. If the bridge is sufficiently powerful it will absorb that load and your
batteries will simply drain quickly. Usually however the switches in question melt.

To power the motor, you turn on two switches that are diagonally opposed. In the
picture to the right, imagine that the high side left and low side right switches are turned on.
The current flow is shown in green.

Figure:4.36 Motor Current Flow

MPES ECE Page 48


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

The current flows and the motor begin to turn in a "positive" direction. What happens
if you turn on the high side right and low side left switches? You guessed it, current flows the
other direction through the motor and the motor turns in the opposite direction.

4.26 L293D- DC MOTOR DRIVER IC


L293D is a dual H-Bridge motor driver, So, with one IC we can interface two DC
motors which can be controlled in both clockwise and counter clockwise direction and if you
have motor with fix direction of motion the you can make use of all the four I/o s to connect
up to four DC motors. L293D has output current of 600mA and peak output current of 1.2A
per channel. Moreover, for protection of circuit from back EMF output diodes are included
within the IC. The output supply (VCC2) has a wide range from 4.5V to 36V, which has made
L293D a best choice for DC motor driver.

Figure:4.37 Pin Diagram

4.26.1 Features
 Wide Supply-Voltage Range: 4.5 V to 36 V
 Separate Input-Logic Supply
 Internal ESD Protection
 Thermal Shutdown
 High-Noise-Immunity Inputs
 Functionally Similar to SGS L293 and SGS L293D
 Output Current 1 A Per Channel (600 mA for L293D)
 Peak Output Current 2 A Per Channel (1.2 A for L293D)
 Output Clamp Diodes for Inductive Transient Suppression (L293D)

MPES ECE Page 49


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

4.26.2 Description
The L293 and L293D are quadruple high-current half-H drivers. The L293 is designed
to provide bidirectional drive currents of up to 1 A at voltages from 4.5 V to 36 V. The L293D
is designed to provide bidirectional drive currents of up to 600-mA at voltages from 4.5 V to
36 V. Both devices are designed to drive inductive loads such as relays, solenoids, dc and
bipolar stepping motors, as well as other high-current/high-voltage loads in positive-supply
applications.
All inputs are TTL compatible. Each output is a complete totem-pole drive circuit, with
a Darlington transistor sink and a pseudo- Darlington source. Drivers are enabled in pairs, with
drivers 1 and 2 enabled by 1,2EN and drivers 3 and 4 enabled by 3,4EN.
When an enable input is high, the associated drivers are enabled and their outputs are active
and in phase with their inputs. When the enable input is low, those drivers are disabled and
their outputs are off and in the high-impedance state. With the proper data inputs, each pair of
drivers forms a full-H (or bridge) reversible drive suitable for solenoid or motor applications.
On the L293, external high-speed output clamp diodes should be used for inductive transient
suppression.
A VCC1 terminal, separate from VCC2, is provided for the logic inputs to minimize
device power dissipation. The L293 and L293D are characterized for operation from 0 to 70
degree Celsius.

Figure:4.38 Block Diagram

MPES ECE Page 50


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

Figure:4.39 Function Table Figure:4.40 Logic Diagram


This chip contains 4 enable pins. Each enable pin corresponds to 2 inputs. Based on the
input values given, the device connected to this IC works accordingly. The output of L293D
depends on the input provided from the microcontroller and the enable pins. It should be
remembered that unless the enable pins are not high, whatever input values given to L293D IC
will not be applied to the motors in any way.
A simple schematic for interfacing a DC motor using L293D is shown below.

Figure:4.41 Truth Table

MPES ECE Page 51


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

As you can see in the circuit, three pins are needed for interfacing a DC motor (A, B, Enable).
If you want the o/p to be enabled completely then you can connect Enable to VCC and only 2
pins needed from controller to make the motor work.

4.27 ESP8266 WIFI Module

The ESP8266 WIFI Module is a self-contained SOC with integrated TCP/IP protocol
stack that can give any microcontroller access to your WIFI network. The ESP8266 is capable
of either hosting an application or offloading all WIFI networking functions from another
application processor. Each ESP8266 module comes pre-programmed with an AT command
set firmware, meaning, you can simply hook this up to your Arduino device and get about as
much WIFI-ability as a WIFI Shield offers (and that's just out of the box)! The ESP8266
module is an extremely cost-effective board with a huge, and ever growing, community.

This module has a powerful enough on-board processing and storage capability that allows it
to be integrated with the sensors and other application specific devices through its GPIOs with minimal
development up-front and minimal loading during runtime. Its high degree of on-chip integration allows
for minimal external circuitry, including the front-end module, is designed to occupy minimal PCB
area. The ESP8266 supports APSD for VoIP applications and Bluetooth co-existence interfaces, it
contains a self-calibrated RF allowing it to work under all operating conditions, and requires no external
RF parts.

There is an almost limitless fountain of information available for the ESP8266, all of
which has been provided by amazing community support. In the Documents section below you
will find many resources to aid you in using the ESP8266, even instructions on how to
transform this module into an IoT (Internet of Things) solution!

Figure:4.42 ESP8266 WIFI Module

MPES ECE Page 52


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

4.28 ESP8266 Pin Configuration

Figure: 4.43 ESP8266 Pinout

Pin Pin Name Alternate Normally used for Alternate purpose


Number Name
1 Ground - Connected to the ground of the -
circuit
2 TX GPIO – 1 Connected to Rx pin of Can act as a General-purpose
programmer/µC to upload program Input/output pin when not
used as TX
3 GPIO-2 - General purpose Input/output pin -
4 CH_EN - Chip Enable – Active high -
5 GPIO - 0 Flash General purpose Input/output pin Takes module into serial
programming when held low
during start up
6 Reset - Resets the module -
7 RX GPIO – 3 General purpose Input/output pin Can act as a General-purpose
Input/output pin when not
used as RX
8 VCC - Connect to +3.3V only

Table: 4.3 Pin Names and its Uses

MPES ECE Page 53


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

4.29 ESP8266-01 Features

 Low cost, compact and powerful Wi-Fi Module


 Power Supply: +3.3V only
 Current Consumption: 100mA
 I/O Voltage: 3.6V (max)
 I/O source current: 12mA (max)
 Built-in low power 32-bit MCU @ 80MHz
 512kB Flash Memory
 Can be used as Station or Access Point or both combined
 Supports Deep sleep (<10uA)
 Supports serial communication hence compatible with many developments’ platform like
Arduino
 Can be programmed using Arduino IDE or AT-commands or Lua Script

4.30 Where to use ESP8266-01

The ESP8266 is a very user friendly and low-cost device to provide internet
connectivity to your projects. The module can work both as an Access point (can create hotspot)
and as a station (can connect to Wi-Fi), hence it can easily fetch data and upload it to the
internet making Internet of Things as easy as possible. It can also fetch data from internet
using API’s hence your project could access any information that is available in the internet,
thus making it smarter. Another exciting feature of this module is that it can be programmed
using the Arduino IDE which makes it a lot more user friendly. However, this version of the
module has only 2 GPIO pins (you can hack it to use up to 4) so you have to use it along with
another microcontroller like Arduino, else you can look onto the more standalone ESP-
12 or ESP-32 versions. So, if you are looking for a module to get started with IOT or to
provide internet connectivity to your project then this module is the right choice for you.

4.31 How to use the ESP8266 Module

There are so many methods and IDEs available to with ESP modules, but the most
commonly used on is the Arduino IDE. So let us discuss only about that further below.
The ESP8266 module works with 3.3V only, anything more than 3.7V would kill the module
hence be cautions with your circuits. The best way to program an ESP-01 is by using the FTDI
board that supports 3.3V programming. If you don’t have one it is recommended to buy one or
for time, being you can also use an Arduino board. One commonly problem that everyone faces
with ESP-01 is the powering up problem.

MPES ECE Page 54


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

The module is a bit power hungry while programming and hence you can power it with
a 3.3V pin on Arduino or just use a potential divider. So, it is important to make a small voltage
regulator for 3.31v that could supply a minimum of 500mA. One recommended regulator is
the LM317 which could handle the job easily. A simplified circuit diagram for using the
ESP8266-01 module is given below

Figure:4.44 Circuit Diagram Esp8266-01

The switch SW2 (Programming Switch) should be held pressed to hold the GPIO-0 pin to
ground. This way we can enter into the programming mode and upload the code. Once the code
is released the switch can be released.

4.32. Applications

 IOT Projects
 Access Point Portals
 Wireless Data logging
 Smart Home Automation
 Learn basics of networking
 Portable Electronics
 Smart bulbs and Sockets

4.33 2D – Model

Figure:4.45 2D Model
MPES ECE Page 55
A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

CHAPTER 5

SOFTWARES

5.1 Introduction to Arduino IDE


Arduino is a prototype platform (open-source) based on an easy-to-use hardware and
software. It consists of a circuit board, which can be programmed (referred to as a
microcontroller) and a ready-made software called Arduino IDE (Integrated Development
Environment), which is used to write and upload the computer code to the physical board.

The key features are:

 Arduino boards are able to read analog or digital input signals from different sensors
and turn it into an output such as activating a motor, turning LED on/off, connect to the
cloud and many other actions.
 You can control your board functions by sending a set of instructions to the
microcontroller on the board via Arduino IDE (referred to as uploading software).
 Unlike most previous programmable circuit boards, Arduino does not need an extra
piece of hardware (called a programmer) in order to load a new code onto the board.
You can simply use a USB cable.
 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 the functions of the micro-
controller into a more accessible package.
After learning about the main parts of the Arduino UNO board, we are ready to learn how to
set up the Arduino IDE. Once we learn this, we will be ready to upload our program on the
Arduino board.

5.2 Arduino data types:


Data types in C refers to an extensive system used for declaring variables or functions
of different types. The type of a variable determines how much space it occupies in the storage
and how the bit pattern stored is interpreted.
The following table provides all the data types that you will use during Arduino
programming.

MPES ECE Page 56


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

5.2.1 Void:
The void keyword is used only in function declarations. It indicates that the function is
expected to return no information to the function from which it was called.
Example:
Void Loop ()
{
// rest of the code
}

5.2.2 Boolean:
A Boolean holds one of two values, true or false. Each Boolean variable occupies one
byte of memory.
Example:
Boolean state= false; // declaration of variable with type Boolean and initialize it with
false.
Boolean state = true; // declaration of variable with type Boolean and initialize it with
false.

5.2.3 Char:
A data type that takes up one byte of memory that stores a character value. Character
literals are written in single quotes like this: 'A' and for multiple characters, strings use double
quotes: "ABC".
However, characters are stored as numbers. You can see the specific encoding in the
ASCII chart. This means that it is possible to do arithmetic operations on characters, in which
the ASCII value of the character is used. For example, 'A' + 1 has the value 66, since the ASCII
value of the capital letter A is 65.
Example:
Char chr_a = ‘a’ ;//declaration of variable with type char and initialize it with character
a.
Char chr_c = 97 ;//declaration of variable with type char and initialize it with character
97

MPES ECE Page 57


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

5.2.4 Unsigned char:


Unsigned char is an unsigned data type that occupies one byte of memory. The
unsigned char data type encodes numbers from 0 to 255.
Example:
Unsigned Char chr_y = 121; // declaration of variable with type Unsigned char and
initialize it with character y

5.2.5 Byte:
A byte stores an 8-bit unsigned number, from 0 to 255.
Example:
byte m = 25 ;//declaration of variable with type byte and initialize it with 25

5.2.6 int:
Integers are the primary data-type for number storage. int stores a 16-bit (2-byte) value.
This yields a range of -32,768 to 32,767 (minimum value of -2^15 and a maximum value of
(2^15) - 1).
The int size varies from board to board. On the Arduino Due, for example, an int stores
a 32-bit (4-byte) value. This yields a range of -2,147,483,648 to 2,147,483,647 (minimum value
of -2^31 and a maximum value of (2^31) - 1).
Example:
int counter = 32 ;// declaration of variable with type int and initialize it with 32.

5.2.7 Unsigned int:


Unsigned int’s (unsigned integers) are the same as int in the way that they store a 2-
byte value. Instead of storing negative numbers, however, they only store positive values,
yielding a useful range of 0 to 65,535 (2^16) - 1). The Due stores a 4-byte (32-bit) value,
ranging from 0 to 4,294,967,295 (2^32 - 1).

Example:
Unsigned int counter= 60; // declaration of variable with type unsigned int and initialize
it with 60.

MPES ECE Page 58


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

5.2.8 Word:
On the Uno and other ATMEGA based boards, a word stores a 16-bit unsigned number.
On the Due and Zero, it stores a 32-bit unsigned number.
Example
word w = 1000 ;//declaration of variable with type word and initialize it with 1000.

5.2.9 Long:
Long variables are extended size variables for number storage, and store 32 bits (4
bytes), from 2,147,483,648 to 2,147,483,647.
Example:
Long velocity= 102346 ;//declaration of variable with type Long and initialize it with
102346

5.2.10 Unsigned long:


Unsigned long variables are extended size variables for number storage and store 32
bits (4 bytes). Unlike standard longs, unsigned longs will not store negative numbers, making
their range from 0 to 4,294,967,295 (2^32 - 1).
Example:
Unsigned Long velocity = 101006 ;// declaration of variable with type Unsigned Long
and initialize it with 101006.

5.2.11 Short:
A short is a 16-bit data-type. On all Arduinos (AT Mega and ARM based), a short store
a 16-bit (2-byte) value. This yields a range of -32,768 to 32,767 (minimum value of -2^15 and
a maximum value of (2^15) - 1).
Example:
short Val= 13 ;//declaration of variable with type short and initialize it with 13

5.2.12 Float:
Data type for floating-point number is a number that has a decimal point. Floating-point
numbers are often used to approximate the analog and continuous values because they have
greater resolution than integers.
MPES ECE Page 59
A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

Floating-point numbers can be as large as 3.4028235E+38 and as low as


3.4028235E+38. They are stored as 32 bits (4 bytes) of information.
Example:
float num = 1.352;//declaration of variable with type float and initialize it with 1.352.

5.3 Double:
On the Uno and other ATMEGA based boards, Double precision floating-point number
occupies four bytes. That is, the double implementation is exactly the same as the float, with
no gain in precision. On the Arduino Due, doubles have 8-byte (64 bit) precision.
Example:
double num = 45.352 ;// declaration of variable with type double and initialize it with
45.352.

In this section, we will learn in easy steps, how to set up the Arduino IDE on our
computer and prepare the board to receive the program via USB cable.

Step 1:
First you must have your Arduino board (you can choose your favorite board) Anda
USB cable.
In case you use Arduino UNO, Arduino Duemilanove, Nano, Arduino Mega2560, or
Diecimila, you will need a standard USB cable (A plug to B plug), the kind you would connect
to a USB printer as shown in the following image.

Figure 5.1: USB Cable


Step 2: Download Arduino IDE Software.
You can get different versions of Arduino IDE from the Download page on the Arduino
Official website. You must select your software, which is compatible with your operating
system (Windows, IOS, or Linux). After your file download is complete, unzip the file.

MPES ECE Page 60


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

Figure 5.2: Downloading Page


Step 3: Power up your board.
The Arduino Uno, Mega, Duemilanove and Arduino Nano automatically draw power
from either, the USB connection to the computer or an external power supply. If you are using
an Arduino Diecimila, you have to make sure that the board is configured to draw power from
the USB connection. The power source is selected with a jumper, a small piece of plastic that
fits onto two of the three pins between the USB and power jacks. Check that it is on the two
pins closest to the USB port. Connect the Arduino board to your computer using the USB cable.
The green power LED (labeled PWR) should glow.

Step 4: Launch Arduino IDE.


After your Arduino IDE software is downloaded, you need to unzip the folder. Inside
the folder, you can find the application icon with an infinity label (application.exe).
DoubleClick the icon to start the IDE.

Figure 5.3: Lunching Page

MPES ECE Page 61


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

Step 5: Open your first project.


Once the software starts, you have two options:
 Create a new project.
 Open an existing project example.
To create a new project, select File --> New. To open

Figure 5.4: Creating New Project

To open an existing project example, select File -> Example -> Basics -> Blink.

Figure 5.5: Process to Blink LED


MPES ECE Page 62
A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

Here, we are selecting just one of the examples with the name Blink. It turns the LED
on and off with some time delay. You can select any other example from the list.

Step 6: Select your Arduino board.


To avoid any error while uploading your program to the board, you must select the
correct Arduino board name, which matches with the board connected to your computer.
Go to Tools -> Board and select your board

Figure 5.6: Arduino Uno Tutorial

Here, we have selected Arduino Uno board according to our tutorial, but you must
select the name matching the board that you are using

Step 7: Select your serial port.


Select the serial device of the Arduino board. Go to Tools ->Serial Port menu. This is
likely to be COM3 or higher (COM1 and COM2 are usually reserved for hardware serial ports).
To find out, you can disconnect your Arduino board and re-open the menu, the entry that
disappears should be of the Arduino board. Reconnect the board and select that serial port.
MPES ECE Page 63
A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

Figure 5.7: Arduino Uno on COM3

Step 8: Upload the program to your board:


Before explaining how we can upload our program to the board, we must demonstrate
the function of each symbol appearing in the Arduino IDE toolbar.

Figure 5.8: Symbols

A- Used to check if there is any compilation error.


B- Used to upload a program to the Arduino board.
C- Shortcut used to create a new sketch.
D- Used to directly open one of the example sketches.
E- Used to save your sketch.
F- Serial monitor used to receive serial data from the board and send the serial data to the
board.

MPES ECE Page 64


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

Now, simply click the "Upload" button in the environment. Wait a few seconds; you will
see the RX and TX LEDs on the board, flashing. If the upload is successful, the message "Done
uploading" will appear in the status bar.
Note: If you have an Arduino Mini, NG, or other board, you need to press the reset button
physically on the board, immediately before clicking the upload button on the Arduino
Software.

5.4 Arduino Programming Structure


In this chapter, we will study in depth, the Arduino program structure and we will learn
more new terminologies used in the Arduino world. The Arduino software is open-source. The
source code for the Java environment is released under the GPL and the C/C++ microcontroller
libraries are under the LGPL.
5.4.1 Sketch:
The first new terminology is the Arduino program called “sketch”.
5.4.2 Structure:
Arduino programs can be divided in three main parts: Structure, Values (variables and
constants), and Functions. In this tutorial, we will learn about the Arduino software program,
step by step, and how we can write the program without any syntax or compilation error.
Let us start with the Structure. Software structure consist of two main functions:
 Setup () function
 Loop () function

Figure 5.9: Void Setup

MPES ECE Page 65


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

Void setup ()
{
}

5.4.3 PURPOSE:
The setup () function is called when a sketch starts. Use it to initialize the variables,
pin modes, start using libraries, etc. The setup function will only run once, after each power up
or reset of the Arduino board.
INPUT
OUTPUT
RETURN

Void Loop ()
{
}

PURPOSE:
After creating a setup () function, which initializes and sets the initial values, the loop
() function does precisely what its name suggests, and loops seductively, allowing your
program to change and respond. Use it to actively control the Arduino board.

INPUT
OUTPUT
RETURN

MPES ECE Page 66


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

CHAPTER 6

RESULTS
6.1. RESULTS

• In ration shop several drawbacks are there like material robbery, corruption,
malpractices, long waiting time to gather materials, low processing speed.
• To overcome above problems the mechanized rationing scheme is required.
• Here the smart card concerned open-end credit and controller for distributing the
materials.
• At this point card is modified by open-end credit and send the stock details to
government head office using internet.
• So, this proposed system used to avoid the corruption, goods theft, forgery and also
suggested maintaining the stock details properly and updating the small print easily.
• They provide a secure, safe and efficient way of fair price shop.

Figure.6.1. Photocopy of Arduino Uno Board

MPES ECE Page 67


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

CHAPTER 7

CONCLUSION

Public distribution system is an automation system and it is a recompense over the present fair
price shops. It eliminates fake ration holders and protects the interest of the common people
ensuring the countries food security.
Selecting the commodity and quality will make the system smarter and more robust. It will
help the country’s economy to reach new heights. The automated PDS is straightforward to
implement and requires much less diligence in comparison to the opposite system. Using this
system one can avoid the malpractices because there are no manual operations and also all
information is stored in the database.
As there's no manual data stored in books or register, all the info is stored in database hence
it's easy for higher authority to cross check the info at any point. So, implementing this will be
really helpful to targeted people.
Using this proposed system, we can avoid the corruption in rationing system to a large
extent by providing transparency at each level. As there is no manual data stored in books or
register, all the data is stored in database hence it is easy for higher authority to cross check the
data at any point. So, implementing this will be really helpful to targeted people.

MPES ECE Page 68


A STEP TOWARDS SMART RATION CARD SYSYTEM USING RFID & IOT

REFERENCES
1. K. Bal Karthik, “Closed-Based Ration Card System using RFID and GSM
Technology,’’ vol.2, Issue 4, Apr 2013.
2. Rahul J. Jadhav, Dr. Pralhad K. Mudalkar International “Smart Card based e-PDS
system” Journal of Advanced Research in Computer and Communication Engineering
Vol. 2, Issue 10, October 2013 [8] T. R. Sreenivas,” A case of supply chain management
of Public Distribution System operations in the Chhattisgarh state of India”, 3– 7
September 2012.
3. A. N. Madur, Sham Nayse,” Automation in Rationing System Using Arm 7,”
International journal of innovative research in electrical, electronics, instrumentation
and control engineering, vol.1, Issue Jul 2013.
4. Rajesh C. Pingle and P. B. Borole, “Automatic Rationing for Public Distribution
System (PDS) using RFID and GSM Module to Prevent Irregularities,” HCTL Open
International Journal of Technology Innovations and Research, vol 2, pp.102-111, Mar
2013.
5. Dhanojmohan, Rathikarani, Gopukumar,” Automation in ration shop using PLC,”
International Journal of Modern Engineering Research, vol.3, Issue 5, Sep-oct 2013, pp
2291- 2977, ISSN:2249- 6645.
6. A. N. Madur, P. N. Matte “Replacing Traditional PDS with Smart PDS” International
Journal of Emerging Technology sand Advanced Engineering Volume 3, Issue 12,
December 2013.
7. Agarwal M., Sharma M., Singh B, Shantanu,” Smart Ration Card Using RFID and
GSM Technique” IEEE Conference on The Next Generation Information Technology.
8. Shivabhakt Mhalasakant Hanamant1, Suraj V.S., Moresh Mukhedkar “Atomization of
Rationing System” IJCEM International Journal of Computational Engineering &
Management, Vol. 17 Issue 6, November 2014 ISSN (Online): 2230-7893
9. Wahib, M.; Munawar, A.; Munetomo, M.; Akama, K. “A Framework for Cloud
Embedded Web Services Utilized by Cloud Applications Services”, 2011 IEEE World
Congress on Communication, Networking & Broadcasting.
10. Rajesh Pingle, P.B. Borole and Sagar Patkar, “Simulation and Results of Automatic
Rationing for Public Distribution System (PDS) and Technique to Inform People about
Various Facilities Provided by Government to Them” International Journal of
Emerging Trends in Electrical and Electronics (IJETEE –ISSN: 2320-9569) Vol. 5,
Issue.3, July-2013.

MPES ECE Page 69

You might also like