TIDUF78 May   2024

 

  1.   1
  2.   Description
  3.   Resources
  4.   Features
  5.   Applications
  6.   Design Images
  7. 1System Description
    1. 1.1 Key System Specifications
  8. 2System Overview
    1. 2.1 Block Diagram
    2. 2.2 Design Considerations
    3. 2.3 Highlighted Products
  9. 3System Design Theory
    1. 3.1 Hardware Design
    2. 3.2 Software Design
      1. 3.2.1 TMAG5170 SPI Frame
        1. 3.2.1.1 Serial Data In 32-Bit Frame
        2. 3.2.1.2 Serial Data Out 32-Bit Frame
      2. 3.2.2 TMAG5170 Register Configuration
      3. 3.2.3 SPI and Start-of-Conversion Timing
      4. 3.2.4 Linear Position Calculation
  10. 4Hardware, Software, Testing Requirements, and Test Results
    1. 4.1 Hardware
      1. 4.1.1 PCB Overview
      2. 4.1.2 MCU Interface Connector
    2. 4.2 Test Setup
    3. 4.3 Test Results
      1. 4.3.1 Magnetic Z and X Field Measurement
      2. 4.3.2 Linear Position Measurement
      3. 4.3.3 SPI Signal Measurement
  11. 5Design and Documentation Support
    1. 5.1 Design Files
      1. 5.1.1 Schematics
      2. 5.1.2 BOM
      3. 5.1.3 PCB Layout
        1. 5.1.3.1 Layout Prints
        2. 5.1.3.2 Layout Guidelines
    2. 5.2 Tools and Software
    3. 5.3 Documentation Support
    4. 5.4 Support Resources
    5. 5.5 Trademarks
  12. 6About the Author

Linear Position Measurement

As described in Section 3.2.4, the moving magnet position is calculated from the sensor with the highest Z-field magnitude using the Z- and X-field components. To adjust for the off-axis measurement the measured Z field was calibrated for gain and offset. In addition, a compensation factor multiplied by the absolute magnitude of the X field was used to compensate a nonlinearity with the position calculation. In addition, the displacement between each TMAG5170 on the PCB was corrected. For simplicity, the same value was used as distance between each TMAG5170.

Table 4-5 Calibration Factors
TMAG5170 1 2 3 4
Z offset 14.6mT 14.3mT 14mT 13.8mT
Z gain 0.94 0.93 0.94 0.94
Displacement 24.97mm 24.97mm 24.97mm 24.97mm
X axis compensation factor 0.001538 0.001538 0.001538 0.001538

The position was measured at a linear speed of around 0.4m/s at 22°C room temperature. The peaks observed at either end of the data capture are the result of the magnet leaving the sensing range of the quad sensor PCB.

TIDA-060045 Linear Position Error Over
                    Quad TMAG5170 at Room Temperature Figure 4-11 Linear Position Error Over Quad TMAG5170 at Room Temperature

To measure the impact of the Z field and X field noise floor, the static position error at 14.19cm was measured at over 1000 samples at 4kHz, as shown in Figure 4-11. The corresponding histogram is shown in Figure 4-12. Measurements are at 22°C room temperature.

TIDA-060045 Static Position Over 1000
                    Samples at 4kHz Sample Rate Figure 4-12 Static Position Over 1000 Samples at 4kHz Sample Rate
TIDA-060045 Histogram of Position Error at
                    Magnet Position 14.19cm Figure 4-13 Histogram of Position Error at Magnet Position 14.19cm

The corresponding standard deviation and ENOB versus full-scale position measurement range are shown in Table 4-6.

Table 4-6 Standard Deviation, SNR and ENOB at Static Position 14.19cm for quad TMAG5170
QUAD TMAG5170 POSITION ERROR COMMENT
Standard deviation [cm] 0.0053
Full-scale range [cm] 10 quad 3D sensors
ENOB [bit] 10.6

Each individual TMAG5170 provides an ENOB of 8.6-bit over the 2.5cm measurement range. Due to the quad TMAG5170 array with the 10cm range, the overall ENOB increase by 2-bit to the 10.6-bit shown in the table above.

Following that test, the position measurement was repeated 5 times at a linear speed of around 0.4m/s to outline the impact of the Z field and X field noise to the absolute accuracy. The test result is shown Figure 4-14.

TIDA-060045 Linear Position Error Over 5
                    Test Runs Figure 4-14 Linear Position Error Over 5 Test Runs

Further optimization is possible by more advanced compensation algorithms, see also. Magnets with higher field strength allow increase of the magnetic field strength to 100mT for the Z-axis and 50mT for the X-axis and help increase the signal to ratio by a factor of 2, respectively. Refer to Magnet Selection for Linear Position Applications (Rev. A).

A video demonstration of TIDA-060045 can be viewed at Designing with 3D Hall-effect sensors: Linear position encoding. For help simulating magnetic systems, the TI Magnetic Sense Simulator (TIMSS) tool can accelerate design and evaluation of magnetics systems.