SPRUJF4 October 2024
The current through the motor is sampled by the microcontroller as part of the motor control algorithm once during each PWM cycle. The TIEVM-MC-MODULE daughter board supports single and 3-shunt current sensing.
To measure both positive and negative currents, the measurement circuits require an offset reference voltage of half of the maximum input allowable by the ADC. This 1.65 V offset reference voltage is created by a voltage follower, as shown in Figure 2-6:
Figure 2-7 shows how the motor current is represented as a voltage signal, with filtering, amplification, and offset to the center of the ADC input range for daughterboard. This circuit is used for each of the three phases of the PMSM. The transfer function of this circuit is given by Equation 4.
where
The calculated resistance values lead to the sensing circuit shown in Figure 2-4, Gi is given by Equation 5.
The maximum peak-to-peak current measurable by the microcontroller is given by Equation 6.
This has the peak-to-peak value of ±7.99 A. The following code snippet shows how this is defined for compressor motor in user_mtr1.h file:
//! \brief Defines the maximum current at the AD converter
#define USER_M1_ADC_FULL_SCALE_CURRENT_A (15.97f)
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 inverting pin of the operational amplifier. The highlighted sign is required to be configured to have the correct polarity for the current feedback in software as shown in the following code snippet in user.mtr1.h:
// define the sign of current feedback based on hardware board
#define USER_M1_SIGN_CURRENT_SF (1.0f)