TIDUFE5 July   2025

 

  1.   1
  2.   Description
  3.   Resources
  4.   Features
  5.   Applications
  6.   6
  7. 1System Description
    1. 1.1 Terminology
    2. 1.2 Key System Specifications
  8. 2System Overview
    1. 2.1 Block Diagram
    2. 2.2 Design Considerations
    3. 2.3 Highlighted Products
      1. 2.3.1  TMS320F2800137
      2. 2.3.2  LMG3651R025
      3. 2.3.3  LMG2650
      4. 2.3.4  TMCS1126
      5. 2.3.5  ISO6721
      6. 2.3.6  UCC28881
      7. 2.3.7  UCC27712
      8. 2.3.8  TPS562206
      9. 2.3.9  TLV9062
      10. 2.3.10 TLV74033
  9. 3System Design Theory
    1. 3.1 Totem Pole PFC
      1. 3.1.1 Inductor Ratings
      2. 3.1.2 AC Voltage Sensing
      3. 3.1.3 DC Link Voltage Sensing
      4. 3.1.4 AC Current Sensing
      5. 3.1.5 DC Link Capacitor Rating
    2. 3.2 Three-Phase PMSM Drive
      1. 3.2.1 Field Oriented Control of PM Synchronous Motor
        1. 3.2.1.1 Space Vector Definition and Projection
        2. 3.2.1.2 Clarke Transformation
        3. 3.2.1.3 Park Transformation
        4. 3.2.1.4 Basic Scheme of FOC for AC Motor
        5. 3.2.1.5 Rotor Flux Position
      2. 3.2.2 Sensorless Control of PM Synchronous Motor
        1. 3.2.2.1 Enhanced Sliding Mode Observer With Phase Locked Loop
          1. 3.2.2.1.1 Mathematical Model and FOC Structure of an IPMSM
          2. 3.2.2.1.2 Design of ESMO for the IPMSM
          3. 3.2.2.1.3 Rotor Position and Speed Estimation With PLL
      3. 3.2.3 Hardware Prerequisites for Motor Drive
        1. 3.2.3.1 Current Sensing With Three-Shunt
        2. 3.2.3.2 Motor Voltage Feedback
  10. 4Hardware, Testing Requirements, and Test Results
    1. 4.1 Hardware Requirements
      1. 4.1.1 Hardware Board Overview
      2. 4.1.2 Test Conditions
      3. 4.1.3 Test Equipment Required for Board Validation
    2. 4.2 Test Setup
    3. 4.3 Test Results
      1. 4.3.1 Functional Waveforms
  11. 5Design and Documentation Support
    1. 5.1 Design Files
      1. 5.1.1 Schematics
      2. 5.1.2 Bill of Materials
      3. 5.1.3 Altium Project
      4. 5.1.4 Gerber Files
      5. 5.1.5 PCB Layout Recommendations
    2. 5.2 Tools
    3. 5.3 Documentation Support
    4. 5.4 Support Resources
    5. 5.5 Trademarks
  12. 6About the Author

Current Sensing With Three-Shunt

The current through the motor is sampled by the microcontroller as part of the motor control algorithm during every PWM cycle. To measure bidirectional currents of the motor phase, that is, positive and negative currents, the circuits create a reference voltage of 1.65V. This offset reference voltage is created by a voltage follower with TLV9062. Figure 3-20 shows how the motor current is represented as a voltage signal, with filtering, amplification, and offset to the center of the ADC input range. This circuit is used for each phase of the three-phase motor. The transfer function of this circuit is given by Equation 47.

Equation 47. VOUT=VOFFSET+IIN×RSHUNT×Gi

where

  • RSHUNT = 0.02Ω
  • VOFFSET = 1.65V

The calculated resistance values lead to the sensing circuit shown in Figure 3-21, Gi is given by Equation 48.

Equation 48. Gi=RfbRin=R20R18=10.0K1.0K=10.0

The maximum peak-to-peak current measurable by the microcontroller is given by Equation 49.

Equation 49. Iscale_max=VADC_maxRSHUNT×Gi=3.30.02×10=16.5A

The resulting 16.5A is the peak-to-peak value of ±8.25A. The following code snippet shows how this is defined for the compressor motor in the user_mtr1.h file:

//! \brief Defines the maximum current at the AD converter
#define USER_M1_ADC_FULL_SCALE_CURRENT_A         (16.5f)

Correct polarity of the current feedback is also important so that the microcontroller has an accurate current measurement. In this hardware board configuration, the negative pin of the shunt resistor, which is connected to ground, is also connected to the non-inverting pin of the operational amplifier. The highlighted sign is required to be configured to have correct polarity for the current feedback in software as shown in the following code snippet in motor1_drive.c:

// define the sign of current feedback based on hardware board
adcData[MTR_1].current_sf = -userParams[MTR_1].current_sf;
TIDA-010282 Motor Current Sensing Circuit With Three-ShuntFigure 3-20 Motor Current Sensing Circuit With Three-Shunt

Implement the same calculation steps for a fan motor, and set the scale values in the user_mtr2.h file.