SBAU420 March   2023

 

  1.   TMAG5170D Evaluation Module Abstract
  2.   Trademarks
  3. 1Overview
    1. 1.1 Kit Contents
    2. 1.2 Related Documentation From Texas Instruments
  4. 2Hardware
    1. 2.1 Features
  5. 3Operation
    1. 3.1 Quick Start Setup
    2. 3.2 EVM Operation
      1. 3.2.1 Setup
        1. 3.2.1.1 Driver Installation
        2. 3.2.1.2 Firmware
          1. 3.2.1.2.1 Firmware Debug
        3. 3.2.1.3 GUI Setup and Usage
          1. 3.2.1.3.1 Initial Setup
          2. 3.2.1.3.2 GUI Operation
      2. 3.2.2 Rotate and Push Demonstration
        1. 3.2.2.1 Optimizing Device Angle Matching
      3. 3.2.3 Direct EVM Serial Communication
  6. 4Schematics, PCB Layout, and Bill of Materials
    1. 4.1 Schematics
    2. 4.2 PCB Layout
    3. 4.3 Bill of Materials

Optimizing Device Angle Matching

Each 3D Hall-effect sensor is fabricated on a die and the package assembly has these dies stacked vertically for a minimal offset in the XY plane. Device tolerances for sensitivity gain and offset should be canceled out:

  1. Capture the data for one full rotation on both devices with averaging set to 32x for minimal input referred noise. Set the device to calculate angle using the desired axes.
  2. Correct the gain for one axis on each device:
    1. Find the maximum and minimum data points for each axis used in the angle measurement
    2. If the maximum of either channel is more than 2x the maximum of the other, it will be necessary to attenuate the channel with the larger input. Otherwise, TI recommends to amplify the output of the smaller input
    3. GAIN_VALUE in the MAG_GAIN_CONFIG register (0h11) is used to select the sensitivity gain adjustment for the desired axis.
      1. Gain is calculated from an 11-bit value / 1024. (For a value ranging from 0-2)
      2. Select the axis to amplify/attenuate using GAIN_SELECTION
      3. Set gain value based on the ratio of:
        1. (Max Ch A - Min Ch A)/(Max Ch B - Min Ch B).
        2. Where Channel A and B are selected based on step 2b.
  3. Repeat step 1 to verify the amplitude matching and to start the calculation of the offset correction
    1. For each axis, calculate the offset using:
      1. Output Offset = (Maximum Value + Minimum Value) /2
    2. Set OFFSET_SELECTION in MAG_OFFSET_CONFIG (0h12) to 0b11 to enable offset correction on both axes
    3. Set OFFSET_VALUE1 and OFFSET_VALUE2 using a 7-bit 2's compliment value to correct output offset based on maximum and minimum peak data in step 3a.

After correction sensitivity and offset errors of the device, the sensors may still experience some measurement error due to mechanical rotations of the package relative to the rotating magnet. The most straightforward alignment method is achieved by placing the sensor on-axis to the rotating magnet.

GUID-20210311-CA0I-VGS6-ZMHK-BXHWHP06PK50-low.png Figure 3-12 Sensor Alignments for Angle Measurements

In an ideal on-axis placement, the X and Y axis data will observe a decrease in magnitude only, with no impact to observed angle linearity. As the package is mechanically offset, peak input data for X and Y axes will vary, and the severity of amplitude correction needed will become more significant. Additionally, package rotations may cause angle offset relative to the position of the magnet or phase error between the observed X and Y axis input. This happens as each sensing element detects the field which is orthogonal to the sensing element and the sensor is no longer orthogonal to the rotating magnet. As a result, each sensing element detects a portion of the vector component from either of the other two axes. This error may vary based on the installation of either the magnet or sensor within the system. Often, end-of-line calibration for each sensor is required after full system assembly to achieve the best results. For more information, refer to the Texas Instruments Achieving Highest System Angle Sensing Accuracy application note.