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

Implementing Diagnostics and a Magnetic Window Comparator

A square wave voltage waveform on the ADJ pin of the TMAG5328 can help a user detect under certain conditions when the TMAG5328 pins have been disconnected or shorted to other pins. This technique for implementing diagnostics works by applying a square wave on the TMAG5328 ADJ pin, which allows the pin to alternate the BOP and BRP of the TMAG5328 in a way to also create a square wave output on the TMAG5328 OUT pin. You can use a DAC to create the square wave, or you can use another voltage output circuit to create a voltage waveform that alternates between two voltages somewhere within the 0.16 V and 1.2 V. During the diagnostic check, a microcontroller can check to confirm the TMAG5328 OUT pin changed state after the ADJ pin square wave changed state. If the TMAG5328 OUT pin does not change state after the ADJ square wave changes state, a fault may have occurred.

The high and low voltage values of the square wave create two BOP values that alternated between. When the high voltage of the square wave is applied to the ADJ pin, it creates a larger BOP, which is referred to as BOP,HIGH. It also results in a new BRP, which is referred to as BRP,HIGH. If the sensed magnetic flux density in the system (BSystem) is less than BRP,HIGH, the TMAG5328 output is asserted high when the high portion of the square wave is applied to the ADJ pin. When the low voltage of the square wave is applied to the ADJ pin, it creates a smaller BOP, which is referred to as BOP,LOW. If BSystem is greater than BOP,LOW, the TMAG5328 output is asserted low when the low portion of the square wave is applied to the ADJ pin. Consequently, the produced square wave on the TMAG5328 output should change state after the square wave on its ADJ pin switches from high to low or low to high.

In addition to detecting signal shorts and disconnections, this technique also implements a magnetic window comparator that detects when the sensed magnetic flux density is either greater than BOP,HIGH ­or less than BRP,LOW. If the high voltage value of the square wave is selected so that BRP,HIGH is larger than the maximum magnetic flux density reading expected in the system and the low voltage of the square wave is selected so that BOP,LOW is less than the minimum magnetic flux density reading expected in the system, the window comparator can potentially detect when there is a fault due to the system’s magnet being either too close or too far from its normal range of positions.

For this diagnostic technique to properly function, you must meet the following constraints:

  • BOP,LOW ≥ 2 mT (this means that the low output voltage of the square wave must be ≥ 0.16 V)

  • BOP,HIGH ≤ 15 mT (this means that the high output voltage of the square wave must be ≤ 1.2 V)

  • BOP,LOW ≤ BSystem (this is needed to ensure that the TMAG5328 output is asserted low when the low portion of the square wave is applied)

  • BSystem ≤ BRP,HIGH (this is needed to ensure that the TMAG5328 output is asserted high when the high portion of the square wave is applied)

  • The square wave pulse width duration, referred to as tOP, must be greater than the TMAG5328 period of magnetic sampling. This requirement ensures that the TMAG5328 has enough time to update its BOP based on the voltage provided to the ADJ pin. For example, as the TMAG5328 period of magnetic sampling is 50 ms, using a value of tOP = 100 ms is more than sufficient to meet this requirement.

Figure 4-1 shows a visual representation of these constraints.

Figure 4-1 Constraints for Diagnostic Implementation.