SLYA059B July   2022  – May 2024 TMAG5170 , TMAG5170-Q1 , TMAG5170D-Q1 , TMAG5173-Q1 , TMAG5273

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
  5. 2Magnet Selection
    1. 2.1 Impact of Magnet Parameters
    2. 2.2 Calibration Method
  6. 3Summary
  7. 4References
  8. 5Revision History

Calibration Method

For any particular magnet selected, the position of the magnet can be calculated by deriving the mechanical angle using the arc-tangent of the outputs of the Hall-effect sensor.

For example, the input field produced by Figure 2-6 with a remanence of 850mT is shown in the following plot.

TMAG5170, TMAG5170-Q1, TMAG5170D-Q1, TMAG5173-Q1, TMAG5273 Magnet (10mm ⌀ × 4mm) at 10mm
                    Vertical Air Gap Figure 2-6 Magnet (10mm ⌀ × 4mm) at 10mm Vertical Air Gap

Calculations of angle using these inputs directly can be compared to the real mechanical angle.

TMAG5170, TMAG5170-Q1, TMAG5170D-Q1, TMAG5173-Q1, TMAG5273 Mechanical Angle Versus
                    Calculated Arctangent Figure 2-7 Mechanical Angle Versus Calculated Arctangent

Notice that the form is similar but is distorted somewhat in shape and extent. This distortion can be corrected using the following form:×

Equation 1. P o s i t i o n = tan γ * a tan α * B z - β B x + φ * B x * m a g n e t   t h i c k n e s s + a i r g a p 2

In Equation 1, four specific correction factors are required to obtain linearity. α specifies the amplitude correction applied to the Z axis input, β specifies a fixed offset which must be applied to the Z axis input. γ is a scalar correction for the magnetic angle, and φ is a scalar factor of the Y axis input which corrects some non-linearity in the final result.

In this case, setting the following empirically derived values for each factor produce a final position accuracy shown in Figure 2-8.

TMAG5170, TMAG5170-Q1, TMAG5170D-Q1, TMAG5173-Q1, TMAG5273 Calibrated Position Error
                    Versus Absolute Position
α = 0.791 ; β = 16.3 ; γ = 0.4104 ; φ = 0.448
Figure 2-8 Calibrated Position Error Versus Absolute Position

This same method was applied in the following figures to obtain similar accuracy. In each case, the position error is minimized over a region approximately 2x the diameter of the magnet.

TMAG5170, TMAG5170-Q1, TMAG5170D-Q1, TMAG5173-Q1, TMAG5273 Position Error for Magnet
                        (5mm ⌀ × 4mm) at 10mm Air Gap
α = 0.833 ; β = 4.85 ; γ = 0.397 ; φ = 1.07
Figure 2-9 Position Error for Magnet (5mm ⌀ × 4mm) at 10mm Air Gap
TMAG5170, TMAG5170-Q1, TMAG5170D-Q1, TMAG5173-Q1, TMAG5273 Position Error for Magnet
                        (14mm ⌀ × 4mm) at 10mm Air Gap
α = 0.739 ; β = 24.12 ; γ = 0.4215 ; φ = 0.4617
Figure 2-10 Position Error for Magnet (14mm ⌀ × 4mm) at 10mm Air Gap

The quality of each calibration varies with the exactness of the correction factors applied. In the case of the largest diameter magnet, peak error in the sensing range is approximately 10 um.

Of similar note, the ratio of the potential sensing range to the magnet diameter is largest for the smaller (and weakest) magnet.

Similarly, varying the air gap distance is possible to demonstrate impact on the expected sensing range of the sensor. Consider the following plots based on the 14mm ⌀ x 4mm magnet at air gaps of 5mm and 20mm.

TMAG5170, TMAG5170-Q1, TMAG5170D-Q1, TMAG5173-Q1, TMAG5273 Position Error for Magnet
                        (14mm ⌀ × 4mm) at 5mm Air Gap
α = 0.79 ; β = 58.9 ; γ = 0.297 ; φ = 0.049
Figure 2-11 Position Error for Magnet (14mm ⌀ × 4mm) at 5mm Air Gap
TMAG5170, TMAG5170-Q1, TMAG5170D-Q1, TMAG5173-Q1, TMAG5273 Position Error for Magnet
                        (14mm ⌀ × 4mm) at 20mm Air Gap
α = 0.775 ; β = 4.95 ; γ = 0.436 ; φ = 1.54
Figure 2-12 Position Error for Magnet (14mm ⌀ × 4mm) at 20mm Air Gap

In both cases, the maximum sensing range for the magnet was reduced. In the case of the 5mm air gap, the input field was limited by distortion. In the case of the 20mm air gap, the sensing range is limited by the strength of the magnetic field. The design goal, therefore, is to target a strong magnetic field that neither saturates the input of the sensor nor becomes distorted due to close range of the magnet.

In some cases, using a bar-shaped magnet can be advantageous for ease of assembly. This calibration method is not limited to cylindrical magnets. Similar to the previous cases, implementing the same calibration method for a square-faced magnet traveling over the sensor can produce excellent linearity (see Figure 2-13).

TMAG5170, TMAG5170-Q1, TMAG5170D-Q1, TMAG5173-Q1, TMAG5273 Position Error for Magnet
                    (10mm × 10mm × 4mm) at 5mm Air Gap
α = 0.75 ; β = 53.7 ; γ = 0.3815 ; φ = 0.089
Figure 2-13 Position Error for Magnet (10mm × 10mm × 4mm) at 5mm Air Gap