SLYA070A october   2022  – may 2023 TMAG5170 , TMAG5170-Q1 , TMAG5170D-Q1 , TMAG5273

 

  1. 1Application Brief

Application Brief

Introduction

Precision position feedback is critical in many industrial applications such as linear motor transport systems. These systems implement a repeating series of linear motor coils which can be driven independently to drive a network of mover platforms on a track. To achieve the highest resolution of position accuracy, sensors capable of distinguishing individual movers can be installed to provide feedback to the host system controller. Three dimensional Hall-effect sensors such as TMAG5170 are designed for this task. Multi-mover Position Sensing with Linear Motor Transport Systems shows how this is implemented.

The size of the magnet located in each mover impacts the sensing range for any given sensor. As the magnet size increases, the effective sensing range similarly increases. This maximum range directly determines the number of sensors required to accurately track position over a given distance. Magnet Selection for Linear Position Applications provides more details regarding how magnet selection impacts sensing range.

Topologies

Consider a 1-m long track with a maximum sensor spacing of 20 mm. This segment then requires 50 sensors to detect position along the entire length of track.

GUID-20220915-SS0I-LW7F-DD20-ZQ61TLKQJ1WP-low.svgFigure 1 Example TMAG5170 Sensor Array

One particular challenge with configuring this design is how to incorporate a large number of devices communicating data back to the host and synchronizing simultaneous sampling. In the case of TMAG5170, the device operates over SPI and has a dedicated start-of conversion hardware pin. For small arrays with only a few sensors, it is possible to configure the microcontroller (MCU) to drive each sensor individually.

GUID-20220915-SS0I-1SJG-ST6H-2Z6HWD7W0GFB-low.svgFigure 2 Small Array Fan-Out

In this particular case, the design is limited by the number of serial bus interfaces available in the MCU. In Figure 2, a single MCU can support four independent sensors. As a result, 13 MCUs are required to support an array of sensors spanning the 1-m track.

Increasing the number of sensors on a single SPI bus is possible by fanning out the serial data in, serial data out, and clock lines to all of the sensors. Individual chip select lines can be routed to each sensor. For the MCU with 16 GPIOs, using a single controller to communicate with 13 different sensors is possible. This configuration reduces the required number of MCUs from 13 to 4.

GUID-20220915-SS0I-B9KP-PMHX-VGZ69SP030ZZ-low.svgFigure 3 Large Array Fan-Out

Another method to further reduce the MCU count is to use a decoder to reduce the number of IO pins required to set the chip select signal for each sensor. With a 3:8 configuration, it is possible to drive the entire sensor array using a single MCU

GUID-20220915-SS0I-LTQM-HLVR-TFMSFWXHSD91-low.svgFigure 4 Array Fan-Out With Demultiplexer

For a system which prioritizes speed, this design is most beneficial to configure the device control using a dedicated SPI bus per sensor. This approach has the highest cost and requires larger PCB layout to properly route all SPI lines.

For a system which seeks to minimize cost and size, the decoder reduces the total component cost and allows for reduced PCB routing. However, as the number of sensors on a single bus increases, the total delay in measurement for any sensor must also increase.

Additional system trade-offs are important to consider. TMAG5170 operates between 2.3 V and 5.5 V. Standard logic levels of 3.3 V or 5 V are supported, but confirm the SPI bus matches VCC at the device. If not, level shifters are necessary to verify consistent voltage domains. Multi-mover Position Sensing with Linear Motor Transport Systems provides details regarding configuring a device for a specific clock rate.

The MCU must step through each sensor in series to capture a complete view across the entire track, and as a result the time between consecutive reads for any one sensor must scale accordingly. TMAG5170 includes a dedicated function on the ALERT pin which allows for simultaneous start of conversion to facilitate the synchronization of each conversion as data is polled throughout the system. This improves the robustness of the system control with multiple movers along the same track.

Driving SPI and Timing

Consider the drive capabilities of the MCU and the sensor. The total parasitic capacitance and inductance of the PCB routing combined with the input capacitance of each device sharing the bus influence the maximum communication rate.

One particular concern when clock speeds are increased is reflections that occur due to impedance mismatch of the trace and load. In Figure 5, a clock signal with poor impedance matching is probed at the driving (green) and receiving (blue) endpoints of an unmatched transmission line. For comparison, the signal being driven is overlaid in red.

GUID-A613A9E2-BE11-4D0C-B637-30AAAC969A84-low.gifFigure 5 Overshoot and Undershoot Produced by Reflections

The severity of the observed reflection is influenced by the length of the wire and the input and output impedance of the devices connected to the transmission line. Seeing termination RC networks installed to minimize this effect on the signal is not uncommon.

In addition to reflections, the slew rate of the clock edge can similarly limit the maximum data rate possible. Voltage change across a capacitor is described in Equation 1.

Equation 1. I=C×δVδt

Therefore, as the number of sensors on the bus increases, the total parasitic capacitance for that line similarly increases. If either the MCU or sensor is not able to source enough current onto the clock or data lines then the rising and falling edge times become longer. This increase of rising and falling edge times can worsen to the point of violating timing requirements. Verify the system meets all of the setup and hold times and meets the rise and fall time requirements.

GUID-5E5B8F4E-9ACA-40C8-A6FE-30C96E232614-low.gifFigure 6 TMAG5170 SPI Timing Diagram

If the fan-out is too large to reach the desired number of sensors, then use clock and data buffers to help maintain clean data transmission.

Conclusion

Large sensor arrays are enabled when using devices such as TMAG5170 which offer digital communications over SPI. Depending on the size of the array, a variety of approaches are available to reduce the total number of microcontrollers needed to capture all of the relevant data. For large arrays which fan out with several devices on a single net, the added capacitance and trace impedances can require extra consideration to verify the quality of data transmission.

See the following device recommendations and supporting documentation for more information.

Table 1 Alternative Device Recommendation
Device Characteristics Design Considerations
TMAG5170(TMAG5170-Q1) Commercial (Automotive) grade linear 3D Hall-effect position sensor with SPI available in 8-pin VSSOP package Complete magnetic vector sensitivity. This device is able to track a wide range of magnet positions, though careful planning is required to make sure all input conditions map to a unique position.

TMAG5170D-Q1

Dual-die Automotive high-precision 3D linear Hall-effect sensor with SPI interface available in 16-pin TSSOP package

Identical to the TMAG5170, but with stacked sensor dies for integrated redundancy.

TMAG5273 Commercial grade Linear 3D Hall-effect position sensor with I2C interface available in 6 pin SOT-23 package Similar to the TMAG5170, but operates over I2C with wider sensitivity tolerance specifications.
TMAG5173-Q1 Automotive grade Linear 3D Hall-effect position sensor with I2C interface available in 6-pin SOT-23 package Operates over I2C with comparable performance to TMAG5170.
Table 2 Related Technical Resources
Name Description
High Speed Layout Guidelines Application report that discusses and demonstrates various techniques and rules for quality data transmission
Multi-mover Position Sensing with Linear Motor Transport Systems An introduction to linear motor transport systems with timing discussion to verify synchronous capture of a network of sensors
TMAG5170 EVM GUI and attachments incorporate angle measurement using a precise three dimensional linear Hall-effect sensor

TMAG5170D EVM

GUI and attachments incorporate angle measurement using both precise three dimensional linear Hall-effect sensors integrated in this one device
TMAG5273 EVM GUI and attachments incorporate angle measurement using a three dimensional linear Hall-effect sensor

TMAG5173 EVM

TI Precision Labs - Magnetic Sensors A helpful video series describing the Hall effect and how to use the Hall effect in various applications. A video on CORDIC calculations is included.