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-Q1: Magnitude Reading Conversion

Part Number: TMAG5170-Q1

Hello,

In the linked thread, it seems there was an action to look into whether Figure 7-9 had a typo or not, but it does not seem like that was answered. Could you help answer this for me? Is the 13-bit magnitude result data 13 bits absolute or signed?

The other question I have is how do you convert the magnitude reading into mT? Again, according to the linked thread, it seems like you divide the magnetic range option chosen by (2^(12-signbit)) to get the LSB value. Then you could theoretically convert the binary to decimal based on that. Is that a correct understanding?

Best,

Jason Maxwell

  • Jason,

    One important thing to understand is that the magnitude conversion result is a byproduct of the CORDIC angle calculation and uses the XY, YZ, or ZX channel results that are output by the device. The CORDIC assumes that the range of both channels match.  If not, then the resulting angle calculation will become quite non-linear and this will also affect the magnitude result.

    The internal ADC which captures the X,Y, and Z channel results is 12-bit.  However, with averaging this will sign extend to 16-bit. The ENOB of the result will depend on the number of averages applied, with the 32x result achieving about 14.5bits of effective resolution. 

    The effective result of the CORDIC magnitude is unsigned, and magnitude is just the directionless absolute value of the vector.  It should be equivalent to:

    • magnitude = sqrt(Bx2+By2+Bz2)

    While the result register space is 13-bit, the effective result is limited to 12-bits and the MSB is always 0. Magnitude should be calculated by multiplying the register result by the full-scale input range(i.e. 100mT in the case of the +/-50mT range) and dividing by 212

    • mag = register_value * (2*50) / 212

    If we consider the case where both X and Y channels are fully saturated at 50mT, the calculated magnitude result should be 70.7mT.  If we were to convert this to a 13-bit value on the +/-50mT range, we would expect a maximum possible code of 0x0B50 (0 1011 0101 0000).  Notice that the MSB is '0'.  

    Thanks,

    Scott

  • Hey Scott,

    Thanks for the quick response. I appreciate the clarity here.

    Best,

    Jason