Position and Level Sensing Using Hall-Effect Sensing Technology

Download PDF Version


Hall-effect (magnetic field) sensing applications have become practical recently through advancements in supporting technologies. This paper introduces Hall-effect technology, and then explores how it has been applied, in particular, differentiating between the primary types of Hall sensor ICs, and the highly differentiated range of sensing behaviors they can support. In addition, it explores some of the enabling technologies, such as advances in signal processing, that have made this technology so much more robust than in its earliest days. This allows the application of the extreme high-reliability benefit of contactless Hall applications in a broader range than ever before.

In addition to the improvements in supporting technologies, the Hall-effect devices themselves have advanced, contributing to the designs of complete solutions. These advances include power and space reduction, as well as integration of diagnostic and protection functions that allow Hall sensor ICs to provide the advanced data-driven features that are becoming more in demand in miniaturized portable consumer electronics, automobiles, and other growing industries.


With the extensive variety of solutions available for position sensing and level sensing, designers can select optimum technologies and packages to meet their commercial and engineering goals. Of these solutions, Hall-effect technology, with its application of contactless magnetic sensing, provides exceptional value and reliability. This application note examines the benefits of Hall-effect technology and how the latest developments in these devices enhance position and level sensing results.

Hall Effect Benefits

There may be almost as many means of sensing position and level as there are applications requiring these functions. Inductive, capacitive, mechanical, magneto-resistive, Hall effect, and optical, to name just a few, are all viable sensing options and the list continues to expand. Yet for a designer, there always remains the same critical elements that need to be addressed and that inevitably mate the requirements of the application to the appropriate sensing technology.

Critical requirements, such as: cost, distance of travel (effective operating air gap), resolution, accuracy, and often times cost again, all need to be determined to effectively and efficiently select the proper sensing technology. Of course, constructing answers for each of these elements is not always a straightforward task. Here, though, the flexibility of Hall-effect sensing technology is most advantageous. High reliability, small size, production-viable cost, wide operating voltage ranges, variety of output options, and ease of implementation allow Hall-effect sensing technology to service applications in most every market.

Overview of Hall Technology

First, a brief tutorial on how Hall-effect technology works. Simply stated, the Hall effect, so named after Sir Edwin Hall and discovered in 1879, refers to the measurable voltage across a conductive material, for example silicon (Si) or gallium arsenide (GaAs), that occurs when an electric current flowing through a conductor is influenced by a magnetic field (see figure 1). This transverse force created by the magnetic field is known as the Lorentz force. Therefore, a Hall-effect device requires a magnetic field in order to actuate the device.

Figure 1

Figure 1. In the Hall effect, magnetic flux perpendicular to the flow of an electrical current results in a measurable voltage.

Although quite common today, Hall-effect technology did not truly begin to gain mass acceptance until the 1980s. This was because the voltage potential across the Hall element is minuscule, and may be influenced by outside forces, such as temperature and package stresses. As shown in figure 2, more recent devices incorporate advances in the ability to amplify the signal, in addition to the utilization of on-chip, offset cancellation techniques, which have allowed Hall-effect sensing technology to be employed even under extreme environmental conditions, such as under-hood applications in automobiles. Furthermore, the "non-contacting" operation of Hall-effect ICs affords the user a nearly infinite life with regard to actuation and switching.

Figure 2

Figure 2. Modern Hall-effect sensor ICs integrate signal conditioning and amplification techniques to make practical devices.

Hall Device Options

Further investigating the elements that require consideration for a position or level sensing application, Hall-effect ICs provide the designer with a multitude of features and variations, including either digital or analog output. The former option is optimal for sensing discrete positions, while the latter affords the user a relatively infinite number of positions for greater resolution. Some examples of applications requiring discrete position or level sensing are: automotive shift selectors, seat belt buckle switches, seat position sensors, cellular flip phones, brushless dc motor commutation, windshield wiper fluid reservoirs, and gas tanks, to name just a few. Due to its high reliability, Hall-effect technology is used to replace reed switches and mechanical switches in these applications.

Most Hall-effect switches have output structures that are open drain and provide low resistance, thus simplifying the interface to most microprocessors and other digital electronics (threshold comparators, multiplexers, basic TTL gates, and so forth). Typical of open-drain outputs, once switched "on," the output voltage of the Hall-effect device transitions from high to low. This being said, there is an abundance of variations for Hall-effect ICs in order to service to the plethora of position and level sensing applications, each one with its own nuances. These variations include features such as: micro-power consumption, magnetic pole-independent sensing, user-programmable options, two-wire current sourced output devices, magnetic bias for sensing ferrous targets, and inverted outputs. These cannot all be adequately discussed in one sitting, and for the purpose of this article, the focus will be on standard devices: their operation and application uses.

Standard Hall Device Characteristics

There are three common variations of standard digital position and level sensor ICs: unipolar, latching, and bipolar. With unipolar switches the actuation is caused by a magnetic field of sufficient strength to turn the device "on." Typically Bsouth (B indicates magnetic flux density) must be greater than the magnetic operate point, BOP, of the device in order to turn these devices on. Once the magnetic field is reduced below the magnetic release point, BRP, of the device, these devices return to the "off" state.

Latching devices turn on in a manner similar to unipolar switches. However, latching devices can only be turned off (unlatched) when the device sees sufficient magnetic field strength of the opposite polarity, Bnorth.

Bipolar switches are akin to latching devices in that they use opposing magnetic polarities to turn on and off. But due to the high sensitivity of these devices, they cannot be guaranteed to operate as a latch. In some cases, bipolar switches can have switchpoints (BOP and BRP) that cause them to function as a standard unipolar switch or even as a negative switch (switching only in the presence of sufficient north magnetic polarity).

Low Resolution Applications

An excellent example of an application that uses discrete position sensing is an automobile shift selector. In shift selectors there are commonly as few as five discrete positions (Park, Reverse, Neutral, Drive and Low). With a unipolar switch placed at each individual position (P, R, N, D, and L), each switch only turns on when the magnet in the shifter is moved directly adjacent to the switch, as shown in figure 3.

Figure 3

Figure 3. Hall devices can be used as proximity switches, matched 1-to-1 with sensed positions, or arrayed to provide additional sensing positions through analysis of magnetic cross talk using multiple devices.

Should the designer require additional positions, the spacing between the devices can be reduced to create "cross talk" between the devices. In this manner additional positions are obtained when the magnet is sufficiently close to two devices such that they are both turned on, thereby increasing the number of positions from, for example, five to nine. Simple Binary Coded Decimal (BCD) systems, or more advanced systems such as Gray code or Densely Packed Decimal (DPD), can be used to decode the logic and acquire positional information.

Similarly this tactic could be used to sense fluid levels in a tank by means of a flotation device with a magnet inside, as illustrated in figure 4. As the magnet floats up and down with the changes in the level of the fluid, discrete levels are determined by which sensor IC is in the on state.

Figure 4

Figure 4. Level sensing application in fluid tank; spherical float with button magnet inside rides on the fluid surface, while Hall devices and wiring are fully isolated in a separate chamber.

High Resolution Applications

It can be seen very quickly from the shift selector example that discrete position or level sensing is ideal when only a few positions are required. This method of adding a device for each position very quickly becomes cost prohibitive and spatially challenging when the application requires finer resolution.

Enter the linear Hall-effect device with an analog output. Similar to the digital switches, there is an abundance of features available in linears; for example, ratiometric outputs, user programmability, digital outputs (such as PWM), and unidirectional or bidirectional sensing. Like in the preceding description of devices for discrete positions or levels, this discussion will concentrate only on standard linear Hall-effect sensor ICs: their means of operation and application uses.

Most standard linear Hall-effect sensor ICs have ratiometric outputs (0.5 × VDD) that respond proportionately to magnetic field strength. These devices generally require a regulated 5.0 V supply and the QVO (quiescent voltage output, VOUT(Q)) is 2.5 V when there is no significant magnetic field present (see figure 5). The output voltage increases when sensing an increasing magnetic field from the south pole of a magnet, approaching 5.0 V. Conversely, the output voltage will decrease when sensing an increasing magnetic field from the north pole of magnet, approaching 0 V.

Figure 5

Figure 5. Linear Hall-effect devices respond throughout the range of sensed magnet flux, outputting a ratiometric analog signal.

There are two common configurations for applications of linear devices, which form the foundation for most designs. These techniques are termed slide-by and head-on.

Slide-By Configurations

In a standard slide-by application, a magnet moves across the face of the package, such that the Hall element senses one or both magnetic poles, as shown in figure  6. There can be effectively three positions at which the voltage output is zero: (a) before the magnet is close enough for the field to be sensed by the device, (b) once the zero crossing (B = 0) between the poles is directly adjacent to the Hall element, and (c) once the magnet has moved past the device far enough that there is no longer sufficient field detectable at the element. Effectively, the change in output voltage is from 2.5 to 0 V (assuming that VDD is 5 V) as the north pole of the magnetic field passes the face of the package, and from 2.5 to 5.0 V as the south pole passes the face of the package. This is typically labeled bidirectional sensing.

Figure 6

Figure 6. Slide-by application configuration and response curve, showing separate nodes for the peaks at the north pole and at the south pole.

It certainly is also possible to sense the change of only one pole across the device, although this could limit the available range. Known as unidirectional sensing, the change in the output is then limited to only 2.5 V for standard linears. To obtain full range of operation, one would have to employ a user-programmable linear with this feature. The change in voltage output from the Hall-effect IC as the field changes across the face can then be used to determine the relative position of the moving magnet. An A-to-D converter on a standard microprocessor and a simple lookup table can then be employed to convey the actual position. In this situation, the resolution (the number of positions that can be detected) is predicated on the resolving capabilities of the A-to-D converter, but the analog signal provides a relatively infinite number of positions.

An example of an application that can use slide-by sensing is valve position, diagrammed in figure 7. In this application often the magnet is a two-pole ring magnet that rotates in front (slides by the face) of the Hall-effect package. As the opposing magnetic fields pass in front of the element, the voltage output changes proportionately to the change in field strength. By means of precise sensing, the position of the valve can be controlled to dictate more accurately the flow of a substance through a carrier.

Figure 7

Figure 7. Valve position sensing is a proven application for slide-by Hall IC configurations.

Head-On Configurations

Head-on position sensing is very similar to the unidirectional sensing of the slide-by configuration. In essence the linear Hall IC only differentiates the change in magnetic field strength for one magnetic pole, which can be of either north or south polarity. The detection pattern is straightforward. As the magnet approaches the device, the field detected by the IC increases, and the field strength decreases as the magnet is removed, as shown in figure 8.

Figure 8

Figure 8. Head-on application configuration and response curve, showing a monotonic characteristic regardless of pole orientation.

Detecting the height of the deck on a treadmill illustrates well the uses of a head-on sensing technique. When the height of the deck is altered to change the gradient for the runner, a linear Hall IC can be used to detect the displacement of the deck. Typically the magnet is attached to the deck itself while the sensor assembly remains stationary. As the runner increases or decreases the gradient of the deck, the sensor IC provides feedback to the control module as to the relative displacement, by means of the change in field strength witnessed by the Hall element.

Determining Field Specifications

As with any technology, there are some specific considerations when designing an application using a Hall-effect sensor IC. Careful selection of the magnet is of the utmost importance, including shape and placement, as shown in figure 9. Magnetic field strength decreases exponentially over distance. Furthermore, magnets have temperature coefficients that need to be considered.

Figure 9

Figure 9. This model depicts the change in field strength for a button magnet (similar to that used for figure 10). The arrows represent magnetic flux lines. The closer the lines are to the magnet, the stronger the field strength.

Therefore for discrete position sensing, it is always good practice to determine the effective air gap, from the face of the package to the magnet, at the required switching position, and then determine the maximum and minimum field strengths, over the rated temperature range, at that distance. This value should then be compared to the maximum rated operating switchpoint for each alternative device.

A chart and formula for estimating field degradation by effective air gap is provided in figure 10. This change can be calculated using the formula below:

Equation 1


  • Br = Residual Magnetic Inductance of the material, in G,
  • L = Length of the magnet, in mm,
  • X = Distance between the surface of the magnet and the device, in mm, and
  • R = Radius of the magnet, in mm.

The chart reflects typical results for a button magnet, similar to that used for figure 9, composed of NdFe, rated at 30 MOe (oersted; 1 Oe = 100 microtesla, micro;T), with 2 mm radius, and 1 mm thickness.

A good rule of thumb for a designer is to make certain that, at the required position for the device to switch, there is at least 10% more field strength than is required at the maximum rated switchpoint. For example, if it is required for a unipolar switch with a BOP(max) of 50 G to turn on at a certain distance, then the field strength at that distance should be no less than 55 G under all conditions.

Designing Linear Applications

Unlike digital Hall-effect switches, which require only a certain strength and polarity of field in order to actuate, linear devices require a little more application specification in order to achieve satisfactory results. The gain of a linear IC determines the resolution at a given distance. Therefore regardless of whether the application is slide-by or head-on, one must select the appropriate gain.

In order to do this, two known end points and the required resolution (number of data points) must be established. The following is a brief example for determining the appropriate gain.

Assuming that the requirements for the application are as depicted in figure 11, the useable linear range would be 3 V. The full range as the magnet travels across the device would be 200 G (gauss; 10 G = 1 millitesla, mT). Dividing the change in output voltage, VOUT, by the change in applied field, Bapplied, provides the appropriate gain of the linear Hall-effect device for this application.

For greater clarity, here are the equations and the results for this example. The general equation is:

Gain (mV/G) = VOUT (mV) / Bapplied (G) .

To use the example data, first convert VOUT from V to mV.



   = 4000 mV – 1000 mV

   = 3000 mV (full linear range),


Bapplied(G) = Bmax – Bmin

      = 100 G – (–100 G) = 200 G.

Note: The algebraic convention applied is: positive values for B denote south polarity, and negative values for B denote north polarity.

Entering these into the general equation:

Gain (mV/G) = 3000 mV / 200 G

   = 15 mV/G .

Of course, in real world applications the transfer functions are not perfectly linear and there can be an inherent offset in the system. For this reason, further consideration must be given to the accuracy required by the application, as well as the resolution capabilities of the A-to-D converter or similar device that must read the output, and the temperature coefficient of the magnet.

It is helpful in these situations to consider:

  • The change in the quiescent output voltage as a function of temperature, VOUT(Q)(TA),
  • The change in sensitivity (gain) as a function of temperature, Vsens(Q)(TA), and
  • The linearity of the device over a given range of magnetic field strength.

Linear Hall-effect ICs can be back-biased with a magnetic field in order to sense ferrous targets. For example, Hall IC-based sensors are widely accepted in the automotive industry to accurately sense the position of cam lobes and the speed of crankshafts in engines, in order to improve timing and thereby grant more efficient consumption of fuel. The high bandwidth capability of many Hall-effect linears allows them to be used to sense changes in current for DC-to-DC converters and battery management systems in hybrid vehicles.


Obviously these are simplified examples of applications that can employ Hall-effect sensing, and very compressed descriptions of capabilities and features offered by this technology. Other interesting examples of important Hall technology options include:

  • The current source outputs of two-wire devices are ideal for safety-critical applications, such as seat position and seat belt buckle sensors. This is because these devices output two distinct current levels to indicate the on and off states. Any output that deviates from these levels is a fault condition, affording the user with inherent diagnostics.
  • Extremely low current draw (<5 W) permits Hall-effect ICs to be used in open/closed circuit sensors. This is particularly valuable in battery-operated applications that are sensitive to power loss, for example: cellular flip phones, laptop computers, and pagers.
  • The flexibility of these sensor ICs is further enhanced by the assortment of package options. Some micro-leaded packages (MLP, also known as leadless DFN or QFN packages) are as small as 2.0 × 2.0 × 0.5 mm, while others are large enough to include a samarium cobalt magnet to back-bias the IC.

It is the myriad of applications that can be served by Hall-effect technology that drives the ever-increasing diversity of these devices. As a result, the technology continues to evolve. The ongoing reductions in size and continual increase in capabilities lend Hall technology to be a viable solution to almost any position or level sensing application.