Linear magnetic sensing is becoming increasingly popular with the advent of low-cost Hall-effect sensors, which measure the vertical component of a magnetic field. These sensors can be used for a wide variety of applications, from monitoring of a valve position and volume controls in mixing consoles, to a slider in climate controls and collision detection in automatic cleaning robots.
Magnetic sensing is non-contact and non-invasive, which means that it can be more reliable in harsh environments where moisture or dirt can compromise resistive contact sensors. The technology is also much more cost effective than optical linear sensing alternatives.
Two techniques use a typical one-dimensional (1D) linear Hall-effect magnetic sensor to sense along a single axis to make linear measurements: the head-on and pass-by approaches. Both techniques use the Hall sensor with a magnet aligned with the axis.
“Head On” and “Pass By”
In the head-on configuration, only the magnetic B field of the z-axis is used. Because the field drops very quickly with distance, only a small travel distance can be measured (Fig. 1). It limits the applications for this approach, since the sensor needs to cover a range of under 1 mT to around 250 mT to give a range of movement of around 10 mm—and this requires a high-performance magnet, which can be costly.
1. Linear movement with head-on configuration.
When implementing the pass-by method to take a linear position measurement from the side, the designer chooses one axis of interest. The x component of the magnetic field is linear across a very small range around the center position, but unique position detection is only possible for ranges smaller than the diameter of the magnet.
Figure 2 illustrates that, when using the z-axis of the magnetic field, the Bz component is symmetrical around the center of movement and therefore ambiguous. The pass by can be made more accurate when the sensors used are able to detect more than one axis. Such sensors are based on the integration of multiple Hall-effect devices in a single package.
2. Linear movement with pass-by configuration.
Next-Gen 3D Sensors
The integration of planar Hall-effect elements into a single device is the basis for a new generation of 3D sensors (Fig. 3). These combine the field information from more than one axis to provide greater accuracy across a wider range for linear measurements, delivering contactless sensing that isn’t sensitive to dirt and a higher range of motion compared to linear hall solutions. Positioning between sensor and sliding interface is also very flexible, making the system design easier and more reliable. No surprise, then, that 3D magnetic sensors are replacing electrical and optical position sensing systems.
3. Overview of the 3D magnetic sensors developed by Infineon Technologies.
Accurate 3D sensors with low-power consumption and compact footprint (6-pin package) can directly measure the x, y, and z components of a magnetic field. They can be used in linear sliders as well as for 3D movement detection and the measurement of 360-deg. angle rotation.
With three-axis measurement in a small package, the entire system size is reduced, and the sensors include a two-wire digital I2C communication interface for bidirectional communication between the sensor and microcontroller. This makes them useful for consumer and industrial applications such as joystick controllers, anti-tampering in smart meters, and multifunction sliders in white goods.
With automotive qualification to AEC-Q100 and supporting the functional safety standard ISO 26262, the sensors can be used as control elements for infotainment and navigation systems, air conditioners, multifunctional steering wheels, and light switches, as well as gear stick position sensing and control buttons on the steering wheel.
Devices such as the TLE493D-W2B6 provide three-dimensional magnetic position sensing (Fig. 4). An integrated temperature sensor enables the application to compensate possible temperature-dependent magnetic field changes. This enables angle measurements at an accuracy of around ±2° after calibration at room temperature. System errors that may occur based on assembly tolerances and lifetime drift of the individual sensing elements also are compensated. This makes the implementation easier because it merely needs a simpler magnetic design.
4. Block diagram of three-dimensional magnetic position sensing.
Evaluation kits facilitate testing out these sensors. Add-ons such as joysticks and linear sliders make it even easier to work with this new generation of 3D sensors. Code segments help developers integrate the sensors and controllers quickly into a wide range of industrial or automotive designs. In addition, an easy-to-use calibration algorithm can be tested out through the evaluation kit.
Some 3D sensor variants include a “Wake-Up Feature,” which activates a system when user-set magnetic limits have been exceeded.
Affordable Evaluation Systems
Moving to a 3D sensing system for a linear slider is a step up in design complexity, but it ultimately provides lower cost and higher reliability. System development is eased with the availability of low-cost evaluation boards that include a 3D magnetic sensor and microcontroller (Fig. 5).
5. The 3D Sensor 2Go magnetic sensor evaluation board.
The kit has a complete set of onboard devices, including an onboard J-Link Lite Debugger and MCU based on the ARM Cortex-M0 controller core. This allows developers to build applications quickly via a downloadable graphical user interface (GUI) and samples of code for popular applications. Power for the evaluation system comes from a micro USB connector with ESD and reverse-current protection.
One advantage of the kit is the ability to add extra hardware. These add-ons work across all variants of the evaluation kits to make it even easier for developers to build the complete system around the sensor (Fig. 6). The add-ons include a rotate knob and a joystick that can be mounted on the kit to sense the rotational and vertical movements of control elements and pushbuttons. An out-of-shaft adapter with three different out-of-shaft configurations, covering the x-z, y-z and x-y axis, also is available. Furthermore, a linear slider is provided as an add-on to the board with flexible configuration of the air gaps, with two different magnetic strengths and distance limiters.
6. The linear slider (left) and rotary button (right) add-ons for the Sensor 2Go evaluation board.
Supporting Design and Development
Leveraging the new generation of 3D magnetic sensors will lead to greater accuracy with higher reliability than possible with existing 1D sensors or resistance-based techniques. These 1D sensors have been limited in how they can be used effectively for linear sliders, either in distance or reliability, restricting the options for designers. And moving to other options such as linear sensors is often too expensive.
The 3D magnetic sensor operates over longer distances with lower-cost magnets. Evaluation boards cover all options for 3D sensors, from linear sliders to angle measurements, and provide designers with the support they need to develop both the hardware and software for such systems. Hardware add-ons for sliders, joysticks, and rotating knobs allow the sensors to be used even more easily in the relevant form factor.
To support customers in their development of the magnetic application circuits, Infineon provides magnetic simulation tools on its website.
A free downloaded GUI with code samples helps in software development. Developers can access the code samples via https://github.com/Infineon/TLE493D-3DMagnetic-Sensor and https://github.com/Infineon/TLV493D-A1B6-3DMagnetic-Sensor. Samples can be tested out with the onboard debug hardware and software, which gives visibility to how the code operates, regardless of the end application.
Sigmund Zaruba is an Application Engineer at Infineon Technologies.