cancel
Showing results for 
Search instead for 
Did you mean: 

Automatic Antenna Tuning - ST25R3914

APant.2
Associate III

All,

Background

I am currently working on a project that uses the ST25R3914 nfc chip and would like to implement the Automatic Antenna Tuning (AAT) feature. After looking at the data sheet, it states that chip can perform antenna tuning automatically by sending it the direct command Calibrate Antenna. Great. I then looked through the RFAL library to see if there was an API function I could call that would execute this command, and I found rfalCalibrate.

This makes it easier to implement because I can now call the function mentioned above and the antenna will be tuned, but I had a few questions:

  1. When should I call this function? Should it be done after every tag that is detected?
  2. How often should it be called?
  3. Is there a configuration variable/register that needs to be set to get this feature to work?

Your expertise is greatly appreciated here.

Thank you in advance!

Adan

1 ACCEPTED SOLUTION

Accepted Solutions

Hi,

I would rather look at what the chip internal phase and amp measurement are revealing. I think 16 deg would be outside of the range of the chip internal measurements.

Please refer to the section in the DS about "Measure Phase":

0693W00000UoV2XQAV.png 

Best Regards, Ulysses

View solution in original post

18 REPLIES 18
Ulysses HERNIOSUS
ST Employee

Hi Adan,

please have also a look at AN4974: Antenna matching for ST25R3911B/ST25R391x devices

For the antenna tuning you there is one register to set the target phase (our driver let's this default to 90deg) and then this is about it.

Concerning how often you want it to call, you need to ask yourself what you want to achieve with it:

  1. Compensate potential temperature instability of the matching
  2. Compensate changing environment
  3. Compensate part-to-part variations of matching components, etc.
  4. ....

IMO after every tag will not make sense. You will need to ask yourself what you want to achieve as above, devise procedures for your reader and test this if it achieves what you want.

Best Regards, Ulysses

APant.2
Associate III

Ulysses,

Is the default 90deg phase a good starting point? Sorry, I don't have much experience with tuning antennas and also, my electrical background isn't up to par either ha.

I will also figure out what exactly needs to done with the antenna tuning with my team and call that function accordingly.

I was also wondering, how do I go about testing the calibrate function? Can I bring a metal object close to the antenna to cause some sort of distortion in the signal and then call the function?

Thanks,

Adan

Another question I had was, how does the AAT affect low-power card detect?

Thanks,

Adan

Hi,

you could go and measure the amplitude (and phase) before and after the calibration. Also the trim value will tell you about the changed tuning.

Of course if amplitude is higher you can expect more range.

Best Regards, Ulysses

APant.2
Associate III

Ulysses,

I have been calling the calibration routine in my code, for testing purposes, but I am running into an issue. The function returns a success, but the tri_err bit on the Antenna Calibration Display Register is set. This means, per the datasheet, that there was a calibration error. This confuses me since I get a ERR_NONE from the routine. Is there something I am not setting?

Also, does the AAT affect low-power card detect?

Thanks,

Adan

Hi Adan,

ERR_NONE: Command was executed correctly from SPI perspective, interrupt did come, etc.

tri_err can happen if you heavily detuned the antenna such that the phase set inside Antenna calibration target register cannot be reached anymore as this would be the starting point for the search.

I think I answered your question on AAT vs low-power card detect before: "if amplitude is higher you can expect more range."

Best Regards, Ulysses

APant.2
Associate III

Ulysses,

Interesting, I will take a look at the signal with a scope and see if I can figure out what I am doing wrong.

Ahh okay, I see what you're saying. So if I call the calibrate function while it's in low-power mode, the system will remain in that state, but the distance I can detect a tag might increase. Makes sense.

Thanks,

Adan

Hi Adan,

About tri_err: If you detune too much the trim caps may not be sufficient to bring back the system close to the target phase. There is nothing you can really do about it in SW. For better understanding it may be helpful for you to sweep through all 16 trim values and record resulting amplitude and phase. ST25R3911B-DISCO in the GUI let's you do so.

If you call the calibrate function while performing wake-up /LPCD there is a good chance that you just immediately wake-up as a changed trim will cause a change in LC-tank (changed amplitude and phase) and the old reference value is too far off.

I would recommend that you calibrate before going into wake-up mode.

BR, Ulysses

APant.2
Associate III

Ulysses,

I hooked up an oscilloscope to my tx and rx lines, at the antenna end, and measured the phase difference between the two lines at startup. I did this because the hardware engineer working with me on this project tuned the antenna to work at 13.56 Mhz. The measured value was ~16 deg and frequency ~13.590Mhz. I want to set this phase as my target. I'm now curious to know, how do you map the degrees to the register value. To set the 90 degree phase, the register is set to 0b1000000. This is confusing and not sure how to map the 16 deg phase to bits. The datasheet also only points to the command table, but doesn't explain the bits.

I will also implement your recommendation regarding AAT and LPCD.

Thanks,

Adan