SBAU419 November   2022 TMAG5170

 

  1.   Abstract
  2.   Trademarks
  3. 1Introduction
    1. 1.1 Simulating Magnetic Fields
  4. 2Supported Functions
    1. 2.1 Hinge
    2. 2.2 Linear Displacement
    3. 2.3 Joystick
    4. 2.4 Rotation
    5. 2.5 Static Position
  5. 3Supported Magnets
    1. 3.1 Built-In Library of Materials
    2. 3.2 Magnet Shapes
      1. 3.2.1 Bar
      2. 3.2.2 Strip
      3. 3.2.3 Diametric Cylinder
      4. 3.2.4 Axial Cylinder
      5. 3.2.5 Diametric Ring
      6. 3.2.6 Axial Ring
      7. 3.2.7 Multi-Pole Ring (Radial)
      8. 3.2.8 Multi-pole Ring (Axial)
      9. 3.2.9 Sphere
  6. 4Device Emulation
    1. 4.1 Device Types
      1. 4.1.1 Analog Linear
      2. 4.1.2 Digital Linear
      3. 4.1.3 Switch
      4. 4.1.4 Latch
  7. 5Simulation Outputs
  8. 6Additional Resources
  9. 7References

Simulation Outputs

Upon clicking "Start Simulation" the tool starts by modeling the motion of the magnet and evaluating the magnetic field present at all magnet positions. Again, these positions are defined by the "Step Size" field. Fewer steps result in a faster simulation, but fine resolution will be lost.

Three tabs will open in the most recent instance of the system default internet browser. These will display the local data generated by the tool for ease of understanding, and a save file prompt will open asking where to save the data on the local machine.

Figure 5-1 Save Prompt for .csv File

The first tab displayed shows an animated 3D plot displaying the magnet and sensor location. A blue line displays the path of travel for the magnet. The user may left-click on the plot area and drag the mouse to orbitally rotate the view. To pan the view, the mouse should instead be right-clicked. The mouse scroll-wheel may be used to adjust the zoom.

Figure 5-2 Animated Motion
Figure 5-3 Animated Motion
Figure 5-4 Animated Motion

The second tab contains a reference static image of the 3D plot alongside a plot of the magnetic field inputs observed at the sensor location. The static 3D plot may have its view adjusted similar to the animated plot on the previous tab.

The graph of magnetic field inputs and device outputs are color coded to match the RGB marker that represents the XYZ axes, which are shown to represent the sensor location and orientation. Each plot allows the user to zoom on a particular region by clicking and dragging to highlight the region of interest.

Figure 5-5 Magnetic Field Simulation Results

The third (and sometimes fourth) tab displays device outputs for the selected sensor type. If no sensor has been selected these tabs do not open. Device output is plotted against the type of motion that has been simulated. Whenever the input field saturates the input range of the sensor, the output is displayed at the maximum output level marked in the data sheet.

For analog and digital linear devices the output may vary between the specified output range. If the magnetic field input saturates the output range of the device, the output is displayed at the limit values. Switch and latch devices only have two outputs states that will display outputs at the digital logic levels VOH and VOL.

Figure 5-6 Analog Linear Sensor Output

For analog linear devices, the output plot includes input referred noise in the output response of the sensor. If the signal-to-noise ratio (SNR) of the sensor is not sufficiently large, this helps to demonstrate possible uncertainty in mechanical position that may occur. Successive simulation runs help to visualize the impact of 6-sigma noise on the sensor output. It is possible to reduce the impact of noise in application through the addition of an output filter, but this is at the cost of maximum output bandwidth. In #GUID-0B9CE2FD-6251-46E3-8DAC-C1E022C0E054, a hinge motion is observed using DRV5055A2 is used to measure the Z-component of the magnetic field shown in #GUID-BE5DFD55-80AF-4016-89C8-DD9955F72458.

Figure 5-7 Digital Linear Sensor Output

Digital linear devices similarly includes the input referred noise as it impacts the ADC conversion result for the device. The output result also shows output codes spanning across the n-bit conversion range for the sensor to demonstrate quantization effects on the measurement result. Additionally, when two or more axes of output results are produced by the sensor, the tool plots a calculated angle when simulating magnet rotation. When the input magnetic fields are equal amplitude and sinusoidal with a 90° phase difference, the resulting angle is linear with respect to the magnet rotation. Amplitude mismatch, offset and phase errors may result from mechanical sources. This can be seen comparing the TMAG5170 calculated angle results shown in #GUID-1D5500FA-37D8-4B0E-B378-D485B606773D. Notice that the YZ angle result is linear while the XY angle result is less ideal.

Amplitude mismatch and offset may be corrected using register settings in many devices, but calibration may be required to reach the highest accuracy results. For more information about improving angle accuracy, see Achieving Highest System Angle Sensing Accuracy.

Figure 5-8 Switch Sensor Output

Switch type devices generate a plot displaying sensor response to both forward and reverse motion of the magnet. This overlay is to highlight the impact of BHYS on the device operation. It is recommended to evaluate both directions of travel to verify that the intended response to the mechanical input matches expectations.

For any device with dual uni-polar outputs, such as DRV5032DU, a fourth tab will appear. This tab separately displays the second output of the device. Both outputs that result from pulling an axial cylinder magnet past DRV5032DU are shown in #GUID-E6A4D3FC-B875-4F93-8DD3-3567318CCFB7.

Figure 5-9 Latch Sensor Output

For latch type devices, a forward and reverse plot is displayed similar to the latch type devices. In the case of 2D latches, the display plot shows the response of both axes that are being sensed. If needed, the plot may be hidden by clicking the plot name in the legend.

As an example, plots showing TMAG5110 placed adjacent to a rotating 10-pole magnetic ring are available in #GUID-A04B1FAD-DB3C-40F8-831B-F1345C736E9E.