TIDUC07 March   2022

 

  1.   Description
  2.   Resources
  3.   Features
  4.   Applications
  5.   5
  6. 1System Description
  7. 2System Overview
    1. 2.1 Block Diagram
    2. 2.2 Highlighted Products
      1. 2.2.1 TMAG5170
      2. 2.2.2 DRV5055A4
    3. 2.3 Design Considerations
      1. 2.3.1 Magnet Selection
      2. 2.3.2 Magnet Shape
      3. 2.3.3 Magnet Rotation Speed
      4. 2.3.4 Sensor Location
      5. 2.3.5 Expected Performance
      6. 2.3.6 Layout for Sensor Location
      7. 2.3.7 45° Alignment
  8. 3Hardware, Software, Testing Requirements, and Test Results
    1. 3.1 Hardware Requirements
    2. 3.2 Test Setup
      1. 3.2.1 Test Equipment
      2. 3.2.2 Test Hardware Configuration
      3. 3.2.3 Test Software Configuration and Initial Data Capture
    3. 3.3 Test Results
      1. 3.3.1 Calibration Methods
      2. 3.3.2 TMAG5170 On-Axis
      3. 3.3.3 TMAG5170 In-Plane
      4. 3.3.4 TMAG5170 Off-Axis
      5. 3.3.5 TMAG5170 45° Alignment
      6. 3.3.6 DRV5055 Off Axis Result
  9. 4Design and Documentation Support
    1. 4.1 Design Files
      1. 4.1.1 Schematics
      2. 4.1.2 BOM
    2. 4.2 Tools and Software
    3. 4.3 Documentation Support
    4. 4.4 Support Resources
    5. 4.5 Trademarks

System Description

In any precision motor control application it becomes necessary to assess angular position of the motor shaft to ensure overall control of the system matches expectation. Inaccurate position data may result with impaired user safety, wider manufacturing tolerances and yield loss, navigation failures, or damaged equipment. As a result, it becomes essential in many applications to constantly monitor and evaluate angular position. For example, in autonomous mobile robots and robotic lawnmowers, the ability to match the angular rotation speed of each wheel is critical for proper navigation.

Although various technologies exist for angle measurement, this design demonstrates the use of two standard one dimensional (1D) linear Hall-effect sensors or a three dimensional (3D) linear Hall-effect sensor. Each technique is subject to various challenges which must be addressed.

Table 1-1 Angle Measurement Methods
METHOD ADVANTAGES DISADVANTAGES
3D Hall-effect (Method demonstrated in this design)
  • Single sensor can capture entire magnetic field
  • Sensor placement is flexible for compact solutions
  • Angle position is available at system power up
  • Immune to dirty working conditions
  • Depending on range and placement, magnetic field may be non-ideal
  • Magnet cost
1D Hall-effect (Method demonstrated in this design)
  • Inexpensive sensors with analog output
  • Compact solution size
  • Angle position available at system power up
  • Immune to dirty working conditions
  • Requires precise sensor placement for accurate phase alignment
  • Magnet cost
Hall-effect Incremental Encoding
  • Captures speed and direction of rotating magnet
  • Simple calculation for incremental angle changes
  • Immune to dirty working conditions
  • Requires a multipole ring magnet
  • Provides incremental angle position only and position at power up is unknown

Inductive Sensed Angle Encoding

  • Immune to influence from nearby fixed permanent magnets
  • Immune to dirty working conditions
  • Requires precise design of sense coil and metal target
Optical Encoding
  • Provides highest resolution data
  • Solution size tends to be bulky
  • Must operate in clean conditions

Stepper Motor Pulse counting

  • Simple implementation
  • Precision control can be achieved using geared configurations
  • Step size jitter provides uncertainty in absolute position
  • Start position is unknown
Sensorless Motor Control
  • Does not require additional sensing components
  • Does not detect

    Motor position when stopped

  • Does not work well at low speeds
  • Can be difficult to manage at very high speeds
  • Requires complex calculations

Not all solutions are able to use optical encoding due to contaminants such as dust, dirt, and grime. Optical solutions tend to become bulky to create sealed environments for the sensor, which do not fit well into compact designs.

For inductive and linear Hall-effect based solutions, the premise of the angle calculation uses sinusoidal outputs which are 90° out of phase from each other.

Figure 1-1 Sine and Cosine Inputs

With outputs of this form, use Equation 1 through Equation 4 to describe the absolute angle.

Equation 1. O u t 1 = sin θ
Equation 2. O u t 2 =   cos θ
Equation 3. tan θ = O u t 1 O u t 2
Equation 4. θ = atan O u t 1 O u t 2

As Equation 4 shows, determine the angle by calculating the arctangent of the ratio of the two outputs. To simplify this calculation step in software, use the atan2() function available in many coding libraries. This function automatically considers the sign of each input and applies adjustments to produce an output ranging from ±180°.

An additional option is to use a device with an integrated CORDIC calculator. CORDIC is an algorithm that approximates a binary search by performing vector rotations and has been optimized for digital logic. Devices such as TMAG5170 and TMAG5273 are capable of generating angle outputs using the device outputs with minimal total system latency.

Linear Hall-effect solutions may be implemented in the following arrangements, which will be explored in more detail in Sensor Location.

  • 1D In-Plane
  • 1D Off-Axis
  • 3D In-Plane
  • 3D Off-Axis
  • 3D On-Axis