RFID Based Museum Guide For Tourists
RFID Based Museum Guide For Tourists
RFID Based Museum Guide For Tourists
INDEX
Contents Page No.
Abstract.....
Microcontroller AT89S52.......................
Hardware Description.
Coding......
Software Description
Conclusion.
References.
An RFID module basically consists of two parts, namely, a tag and a reader. A typical RFID system consists of an antenna, a transceiver and a transponder (RF tag). The radio frequency is read by the transceiver and the information is transferred to a device for further processing. The information (the unique serial number) to be transmitted is stored in the RF tag or transponder. The transponder contains a chip and an antenna mounted on a substrate. The chip transmits the relevant information through antenna. The antenna also receives the electromagnetic waves sent by the RFID reader. Different RFID tags work on different frequencies. Here low frequency, 125 kHz, RFID tags have been used. These tags work within a range of 10 cm. When an RFID tag comes in this range, the reader detects it and sends a unique code of the tag serially. This serial code, consisting of 12 bytes, is received by the microcontroller.
2
Block Diagram:
Embedded Hardware
All embedded systems need a microprocessor, and the kinds of microprocessors used in them are quite varied. A list of some of the common microprocessor families is the ZILOG Z8 family, Intel 805/80188/x 86 families, Motorola 68k family and the PowerPC family.
Embedded Software
The software for the embedded systems is called firmware. The firmware will be written in assembly languages for time or resource critical operations or using higher-level languages like C or embedded C. The software will be simulated using micro code simulators for the target processor. Since they are supposed to perform only specific tasks these programs are stored in Read Only Memories (ROMs).
Software
Hardware
o o o
ALP C VB Etc.,
o o o
Software deals with the languages like ALP, C, and VB etc., and Hardware deals with Processors, Peripherals, and Memory. Memory: Peripherals: Processor: It is used to store data or address. These are the external devices connected It is an IC which is used to perform some task Processors are classified into four types like: 1. Micro Processor (p) 2. Micro controller (c) 3. Digital Signal Processor (DSP) 4. Application Specific Integrated Circuits (ASIC)
BLOCK DIAGRAM
RFID TAGS
RFID READER
AT 89S52 Microcontroller
LCD Display
Speaker
3.MICROCONTROLLER
Basically, a microcontroller is a device which integrates a number of the components of a microprocessor system onto a single microchip. So a microcontroller combines onto the same microchip. The following components: CPU Core Memory (Both RAM and ROM) Some Parallel Digital I/Os The microprocessor is the integration of a number of useful functions into a single IC package. Has the ability to execute a stored set of instructions to carry out user defined tasks; also has ability to access external memory chips to both read and write data from and to the memory. Essentially, a microcontroller is obtained by integrating the key components of microprocessor, RAM, ROM, and Digital I/O onto the same chip die. Modern microcontrollers also contain a wealth of other modules such as Serial I/O, Timers, and Analogue to Digital Converters. There are a large number of specialized devices with additional modules for specific needs. E.g. CAN controllers.
MICROCONTOLLER (AT89S52)
8
FEATURES Compatible with MCS-51 Products 8K Bytes of In-System Programmable (ISP) Flash Memory 4.0V to 5.5V Operating Range Fully Static Operation: 0 Hz to 33 MHz 256Bytes Internal RAM 32 Programmable I/O Lines 3 16-bit Timer/Counters Full Duplex UART Serial Channel
The AT89S52 is a low-power, high-performance CMOS 8-bit micro controller with 8Kbytes of in-system programmable Flash memory. The device is manufactured Using Atmels high-density non-volatile memory technology and is compatible with the industry-standard 80C51 micro controller. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional non-volatile memory programmer. By combining a versatile 8-bit CPU with in-system programmable flash one monolithic chip; the Atmel AT89S52 is a powerful micro controller, which provides a highly flexible and costeffective solution to many embedded control applications.
10
The AT89S52 provides the following standard features: 8K bytes of Flash, 256 bytes of RAM, 32 I/O lines, Watchdog timer, two data pointers, three 16-bit timer/counters, full duplex serial port, on-chip oscillator, and clock circuitry. In addition, the AT89S52 is designed with static logic for perationdown to zero frequency and supports two software selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM timer/counters, serial port, and interrupt system to continue functioning. The Power-down mode saves the RAM contents but freezes the oscillator, disabling all other chip functions until the next interrupt or hardware reset.
11
PIN DESCRIPTION OF MICROCONTROLLER AT89S52 VCC Supply voltage. GND Ground. Port 0 Port 0 is an 8-bit open drain bi-directional I/O port. As an output port, each pin can sink eight TTL inputs. When 1sare written to port 0 pins, the pins can be used as high impedance inputs. Port 0 can also be configured to be the multiplexed low order address/data bus during accesses to external program and data memory. In this mode, P0 has internal pull-ups. Port 0 also receives the code bytes during Flash programming and outputs the code bytes during program verification. External pull-ups are required during program verification. Port 1 Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 1 Output buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins, they are pulled high by the internal pull-ups and can be used as inputs. In addition, P1.0 and P1.1 can be configured to be the timer/counter 2 external count input (P1.0/T2) and the timer/counter 2 trigger input P1.1/T2EX), respectively, as shown in the following table. Port 1 also receives the low-order address bytes during Flash programming .
12
Port 2 Port 2 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 2 output buffers can sink/source four TTL inputs. When 1s are written to Port 2 pins, they are pulled high by the internal pull-ups and can be used as inputs. Port 2 emits the high-order address byte during fetches from external program memory and during accesses to external data memory that uses 16-bit addresses (MOVX @DPTR). In this application, Port 2 uses strong internal pull-ups when emitting 1s. During accesses to external data memory that use 8-bit addresses (MOVX @ RI), Port 2emits the contents of the P2 Special Function Register. Port 2 also receives the high-order address bits and some control signals during Flash programming and verification. Port 3 Port 3 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 3 output buffers can sink/source four TTL inputs. When 1s are written to Port 3 pins, they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled low will source current (IIL) because of the pull-ups. Port 3 also serves the functions of various special features of the AT89S52, as shown in the following table. Port 3 also receives some control signals for Flash programming and verification.
13
RST Reset input. A high on this pin for two machine cycles while the oscillator is running resets the device. ALE/PROG Address Latch Enable (ALE) is an output pulse for latching the low byte of the address during accesses to external memory. This pin is also the program pulse input (PROG) during Flash programming. In normal operation, ALE is emitted at a constant rate of1/6 the oscillator frequency and may be used for external timing or clocking purposes. Note, however, that one ALE pulse is skipped during each access to external data Memory. If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. with the bit set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the ALE-disable bit has no effect if the micro controller is in external execution mode. PSEN Program Store Enable (PSEN) is the read strobe to external program memory. When the AT89S52 is executing code from external program memory, PSEN is activated twice each machine cycle, except that two PSEN activations are skipped during each access to external data memory. EA/VPP External Access Enable. EA must be strapped to GND in order to enable the device to fetch code from external program memory locations starting at 0000H up to FFFFH. Note, however, that if lock bit 1 is programmed, EA will be internally latched on reset. A should be strapped to VCC for internal program executions. This pin also receives the 12voltProgramming enables voltage (VPP) during Flash programming.
14
XTAL1 Input to the inverting oscillator amplifier and input to the internal clock operating circuit. XTAL2 Output from the inverting oscillator amplifier. Oscillator Characteristics XTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier that can be configured for use as an on-chip oscillator, as shown in Figure 1. Either a quartz crystal or ceramic resonator may be used. To drive the device from an External clock source, XTAL2 should be left unconnected while XTAL1 is driven, as shown in Figure 2.
15
16
The figure below shows some of the common and less-common frequency bands in which RFID systems operate. Also shown is the corresponding wavelength - the distance between points at which the field has a fixed value when the signal moves at the velocity of light.
18
Basic RFID system consists of three components a. Tags The basic RFID building blocks are miniature electronic devices known as Tags which talk to Readers. The RFID tags, also known as transponder, are usually small pieces of material, typically comprising three components: an antenna, a microchip unit containing memory storage an encapsulating material. Tag are embedded or attached to an item. The Tag has memory which stores information as either read only, write once or unlimited read/write. Tags typically range in size from a postage stamp to a book, depending on read distance and features. RFID tags come in a wide variety of shapes and sizes.
Fig 4.3: RFID Tags RFID tags are categorized into active and passive. They are fundamentally distinct technologies with substantially different capabilities. Both of the technology use radio frequency energy to communicate between a tag and a reader, the method of powering the tags is different. Active RFID tags are powered by an internal battery or internal power source continuously power the tag and its RF communication circuitry and are typically read/write, i.e., tag data can be rewritten and/or modified. While passive RFID tags operate without a separate external power source and obtain operating power generated from the reader. The passive RFID relies on RF energy transferred from the reader to be tag to power the tag. Passive tags are consequently much lighter than active tags, less expensive, and offer a virtually unlimited operational life time.
19
b. Reader: The Reader is able to talk to the Tag using radio waves over the air to send or receive information. The distance between the Tag and Reader for the radio waves to be strong enough for the devices to talk with each other is an important specification in building a reliable RFID system. Once you have reliable radio communications between the Tag and the Reader the system may take action based on results of their communication. RFID may send information downstream to your legacy systems or update digital information stored on the Tag. This wide range of options and the real time capability of RFID give it exciting new capabilities, distinct advantages and specific costs to build its infrastructure. RFID systems are also distinguished by their frequency ranges. Low-frequency (30 KHz to 500 KHz) systems have short reading ranges and lower system costs. They are most commonly used in security access, asset tracking, and animal identification applications. High-frequency (850 MHz to 950 MHz and 2.4 GHz to 2.5 GHz) systems, offering long read ranges (greater than 90 feet) and high reading speeds, are used for such applications as railroad car tracking and automated toll collection. However, the higher performance of high-frequency RFID systems incurs higher system costs. Different countries have allotted different parts of the radio spectrum for RFID, so no single technology optimally satisfies all the requirements of existing and potential markets. The industry has worked diligently to standardize three main RF bands: low frequency (LF), 125 to 134 kHz; high frequency (HF), 13.56 MHz; and ultrahigh frequency (UHF), 860 to 960 MHz. Most countries have assigned the 125 or 134 kHz areas of the spectrum for low-frequency systems, and 13.56 MHz is used around the world for high-frequency systems (with a few exceptions), but UHF systems have only been around since the mid-1990s, and countries have not agreed on a single area of the UHF spectrum for RFID.
20
c. An RFID antenna: Connected to the RFID reader, can be of various size and structure, depending on the communication distance required for a given systems performance. The antenna activates the RFID tag and transfers the data by emitting pulses.
21
Advantages of RFID
a. b. c. d. e. f.
No line of sight requirement. The tag can stand a harsh environment. Long read range. Larger area of coverage. Up to several feet. Portable database Multiple tag read/write. Tracking people, items, and equipment in realtime. Non-line of sight identification of tags
g. h. i.
Unattended operations are possible, minimizing human errors and high cost. Ability to identify moving elements that have tags embedded. Can be used in diverse environments, including live stock, military, and scientific areas.
j.
RFID can be used in addition to Bar Code. These two technologies can be complementing each other.
k.
Automatic integration with back end software solutions provide end to end integration of data in real time.
l. m. n. o.
Labor reduction Enchanced visibility and forecasting Improved inventory management. Simultaneous automatic reading.
22
5. Hardware Description
5.1 Power supply description:
As the microcontroller operating voltage is +5V DC. Through this power supply circuit we have to create a +5V DC which is given to the micro controller. The below components are used to create the power supply
230V AC supply
Bridge rectifier
Filter
Regulator Fig
Description:
230V AC supply is given to the step down transformer of 12A type. It may be a 230V to 9V or 12V step down transformer. The output of the step down transformer is given to bridge rectifier. The bridge rectifier is formed with 1N4007 diodes. The bridge rectifier converts the AC Voltage into DC Voltage. But the output DC Voltage contains some AC component (ripples). So we use a capacitors-2200uF/25V, 0.1uF/D and resistor of 10K as a filter for removing ripples. That output DC Voltage is given to the positive voltage regulator LM7805 (i.e., 78 represents the positive series and 5 represent the output voltage it can provide). So the output of the regulator will be the regulated +5V DC. To indicate the condition of the circuit we place a LED at the end of the circuit.
Voltage Regulators
Voltage regulators comprise a class of widely used ICs. Regulator IC units contain the circuitry for reference source, comparator amplifier, control device, and overload protection all in a single IC. IC units provide regulation of either a fixed positive voltage, a fixed negative voltage, or an adjustably set voltage. A fixed three-terminal voltage regulator has an unregulated dc input voltage, Vi, applied to one input terminal, a regulated dc output voltage, Vo, from a second terminal, with the third terminal connected to ground. The series 78 regulators provide fixed positive regulated voltages from 5 to 24 volts. Similarly, the series 79 regulators provide fixed negative regulated voltages from 5 to 24 volts. IC Voltage Regulators Voltage regulator ICs are available with fixed (typically 5, 12 and 15V) or variable output voltages. They are also rated by the maximum current they can pass. Negative voltage regulators are available, mainly for use in dual supplies. Most regulators include some automatic protection from excessive current ('overload protection') and overheating ('thermal protection'). Many of the fixed voltage regulator ICs has 3 leads and look like power transistors,
24
Second line
C0
C1
C2
C3
C4
C5
C6
through CF
25
Address locations for a 2x16 line LCD SIGNALS TO THE LCD The LCD also requires 3 control lines from the microcontroller: 1) Enable (E) This line allows access to the display through R/W and RS lines. When this line is low, the LCD is disabled and ignores signals from R/W and RS. When (E) line is high, the LCD checks the state of the two control lines and responds accordingly. 2) Read/Write (R/W) This line determines the direction of data between the LCD and microcontroller. When it is low, data is written to the LCD. When it is high, data is read from LCD. 3) Register select (RS) With the help of this line, the LCD interprets the type of data on data lines. When it is low, an instruction is being written to the LCD. When it is high, a character is being written to LCD. 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 Instruction - 1 Character
26
Writing and reading the data from the LCD: Writing data to the LCD is done in several steps: 1) Set R/W bit to low 2) Set RS bit to logic 0 or 1 (instruction or character) 3) Set data to data lines (if it is writing) 4) Set E line to high 5) Set E line to low Read data from data lines (if it is reading): 1) Set R/W bit to high 2) Set RS bit to logic 0 or 1 (instruction or character) 3) Set data to data lines (if it is writing) 4) Set E line to high 5) Set E line to low
27
PIN DESCRIPTION
Most LCDs with 1 controller has 14 Pins and LCDs with 2 controller has 16 Pins (two pins are extra in both for back-light LED connections).
28
5.6UART:
Computer
UART driver
Microcontroller
Fig 5.12 UART Block Diagram Atmel microcontroller features a full duplex (separate receive and transmit registers) Universal Asynchronous Receiver and Transmitter (UART). The main features are: Baud rate generator that can generate a large number of baud rates (bps) High baud rates at low XTAL frequencies 8 or 9 bits data Noise filtering Overrun detection Framing Error detection False Start Bit detection Three separate interrupts on TX Complete, TX Data Register Empty and RX Complete. The alternative function of portd0, portd1 is UART. Portd0 is the receiver pin and portd1 is the transmitter pin. Here we are using IC MAX232 as a UART driver. This micro controller board contains max232 IC which is used as a voltage converter.
29
Fig 5.13 Max 232 Schematics The output supply of computer will be 10V and we require 5V of supply for our microcontroller board. When we want to take some input from the computer to the micro controller, then we require some means in order to down convert that 10V to 5V. This is done through max232 IC. Similarly, when we are reading some thing from the micro controller in to the micro controller, then we need some up converter that converts 5V to 10V to the computer. This is also done through max232 only. This all work is done through the 4 capacitors present near the max232. These capacitors provide charge when required and store the charge when not required. So, Max232 requires: power supply of 5V 2 RS232 Drivers 4 External Capacitors of 1micro farad Dual charge pumps DC-DC voltage converters Receiver and Transmitter Enable control pins. Temperature of 00to +700 . The transmit pin of the micro controller [txd] pin 11 is connected to pin no 10 of MAX 232 IC. The receive pin of the micro controller [rxd] pin 10 is connected to pin no 9 of MAX 232 IC. In the DB9 connector pin no 5 is GROUND. Pin no 2 is receive pin. Pin no 3 is Transmit pin.
30
Fig 5.14 Reset Circuit Schematic Reset circuit contains one zener diode which operates in reverse bias, one tic-tac switch, one tantalum capacitor and one resistor. Vcc is the supply of +5V which we are giving to the controller board. This supply passes through the zener diode to the controller through pin no. 9. The reset pin here works in active low position. Active low means that whenever we are providing the supply, it will go to the controller. When we are grounding the circuit once, it shows the reset operation. Now, in this circuit, when we press the reset button (tic-tac switch), then the supply will be grounded which means that the supply has been stopped and when we release the switch the controller comes to the initial position. Tantalum capacitor is used here in order to protect the controller from the spike voltages caused due to the sudden change in the voltage when we press and release the tictac switch.
31
33
6.2 Project Coding: //Program to interface RFID with 8051 microcontroller (AT89C51) #include<reg51.h> unsigned int data_out,command=0x80,temp; sfr lcd_data_pin=0xA0; //P2 port sbit rs=P1^0; //Register select sbit rw=P1^1; //Read/Write sbit en=P1^2; //Enable pin unsigned char card_id[12]; void delay(unsigned int count) { int i,j; for(i=0;i<count;i++) for(j=0;j<1275;j++); } //Function to provide delay
void lcd_command(unsigned char comm) { lcd_data_pin=comm; en=1; rs=0; rw=0; delay(1); en=0; } void lcd_data(unsigned char disp) { lcd_data_pin=disp; en=1; rs=1; rw=0; delay(1); en=0; } lcd_string(unsigned char *disp) { int x; for(x=0;disp[x]!=0;x++) { lcd_data(disp[x]);
34
void recieve() //Function to recieve data serialy from RS232 { unsigned char k; for(k=0;k<12;k++) { while(RI==0); card_id[k]=SBUF; RI=0; } } void main() { int l; TMOD=0x20; //Enable Timer 1 TH1=0XFD; SCON=0x50; TR1=1; // Triggering Timer 1 lcd_ini(); lcd_command(0x81); //Place cursor to second position of first line lcd_string("UNIQUE CARD ID:"); delay(200); while(1) { recieve(); lcd_command(0xC1); //Place cursor to second position of second line for(l=0;l<12;l++) { lcd_data(card_id[l]); } } }
35
7. Software Description
Embedded c Keil software Installing the Keil software on a Windows PC Insert the CD-ROM in your computers CD drive On most computers, the CD will auto run, and you will see the Keil installation menu. If the menu does not appear, manually double click on the Setup icon, in the root directory: you will then see the Keil menu. On the Keil menu, please select Install Evaluation Software. (You will not require a license number to install this software). Follow the installation instructions as they appear.
Loading the Projects The example projects for this book are NOT loaded automatically when you install the Keil compiler. These files are stored on the CD in a directory /Pont. The files are arranged by chapter: for example, the project discussed in Chapter 3 is in the directory /Pont/Ch03_00-Hello. Rather than using the projects on the CD (where changes cannot be saved), please copy the files from CD onto an appropriate directory on your hard disk. Note: you will need to change the file properties after copying: file transferred from the CD will be read only. Configuring the Simulator Open the Keil Vision2 go to Project Open Project and browse for Hello in Ch03_00 in Pont and open it.
36
Now we need to check the oscillator frequency: Go to project Options for Target Target1
38
Building the Target Build the target as illustrated in the figure below
39
Running the Simulation Having successfully built the target, we are now ready to start the debug session and run the simulator. First start a debug session
40
The flashing LED we will view will be connected to Port 1. We therefore want to observe the activity on this port
41
To ensure that the port activity is visible, we need to start the periodic window update flag
Go to Debug - Go
42
While the simulation is running, view the performance analyzer to check the delay durations.
43
44
45
8. Conclusion
The project RFID Based Museum Guide For Tourists has been successfully completed and tested with Integration of the features of every hardware component for its development. Presence of every block has been reasoned out and placed carefully thus contributing to the best working of the unit.
The project was finished using very simple and easily available components making it lightweight and portable. This helps tourists to move in any premises of museum with the help of RFID Technology. The voice chip module is also interfaced for audio playback for the recorded voice messages relevent to particular object. I believe that our step is towards complete automated guidance system for tourists.
Finally I can conclude that this project application gives a very good features and there is huge scope for further research and development for using the same with the help of advanced technology.
46
9.Bibliography:
1) P. Bahl and V. N. Padmanabhan, RADAR: An In-Building RF-based User Location and Tracking System, in Proc. IEEE INFOCOM, 2000, pp. 775784. 2) P. Krishnan, A. S. Krishnakumar , Wen-Hua Ju , Colin Mallows , Sachin Ganu A System for LEASE: Location Estimation Assisted by Stationary Emitters for Indoor RF Wireless Networks, IEEE INFOCOM 2004, March 7-11, 2004, Hong Kong. 3) Leonard E. Miller, Indoor Navigation for First Responders: A Feasibility Study, Technical Report, National Institute of Standards and Technology, February 2006. 4) Hirohiko Ohkubo, Seiji Kitakaze, Yo Fujishima, Naoto Watanabe, Minoru Kamata, Integrated Way Finding/Guidance system using GPS/IR/RFID with mobile device, Technology & Persons with Disabilities Conference, March 14-19, 2005, Los Angeles. 5) S. Willis, S. Helal, RFID information grid for blind navigation and wayfinding, in Proceedings of the Ninth IEEE International Symposium on Wearable Computers, 2005 18-21 Oct. 2005. 6) Jongwhoa Na, The Blind Interactive Guide System Using RFID-Based Indoor Positioning System, in Computers Helping People with Special Needs, LNCS Volume 4061, ISBN 978-3-540-36020-9, 2006. 7) www.atmel.com for ATMega8515 micro controller
47