SLYA070 October   2022 TMAG5170 , TMAG5170-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 about 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. More information about how this is implemented is found in the Multi-mover Position Sensing with Linear Motor Transport Systems application brief.

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. Details regarding how magnet selection impacts sensing range is found in the Magnet Selection for Linear Position Applications application note.

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.

Figure 1-1 Example TMAG5170 Sensor Array

One particular challenge with configuring this design is how to handle such 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, is possible to configure the microcontroller (MCU) to drive each sensor individually.

Figure 1-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 the case shown in Figure 1-2, a single MCU can support four independent sensors. As a result, 13 MCUs are required to handle 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.

Figure 1-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, driving the entire sensor array using a single MCU is possible.

Figure 1-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 easily supported, but make sure the SPI bus matches VCC at the device. If not, level shifters are necessary to verify consistent voltage domains. Details regarding configuring a device for a specific clock rate are available in the Multi-mover Position Sensing with Linear Motor Transport Systems application brief.

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. Again, 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 1-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 1-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 meet the rise and fall time requirements.

GUID-5E5B8F4E-9ACA-40C8-A6FE-30C96E232614-low.gifFigure 1-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-1 Alternative Device Recommendation
DeviceCharacteristicsDesign Considerations
TMAG5170
(TMAG5170-Q1)
Commercial (Automotive) grade linear 3D Hall-effect position sensor with SPI available in 8-pin DGK packageComplete magnetic vector sensitivity. This device is able to track a wide range of magnet positions, though careful planning is still required to make sure all input conditions map to a unique position.
TMAG5273Commercial grade Linear 3D Hall-effect position sensor with I2C interface available in 6 pin SOT-23 packageSimilar to the TMAG5170, but operates over I2C with wider sensitivity tolerance specifications.
TMAG5173-Q1Automotive grade Linear 3D Hall-effect position sensor with I2C interface available in 6-pin SOT-23 packageOperates over I2C with comparable performance to TMAG5170.
Table 1-2 Related Technical Resources
NameDescription
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 EVMGUI and attachments incorporate angle measurement using a precise three dimensional linear Hall-effect sensor
TMAG5273 EVMGUI and attachments incorporate angle measurement using a three dimensional linear Hall-effect sensor

TMAG5173 EVM

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