How to Achieve Fast, Precise, and Low Power Position Sensing for Real-Time Control

By Jeff Shepard

Contributed By Digi-Key's North American Editors

The use of three-dimensional (3D) position sensing for real-time control is growing across a variety of Industry 4.0 applications, ranging from industrial robots and automated systems to robot vacuums and security. 3D Hall effect position sensors are a good option for these applications as they provide high repeatability and reliability, and can also be used with windows, doors and enclosures for intrusion or magnetic tampering detection.

Still, designing an effective and safe 3D sensing system using a Hall effect sensor can be a complex and time-consuming process. The Hall effect sensor needs to interface with a microcontroller (MCU) powerful enough to act as an angle calculation engine and to perform measurement averaging, as well as gain and offset compensation to determine magnet orientations and 3D positions. The MCU also needs to handle a variety of diagnostics including monitoring the magnetic field, system temperature, communication, continuity, internal signal path, and the power supply.

In addition to hardware design, software development can be complex and time-consuming, further delaying time to market.

To address these challenges, designers can use integrated Hall effect 3D position sensor ICs with an internal calculation engine. These ICs simplify software design and reduce the system processor’s load by as much as 25%, enabling the use of a low-cost, general-purpose MCU. They can also provide fast sample rates and low latency for accurate real-time control. In battery-powered devices, 3D Hall effect position sensors can be operated with duty cycles of 5 Hertz (Hz) or less to minimize power consumption. In addition, integrated functions and diagnostics maximize design flexibility and system safety and reliability.

This article reviews the fundamentals of 3D Hall effect position sensors and describes their use in robotics, tamper detection, human interface controls, and gimbal motor systems. It then presents examples of high-precision, linear 3D Hall effect position sensors from Texas Instruments, along with associated evaluation boards and implementation guidance to speed the development process.

What are 3D Hall effect sensors?

3D Hall effect sensors can gather information about the complete magnetic field, enabling the use of distance and angular measurements for position determination in 3D environments. The two most common placements for these sensors are on-axis and coplanar with the magnetic polarization (Figure 1). When placed on the axis of polarization, the field provides a unidirectional input to the sensor that can be used for position determination. Coplanar placement produces a field vector that is parallel to the magnet face regardless of the range to the sensor, also enabling position and angle determination.

Image of 3D Hall effect position sensors can be placed on-axis or coplanar to the magnetic fieldFigure 1: 3D Hall effect position sensors can be placed on-axis or coplanar to the magnetic field to measure distance and angular movement. (Image source: Texas Instruments)

Industry 4.0 systems such as robots need multi-axis motion sensing to measure the angle of robotic arms, or at each wheel of mobile robots to support navigation and precise movement throughout a facility. Integrated 3D Hall effect sensors are well-suited for these tasks since they are not susceptible to moisture or dirt. Coplanar measurements provide highly accurate magnetic field measurements of rotating shafts (Figure 2).

Image of integrated 3D Hall effect sensorsFigure 2: Integrated 3D Hall effect sensors can measure shaft rotation in robots and other Industry 4.0 applications. (Image source: Texas Instruments)

Secure enclosures such as electricity and gas meters, automatic teller machines (ATMs), enterprise servers and electronic point of sales equipment can use on-axis field measurements to detect intrusions (Figure 3). When the case is opened, the flux density (B) sensed by the 3D Hall effect sensor decreases until it falls below the flux release point (BRP) specification of the Hall switch, at which time the sensor sends out an alert. When the case is closed, the magnetic flux density must be large enough relative to the BRP to prevent false alerts. Since a magnet’s flux density tends to decrease as its temperature increases, the use of a 3D Hall effect sensor with temperature compensation capability can improve system reliability for enclosures used in industrial or outdoor environments.

Diagram of enclosure tamper detection can be implemented with 3D Hall effect sensors Figure 3: Enclosure tamper detection can be implemented with 3D Hall effect sensors to identify unauthorized access. (Image source: Texas Instruments)

Human interfaces and controls in home appliances, test and measurement equipment, and personal electronics can benefit from the use of all three axes of motion. A sensor can monitor motion in the X and Y planes to identify rotation of a dial and can identify when the dial is pushed by monitoring a large shift in the X and Y magnetic axes. Monitoring the Z-axis enables the system to identify misalignments and send alerts for wear or damage that the dial may need preventative maintenance.

Gimbal motor systems in handheld camera stabilizers and drones benefit from the use of 3D Hall effect sensors with selectable magnetic field sensitivity ranges and other programmable parameters to provide angle measurements to an MCU (Figure 4). The MCU continuously adjusts the motor position as needed to stabilize the platform. A sensor that can accurately and precisely measure angles in on and off-axis positions provides mechanical design flexibility.

Image of gimbal motors in handheld camera platforms and dronesFigure 4: Gimbal motors in handheld camera platforms and drones benefit from 3D Hall effect sensors with selectable magnetic field sensitivity ranges. (Image source: Texas Instruments)

Out-of-plane measurements often cause different magnetic field strengths (gains) and different offsets in different axes, which can cause angle calculation errors. The use of a 3D Hall sensor with gain and offset corrections supports flexibility when placing the sensor relative to the magnet, ensuring the most accurate angle calculations.

Flexible 3D Hall effect sensors

Texas instruments offers designers a selection of three-axis linear Hall effect sensors including the TMAG5170 family of high precision 3D linear Hall effect sensors with a 10 megahertz (MHz) serial peripheral interface (SPI) and cyclic redundancy check (CRC), and; The TMAG5273 family of low power linear 3D Hall effect sensors with an I²C interface and CRC.

TMAG5170 devices are optimized for fast and accurate position sensing and include: linear measurement total error of ±2.6% (maximum at 25°C); sensitivity temperature drift of ±2.8% (maximum), and; 20 kilosamples per second (Ksps) conversion rate for a single axis. TMAG7273 devices feature low power modes including: 2.3 milliampere (mA) active mode current; 1 microampere (µA) wake-up and sleep mode current, and; 5 nanoampere (nA) sleep mode current. These ICs include four primary functional blocks (Figure 5):

  • The Power Management & Oscillator block includes undervoltage and overvoltage detection, biasing, and oscillators.
  • Hall sensors and associated biasing with multiplexers, noise filters, temperature sensing, integrator circuit, and an analog-to-digital converter (ADC) make up the Sensing and Temperature Measurement block.
  • The communication control circuitry, electrostatic discharge (ESD) protection, input/output (I/O) functions, and CRC are included in the Interface Block.
  • The Digital Core contains diagnostic circuitry for mandatory and user-enabled diagnostic checks, other housekeeping functions, and an integrated angle calculation engine that provides 360° angular position information for both on-axis and off-axis angle measurements.

Diagram of Texas Instruments TMAG5170 models and an I²C interface on the TMAG5273 modelsFigure 5: Except for an SPI interface (shown above) on the TMAG5170 models and an I²C interface on the TMAG5273 models, the internal functional blocks are the same for both families of 3D Hall effect sensor ICs. (Image source: Texas Instruments)

The TMAG5170 devices are delivered in an 8 pin VSSOP package measuring 3.00 x 3.00 millimeters (mm) and are specified over an ambient temperature range of –40°C to +150°C. The TMAG5170A1 includes sensitivity ranges of ±25 millitesla (mT), ±50 mT, and ±100 mT, while the TMAG5170A2 supports ±75 mT, ±150 mT, and ±300 mT.

The low-power TMAG5273 family uses 6 pin DBV packages measuring 2.90 x 1.60 mm and is specified over an ambient temperature range of –40°C to +125°C. It’s also offered in two different models; The TMAG5273A1 with sensitivity ranges of ±40 mT and ±80 mT, and the TMAG5273A2 that supports ±133 mT and ±266 mT.

Two user-selected magnetic axes are used for angle calculations. The impact of system mechanical error sources is minimized through magnetic gain and offset corrections. The onboard temperature compensation function can be used to independently compensate for temperature changes in the magnet or the sensor. These 3D Hall effect sensors can be configured through the communications interface to enable user-controlled combinations of magnetic axes and temperature measurements. The ALERT pin on the TMAG5170, or the INT pin on the TMAG5273, can be used by an MCU to trigger a new sensor conversion.

Eval boards aid in getting started

Texas Instruments also offers two eval boards, one for the TMAG5170 series and one for the TMAG5273 series, to allow basic functional evaluations (Figure 6). The TMAG5170EVM includes both the TMAG5170A1 and the TMAG5170A2 models on a snap-apart pc board. The TMAG5273EVM has the TMAG5273A1 and TMAG5273A2 models on a snap-apart pc board. They include a sensor control board that interfaces with the graphic user interface (GUI) to view and save measurements and read and write registers. The 3D printed rotate & push module is used to test common functions of angular measurement.

Image of Texas Instruments TMAG5170EVM and TMAG5273EVM both include a snap-apart boardFigure 6: The TMAG5170EVM and the TMAG5273EVM both include a snap-apart board with two different 3D Hall effect sensor ICs (lower right), a sensor control board (lower left), 3D printed rotate and push module (center), and a USB cable to provide power. (Image source: Texas Instruments)

Illustration of the Texas Instruments 3D printed rotate and push moduleFigure 7: Illustration of the 3D printed rotate and push module mounted on top of the EVM. (Image source: Texas Instruments)

Using the 3D Hall sensors

There are a few implementation considerations designers need to be aware of when using these 3D Hall effect position sensors:

  • The SPI readout of the result register in the TMAG5170, or the I²C readout in the TMAG5273, needs to be synchronized with the conversion update time to ensure the correct data is read. The ALERT signal on the TMAG5170, or the INT signal on the TMAG5273, can be used to notify the controller when a conversion is complete and the data is ready.
  • A low-inductance decoupling capacitor must be placed close to the sensor pin. A ceramic capacitor with a value of at least 0.01 microfarads (μF) is recommended.
  • These Hall effect sensors can be embedded within enclosures made from nonferrous materials such as plastic or aluminum with the sensing magnets on the outside. Sensors and magnets can also be placed on opposite sides of a pc board.

Conclusion

With the growth of 3D motion and control, designers need to get accurate measurements in real-time, while keeping costs to a minimum through simplified design, while also minimizing power consumption. As shown, the TMAG5170 and TMAG5273 integrated 3D Hall effect sensors address these issues, offering the flexibility of fast sample rates and low latency for accurate real-time control, or slow sample rates to minimize power consumption in battery-powered devices. High accuracy is ensured with the integrated gain and offset correction algorithms, combined with independent temperature correction for the magnet and sensor.

Recommended Reading

  1. The Fundamentals of Proximity Sensors: Their Selection and Use in Industrial Automation
  2. Why and How to Use the Serial Peripheral Interface to Simplify Connections Between Multiple Devices

Disclaimer: The opinions, beliefs, and viewpoints expressed by the various authors and/or forum participants on this website do not necessarily reflect the opinions, beliefs, and viewpoints of Digi-Key Electronics or official policies of Digi-Key Electronics.

About this author

Jeff Shepard

Jeff has been writing about power electronics, electronic components, and other technology topics for over 30 years. He started writing about power electronics as a Senior Editor at EETimes. He subsequently founded Powertechniques, a power electronics design magazine, and later founded Darnell Group, a global power electronics research and publishing firm. Among its activities, Darnell Group published PowerPulse.net, which provided daily news for the global power electronics engineering community. He is the author of a switch-mode power supply text book, titled “Power Supplies,” published by the Reston division of Prentice Hall.

Jeff also co-founded Jeta Power Systems, a maker of high-wattage switching power supplies, which was acquired by Computer Products. Jeff is also an inventor, having his name is on 17 U.S. patents in the fields of thermal energy harvesting and optical metamaterials and is an industry source and frequent speaker on global trends in power electronics. He has a Masters Degree in Quantitative Methods and Mathematics from the University of California.

About this publisher

Digi-Key's North American Editors