SLVAF61 January   2022 DRV5032 , DRV5033 , DRV5033-Q1 , TMAG5110 , TMAG5110-Q1 , TMAG5111 , TMAG5111-Q1 , TMAG5123 , TMAG5123-Q1 , TMAG5124 , TMAG5124-Q1 , TMAG5231

 

  1. 1Application Brief

Application Brief

Introduction

Many user systems require position detection for a switch mode type of operation. This On or Off type of switch functionality is relatively straightforward when using a typical Hall-effect switch device and can be found in laptop lids, safety harnesses, light switches, and power tools. The sensor output toggles states when the input magnetic field exceeds the operating threshold, BOP, and the output returns to the idle state when the same field component has a magnitude less than the release threshold, BRP. There is typically some hysteresis built into the device to help prevent rapid output toggling in cases where the field magnitude is very close to the operating threshold.

Figure 1-1 Two-Position Switch

This function may be used in many spaces. In many cases, two output states are sufficient and this operation is well suited to prevent mechanical wear and interference from dust and grease. More details regarding this type of solution are discussed in the Two-State Selector Using Hall-Effect Sensors application brief.

Multi-state Position Sensors

While many systems have only two intended positions for detection, this concept can also be expanded to include additional states. Consider briefly a tool with a three-position power switch. It might be marked with settings such as Low, High, and Off. Here a single sensor is not well suited to detect all three states. At first glance this could be solved by adding a sensor for every additional switch position in the system.

Design for this mode is straightforward using a unipolar switch. The magnet can be placed at a close enough air gap to ensure that the worst-case operating point, BOP Max, is exceeded with the South pole of the magnet facing the sensor. This results in a field vector directed upward when the magnet is above the sensor. If the magnet is allowed to travel greater than its own width, the direction of the field is directed downward, and the sensor cannot activate. As long as the sensor spacing exceeds the full width of the magnet, an array of sensors can be placed to create any number of positions.

To help with magnet selection, the Magnetic Sensing Proximity Tool offers the ability to calculate the expected fields from a variety of magnet materials in both bar and cylinder axial magnets. Using the head-on or slide-by configurations, the air gap and travel distance can be quickly optimized for this application.

Figure 1-2 Multi-position Detection With Two Sensors

As the magnet moves, it is immediately obvious which position is active by examining the outputs.

Table 1-1 Position Coding
PositionSensor 1Sensor 2...Sensor n
11000
20100
...0010
n0001

While this may not seem inconvenient for a low number of positions, the component requirement becomes more difficult to manage as the number of positions increases. There are a few alternative ways to approach this problem with a reduced component count.

Dual-Unipolar Switch

A switch device with dual-unipolar switches, such as DRV5032DU (see the DRV5032 Ultra-Low-Power Digital-Switch Hall Effect Sensor data sheet), has two outputs which operate independently. Each output is sensitive to opposite polarity of the magnetic field, that is, one sensor responds when the device is presented with a North pole, and the other output responds when presented with a South pole.

Using a device like this allows for three positions to be detected using a magnet oriented as shown in Figure 1-3:

Figure 1-3 Three-Position Switch Using a Single Device

Examining the field lines in Figure 1-4 it is apparent that for the middle position, the magnetic field is parallel to the surface of the PCB. Since there is no component in the direction of sensitivity for this sensor, neither output is activated. However, near either extremity of the magnet, the field vector becomes vertical. When the magnet is positioned in the left position the N pole sensitive output is active, and when positioned to the right, the S pole sensitive output activates.

Figure 1-4 Magnetic Field for Three-Position Switch

As a general rule, this is most easily designed using a magnet whose length is two times the length of travel between switch positions. At center, there is no vertical component to the field and neither sensor is active. Traveling one half the length of the magnet places either magnet pole immediately above the sensor where there is a large vertical component. Again, the Magnetic Sensing Proximity Tool is a valuable tool for magnet selection and determining mechanical functions.

In the event that more than three positions are required, this format may be extended by placing an array of sensors spaced apart to create more unique positions. Take care when using this approach to ensure unique output conditions. As a result of using multiple devices, the center position where both outputs are inactive cannot be used for more than one sensor without creating a conflict. An example showing inputs for two sensors along with active regions bounded by BOP Max and BRP Min for each output is shown in Figure 1-5. It is not possible to determine the magnet position in the unshaded regions.

Figure 1-5 Two-Sensor Input

Rotary Position

Another format for multi-position sensing is for rotary dials as might be common user controls for white goods, audio equipment, or power tools. This may be implemented by changing the travel of the magnet from a linear path to an arc.

Figure 1-6 Curved Multi-sensor Sweep

This solution works in a similar manner as the previously presented extended array. Examples of this implemented using linear Hall-effect sensors is found in the Linear Hall Effect Sensor Array Design application report.

Another unique rotary configuration may be created using TMAG5110A2 with a standard diametric cylinder magnet. If placed on axis with this magnet type there are four distinct output conditions that occur over one full rotation. As each input threshold or release point is crossed, four unique output conditions are observed.

Figure 1-7 TMAG5110 On-Axis
GUID-20210311-CA0I-KGNW-2BJ8-PFV1Z8XZT7G5-low.gifFigure 1-8 On-Axis Magnetic Field Inputs
Magnet AngleOut1Out2
0 (360)+01
90+00
180+10
270+11

Additional information regarding multi-position detection using TMAG5110 is found in the Incremental Rotary Encoders application brief.

Magnetic Coding

One final approach that can be implemented is to create a coded pattern of magnets. For example, it is possible to create a magnet pattern to produce 2n output states, where n is the number of sensors. Each sensor may be placed centered below consecutive magnet segments. This wheel pattern is designed for 4 sensors with 16 unique combinations.

Figure 1-9 Coded Magnetic Wheel

Linear Sensors

A final approach may be implemented using linear Hall-effect sensors. However, differentiation of each state requires a method to convert the analog output voltage. This may be done in digital logic or by using comparators to define output regions.

Linear sensors are able to provide greater resolution than three fixed positions, and are typically better suited for a slide-by solution where a gradient output is required. More details on this solution type are found in the Tracking Slide-By Displacement with Linear Hall-Effect Sensors application brief. Linear Hall-effect sensor options are found at ti.com.

Additional Resources From Texas Instruments

Table 1-2 Alternate Device Recommendations
DeviceCharacteristicsConsiderations
DRV5032Commercial single axis low power Hall-effect switch available in SOT-23, X2SON, and TO-92 packagesSensitivity variation DRV5032DU is a dual unipolar switch, with two outputs that operate independently. One output is dedicated to detecting positive fields, and the other output detects negative fields.
DRV5033
(DRV5033-Q1)
Commercial (Automotive)
Single axis Hall-effect switch. VCC for this device operates up to 38 V.
Multi-position switching solutions requires devices in an array configuration.
TMAG5110
(TMAG5110-Q1)
Commercial (Automotive)
Dual axis Hall-effect latch
This device may be used to detect multiple positions of a rotating magnet using either a diametric cylinder or a multi-pole ring magnet.
TMAG5123
(TMAG5123-Q1)
Commercial (Automotive)
Single axis In-Plane Hall-effect switch. VCC for this device operates up to 38 V
An In-Plane sensor is able to detect the magnetic field component parallel to the PCB surface in a surface mount package. Multi-position switching requires devices in an array configuration.
TMAG5231Commercial single axis low power Hall-effect switchThis device offers tighter threshold tolerances than DRV5032. Multi-position switching solutions requires devices in an array configuration.
TMAG5124
(TMAG5124-Q1)
Commercial (Automotive)
Single axis switch in a 2-wire configuration
This device is offered in the SOT-23 package and output state may be monitored by measuring ICC. This device is particularly useful for remote sensing applications.
Table 1-3 Supporting Resources
NameDetails
Designing Single and Multiple Position Switches Using TI Hall-Effect SensorsDetailed guide with design considerations for single and multi-position switches
Two-State Selector Using Hall-Effect SensorsAn application note discussing the basics of designing a two-position switch
Incremental Rotary EncodersAn application note discussing incremental encoding
Magnetic Sensing Proximity ToolA useful calculator tool capable of providing guidance on magnet selection and travel
Tracking Slide-By Displacement with Linear Hall-Effect SensorsAn application note describing configuration of a linear Hall-effect sensor for slide-by magnet travel