DragonBot Maze Project Spring 2021
RFID Testing
Author/s: Matthew Hillsman
Table of Contents
Introduction
The initial testing of the RFID sensor was performed on a breakout board, which contains the MFRC522 IC, made by Hiletgo. The testing was performed with an Arduino Uno. The Arduino and RFID board were connected via the SPI communication protocol. This test was performed using the SPI rather than the I2C because the breakout board used was hardwired to use only the SPI protocol.
The tests performed on this RFID module included verifying that the sensor would be able to detect the ID of the RFID card, confirming at what range the sensor would be able to read the card consistently and reliably, testing where the card must be and at what angle with respect to the sensor in order to get a proper reading, testing how long the card must be near the sensor in order for a proper reading to take place, and testing the effects on the reading with the card in motion at different speeds.
Procedure of Card Reading Verification
To test that the sensor was successfully reading the cards, the RFID sensor module was installed into a breadboard. Wires coming from the Arduino Uno were installed into the breadboard in order to connect the sensor to V3.3, GND, the 4 signals required for the SPI communication, and an additional signal that serves as a reset signal.
The library found here was installed on the Arduino IDE, and the code used for the initial tests was taken from here.
The card and keyfob included with the HiLetGo breakout board were used to conduct the test. The card was brought near the RFID module’s antenna, while watching the serial monitor. The Serial monitor returned the card ID value along with an “access granted” or “access denied” message. Upon being able to see the ID of the card from the serial monitor, it was concluded that the module is working.
Range and Reliability Testing
Using the same setup described above, the card was then moved further away from the sensor’s antenna, to see at what distance I can get card readings. The card and antenna were separated by distance as I moved the card in front of the antenna. I noticed that the readings were consistent when the card was approximately 3 centimeters or less from the antenna. When the card was moved at a distance greater than 3 centimeters, the readings stopped completely. I was able to conclude from this test that the sensor will give a reliable reading virtually every time the card is 3 cm or less from the sensor. When the distance was greater than 3cm, no readings would take place at all. This test was performed with respect to both the top side and the bottom side of the antenna. The results for both sides of the antenna were identical.
My initial expectations were that the card readings would be reliable at close range, then the reliability of the readings would slowly fade as the distance was increased. This was not the case, as there was no fading effect of the reliability as the distance was increased. The results were that the card was either within range of the sensor, in which the sensor would read the card consistently, or it was out of range, in which the sensor would not read the card at all.
Card Positioning and Angle Testing
Using the same setup as described above, the card was then position so that it was not directly above the antenna, but some distance to the side, but within the range of the antenna that was confirmed above. The results were that no card was read. This was confirmed several times. I then moved the card so that it was orthogonal so the plane containing the antenna coil but touching it on the side. The results were the same, and no card was read. I tried this several times with different positions of the card with respect to the coil, but the results were all the same, no card was read. I was able to conclude from this that the sensor will not read a card that is to the side of the coil, but that the card must be directly above the coil in order for it to get a reading.
I then placed the card so that it was directly above the sensor’s coil, but I tried it with the card not directly parallel with the coil, but at different angles. The results I had found were that the sensor would read the card consistently up to about a 45 degree with respect to the sensor’s coil. Between 45 degrees and 60 degrees, I would get some readings, but less consistently. Between 60 degrees and 90 degrees with respect to the coil, I would get no card readings. These results were identical when tested on both the top and bottom sides of the sensor’s coil.
Length of Time to Perform a Proper Reading
The verification test was performed again, but with special attention being made to the length of time required for the sensor to read the card. Upon performing this test, it was quickly realized that the length of time to get a reading was faster than could be accurately measured with a stopwatch. To the human eye, it had appeared that the reading of the card and its data was instantaneous. It was concluded that the length of time needed to get a card reading was so negligible, that it would not interfere with the operations of the robot, and that the length of time would not need to be accounted for as it was essentially instant.
Reading of Card While in Motion
The final test I performed on the breakout board was testing the reliability of reading the cards while the sensor was in motion. The purpose of this test was to simulate the robot as it is driving through the maze, and to test if this motion needed to be accounted for on the card reading reliability. The card was placed on the desk. I picked up the breadboard that the sensor was attached to, as well as the Arduino, and I began moving the sensor back and forth over the card, while watching for the card readings on the serial monitor. I began by moving the sensor slowly, then gradually increased the speed of the sensor with respect to the stationary card. The results were that the card would be read consistently at all the speeds possible. It wasn’t until the speed of the sensor was significantly more that we would ever be able to get the robot to move, that the sensor began failing to read the card.
Conclusion
In conclusion, the maze robot will need to be able to detect the presence of card and distinguish between at least 9 different card types. The successful testing of the MFRC522 has confirmed this IC as a viable and practical option to accomplish this goal. This testing also gives us valuable information which can be used in the further design and implementation of the RFID module as our card reader of choice.