Group 244
From ECE Department Wiki
Contents |
Project Description
The main idea of this project is to create a RFID tag range testing device to automatically move a RFID tag further away in distance and to send a radio frequency signal to the suspended tag in order to monitor the number of signals returned to the antenna. The benenfit of creating this system is that manufacturers of RFID tags would be able to insert their tags onto the pulley and compare the results of signals returned. This is to help them develop the best tags possible in various conditions and environments.
We used a stepper motor and a pulley system to move the
tag forward a specific amount and return to its original
location after testing. There were two PICs involved, one
master to control when the motor should move and to send out
the reader commands and one PIC to control the high and low
flags for the motor. Because RFID tags are highly sensitive
to water, florescent lighting, standing waves and reflection,
we needed to make the testing device portable in order to
obtain an optimal location away from
interferences. The main challenge with this is proper
mounting and being able to power the motor with a standard
12V supply. The pulley system can be mounted on stands and
the PCB board and reader can also be transported to various locations.
Members
- Philip Kannianen
- Brianna Balint
- Trisha Teunissen
- Advisor: Dr. Jake Glower
Project Background
The idea for this project came from Dr. Jake Glower’s continued work in RFID tags and testing. He and companies that he has worked with were interested in the idea of a standard testing system that a tag could be easily and quickly tested for quality. We are testing and programming using an Alien reader ALR-9780. There are currently more advanced readers than this model, but for our purposes, it worked efficiently. The code can be modified to give different commands to fit each reader if the tester wants more sensitive results. For moving the tag, we had a couple major design changes. The most significant change that we made was with the motor. In Senior Design 403, we tried to use a servo motor design but due to difficulties in programming, cost, and issues in power supply, we switched to a 12VDC stepper motor in Senior Design 405. This motor involved a significantly less complicated circuit that we could easily troubleshoot and modify without concern of burning out expensive parts. An additional change we made was deciding not to run our project with keyboard control because we wanted to make the project run fully automatic. If we would have used keyboard control to run the device, a technician would always have to be present for testing. Without the use of a keyboard no one need to be present during testing of new RFID tags which will in turn give more accurate results without a person absorbing signals.
For the most part, the main components of our project have remained the same throughout Design 403 and 405. The main components are: Stepper Motor, Alien Reader, RFID Tags, pulley system run by motor, Voltage Regulator, Power Supply, and a Computer with an excel program and HyperTerminal.
Requirements
• Use a PIC to control a stepper motor to move a certain distance
• Use a PIC to talk to the Alien Reader
• Device should be portable
• The Alien Reader records the number of pings returned from the RFID tag
• Make a graph with the recorded data
• The two PICs must be able to communicate with each other
Hardware
The Alien PIC is the master and tells the stepper motor PIC when to move the motor.
Once the motor is done moving, the Alien PIC tells the reader to ping the RFID tag 1000
times. The reader gathers the responses and sends the data back to the Alien PIC. The
data is displayed on the LCD and also sent to a PC using a software UART through RC2 on
the Alien PIC and is viewed on the PC using HyperTerminal (refer to user’s manual for steps).
The LM1085 was chosen for a voltage regulator to give the user flexibility in choosing supply voltages. The LM1085 is designed to output a constant 5V when the input is anywhere from 5V to 36V. The user can connect the PCB to a 5V supply in the lab, or to a 12V supply from a vehicle’s cigarette lighter, or a 12V car battery, or even a 24V vehicle supply. Also, this regulator protects the entire circuit from reversing the polarity of the input voltage. If the leads are reversed, the regulator will not function due to the internal configuration using diodes.
The stepper motor circuit is fairly straight-forward in that the PIC sends patterns of 1s and 0s to the 4 channels of the motor to make it step forward or backward. Four pins of the PIC are connected to MCP602 op-amps.
The diagram on the right depicts the inner connections and offers a more intuitive
explanation of the pinout of the MCP602. They were chosen since they run on 0V-5V supplies
where as many others, including the very common LM741, require a -12V-+12V supply. These
op-amps are to make the voltage level 5V instead of 3.4V that was being measured. This was a
major problem since at 3.4V, the transistors were still in the active region and were overheating
due to the current draw of the motor. The op-amps are set up as comparators with a 2.5V reference
on the inverting terminal. When the output of the PIC is below 2.5V, the output of the op-amp
is the negative rail, which is 0V or ground in this case. When the output is above 2.5V, the
op-amp output is the positive rail, which is 5V. The reference voltage is supplied from a voltage
divider which is buffered using another MCP602 op-amp. The output of these op-amps is fed to an
H-bridge to drive the stepper motor. The H-bridge consists of a PNP and NPN transistor pair
connected as shown on the schematic.
For the transistors, the ZTX956 was chosen for the PNP and the ZTX1055a (or ZTX857, they both handle the high current) was chosen for the NPN. The base bias resistors were chosen as 430Ω. This makes the base current 10mA.
These parts are made to handle currents of at least 3A, which is necessary due to the high current draw of the motor. When the base of the PNP transistor is 0V, saturation occurs and the output is 5V. When the base of the NPN transistor is 5V, saturation occurs and the output is 0V. With this circuit, the stepper motor draws current straight from the supply through the saturated transistor and not from the PIC.
The Alien PIC circuit is slightly more complicated due to the fact that it is the master and controls more functions than the stepper PIC. The LCD is connected as follows:
The main lesson learned with getting the LCD to work properly is the fact that unused pins cannot be left floating. Pin 5 needs to be grounded and Pins 7-10 need to be 5V. Pins RA0 and RA1 are connected to the stepper motor PIC to communicate when to move the motor and in what direction to move. The Alien PIC is connected to a MAX232 IC to convert the 0-5V logic level to a +/-12V logic level that the Alien Reader and the PC will be able to interface with. The software UART using RC2 also runs through the MAX232 using the second channel. The capacitors connected to the 232 create a charge pump to build up the voltage. The output of the 232 is connected to DB9 female connectors. There are 4 of these connectors on the board: the direct and null modem of each channel of the 232. The only difference in the direct and null modem configurations is the switching of the transmit and receive lines. Having both null modem and direct on the board is important since one of them will always work. The need for a having both a null modem and direct cable is eliminated since if one doesn’t work, the other one will. The Alien PIC also has an input which is a switch choosing either 5V or ground. This allows the user to select the desired mode of operation for the test setup.
Software
The code is divided onto two PICs, the Alien (master) and stepper motor PICs. The following two flowcharts show how the software runs through the test routine. The Alien PIC sends instructions to the reader to initialize and then tells it to ping the RFID tag 1000 times. The instructions for initializing the reader are stored as constants to free up RAM by storing them in the ROM. The results of the pings are sent to a PC and viewed using Hyper Terminal and also displayed on the LCD. Once this cycle is complete, if the unit is in position mode, the Alien PIC tells the stepper PIC to move the motor forward. This cycle continues until a predetermined point is hit and the test stops. The motor returns the tag to the start position. To do another test cycle, simply reset the unit. The stepper PIC code is shown on the second flowchart. This code is short and fairly simple. An array of numbers is loaded with a pulse sequence to make the motor take half steps. The array is fed to the motor quickly and a variable called Step is set to 100 each time the motor is to be moved forward. This number counts down to 0 at which point the motor stops moving. The stepper PIC waits for the Alien PIC to tell it when to move. It will not move on its own.
Documents
Troubleshooting:Troubleshooting.doc
Future Work
An improvement that could be made is with the software. The software version of MPLAB that we have at school is not large enough for our code. We wanted to add an extra subroutine so that we could operate in two different modes. Unfortunately, the code was then too big for the available software and we could not download the full version of the code to our PIC. If the full version of MPLAB was acquired, the “Vary Attenuation” subroutine could be run and the project would have two different operation modes for testing. We also discovered that spaces in arrays take up a significant amount of space. Limiting or streamlining arrays can save important memory space.
An additional improvement that could be made is in the test setup itself. The line that we are using droops quite a bit in the center. If we could use a tighter line, it would not droop as much. However the motor does not have enough torque to move a tighter line. Perhaps future improvements are figuring out a ways to amp up the current to the motor, or perhaps using a more p owerful motor.
One more project that could be considered in the future is measuring the shape the RFID signal is emitted from the antenna. This could be done by simply placing the tag at different angles to the antenna. It would be a nice project for future work.
This project would be useful to students in the future whose projects are based on RFID tags or any automated motor control. A possible project of designing new RFID tags using varying materials and sizes would find this the perfect setup for testing. This could be used to see what causes the largest amount of interference in readings and since the device is portable you could shift direction and reference angle to antenna to see what shape signal and range that antenna has. Our projects motor control code is very effective for students trying to have a fully automated motor with timed response or if they need a motor to communicate with another PIC.










