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 a Software-Programmable Hall-Effect Switch With Microcontroller-Less Standalone Mode

The TMAG5328 can be made into a software-programmable Hall-effect switch by connecting a software-programmable voltage source with nonvolatile memory to the TMAG5328 ADJ pin. The voltage source could be a DAC or digital potentiometer. Figure 3-1 shows the TMAG5328EVM which specifically uses the DAC43701 8-bit DAC with nonvolatile memory to turn the TMAG5328 into a software-programmable Hall-effect switch. The devices are nearly pin-to-pin compatible, therefore the DAC43701 DAC can be replaced with the higher-resolution DAC53701 DAC or the TPL1401 digital potentiometer (DPOT).

Figure 3-1 TMAG5328EVM Block Diagram.

The nonvolatile memory on these DAC/DPOT devices can be programmed to initialize the device to a user-defined output voltage every time the system is powered ON or when another type of RESET event occurs. The output of the DACx3701 or TPL1401 drives the ADJ pin of the TMAG5328, therefore the TMAG5328 BOP will also be automatically programmed after the system is powered ON. A microcontroller, which on the EVM is on a second PCB called the Sensor Controller Board (SCB), is only necessary to initially program the DAC nonvolatile memory. After the DAC nonvolatile memory is programmed to automatically output a voltage to create the user-defined BOP, the microcontroller is no longer needed. Only the DAC/DPOT and TMAG5328 devices are needed to ensure that the BOP settings are maintained.

In-system calibration can also be supported by following the procedure below:

  1. Configure the system so that the magnet-to-sensor distance is at the desired distance for the TMAG5328 output to switch from high to low.
  2. Follow the procedure in Section 2 to determine the VADC value that causes the TMAG5328 output to switch from high to low.
  3. Store step 2’s VDAC value into the DAC nonvolatile memory.

In-system calibration allows the user to obtain their desired system functionality when magnet placement or manufacturing tolerance can vary greatly from device to device.

Instead of relying on applying a specific condition on the VCC pins of a device, this calibration scheme uses the DAC I2C interface to program the switch, which makes it easier to program. This approach does not require an additional power supply circuit to program the Hall-effect switch. The I2C interface of the DAC allows software-based modification of the BOP, which can enable in-field upgrades of an already deployed unit without performing hardware modification. In addition, four DAC43701 devices can be put on the same I2C bus. If the programming micrcocontroller has multiple I2C interfaces, then more than four systems can be programmed at the same time, thereby further reducing the time needed to perform mass calibration.

The TMAG5328EVM supports this in-system calibration technique. The TMAG5328EVM’s Quick Start Video shows an example of this in-system calibration technique by using the head-on linear displacement 3D print attachment.