PDA

View Full Version : Will this work (BS2px and #rd party RFID)



gth629e
01-31-2010, 12:07 PM
Hello all,

So I have this idea that I would like to bounce off you guys before I spend my "hard earned" penny on hardware. So over the past few months I have been using RFID in a few projects and am having success and fun doing so. I am also still learning the ins and outs of Basic stamps and their capabilities.

What I would like to do is to use an and rfid reader with a BS2px basic stamp to obtain a standalone rfid module that will read and record a hex string from the rfid tag. The reader I will be using is the APSX RW110. Im using that reader because it has a small form factor and of course it is the 13.56 ISO 15693 type reader.

I can communicate with the reader with any "serial talker" from my pc by sending HEX commands, such as FA to read a tag etc. The serial protocol is 19200 baud 8-N-1 UART, thus me choosing the BS2px.

Upon reading a tag the RFID reader will transmit back to the stamp a the unique ID of that tag in a HEX string such as "H1 DE 2F 3S U7 HA 2J 8O W9". The ultimate goal is to have say 4 buttons on the stamp, each button is for a certain attribute. So if I press button A it sends the read command to reader and upon receiving data stores that ID in location A, button b reads and saves in location b etc.

I'd like to add more features later but for now this is my goal. Do any of you brilliant minds see any potential problems?

The RFID reader can accept TTL or rs232 via a shifter, here is the link to the reader if you are interested.

apsx.com/RW110.aspx (http://apsx.com/RW110.aspx)

Thanks all!!

Mike Green
01-31-2010, 10:44 PM
The main problem will be the Stamp keeping up with the RFID reader. If you read an entire response before trying to process it, you should be fine. Pre-compute the CRC for any fixed transmissions (where the data is predetermined) because calculating the CRC will be slow. Remember that "hex string" isn't really true. The RFID reader communicates in strings of 8-bit bytes. "hex" is just used here for the benefit of humans reading the data or entering data.

gth629e
02-01-2010, 01:13 AM
Mike

Thanks you for your input. Yes, when I say "hex string" i realize that I am actually talking about bits, but I think that should still be "easy" with the BS2px . I do have a some question though, I am aware of the CRC calculation that must take place, but what exactly do you mean by Pre-Compute the CRC. I had planned to set it up so that upon a button press, I read the entire data recieved from the reader, store it, and then manipulate it afterwords as I will not be reading that many tags. Also, shouldn't I be able to use the debug command to communicate with the reader?

Mike Green
02-01-2010, 01:36 AM
Most of what is sent to the RFID reader is fixed. Most of the messages are constant and never change. As a result, you can compute the CRC bytes, either using a separate Stamp program or a program on your PC, and put the CRC bytes in your program as constants as well. A few of the responses from the RFID reader are also fixed and the CRC bytes can also be computed ahead of time and put as constants in your program so you don't have to compute them.

You probably won't be able to use the DEBUG command and will have to use SEROUT and SERIN with regular I/O pins. The issue is that the debug port (Sin / Sout / Attn) is designed for use with RS232 signal levels. It can be connected to 5V logic levels, but it inverts the signals (5V <-> 0V) because that's the way RS232 is defined. It also echos everything received from Sin back to Sout and I think that will confuse the RFID reader.

gth629e
02-01-2010, 08:46 AM
Thanks mike as always you are very helpful.

I hadn't thought about the echoing of the debug, but no matter, I would plan on using the SEROUT and SERIN anyway. Looks like I'm all good to start buying some hardware and do some testing.

I do have another question for you though, I know that the internal memory of the BS2px will be sufficient to start with to hold sufficient data, but how would I expand the memory capabilities on down the road? I mean I could replace the eeprom etc, but is what if I wanted to store the data on lets say a SD card, is that possible?

Mike Green
02-01-2010, 09:15 AM
You can't expand the internal memory of any of Parallax's microcontrollers. For that matter, there are very few microcontrollers where this can be done. You could, with great difficulty, replace the EEPROM, but it won't do you any good because the PBasic interpreter won't recognize the additional memory.

That said, you can attach additional EEPROM or other kinds of memory to I/O pins for data storage. Look at the Parallax Memory Stick Datalogger for a way to use a USB memory stick for data storage. You can also use a Propeller with an SD card for datalogging.

gth629e
02-02-2010, 08:07 AM
Thank,

I'll look into that datalogger stick, it sounds perfect. I'll try and keep this post updated with my progress if anyone is interested.

Thanks for all your help.

gth629e
02-02-2010, 08:07 AM
Thank,

I'll look into that datalogger stick, it sounds perfect. I'll try and keep this post updated with my progress if anyone is interested.

Thanks for all your help.