This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Inconsistent time to successfully find RFID tag when RFID tag is statically in range at power up.

Other Parts Discussed in Thread: TPS61222, TRF7960A, TRF7960

Hi All,


I am using a MCU to send Inventory Request(16 slots) to find the UID from the RFID tag. 500ms time interval starts at power-up. I am facing a situation where the RFID tag is statically stick on the TRF7960ATB's antenna(3-5mm range) however, it takes an inconsistent time for getting the UID successfully at Power cycle. Sometimes, it takes less then 10 seconds from power up. Sometimes, it takes more than 30seconds.

  • Here are my code for Inventory request. Note that mask is = 0x00 and flags = 0x06(16 slots).

    void
    Iso15693ScanUID(u08_t *mask, u08_t length) // host command 0x14
    {
    u08_t i = 1, j = 1, command[2], no_slots;

    u08_t *p_slot_no, slot_no[17];
    u08_t mask_size;
    u32_t size;

    u08_t fifo_length = 0;

    slot_no[0] = 0x00;

    // BUGFIX
    TRF796xCheckRXWaitTime();

    if((flags & BIT5) == 0x00) // flag bit5 is the number of slots indicator
    {
    no_slots = 16; // 16 slots if bit is cleared
    Trf796xEnableSlotCounter();
    }
    else
    {
    no_slots = 1; // 1 slot if bit is set
    }

    p_slot_no = &slot_no[0]; // slot number pointer

    mask_size = (((length >> 2) + 1) >> 1); // mask_size is 1 for length = 4 or 8

    buf[0] = 0x8F;
    buf[1] = 0x91; // send with CRC
    buf[2] = 0x3D; // write continuous from 1D
    buf[5] = flags; // ISO15693 flags
    buf[6] = 0x01; // anticollision command code

    //optional afi should be here
    if(flags & 0x10)
    {
    // mask_size is 2 for length = 12 or 16 ;
    // and so on

    size = mask_size + 4; // mask value + mask length + afi + command code + flags

    buf[7] = afi;
    buf[8] = length; // masklength
    if(length > 0)
    {
    for(i = 0; i < mask_size; i++)
    {
    buf[9 + i] = *(mask + i);
    }
    }
    fifo_length = 9;
    }
    else
    {
    // mask_size is 2 for length = 12 or 16
    // and so on

    size = mask_size + 3; // mask value + mask length + command code + flags

    buf[7] = length; // masklength
    if(length > 0)
    {
    for(i = 0; i < mask_size; i++)
    {
    buf[8 + i] = *(mask + i);
    }
    }
    fifo_length = 8;
    }

    // buf[3] = (char) (size >> 8);
    buf[3] = (char) (size >> 4);
    buf[4] = (char) (size << 4);

    Trf796xResetIrqStatus();

    // Enable IRQ
    INTCON3bits.INT2IF = 0; // Clear INT1 flag
    INTCON3bits.INT2IE = 1; // For RFID IRQ line.

    Trf796xRawWrite(&buf[0], mask_size + fifo_length); // writing to FIFO

    start_timing(&MaxRFID_Delay, (time_cnt_t)ONE_SEC );

    i_reg = 0x01;
    irq_flag = 0x00;
    rx_error_flag = 0x00;

    while(irq_flag == 0x00)
    {
    if (test_for_timing_met(&MaxRFID_Delay))
    {
    // Timeout error
    break;
    }
    } // wait for end of TX interrupt

    for(j = 1; j <= no_slots; j++) // 1 or 16 available timeslots
    { rxtx_state = 1; // prepare the extern counter

    // the first UID will be stored from buf[1] upwards

    irq_flag = 0x00;

    while(irq_flag == 0x00)
    {
    if (test_for_timing_met(&MaxRFID_Delay))
    {
    // Timeout error
    break;
    }
    } // wait for interrupt

    while(i_reg == 0x01) // wait for RX complete
    {
    if (test_for_timing_met(&MaxRFID_Delay))
    {
    i_reg = 0x00;
    rx_error_flag = 0x00;
    break;
    }
    }

    command[0] = RSSI_LEVELS; // read RSSI levels
    Trf796xReadSingle(command, 1);
    switch(i_reg)
    {
    case 0xFF: // if recieved UID in buffer
    found = 1;
    break;

    case 0x02: // collision occured
    p_slot_no++; // remember a collision was detected
    *p_slot_no = j;
    break;

    case 0x00: // timer interrupt
    break;

    default:
    break;
    }

    Trf796xReset(); // FIFO has to be reset before recieving the next response
    if((no_slots == 16) && (j < 16)) // if 16 slots used send EOF(next slot)
    {
    Trf796xStopDecoders();
    Trf796xRunDecoders();
    Trf796xTransmitNextSlot();
    }
    else if((no_slots == 16) && (j == 16)) // at the end of slot 16 stop the slot counter
    { Trf796xStopDecoders();
    Trf796xDisableSlotCounter();
    }
    else if(no_slots == 1) // 1 slot is used
    {
    break;
    }
    } // for

    } // Iso15693Anticollision
  • Chee -
    how are you configuring the device? it seems to me that the amount of time is excessive, as the 16 slot inventory process itself (one round, with no collisions and with a tag in each slot, should take well under 100mSec. )

    have you tried switching to single slot inventory to make sure the rest of your initialization and configuration is robust and timely?
    have you set any breakpoints in your code to try to troubleshoot the hangup?

    for ISO15693 you could follow these register settings:
    ===================================================
    #ifdef ENABLE15693 // this standard can be disabled in ISO15693.h
    if (iso_control == 0x02)
    {
    write[0] = 0x20; //Continuous Write, starting with register 0x00
    write[1] = 0x20; //Value for Chip Status Control Register 0x00, 0x20 = +3.3VDC, full power, etc.
    write[2] = 0x02; //Value for ISO Control Register 0x01, 0x02 = high tag data rate, etc.
    write[3] = 0x00; //ISO14443B (N/A)
    write[4] = 0x00; //ISO14443A (N/A)
    write[5] = 0x00; //TX Timer HB (N/A)
    write[6] = 0x00; //TX Timer LB (N/A)
    write[7] = 0x00; //TX Pulse Length Control 0x00 = Disabled
    write[8] = 0x0E; //RX no response wait time (default)
    write[9] = 0x1F; //RX wait time (default)
    write[10] = 0x01; //Mod & SYS_CLK (OOK = 100% mod depth)
    write[11] = 0x40; //RX Special Settings
    write[12] = 0x87; //Regulator (default)

    Trf7970WriteCont(write, 13); //writes registers 0x00:0x0B
    McuDelayMillisecond(5);

    //Trf7970ReadSingle(buf,1);
    //SpiReadCont(00,10); // cont. read
    }
    #endif
    ===================================================
  • Hi Josh,

    Thanks for the reply.
    Currently, the code doesn't hangup. It is able to run inventory request and read the UID successfully. I am calling the Iso15693ScanUID() function every 500ms to poll for a RFID tag.

    I just found out that the issue is the distance between RFID tag and the antenna. It makes significant time different when I put the RFID tag 5mm away and 19mm away. The tag that stick at 19mm away from the antenna is quicker(<5sec) to be detected than the one closer(5mm, >30sec). The time is measure from power-up.

    How to fine tune this range? I am targeting for 0-30mm range for an consistent power-up detection time.

    Thank you.

  • alright then - do me a favor and look and see two things
    one - send me a picture or part number of the tag you are using and the environment you are using it in (i.e. metal desktop, other noise source around, etc. )
    two - look on the TRF7960ATB at the regulator IC (it should have a CKT on the top) if it has a CKR on it, then its one that slipped out
    (issue there was a BOM misunderstanding with the subco) - there were some # made with an adjustable version of the TPS61222 instead of the fixed version.
  • Hi Josh,

    1) We are using TAGSYS ARIO tag. Currently, the environment is at open space. We will put both reader and tag in an enclose environment. The material of the casing is plastic. However, I would like to understand more about the facts here. What will affect the range? and how significant the effect will be?

    2) It is a CKT. Please let me know how to adjust the range. Does it need hardware adjustment or it can be achieve by software? and, how?

    Thanks.

  • are you using the SM (13.6mm x 13.9mm) or the DM (26mm diameter) version?
    i don't have those particular ones in my collection, but they are based on SLI-S, which is essentially same thing as our HF-I silicon.
    with our 24.2mm inlay i get 0-40mm range), with our 22mm wirewound i get same results. This should be about what you get with the ARIO DM device and the TRF7960ATB antenna on that board.

    with a 10mm circular tag from 3rd party and our silicon i get from 0-20mm range with same setup and with a 10mm x 20mm inlay (also from 3rd party) i get from 0-35mm consistently as well.

    maybe double check your wiring to the board and your register settings - if you can share that it may shed some more light on your issue.
    pictures also help alot too in these kinds of troubleshooting situations.
  • ARIO SM

    For wiring, we only wired up these lines:

    1. SS
    2. SCK
    3. SDI
    4. SDO
    5. IRQ
    6. EN
    7. Power
    8. GND

    And, here is the code for registers setting. I am using 0x02 for iso_control parameter.

    void
    Trf796xWriteIsoControl(u08_t iso_control)
    {
        u08_t write[4];
        
        write[0] = ISO_CONTROL;
        write[1] = iso_control;
        write[1] &= ~BIT5;
        Trf796xWriteSingle(write, 2);

        iso_control &= 0x1F;
        
        write[0] = IRQ_MASK;
        write[1] = 0x3E;
        Trf796xWriteSingle(write, 2);
        
        if(iso_control < 0x0C)                    // ISO14443A or ISO15693
        {
            write[0] = MODULATOR_CONTROL;
            write[1] = 0x21;                    // OOK 100% 6.78 MHz
            Trf796xWriteSingle(write, 2);
        }
        else                                    // ISO14443B
        {
            write[0] = MODULATOR_CONTROL;
            write[1] = 0x20;                    // ASK 10% 6.78 MHz
            Trf796xWriteSingle(write, 2);
        }
        
        if(iso_control < 0x08)                    // ISO15693
        {    
            write[0] = TX_PULSE_LENGTH_CONTROL;
            write[1] = 0x80;                    // 9.44 us
            Trf796xWriteSingle(write, 2);
            
            if((iso_control < 0x02) || (iso_control == 0x04) || (iso_control == 0x05)) // low data rate
            {
                write[0] = RX_NO_RESPONSE_WAIT_TIME;
                write[1] = 0x30;                // 1812 us
                Trf796xWriteSingle(write, 2);
                }
            else
            {
                write[0] = RX_NO_RESPONSE_WAIT_TIME;
                write[1] = 0x14;                // 755 us
                Trf796xWriteSingle(write, 2);
            }

            write[0] = RX_WAIT_TIME;
            write[1] = 0x1F;                    // 293 us
            Trf796xWriteSingle(write, 2);
            
            write[0] = RX_SPECIAL_SETTINGS;
            write[1] = RX_SPECIAL_SETTINGS;
            Trf796xReadSingle(&write[1], 1);
            write[1] &= 0x0F;
            write[1] |= 0x40;                    // bandpass 200 kHz to 900 kHz
            Trf796xWriteSingle(write, 2);

                    // cyeng: Special Function??? not found in datasheet
            write[0] = SPECIAL_FUNCTION;
            write[1] = SPECIAL_FUNCTION;
            Trf796xReadSingle(&write[1], 1);
            write[1] |= BIT4;
            Trf796xWriteSingle(write, 2);
        }
        else                                    // ISO14443
        {
            if(iso_control < 0x0C)                // ISO14443A
            {            
                write[0] = TX_PULSE_LENGTH_CONTROL;
                write[1] = 0x20;                    // 2.36 us
                Trf796xWriteSingle(write, 2);
            }
            else
            {
                write[0] = TX_PULSE_LENGTH_CONTROL;
                write[1] = 0x00;                    // 2.36 us
                Trf796xWriteSingle(write, 2);
            }
            write[0] = RX_NO_RESPONSE_WAIT_TIME;
            write[1] = 0x0E;                    // 529 us
            Trf796xWriteSingle(write, 2);
            
            write[0] = RX_WAIT_TIME;
            write[1] = 0x07;                    // 66 us
            Trf796xWriteSingle(write, 2);
            
            write[0] = RX_SPECIAL_SETTINGS;
            write[1] = RX_SPECIAL_SETTINGS;
            Trf796xReadSingle(&write[1], 1);
            write[1] &= 0x0F;                    // bandpass 450 kHz to 1.5 MHz
            write[1] |= 0x20;
            Trf796xWriteSingle(write, 2);
            
            write[0] = SPECIAL_FUNCTION;
            write[1] = SPECIAL_FUNCTION;
            Trf796xReadSingle(&write[1], 1);
            write[1] &= ~BIT4;
            Trf796xWriteSingle(write, 2);
        }

    }


    Please note that this is "Power-up Static Tag detection range" (Not moving detection range). Any register settings that can be fine-tune? Or any hardware that can be fine-tune?

  • Chee -

    see picture of the schematic of the board you are using. 

    please confirm you have wired up MOD & ASK/OOK to 1k pull downs. and you are feeding the board +3.3VDC and get +5VDC on TP1.

    if you also have a picture of your setup, that would potentially help, too. 

  • Hi Josh,


    Thank you for your prompt response. Appreciated.

    I found the potential "solution" of fixing this issue, however I need some clarification from you. Below is what "fix" the issue:

    Chip Status Control Register(0x00) set to 0x20. This will set the Bit0 VIN Voltage range to 0 for 3-V operation as stated in TRF7960a datasheet. However, as you mentions above, the VIN should be +5VDC on TP1. This is not tally with what we set at this register.

    Is this the root cause of this problem? What is the side-effect since there is a little miss-match on register setting and the actual VIN input?

    Again, I would like to express my gratitude on the support that you gave me. I am very happy. Thank you very much. As an engineer, I still want to find out the root cause and side-effect with the above "fix". :)

    Thanks

    Regards,

    CY

  • yes - this bit should match what VIN is. need to switch it over at 3.4VDC to 3V setting if VIN is going that way. Otherwise, should be set for 5VDC operation (B0 = 1)
  • Hi Josh,
    We are experiencing a similar problem in that occasionally we do not get a response back from a Inventory request with, AFI supplied and 1 slot. Part is TRF7960.

    I have been reviewing our existing driver and I found the same error as Chee explained above. The existing driver is setting bit 0 of the "Chip Status Control Register" to 0, but VIN is being supplied with 5 volts, so reading this thread it should really be set to 1.

    Reviewing the history of modifications to our driver and based on the comments in each check in, the original driver was correctly setting this bit to 1. At some point it was some one changed it from 1 to 0 believing it would reduce the power consumption, but when I measure the voltages I am seeing:
    VIN = 4.935
    VDD_RF = 4.916
    VDD_A = 3.351
    VDD_X = 3.376

    Can you confirm that setting the vrs5_3 bit to 0, and supplying VIN with 5 volts can cause the system to not always work correctly?

    Thanks,
    Curt
  • Curt -
    with +5VDC in you can set Chip Status control register to 0x21 (for full power out) or 0x31 (for half power out). If you set the bit to zero and you are still supplying the device with +5VDC, you are reducing the power out of the device and by-product of that is reduced current consumption as well. It still works, though, in our testing of the system in the lab.
    i found the following:

    Not Standard Operating Mode: (for reference only)

    VIN CSC Register setting Register 0x0B Current draw Power Out
    5VDC 0x20 0x87 64.952mA 18.21dBm
    5VDC 0x30 0x87 47.58mA 14.84dBm
    5VDC 0x02 xx (don't care) 10.538mA 0dBm
    5VDC 0x00 xx (don't care) 3.11mA 0dBm
    5VDC 0x80 xx (don't care) 1.584mA 0dBm


    double check your schematic against the reference, make sure that you have the five pairs of 2.2uF and 0.1uF caps on all the regulators, that your clock is starting up correctly and that you do bandgap voltage = 1.6VDC. Then you can check your firmware - if you have a Saleae or other similar LSA, and you send us captures of config and operation communications, we can easily spot errors and get back to you.

  • Hi Josh,
    Thanks for getting back so quick on this issue. We have reviewed our schematic and noted some differences between it and the reference design.

    We do not have the paired 2.2uF and 0.1uF caps on pins 1, 2, 3, 4, 11 or 32, our system only has the 2.2uF caps. Also, the two capacitors connected to pin 8 (RX_IN1) are 1200pf, not 1000pf.

    We measured the bandgap voltage and found it to be 1.587 VDC. I also noticed that the VDD_RF I reported on Friday was incorrect. With CSC=0x20 VDD_RF = 3.359, with CSC=0x21 VDD_RF = 4.651.

    What we are concerned about is that our system works the majority of the time, but will occasionally fail to receive an Inventory response with the system transmitting out the ISO15693 Inventory with AFI command to a tag that is secured into the system assembly. The failure rate increases if we soak our system in an environmental chamber at 15 degrees C before testing. BTW: No other RFID tags are within 2 feet, so anti-collision logic is not performed, and we also send the request with 1 slot.

    You stated that setting the CSC bit 0 to 0 and supplying 5VDC to VIN worked in your lab, but I’m wondering if there are some corner cases or temperature related cases where the system would perform better setting bit 0 of the CSC correctly to 1 since we are providing 5VDC to VIN.