cancel
Showing results for 
Search instead for 
Did you mean: 

How to incorporate ST25R3916B Antenna Tuning into the demo_polling project?

smithderek2000
Associate III

Hello,

   I have a ST25R3916B project that is working fine, largely based around the demo_polling.c application. We use one '3916B and switch between different antennas. Each time we switch obviously the RF characteristics change a little, so I'd like to calibrate the antenna. I found the function st25r3916AatTune() but I don't see any example of how to call it and set the parameters.

1. Is there an example application that shows how to do antenna tuning on the '3916B? If not, how do I do it?

2. How do I know when this process is done so I can start scanning for tags?

3. How can I see the result of the tuning? It would be good to know whether the tuning was 'bad' or 'good'.

Thanks,

Derek

1 ACCEPTED SOLUTION

Accepted Solutions

Hi,

ad 1) These are the inputs for the algorithm in terms of values for the Antenna tuning control registers of the ST25R3916.

ad 2) It depends on your matching and what you want to achieve. By default I assume that you have varicaps on both pins and that you want to put the mins to 0 and the maxs to 0xff.

ad 3) It again depends how accurate you want to vs the time you want to spend. If providing NULL we are starting in the middle (128;128) and with a step size of 32 and dynamic steps which should quickly converge.

ad 4) It depends on your matching. The default config tries to mimic how the hardware algorithm on ST25R3911B was optimizing by default: Maximize amplitude and try to get phase close to 90deg. You can also put the weight for phase to 0 for optimizing only the amplitude to e.g. 2.5V (ampTarget * 13.02mV)

You can send a private message sharing layout and schematics but not sure if they will tell me as a SW engineer much. You can of course send a few results of the antenna tuning vs experienced range change for interpretation. 

BR, Ulysses

View solution in original post

4 REPLIES 4
smithderek2000
Associate III

To add more detail:

a. I did read AN5322 about antenna tuning, but just need more information about how to incorporate into the demo application.

b. Hardware follows X-NUCLEO-NFC08A1 with the series and parallel variable capacitors as LXRW0YV202-059 (100pF - 200pF)

c. Antenna multiplexer is after the RF match circuit (multiplexer attaches to ANT1 and ANT2, below)

 

smithderek2000_0-1713563447012.png

 

 

 

Ulysses HERNIOSUS
ST Employee

Hi Derek,

did you inspect AN5322 for some background?

The function st25r3916AatTune() is blocking and will return a st25r3916AatTuneResult struct which will tell you the relevant information. Just call it just after switching the antenna and enabling the tx field. In a first step you could try to use the default Tune params (i.e. provide a NULL param). 

Interpretation of the result can be quite complex and you need to define your strategy base on mentioned AN5322.

In the end it could also be a solution could also be to just define fixed values which you apply to the two AAT registers when switching the antennas.

BR, Ulysses

Hello,

I read through AN5322 and it mentions the struct but gives no example or units of what the values should be. We're using the 5 variable capacitor topology in  x-nucleo-nfc08a1 with the LXRW0YV201-059 (100pF - 200pF) variable capacitors. The struct is poorly documented, giving no examples of what the values should be set to ideally, nor does it give the units. I also see the defaultTuningParams but again, it doesn't say what each field means.

1. Are aat_a_min, aat_a_max, aat_b_min, aat_b_max in picofarads? Or voltage? It is not specified.

2. Given a range of 100pF - 200pF, what would be a good start value?

3. What would be a good stepWidth to use? 

4. What are recommended values for phaTarget, phaWeight, ampTarget, ampWeight?

Finally, we're under pressure to get this into production - is there a way that we can privately share schematics and layout? Thanks

struct st25r3916AatTuneParams{
uint8_t aat_a_min; /*<! min value of A cap */
uint8_t aat_a_max; /*<! max value of A cap */
uint8_t aat_a_start; /*<! start value of A cap */
uint8_t aat_a_stepWidth; /*<! increment stepWidth for A cap */
uint8_t aat_b_min; /*<! min value of B cap */
uint8_t aat_b_max; /*<! max value of B cap */
uint8_t aat_b_start; /*<! start value of B cap */
uint8_t aat_b_stepWidth; /*<! increment stepWidth for B cap */
uint8_t phaTarget; /*<! target phase */
uint8_t phaWeight; /*<! weight of target phase */
uint8_t ampTarget; /*<! target amplitude */
uint8_t ampWeight; /*<! weight of target amplitude */
bool doDynamicSteps; /*<! dynamically reduce step size */
uint8_t measureLimit; /*<! max number of allowed
steps/measurements */
}

Hi,

ad 1) These are the inputs for the algorithm in terms of values for the Antenna tuning control registers of the ST25R3916.

ad 2) It depends on your matching and what you want to achieve. By default I assume that you have varicaps on both pins and that you want to put the mins to 0 and the maxs to 0xff.

ad 3) It again depends how accurate you want to vs the time you want to spend. If providing NULL we are starting in the middle (128;128) and with a step size of 32 and dynamic steps which should quickly converge.

ad 4) It depends on your matching. The default config tries to mimic how the hardware algorithm on ST25R3911B was optimizing by default: Maximize amplitude and try to get phase close to 90deg. You can also put the weight for phase to 0 for optimizing only the amplitude to e.g. 2.5V (ampTarget * 13.02mV)

You can send a private message sharing layout and schematics but not sure if they will tell me as a SW engineer much. You can of course send a few results of the antenna tuning vs experienced range change for interpretation. 

BR, Ulysses