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

Conducting Diagnostic Tests With TMAG5328EVM and Head-On Linear Displacement 3D Print

This diagnostic technique was tested on the TMAG5328EVM by loading firmware on the EVM's microcontroller that would generate a timer interrupt every 100 ms. In the firmware, the DAC produces a square wave that alternates between 0.68 V (the low state) and 1.04 V (the high state), which creates a BRP,HIGH value of 12 mT and a BOP,LOW value of 8.5 mT. The head-on linear displacement attachment was connected to the TMAG5328 and configured so that the TMAG5328 sees a magnetic field between 8.5 mT to 12 mT.

In the timer interrupt service routine, the TMAG5328 output is first read. If the DAC output voltage is at 1.04 V, the TMAG5328 OUT pin should be high. If the DAC output voltage is currently at 0.68 V, the TMAG5328 OUT pin should be low. If the TMAG5328 OUT pin is not in the correct state, a fault has occurred, which is logged by the microcontroller.

After checking the state of the TMAG5328 OUT pin, the microcontroller configures the DAC to switch to 1.04 V if the TMAG5328 OUT pin is currently at 0.68 V or switch to 0.68 V if the TMAG5328 OUT is currently at 1.04 V. The TMAG5328 output is checked at the next timer interrupt, which gives the TMAG5328 enough time to update its BOP.

Figure 4-2 below shows the expected waveform on the TMAG5328 OUT pin when no faults are present. Due to the OUT pin changing states, the LED connected to the TMAG5328EVM would blink at a frequency equal to the frequency of the DAC square wave (approximately 5 Hz).

GUID-20220801-SS0I-D5S5-ZBPK-SFSMF2DW1Z9X-low.pngFigure 4-2 Logic Analyzer Screenshot of TMAG5328 OUT Pin When No Faults Present During Diagnostic Testing.