The 70% provided in the component datasheet is an error and the raw counts must be calibrated to 30% (with a 10% tolerance being acceptable). I have created an internal request to fix this bug. Thanks a lot for identifying and reporting this.
A few additional information on MagSense IDAC component:
The default IDAC gain is set to 300nA/bit. This means that the maximum current that it can drive is 300*127nA. You can increase/decrease this as there are 3 gain levels possible in MagSense.
To check this, you need to go to expression view
Go to Tools > Options > Design Entry > Component catalog and check the Enable Param Edit Views option.
Then in the MagSense component configurator, right click on Advanced and click on Show Expression view.
Scrolling down, you will find an option to set the gain. By default it is set to 300nA.bit.
This might not be applicable in this case since i believe you are able to achieve 30% easily. Please make sure that the IDAC code is within 30-90 to make sure that error in IDAC is not present.
Edited: Calibration percent must be 30%.
Thanks that helped a lot.
The signal and therefore the SNR is much better now.
I only have the little problem that I need to set the IDAC value higher than 90 to reach the desired 30% with the default gain 300nA/bit.(Exactly to 104)
If I set the gain to 2400nA/bit the IDAC values are lower than 30. (Exactly to 13)
Would you recommend to use the default gain 300nA/bit or the higher gain 2400nA/bit in that case to avoid error in IDAC?
It is better to use lower gain (300nA/bit) with the higher code. However, I see that you are obtaining high Vamp. You can increase Rlx to reduce this Vamp to get close to 1.8V so that the IDAC code required will also be within the required range. Please try this and let us know if you were able to tune with lower IDAC code.
I adjusted the used coil from above to 1,79V Vamp and used a Lx frequency of 2,2 MHz. The IDAC code is 120 to reach the 30% (3272) of the maximum value of raw counts. It works but the IDAC value is quite high.
Than I tested 4 smaller Coils with a Vamp of 1,95 V. ( Dout: 10mm; N: 18; tank capacitor 390pF; RLx: 2,37kOhm; Other Parameters are the same like above)
I adjusted the Vamp to 1,79-1,81V. Because of this i could degrease the IDAC value from 116 to 93 with the same resonant frequency of 1,92 MHz. There it worked.
However I recognized also a side effect of degreasing the IDAC value. This results in a higher noise.
Before the noise of the coils was around 5 to 15. With the degreased IDAC value the noise increased to 15-23 while the Signal only increased slightly from 381-439 to 376-575.
How can i recognize an error of the IDAC?
1. Can you check the IDAC code set by the component with auto-calibration enabled?
2. Can you increase the tank capacitor (C) so that F0 is reduced? lower f0 will result in lower IDAC.
3. Can you probe the Rx line? The Rx line must be probed before coupling capacitor Cc. You will be able to observe a sine wave with amplitude = Vamp. If this is not a sine wave then, the tuning is incorrect and f0 calculated is wrong.
Can you also mention the coupling capacitor used in the design (Cc)?
1. The IDAC code is between 67 and 71 in auto-calibration mode. The Lx frequency is set to 1,84kHz. The raw_counts are between 6740 and 6880 which seems a bit high for me. I found in the expression view the Parameter IsxRawCountCalibrationLevel which was set to 50 and changed it already to 30. With that Parameter set to 50 the IDAC code is 74 and the raw counts are between 7000 and 7200.
Are there more parameters to set the auto-calibration of the IDAC ? I use a slightly changed version of the sample code CE222867_MagSense_With_Feedback_LEDs. And now I am not certain what the function TuneMagSense does. Obviously it is involved in calibrating the IDAC Value, but it works with a percentage of 70%.
/* Tuning */
for(widgetIter = 0; widgetIter < 4; widgetIter++)
/* Move buttons to more sensitive frequency. */
WD_STRUCT_PTR(widgetIter)->snsClk += 3;
/* Recalibrate Idacs for 70% sensitivity */
/* Scan the sensor */
/* Wait till scan is complete */
/* Process the widget */
biggerHalf = CINTA_RESULT > CINTB_RESULT ? CINTA_RESULT : CINTB_RESULT;
/* Update IDAC */
ROUND_DIVIDE((WD_STRUCT_PTR(widgetIter)->idacMod * biggerHalf * PERCENT_100),
(PERCENT_70 * HALF_PERIOD_MAX(widgetIter)));
Could you please explain what the calculation in the end does?
2. Yes that is a possibility which works.
3. I probed the Rx line. It is a sine wave.
I use as recommended a 10 pF coupling capacitor for Vamp = 1.8V.
I also use a 100nF DC blocking capacitor in the Lx line.
4. Could you please explain me how the raw counts are derived?
5. Or do you have already information up to what frequency the IDAC code can be tuned in the limits of 30-90? Is it just frequency dependend or are there more parameters involved which have an impact on the IDAC code? (for example the setup of the resonant circuit)
The raw counts are not derived. They are measured based on the physical inductance parameter. we do not have a derived mathematical formula for raw counts of MagSense.
For a higher resonant frequency, the current required will also be higher. But it also depends on the vamp obtained, as higher Vamp results in more charge in the capacitor requiring more current.