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.

TMAG5273: Getting accurate angle data with a 45° rotated in-plane sensor

Part Number: TMAG5273

Hello,

I am using the TMAG5273x1 sensor in combination with a diametric ring magnet.
The positions I've tested are all off-axis.
The positions I've tested are:

  • Off axis with radial and axial dustances such that Bx and By are equal in amplitude.
  • In plane

However, I'm having trouble with getting consistent results, due to tolerances in my setup.
The significance of the error due to tolerances depends on the sensor placement position relative to the magnet.

According to "SBAA463 - Angle Measurement With Multi-Axis Linear Hall-Effect Sensors, chapter 3.1 sensor alignment"
The ideal sensor alignment for an in-plane setup is based on a 45° rotation, such that the radial and tangential magnet if field strength will be measured equally in amplitude by the sensor XY hall elements.

I'd like to try this out, but I'm curious about how angle calculation will be done in this configuration with the sensed magnetic fields having a phase shift, and thus introduce an angular error.

       

My question is:

How can I get accurate angle data with a 45° rotated in-plane sensor?
Currently I expect +- 1 degree accuracy (before mechanical tolerances) to be good enough for my application.

Follow up questions:
Can the TMAG5273x1 correct for the XY phase offset?
Do I need to correct this in my microcontroller?

  • Garard,

    This 45 degree rotation does provide amplitude matching, but will come with a cost of phase error. In effect, by rotating the device 45 degree, we expose the X and Y sensors to both the X and Y components of the rotating magnetic field.  Depending on how far off the two field amplitudes are, you will observe a different amount of phase shift.  If by chance you were able to place it in a location with already matched amplitudes, then you would only produce a fixed angle offset to your calculation. 

    Trigonometric corrections for the phase shift can happen when calculating the angle, but only assuming you know the actual phase error between the two components. You would also need to manage the angle calculations in your host microcontroller since the device cannot compensate for this error.  The algebra behind such a calculation is shown here:

              In= A*sin⁡(θ)

              In= A*cos⁡(θ-β)

    where β is the phase error.  

    Since we know that:

              A*cos⁡(θ-β) = A*cos⁡(θ)cos⁡(β) + A*sin⁡(θ)sin⁡(β)

    it is possible to work out that 

              In/ In1 = (cos⁡(β)cos⁡(θ)) / sin⁡(θ) + sin⁡(β)

    From here you can solve for tan(θ):

              tan⁡(θ) = cos⁡(β) / (In/ In1 -sin⁡(β))

     

    Thanks,

    Scott