SLYA065 October   2022 TMAG5328

 

  1.   Abstract
  2.   Trademarks
  3. 1Introduction
    1. 1.1 Mapping Switching Distance to Magnetic Flux Density
    2. 1.2 How to Program BOP of TMAG5328
    3. 1.3 Advantages of TMAG5328 Adjustable BOP
  4. 2Determining Sensed Magnetic Flux Density Seen by TMAG5328
  5. 3Implementing a Software-Programmable Hall-Effect Switch With Microcontroller-Less Standalone Mode
  6. 4Implementing Diagnostics and a Magnetic Window Comparator
    1. 4.1 Conducting Diagnostic Tests With TMAG5328EVM and Head-On Linear Displacement 3D Print
      1. 4.1.1 Magnet Out-of-Range Testing (Magnetic Window Comparator Testing)
        1. 4.1.1.1 Signal Disconnections
        2. 4.1.1.2 Signal Shorts
  7. 5Summary

Determining Sensed Magnetic Flux Density Seen by TMAG5328

To estimate the magnetic flux density sensed by the TMAG5328, connect a DAC or other voltage source to the TMAG5328 ADJ pin and follow the procedure below:

  1. Configure the DAC output code to provide 1.2 V to the ADJ pin of the TMAG5328. This ADJ voltage would result in BOP,TYP = 15 mT , BRP,TYP = 14 mT, and BRP,MIN = 11.65 mT.
  2. Verify that the output of the TMAG5328 is high. If the TMAG5328 output is not asserted high, the sensed magnetic flux density is too large to be determined by this technique, which might occur if the sensed magnetic flux density is greater than BRP,MIN = 11.65 mT.
  3. Reduce the DAC output voltage (VDAC ) a step size of one LSB (VLSB).
  4. To ensure that the new BOP is set, wait for a time period at least greater than the TMAG5328 sampling period. The TMAG5328 has a sampling time of 50 ms, therefore you need a delay of at least 50 ms. To account for part-to-part variation in sampling time, a 100-ms delay can be used, which is much larger than the maximum sampling time expected from the TMAG5328.
  5. Read the TMAG5328 output:
    1. If the TMAG5328 output has switched low, the sensed magnetic flux density in units of mT is equal to VDAC (in units of mV) × 0.0125.
    2. If the TMAG5328 output is high and VDAC - VLSB > 0.16 V, continue from step 3.
    3. If the TMAG5328 output is high and VDAC - VLSB ≤ 0.16 V, the sensed magnetic flux density is less than 2 mT, which is too low for this technique to determine the sensed magnetic flux density.

The more DAC steps there are between the 0.16 V to 1.2 V VADJ operating range of the TMAG5328 and the higher the DAC accuracy, the more accurate the estimate of the sensed magnetic flux density. However, using more DAC steps results in a longer execution time for estimating the sensed magnetic flux density. In the TMAG5328EVM, the DAC43701 DAC is used to determine the magnetic flux density sensed by the TMAG5328. The DAC43701 is an 8-bit DAC that is configured to use a 0 V to 1.82 V range. From this 0 V to 1.82 V range, 144 of the possible 256 DAC codes can be used with the TMAG5328 because these codes fall within the 0.16 V to 1.2 V VADJ range of the TMAG5328. The DAC43701 is pin-to-pin compatible with the 10-bit DAC53701, therefore the DAC53701 can replace the DAC43701 on the EVM to allow 584 usable codes within the 0.16 V to 1.2 V VADJ range of the TMAG5328. Using the DAC53701 can enable a slightly more precise estimate of the sensed magnetic flux density than the DAC43701; however, the more codes that are used for determining the sensed magnetic flux density, the longer it takes for the procedure to run. If 100 ms is spent at each DAC code between the 0.16 V to 1.2 V VADJ range of the TMAG5328, it would take about 14.4 seconds to iterate through all the DAC43701 codes and 58.4 seconds to iterate through all the DAC53701 codes.

Figure 2-1 shows a logic analyzer screenshot when this procedure was conducted using the TMAG5328 and DAC43701 devices on the TMAG5328EVM. In Figure 2-1, the Timer ISR plot shows a pulse every time the DAC output changes, the TMAG5328 OUTPUT plot shows the state of the TMAG5328 OUT pin across time, and the DAC Output Voltage plot measures the DAC output voltage across time. In Figure 2-1, the output is asserted low at VDAC = 0.702 V, which indicates that the sensed magnetic flux density is approximately 8.78 mT. The time it takes for this procedure to run depends on how large the sensed magnetic flux density is, where larger magnetic flux densities result in shorter execution times. In the example below, the procedure completed in about 6 to 7 seconds.

GUID-20220801-SS0I-0F94-B8S8-NL89ZNQXZLSK-low.pngFigure 2-1 Logic Analyzer Screenshot of Procedure for Determining Sensed Magnetic Flux Density.