RFID tags and readers

Hi everyone out there…

I am currently doing a project where I want to be able to track the position of my robot along a path as it tries to search for a target…

What I had in mind thus far is making a mat and dividing it into blocks where each block will have an RFID tag on it…hence when the robot is on a specific block it can read the tag and obtain it’s position and display it to the user…

My problem with this is that I am not sure how to find RFID tags and readers that are compatible with the VEX cortex or how to make them compatible with the Cortex controller…

If anyone can offer assistance on this, it will be very much appreciated…
Thanks…

How flexible are your parameters for this project? I’m just asking because using RFID tags is not the method that I would use. If you are intent on using RFIDs, what is your budget like? Do you want to use active or passive tags?

Well my budget it sorta tight so I was looking into passive tags thus far…

What method would you suggest using if not RFID tags?

How open is your field? Does it have walls like normal VEX field? If so, ultrasonics would be a very simple option.

It would be possible with an RFID system, however you would need small RFID tags (rip apart some cards maybe) but a number of RFID readers should be compatible with the cortex as long as they use 5V serial (TTL I believe?)instead of the normal 12V as the Cortex has 2 UART ports to serial. I’ve used a 125KHz reader with Ardunio over 5V serial and I believe it would be easily also since the UART has 5V power to supply the RFID with enough energy to read cards.

Another question I have is that on the Cortex I see that the documentation says that the UART ports are used for the VEX LCD…does this mean that some extra programming is involved here if I were to use an RFID reader?

Thanks hwilson! So far I have found one from Parallax that seems to be able to work with the Cortex… the only thing left to figure out is the programming for it

Hope it will help but programming the RFID won’t be too bad. Most of the 125KHz readers will just spit out the tag’s serial number in readable serial format so the cortex would simply have to poll the UART port to see if data has been sent to it and then use an array to form the string containing the tag serial number (usually 12-13 characters long). There is a second frequency (13.56MHz I think) which allows you to write to the card but this can be a lot harder to use so a simple program to poll the UART port would work and then the obtained serial number could just be checked against a list in the program to allow the robot to determine it’s position.

One thing to note is the range of RFID tags which can differ depending on location so you may have to be right over the tag to detect it which could become interesting if using VEX field tiles

Hi to anyone out there,

I have been trying to implement an RFID reader on the VEX cortex but I’m not sure if I’m doing the programming correctly. I am using RobotC at the moment.

To enable the antennae on the reader, I need to send the enable line low. The enable of the reader is connected to the transmit pin of the UART port or the Cortex. But the only way I am seeing to send any data to the UART is based on functions RobotC has in their serial library where it sends characters. Is this the correct way of setting the enable line low?

Any assistance/input will be greatly appreciated

Thanks!

What’s the part number for the reader you are trying to interface to? That would help us help you. Remember the serial port on the cortex cannot connect directly to peripherals using standard RS232 voltage levels and does not have handshake signals such as RTS etc. You may need some simple buffering, anyway, get us the details on the reader and I’m sure we can help.

Edit.

So perhaps it’s this part, you mentioned parallax before.
http://www.parallax.com/StoreSearchResults/tabid/768/txtSearch/rfid/List/0/SortField/4/ProductID/114/Default.aspx

I don’t see a datasheet but looking at the picture I would say that enable should be connected to a digital out port on the cortex, the / before the name would normally indicate active low, you could also just tie this signal low and see if the reader sends any data on the sout pin. sout would go to RX in on the cortex.

Hey jpearman, I did as you advised and I the reader is actually reading the tags’ ID :smiley:

Thanks a lot for your help!

Would it be possible to interface the mentioned RFID reader with the PIC Microcontroller V0.5?

I was thinking it would be possible to connect it to a digital output for the 5v power supply and use the RX port for the sout. It would require some extra coding. But from what I have read about the Tx/Rx interfacing i think it is possible.

What are everyone’s thoughts?

Thanks

Yes, should not be a problem.

The RFID reader we talked about before only has serial data out, so it will go to the RX input on the PIC. Use one of the digital port lines as an output for enable. Something like this.

[ATTACH]7374[/ATTACH]

The baud rate is pretty slow so the PIC will have no problems reading the data.

Thank you, this answers my question perfectly!!

Alright, so we’re having some issues getting the reader to communicate with the Microcontroller and determining what the ID for the card actually is. We’ve followed your diagrams very carefully, but we can’t seem to a) get the reader to activate and b) print the ID to the terminal window. We’re using EasyC V2 if that means anything to you, and the code we’re using is from a separate post on vex forum (link below). Any insight as to what the issue is would be much appreciated.

https://vexforum.com/local_links.php?action=ratelink&linkid=86&catid=26

Edit: After some trial and error, we’re getting the the microcontroller to display that it’s reading 255 as our “reading” for the ID card, but we aren’t sure we’re even opening communications with the RFID Reader, as we’re getting a compilation warning “Warning[2058] OpenSerialPort2.c line# 5 : call of function without prototype”

The function that this warning is referring to can be find in the thread we posted to this comment, "OpenSerialPortTwo( unsigned baudRate ) ; "

I will try and help next week when I’m back from worlds.

We finally got our code to recognize that there is a card present, now all we need to do is find a way of retrieving the actual values from the card. I’ve read that it should be a 10 digit hexadecimal number.

We want to read the card initially to figure out it’s ID then use its ID in our actual code for the correct card values/ incorrect card values.

Any help is appreciated.

Thanks

Page 4 of the manual states it’s going to send 12 ASCII characters down the line at 2400 baud. Since you are not using the Cortex serial port, how are you managing the baud rate?

http://www.parallax.com/Portals/0/Downloads/docs/prod/audiovis/28140-28340-RFIDreader-v2.2.pdf

Byte 1 will be line feed (ASCII value 10) and then you should see 10 characters and then a carriage return at the 12th character seen (ASCII value 13). In between will be the ASCII characters of the RFID tag it read. Verify the message and then you can use the rest into a string for tag comparison.

Are you seeing the bytes come through the data line?

You are right. We only get what looks like 2 three digit numbers they are consistent so we decided to use them.