SLYA055A June   2021  – June 2022 DRV5021 , DRV5021-Q1 , DRV5023 , DRV5023-Q1 , DRV5032 , DRV5033 , DRV5033-Q1 , TMAG5123 , TMAG5123-Q1 , TMAG5124 , TMAG5231 , TMAG5328

 

  1. 1Application Brief

Application Brief

Some types of equipment have positional threshold states that are sensed for operation. One example is a car door opening and triggering the interior light to turn on. Another example is an aquarium buoy reaching a height that indicates ideal water volume has been reached, thereby activating the refill valve to shutoff. Such binary open-close, above-below, and on-off position monitoring falls under the category of transition detection.

While the desired system reaction is visibly obvious to the user, how the threshold needs to be conveyed to a circuit or machine is less so. One relatively low power, cost-effective, and durable solution is to monitor the magnetic field of a magnet placed in the moving appendage of the system being monitored. Such magnetic fields are commonly monitored by reed switches and Hall-effect sensors.

While reed switches have been used in the past, they are beset by large footprints, installation failures, susceptibility to system vibration, mechanical contact bounce, and mechanical wear. As such, Hall-effect sensors are great alternatives with smaller, more durable packages and longer lifetime.

Designing with a Hall-Effect Sensor

When choosing a Hall-effect sensor, different implementations can be used to achieve the same objective. Each implementation may have large differences in magnet and sensor placement thereby giving flexibility in design. This general concept is illustrated with a laptop lid movement in Figure 1-1. The left example monitors a transition point for a rotating magnet, while the right monitors the transition point for when the magnet reaches a certain distance along an arc. In both of these instances, there are two general laptop lid states, open and closed. For such binary-like spatial operation, Hall switches are appropriate.

Figure 1-1 Transition Detection Implementation

After defining the method of implementation, the minimum and maximum B-field values need to be determined for the transition region corresponding to the position at which the moving body with the magnet triggers a system response. For instance, the B-field values need to be determined for the angle or distance at which the laptop lid triggers the screen to light up or turn off. The distance between the on-off thresholds known as the hysteresis also needs to be defined. The calculated B-field values are then used to choose a suitable device. As most Hall-effect sensors have factory-defined magnetic thresholds, it is often challenging to find a suitable device for a given B-field range. This may require various mechanical implementation variables to be adjusted and the B-field values to be re-calculated multiple times. However, devices such as the TMAG5328, allow users to adjust the magnetic threshold for quick prototyping and may even eliminate the need to run magnetic simulations to fine tune the ideal threshold values.

When implementing transition detection with a Hall switch, there are three general variables that can be modified; the magnet, the Hall switch, and the placement of either the Hall switch or magnet. The magnet has several sub-variables, including the magnet shape, material, and dimensions, that determine the magnetic field that the magnet emits.

As briefly already mentioned, the primary variables of consideration between different devices are the BOP and BRP specifications. These specifications correspond to the device hysteresis and define the spatial region in which the circuit could indicate that the monitored object has crossed the spatial threshold. A successful implementation of the transition detection will have BOP and BRP transition points between the bounds of the trigger region. As shown in Figure 1-2, omnipolar switches like the TMAG5123, TMAG5231 and DRV5032 will trigger for either North or South magnetic fields, whereas unipolar switches like the TMAG5124 with operation like Figure 1-3 will only trigger for one polarity. The difference between BOP and BRP for a given device defines the device hysteresis. A narrower hysteresis can be desirable for certain designs. However, if the hysteresis is too narrow, the device is prone to both mechanical and electrical noise.

Figure 1-2 Omnipolar Switch Operation
Figure 1-3 Unipolar Switch Operation

Design Challenges

Some stages of the design development will be more challenging than others. While magnet equations and their non-linear magnetic behavior might look complex, there are tools that can be used to greatly reduce calculation time. Such tools include ANSYS and Femm, which leverage Maxwell’s equations to solve the B-field while sweeping through different design variables.

After solving for the magnet B-field, a suitable Hall-effect switch needs to be chosen. Because of B-field's non-linear characteristic, the BOP and BRP thresholds have a significant impact on the spatial transition region size. To illustrate this point, consider two devices with equal hysteresis of 5 mT in Figure 1-4.

GUID-20210526-CA0I-SLDG-PX4J-LMSRSWSKFT93-low.gif Figure 1-4 Transition Region

The device with the higher BOP and BRP values on the left has a much smaller spatial transition region of about 0.1 mm than the device with lower BOP and BRP values on the right with a transition region of about 2.3 mm. Consequently if a more narrow transition region is required, devices with higher BOP and BRP values should be used if sensor distance cannot be adjusted or a stronger magnet cannot be used. It is worth noting that while most Hall-effect switches have different hysteresis values depending on the BOP and BRP values, the TMAG5328 has a fixed hysteresis. For this particular device the BOP threshold is set by an external resistor and, with a fixed hysteresis value, the BRP threshold is automatically set.

Hysteresis and variation are also important when designing with a Hall-effect sensor. When assessing different sensors, the max hysteresis may not necessarily match the difference between BOP max and BRP min. The hysteresis indicates the size of the threshold region of the device while the BOP and BRP limits indicate the possible variation between devices. To understand how variation would affect a design, we look at Figure 1-5, which has three identical laptops with the exact same hysteresis. In each instance the leftmost green dotted line is the laptop opening threshold while the rightmost dotted line is the laptop closing threshold. Here we can see the sensors have very narrow hysteresis with both threshold lines spaced very close to each other in each case. However, in these figures we also see poor accuracy with the thresholds scattered over a large range of the lid's freedom of motion. In the leftmost case, the lid placement might never trigger the device, while in the rightmost case the lid must be halfway open for the sensor to detect any state change.

Figure 1-5 Narrow Hysteresis, Wide Variation

Alternatively if we consider wide hysteresis with no device variation, we can observe another kind of undesirable behavior. Consider 1 million laptops have identical behavior to Figure 1-6. Here we can see that the laptop light will trigger off just as the lid approaches the base, which is desirable. However, the laptop will need to be half-way open before its light triggers back on, which may or may not be desirable.

Figure 1-6 Wide Hysteresis, No Variation

For more details and guides related to using Hall-Effect sensors for transition detection, see Table 1-1 and Table 1-2.

Table 1-1 Alternate Device Recommendation
DeviceCharacteristicsDesign Considerations
DRV5032Ultra-low-power digital switch Hall-effect sensor available in SOT-23, X2SON, and TO-92 packages. Both omnipolar and unipolar options available.Great for low power applications. This device can operate on as little as 1.65 V with typical current consumption below a 1μA. DU and FD unipolar variants are active low for North oriented fields.
TMAG5123Omnipolar, in-Plane, high-precision, high-voltage, Hall-Effect switch available in SOT-23 package.Unlike most switch devices on the market that sense in the z-direction, this device is a lateral sensor that detects magnetic fields parallel to the surface of the package.
DRV5033Omnipolar, wide voltage, 30Khz Bandwidth Hall-effect Switch available in SOT-23 and TO-92 packagesThis device is more suitable for designs in which quick response time is the key concern.
Table 1-2 Related Technical Resources
Name Description
HALL-ADAPTER-EVM Provides a fast, easy and inexpensive way to interface with Hall-effect switch ICs.
TMAG5123EVM A demo board including a magnet on a slider that allows the user to assess the in-plane sensing capability of the TMAG5123.
TMAG5328EVM An easy-to-use evaluation module that includes a magnet, a daughter board, and a head-on linear displacement module to demonstrate the head-on linear displacement function.
TI Precision Labs -
Magnetic Sensors
A helpful video series describing the Hall-Effect and how it is used in various applications