Shop OBEX P1 Docs P2 Docs Learn Events
Rfid reader anti-collision — Parallax Forums

Rfid reader anti-collision

janujanu Posts: 11
edited 2013-06-13 20:52 in General Discussion
Hi.,
i am going to use the nRF24L01+ Transceiver as RFID READER and RFID TAG.

But now i am going to implement the ANTI-COLLISIION method for this IC .

Can you please suggest me some model code to support this Transceiver IC?



thanks in advance .,
janu

Comments

  • kwinnkwinn Posts: 8,697
    edited 2013-06-07 18:20
    I'm not really clear on what you are trying to do here since that part is an RF transceiver, which is quite different than the typical RFID reader/tag setup. Perhaps you could give a more detailed explanation of what you want to accomplish.
  • janujanu Posts: 11
    edited 2013-06-10 21:39
    Thanks kwinn
    as i am going to use nRF24L01as transmiter (RFID TAG) and nRF24L01 IC as RECEIVER(READER) also . But i need implement the ANTI-COLLISION code along this transceiver firmware . So can you please provide some ANTI-COLLISION model code for supporting this IC.

    Thanks in advance
  • kwinnkwinn Posts: 8,697
    edited 2013-06-10 22:59
    I have no sample code to share for this particular application, however you may want to look at how ethernet shares a bus using CSMA/CD as a starting point. I do not think Collision Detection is possible since the transceiver would have to be able to receive RF data at the same time it is transmitting. To get around that the receiver (RFID reader) would have to send an acknowledge back to the RFID tag after receiving a valid RFID packet.

    The sequence could be something like:

    1. RFID reader listens for transmitted packets.
    2. RFID tag listens for no RF data transmission and sends data packet (tag id, checksum, etc.).
    3. RFID reader verifies received data (tag id, checksum, etc.) is valid.
    4. if data is valid RFID reader sends ack packet (ack, tag id, etc.).
    5. if data is not valid RFID reader sends nak packet (nak)
    6. if RFID tag receives nak packet it waits for a random length of time and repeats from step 2

    Or it could be:

    1. RFID reader sends stx packet (stx) and listens for a response for x mS.
    2. RFID tag listens for stx packet.
    3. RFID tag waits for a random length of time that is less than x mS
    4. if no other data is being sent RFID tag sends data (tag id, checksum, etc.).
    5. if data is valid RFID reader sends ack packet (ack, tag id, etc.).
    6. if data is not valid RFID reader sends nak packet (nak)
    7. if RFID tag receives nak repeat from step 2
  • janujanu Posts: 11
    edited 2013-06-11 02:30
    Hi Kwinn.,

    Thanks for your great support.

    If the single Tag(nRF24L01 TRNSMITTER) communicate with mulitple reader(nRD24L01 RECEIVER),then all readers will get confused to receive the response from which TAG.

    This stage the collision occurs,am ryte. so we try to avoid this collisions using anti-collision method.
  • kwinnkwinn Posts: 8,697
    edited 2013-06-11 10:28
    How you approach this depends on the type of system you want. Typical RFID systems have one or more readers that read a single tag when it is brought into range of the RFID reader. Multiple tags cannot be read if they are brought in range of the reader at the same time.

    Short of having a token passing or master slave system there is no way to avoid collisions completely. A system that detects collisions and has the senders back off for a random length of time before resending data is generally how bus and RF systems are done.

    What type of system do you want to build?

    It sounds like you want to have multiple readers and multiple tags within range of each other. This type of system will be the most difficult one to write software for, and would probably require some form of token passing.

    A single reader that can read a single tag is the simplest system, and is pretty much equivalent to the standard RFID tag/reader systems in general use.

    There are several possible systems between these two choices.
  • janujanu Posts: 11
    edited 2013-06-12 02:48
    Hi.,
    .
    rfid.JPG
    Here by i attached my process flow diagram.Please check this.If we avoid collision the time delay is the correct solution am ryte.
    1024 x 742 - 36K
  • Mike GreenMike Green Posts: 23,101
    edited 2013-06-12 11:57
    There are a variety of techniques used for handling collision in transmissions on a shared channel. Your process flow diagram has nothing to do with this problem. The problem is strictly internal to the RF network. You can use the techniques used in the Ethernet where every message requires an acknowledgement from the recipient and there are timeouts and retransmission in the case of errors and collisions are avoided by using a random or mostly random delay in replying. Arcnet uses token passing where all transmitters take turns having control of the network and pass a token (special message) to the next known address in the network when it's done sending its messages. Collisions and timeouts occur when new network nodes are added or existing ones drop out. Then the network has to reconfigure itself.

    Usually when people want to build a wireless network, they buy ready-made devices that handle the end-to-end protocols needed like xBee. Other than very general discussions, I'm afraid that we can't really help you. The sample code provided for the transceiver just does CRC error checking for a single pair of transceivers. Anything more complex is something you'll have to research and develop on your own.
  • kwinnkwinn Posts: 8,697
    edited 2013-06-12 19:33
    First, I would suggest you take Mike's suggestion and purchase RF modules that takes care of the communications for you. Far less work that way, and will cost less in the long run.

    I have added questions to the flow diagram you posted. I was asking for more information regarding the overall project rather than details of how a single device operates. It sounds like you plan on having multiple devices like the biocrypt scanner that send the authentication tokens via RF to a reader, which then passes it on to the server by RF or a wired connection. The server response is then sent back to the device by the same path. This is the part you need to explain clearly to get any help.
    537 x 642 - 91K
  • janujanu Posts: 11
    edited 2013-06-12 21:49
    Hi Kwinn.,

    Thanks for your reply.I replied your questions in this attachment.Please refer this.Let me know did you having any questions.Thank you..

    Best Regards.,
    Janu.
    rfid.JPG
    906 x 642 - 73K
  • kwinnkwinn Posts: 8,697
    edited 2013-06-13 08:30
    I still think Mike's suggestion of RF modules that takes care of the communications for you is the best way to proceed, but if you decide to go with the nRF24L01 here is how I would approach it:

    Since this is a system with tags and readers in fixed positions, assign each tag to a specific reader.

    Have the server or an intermediate microcontroller poll each reader in turn. When the reader is polled it in turn polls each tag, and the tag sends ETX if there is no data, or it's data followed by an ETX.
  • janujanu Posts: 11
    edited 2013-06-13 20:52
    Hi Mike.,

    Features are going to be implement with the Active Tags:

    • I want to send data(information) to the Receiver from the Tag .
    • Receiver want to know there is a Tag in Range.
    • Only Ack feedback must be transmit to TAG from the RECEIVER.
    • APPROXIMATELY - 20 Tag will get communicate with the SINGLE Receiver.
    And My question is:
    • If the single Tag communicate with multiple reader,then all readers will get confused to receive the response from which TAG.This stage the collision occurs,so we try to avoid this collisions using anti-collision method.
    Thanks and Regards.,
    Janu
Sign In or Register to comment.