Portable Wireless Locator System: A Senior Design Project, Study Guides, Projects, Research of Electrical and Electronics Engineering

A senior design project for a portable wireless locator system using rfid technology. The system aims to locate the positions of multiple tags attached to personal belongings. The project proposal, design overview, and design details. The team encountered issues with the tags, which they attribute to incorrect crc and potential frequency mismatch.

Typology: Study Guides, Projects, Research

Pre 2010

Uploaded on 03/16/2009

koofers-user-kus-1
koofers-user-kus-1 🇺🇸

10 documents

1 / 21

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
The Portable Wireless Locator System
By
Francisco Lao
Jian Zhang
ECE 445, SENIOR DESIGN PROJECT
FALL 2004
TA: Chirantan Mukhophadyay
Date: 12-5-2004
Project No. 21
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15

Partial preview of the text

Download Portable Wireless Locator System: A Senior Design Project and more Study Guides, Projects, Research Electrical and Electronics Engineering in PDF only on Docsity!

The Portable Wireless Locator System

By Francisco Lao Jian Zhang ECE 445, SENIOR DESIGN PROJECT FALL 2004 TA: Chirantan Mukhophadyay Date: 12-5- Project No. 21

ii

TABLE OF CONTENTS

APPENDIX – TITLE..................................................................................Attached separately REFERENCES............................................................................................Attached separately

    1. INTRODUCTION.................................................................................................................1-
    • 1.1 Review and Update Material..............................................................................................
    • 1.2 Specifications......................................................................................................................
    • 1.3 Subprojects.........................................................................................................................
    1. DESIGN PROCEDURE........................................................................................................4-
    • 2.1 Selecting the Transceiver Unit............................................................................................
    • 2.2 Obtaining Tags....................................................................................................................
    • 2.3 Microcontroller and Power Regulator Units.......................................................................
    • 2.4 The LED Unit.....................................................................................................................
    1. DESIGN DETAILS.............................................................................................................6-
    • 3.1The Power Regulator Unit...................................................................................................
    • 3.2 The Transceiver Unit..........................................................................................................
    • 3.3 The Microcontroller Unit....................................................................................................
    1. DESIGN VERIFICATION...............................................................................................12-
    1. COST......................................................................................................................................
    1. CONCLUSIONS....................................................................................................................

1. INTRODUCTION

1.1 Motivation The portable wireless locator system is a concept design based on helping people keep lives organized. People often misplace or lose important objects such as keys, wallets, cellular phones, and remote controls. Our design is to create a system to help people locate these misplaced items with ease. We think that the project has a great market potential and practical value. Besides, we think that RFID, already a hot industrial technology that has a wide range of applications, can also be used in a small- scale system like ours. 1.2 Updated Material In the project proposal and design review, the system included a buzzer component to notify the user when the tags were out of range. However, as more testing was performed, it was found that our buzzer, when activated, drew a current in excess of 0.1A. This high power consumption level would kill common batteries instantly. Consequently, we decided to substitute the buzzer with LEDs in our proof- of-concept prototype, leaving the audio notification feature a future option. Another major change after the design review was made in to the transceiver unit. Initially, the transceiver was supposed to communicate with just one tag, and multiple-tag reading was considered an optional goal. Later in the project, we decided to increase the complexity of the project by making this optional add-on a nominal functionality of the transceiver.

data stream at 13.56MHz. The data stream contains a command code, address of a specific tag, and checking bits. Tags within the operation range of the system reply the transceiver by sending a data stream indicating whether they are the tags the transceiver requests. The transceiver then tells to the microcontroller the status of the requested tag – present, wrong tag, or absent. The Microcontroller Unit The microcontroller decodes input data from the transceiver and outputs appropriate signals to the LED circuit. It also stores transceiver commands in its memory, gives instructions to the transceiver, and regulates data transfer to and from the transceiver. The LED Unit This subpart contains pull-up resistors and three LED, corresponding to the three tags used in the project. Upon request from the microcontroller, the LEDs will be on, indicating that the tags they represent are out of range. The Transponders The three tags in our system operate at 13.56MHz. They are passive inductive tags and draw power from the RF signals generated by the transceiver. The tags work with TI Tag-it protocol and have a limited operating range of 2 feet.

2. DESIGN PROCEDURE

2.1 Selecting the Transceiver Unit The most important decision of the design was choosing the transceiving components. Two major different types of data transceiving modules had been considered: LINX RF modules and TI RFID products. LINX RF modules, frequently used by ECE 445 students, are a huge collection of various kinds of RF transmitters and receivers of different effective ranges, frequencies, power consumption levels, etc. Due to the popularity of the LINX modules in wireless projects, instruction references on these RF components are abundant and easily accessible. Moreover, inputting data for the transmitter to send is a relatively straightforward procedure, and so it receiving data from the LINX chips. However, the LINX transmitting and receiving components tend to be separate, each requiring a stable power source. RFID products, although increasingly popular in industry today, are less frequently used in project designs in comparison with the LINX RF chips. There is no centralized protocol for RFID technology, and each company may have their own implementation methods. In the United States, TI RFID products are most accessible to us. A typical, most simple TI RFID communication system consists of a reader, and a transponder. Unlike the LINX chips, TI transponders do not require an additional power source. TI RFID communication components generally have a relatively weaker transmission power. After reviewing the pros and cons of the two candidates, TI transceiver chip, specifically S6700, was chosen ahead of LINX chips. First, it is undesirable to attach a bulky circuitry to small possessions like keys, and LINX transmitter/receiver requires batteries, which guarantees a more sizable and heavier attachment than a TI tag. Furthermore, although TI chips offer weaker transmission power, the ideal requirement of six feet operating range can be met comfortably. 2.2 Obtaining Tags Although tags are much cheaper than transceiver chips, obtaining them for this project proved to be a more difficult task. Tags are usually less than one dollar apiece for bulk purchase of over 1, quantities. We called different companies but none of them agreed to offer free samples or sold tags at a smaller quantity. The only kind of tags available to us had only two feet of effective range.

3. DESIGN DETAILS

The reader system is composed of five major blocks, the transceiver unit, microcontroller (PIC16F877) unit, the power regulator unit, the LED output array, and tags. The block diagram is shown in Fig. 1.1., which is copied here for easy reference. Fig. 1.1. Block diagram of the system 3.1 Power Regulator Unit The power regulator was the first thing designed, but the last piece built. This was because our design was very common and we believed it would not give us any trouble. The power regulator was designed to convert a 6 V input into a 5 V output, independently of the load. It also had to have ripples of less than 20 mV. The design that we simulated and used met all of these criteria. To achieve this result, we used the equation provided in the Fairchild semiconductor datasheet: Vout = 1.25(1 + R 2 / R 1 ) + Iadj(R 2 ) (Iadj is negligible in our application) Using this equation, we concluded that to get the desired 5 V output, a 1 K resistor would be used for R and a 3K resistor for R2. We also adjusted C2 to reduce ripples. However in simulation, changing C did not seem to affect the ripples, so we kept the recommended 1uF capacitor. Switch Transceiver and Reader IC S

Antenna Turn system ON? Yes No Power Regulator Microcontroller LED of the respective tags

3.2 The Transceiver Unit The TI-S6700 IC is a HF RFID Reader operating at 13.56 MHz. It is the heart of our project. This transceiver works according to the “reader talks first” principle, meaning that the transponder will not respond unless the transceiver sends a request to the transponder. Our transceiver serves as both an RF reader and receiver, and it can operate in four different modes: Tag-it protocol, ISO/ IEC 15693-2, ISO/ IEC 14443-2, and Direct-Mode. In our design, we initially chose Direct-Mode. The main advantage with Direct-Mode is that it modulates and transmits the input stream directly without processing anything. The output can be easily verified using this mode. However, Direct-Mode is not allowed in many transponders. For our project, we had to use the TI Tag-it protocol because our tags only supported the Tag-it mode. For ideal RF output, we designed the transceiver/antenna component with the capacitor and resistor values with the values given in Figure 3.3-1 in the appendix. As shown in the figure, a 12Ω resistor is used to create a 10% modulation depth. However, in our design it was replaced with an 18Ω resistor to achieve the recommended 20% modulation depth. The inductors and capacitors were added to TX_OUT to create impendence matching for maximum transmission output. The system also required a 50Ω resistor to match the 50Ω antenna to cancel out losses due to reflection. Another important aspect worth noticing in the figure is the two pins XTAL1 and XTAL2. XTAL2 is an input pin for an external system clock. This pin is used to synchronize the internal 13.56 MHz oscillator clock with an external system clock. Initially we believed that this clock was unnecessary, because our system did not require synchronization between the microcontroller and the transceiver. We believed that the synchronization is mainly used for sending and receiving data between the microcontroller and the transceiver. Since our microcontroller had the ability to manually create and detect a S_CLOCK signal, we believed we would not have synchronization issues. We thought that an external system clock would only be applicable if we were using an external Ram chip to store the incoming data. However, after experimentation and frustration we found that when XTAL2 was not present, the transceiver would not respond. The reason was when there was no XTAL2 signal the system believed that our system clock had zero frequency. As a result, it would not take in any of our input signals. We will show later in the report that this was indeed the case. To solve this problem, we ended up feeding the internal clock signal on pin 8, XTAL_CLK, into XTAL2 and XTAL1, because of the transceiver’s 4 MHz to 16 MHz system clock limitation [1].

The command sequence for Direct Mode is 00000000. The test code for using Direct Mode is shown in Fig. 3.2. Once direct mode is initiated, a 101010 test stream is sent to the transceiver unit. The transceiver then immediately encodes the input digital data stream in Manchester code and transmits it. By probing the transceiver output, it can be easily verified whether the transceiver was accepting and understanding the inputs from the microcontroller input stream. void main() { Set_Tris_B(MY_TRISB); // Port B's I/O while(1) { turn_on(); command_direct(); es_1(); //finish initialize command mode output_high(PIN_B0); //set S_Clock high output_high(PIN_B1); //Send data high “1” delay_us(100); output_low(PIN_B1); //Send data low “0” delay_us(100); output_high(PIN_B1); //Send data high “1” delay_us(60); output_low(PIN_B1); //Send data low “0” delay_us(60); output_high(PIN_B1); //Send data high “1” delay_us(100); output_low(PIN_B1); //Send data low “0” delay_us(250); } } For complete code see (see Appendix Direct.cpp) Fig. 3.3. Sample code for Direct mode The while loop repeats the command sequence infinitely, allowing us to actually see and verify the transceiver output on the oscilloscope. The final working program, however, will not be run in this format. The delay_us( ) function is used to control the speed data is sent to the transceiver. Originally, 0.5us was used as the parameter. However, since the function accepted only positive integers, the PIC output was inconsistent and contained large ripples (see Fig. 3.3-1). Next, we tried using a 1us delay. The output of this 1us delay was consistent with our data input (see Fig. 3.3-2). However, we ran into problem creating both a uniform S_Clock and satisfying the minimum hold times between the clock edges required by the transceiver between the S_Clock and Data_In [1]. In additions, the ripples for this delay seemed like it might affect the input signals. After many other trials, we came to the conclusion that since we did not have a minimum S_Clock requirement, we could slow down S_CLOCK to reduce the ripple effects. We

decided to using a 100us delay. Under this setting we were easily able to satisfy the conditions mentioned above. Once we verified that Direct Mode was outputting properly, we moved on to add the Tag-It Mode. To initiate Tag-It, the following sequence was used for the command sequence, 00010001 [1]. Once the transceiver was set to Tag-It mode, we used Tag-It’s get version request command, 0000000011000 [2]. Next, we attached the transponder identification number, unique to every Tag-it transponder, and a 16- bit error checking CRC sequence to cap off the input sequence. Technically, once the transceiver receives this information, it will process it and output a Manchester encoded output to the Tag, telling the specified tag to respond with its ID. However how this output stream will look is unknown, as it depends on how the transceiver encodes the data. Nevertheless, it is known that if the desired Tag sees this input, the transceiver will output a particular sequence on the D_OUT. If the Tag sees that the ID sent is incorrect, it will not process the input, and thus it will not send out anything at all. An error message from the tag indicates that the input command contains an error, most likely an incorrect CRC. The tag will completely ignore the transceiver request if it is out of range or it cannot decode the incoming sequence. For testing purposes, we sent the get version request sequence without the SID present (see Appendix Tag_it.cpp). As long as the tags understand it is a get version request command, it will send its ID back. We did this to see if we are using Tag-it properly and to see if we can actually capture the DATA_OUT from the transceiver. For the actual receive code, only Tag-it mode is initialized. The controller sends out the get version request for the first SID to test if the tag is in range. It then repeats the procedure with the second and third SID’s. It is important to note that the code will become inefficient when there are more tags. Also we added a delay after the function call to give the transmitter enough time to process and send out the information before it is turned off. If the response of the tags are as expected, the LED will be OFF meaning the tags are in range. If the response is not as expected, the LED will turn ON, signifying that the Tags are out of range. Since we were unable to get the actual tags to work like in the datasheet, in order to test this receive code, we created phantom tags. These phantom tags were PICs that contained various tag information. For testing purposes, we coded four different PICs. We coded the first PIC with the SIDs of two different tags. This simulated a situation where two tags are within range (See Two-Tag.cpp). We coded the second PIC with only 1 SID, allowing it to respond properly to only one of the Tag-it function calls (See One-Tag.cpp). We coded the last two PICs with no SIDs and all three SIDs respectively. The

4. DESIGN VERIFICATIONS:

The Power regulator: PSpice was used to simulate the designed circuit. However, since we were unable to find the model in regulator library for simulation, we replaced it with the LM317 regulator model in the op-amp library. The PSPICE simulation can be found in Fig. 4.1-1 in the appendix. The physical power regulator circuit was also tested, and the oscilloscope output is shown in Fig. 4. below: Fig. 4.1. Testing of the physical power regulator circuit The circuit was able to step down an input of 5.968 to 5.054V. The output of the regulator had a ripple of approximately 8.44 mV, significantly below the maximum 20mV ripple that the transceiver accepted [1]. Without a load, the power regulator circuit drew a current of 0.001 A at 6V and dissipated 6mW. With a 2.2 kΩ load, it drew 0.003 A and dissipated 19.8mW. Transceiver circuit: To test the transceiver circuit, we analyzed the three different modes: Idle Clock_On, Idle Clock_Off, and transmit mode. We looked at the transceivers D_IN, D_OUT, TX_OUT, M_ERR, and S_Clock outputs pins to determine if we were sending and receiving the proper data streams. We also probed the components separately to determine the power draw of transceiver to see if it matched the data sheet.

Direct Mode Table 4.1 Current drawn by the PIC and transceiver in transmit mode Components Current, A PIC + Transceiver Unit in Transmit Mode 198 mA PIC (Direct Mode) 23 mA Transceiver Unit 175 mA Power regulator 4 mA As shown in Table 4.1, the transceiver unit drew a current of 175 mA in Direct Mode, which was under the maximum current of 200 mA under 5 V bias as specified in the datasheet [1]. PIC + Transceiver Unit in Idle Mode  59 mA (total current drawn from supply) Fig. 4.2 Transceiver output (Direct Mode) Fig. 4.2 shows part of the Manchester encoded transceiver output. We verified that the transceiver output matched the input data stream sent to it and concluded that the transceiver was responding properly to our microcontroller. However, the signal frequency was almost 1 MHz higher than the nominal 13.56 MHz operating frequency of the transceiver and the tags. This frequency discrepancy could be due to impedance mismatch between the cable and the output. Table 4.2 Current drawn by the PIC and transceiver when the transceiver was idle Components Current, A PIC + Transceiver Unit in Idle Mode 52 mA PIC (Direct Mode) 23 mA Transceiver Unit 29 mA Power regulator 4 mA

Fig. 4.4. Transceiver with Tag (Response Mode) Once the S_Clock is constantly low, the microcontroller no longer has control over the system, and the transmitter is turned off. Since the M_ERR is constantly high, we can come to the following conclusions: 1: The data received from the Tag could not be decoded corrected 2: The data sent to the Tag was not sent properly Since from the direct mode example, we can conclude that the input should be correct. We believe the problem is with our CRC. If our CRC is incorrect, the tag will respond with an error, because it will say that the input data is wrong.

M_ERR

S_Clock

5. COST

Part Cost Quantity Total PIC 16F877 Part Shop (actual cost $8.00) 4 Free S6700 Transceiver $10.00 2 $20. PCB board $8.00 1 $8. SN4002 $0.15 2 $0. LM 317 $0.54 1 $0. Batteries $4.75 1 pack (4 batteries)

LED 445 LAB

(actual cost: $0.17) 6 Free Antenna 445 LAB (actual cost: ~$5.00) 1 Free Capacitors Part Shop 10 Free Resistors Part Shop 6 Free Prototype part costs: Total = $ 18. Labor: Labor to build actual system: 20 hrs @ $50/hour = $1000. Design Labor over semester: 2 men @ 10 hrs/week, 14 weeks @ $30/hr 2101430 = $8, 84002.5 = $21, Total Cost: $22,000. GRAND TOTAL: $22,018.84.