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.

TMAG5170 register setting range

Dear,

I am working on TMAG5170A1EDGKRQ1 sensor (register setting range ±25mT), but changed to TMAG5170A2EDGKRQ1 (register setting range ±75mT). Can you assist with magnetic sensor output calculation data to know the tolerances and accuracies (See attached). 

Thanks for the support in advance.

Regards

Prince Boateng

  • Prince,

    Welcome to E2E, and thank you for reaching out with your question.  I don't see any attachment, but I will try to provide guidance based on what details you have given.

    The primary difference between the A1 and A2 versions of the device is that the selectable sensitivity ranges are different.  A1 allows you to select from +/-25,+/-50,and +/-100 mT sensing ranges.  A2 has the options of +/-75,+/-150,and+/-300 mT.  This option is set for each axis individually, so it might be possible to optimize the sensing range of each axis to the expected range for each direction (X,Y,Z).  However, it is recommended that when you are using the angle calculator to set the ranges for the two axes being used to the same range.

    These settings are available within the SENSOR_CONFIG (0x01) register in bits [5:0]

    The calculation of the field strength is a function of the range which has been selected.  The output code will be in 2s compliment, and will either be a 12-bit or 16-bit result.  If averaging is enabled to reduce noise, then a 16-bit result will be produced.  This setting is in the DEVICE_CONFIG (0x00) register in bits [14:12]

    If n is the number of bits, the possible output code range will be +/- 2n-1

    The Sensing_Range of the device is the Maximum_Input - Minimum_Input.  In the case of the +/-25 mT range this calculates to 50 mT.  In the +/-75 mT setting, Sensing_Range = 150 mT.

    After converting to a signed integer, the effective output result will be Signed_Output / 2n * Sensing_Range.  This is shown in the datasheet here:

    Please let us know if you have any follow up questions!

    Thanks,

    Scott

  • Dear Scott,

    Thanks for a very detailed explanation.

    How does below data for A1 and A2 have in terms magnetic field resolution measurement?

    Does which of them produces in term of resolution?

    If my detection threshold is 1.7mT before SW trigger a flag, can A2 be used effectively compared A1?

    What does mT correspond in bits (LSB) when output code 16-bit is selected?

    A1

    A2

    Thanks for your support in advance. 

  • Dear Scott,

    Signed_Output / 2n * Sensing_Range

    How do I calculate the signed value, from a theoretical point of view or should I use some assumptions?

    Sorry for the many questions

    Regards

    Prince

  • Prince,

    The process to calculate the signed output appears in the equation I referenced in the last image of my initial response.

    If the most significant bit, D15, is a 0, then the number is positive, and calculated normally.  If D15 is a '1', then you would subtract 215 (32768) from the results.  For instance, 0xF0A3 would be calculated as -3933 in decimal format (-32768+28835).

    The LSB size of either device variant (A1 or A2) depends on the range selected. For example, if using the A1 in +/- 25 mT (total range of 50 mT), the LSB size is approximately 1308 LSB/mT (or about 0.764 uT/LSB) , however using the same register setting on the A2 will set the sensing range to +/-75 mT (total range of 150 mT), the LSB size will be 436 LSB/mT (or about 2.294 uT/LSB) .

    Since the ADC is actually only 12-bit, averaging, even set to the maximum will not produce the resolution of a 16 bit result.  This can be noticed by looking at the input referred noise of the device.  See below for the spec on the A1 device:

    At the highest averaging setting, the effective resolution is actually around 14.5 bits, although the result is extended to 16 bits.  In your application, the quality of your measurement will depend on the signal to noise ratio (SNR).  Ideally, you will be measuring a field much larger in magnitude than the noise of the device.

    While either the A1 or A2 can measure a signal of 1.7 mT, the noise performance on A1 is better since the sensitivity gain is lower.  I would recommend with either device that if your signal is in this approximate range that you might want to use the 32x averaging if possible to achieve the best SNR possible.  

    Thanks,

    Scott

  • Thank you very much Scott for your support. 

  • Hello Scott,

    Do you have some data to share regarding the accuracies between A1 and A2 or some theoretical assumptions?

    Regards

    Prince 

  • Prince,

    The plots and spec data shown in the datasheet are created using data measured from actual devices, and any specification that is listed with a min or max value is always verified during production.  We do not typically share the raw data however as this would be cumbersome to publish and support.  

    Thanks,

    Scott

  • Scott,

    Understood, thanks.