SPRUHJ1I January 2013 – October 2021 TMS320F2802-Q1 , TMS320F28026-Q1 , TMS320F28026F , TMS320F28027-Q1 , TMS320F28027F , TMS320F28027F-Q1 , TMS320F28052-Q1 , TMS320F28052F , TMS320F28052F-Q1 , TMS320F28052M , TMS320F28052M-Q1 , TMS320F28054-Q1 , TMS320F28054F , TMS320F28054F-Q1 , TMS320F28054M , TMS320F28054M-Q1 , TMS320F2806-Q1 , TMS320F28062-Q1 , TMS320F28062F , TMS320F28062F-Q1 , TMS320F28068F , TMS320F28068M , TMS320F28069-Q1 , TMS320F28069F , TMS320F28069F-Q1 , TMS320F28069M , TMS320F28069M-Q1
This unique feature to monitor the resistance of the motor while spinning, allows the user to monitor the temperature of the coils based on the resistance increment. To show an example of a temperature sensor implementation, consider the values from Table 16-1.
Parameter | Value | Description |
---|---|---|
R | 12.0 Ω | Resistance at temperature T. Value found with Rs Online. |
R0 | 10.0 Ω | Resistance at temperature T0. Value found with Rs Offline. |
α | 0.00393°C-1 | Temperature coefficient of the material, in this case copper. |
T0 | 20°C | Reference temperature of the material. |
T | ? | Final temperature of the material. To be calculated based on Rs Online. |
Once the Rs Online feature is enabled, consider a resistance increase from 10.0 Ω to 12.0 Ω. The temperature of the motor windings can be calculated based on the following equation, derived from the equation listed in the previous section:
The following code example shows how to implement the temperature monitor:
#define COPPER_TEMP_COEF_INV_C (0.00393)
#define RS_AT_ROOM_TEMP_OHMS (10.0)
#define ROOM_TEMP_C (20.0)
// Derived defines, pre-calculated by the compiler, not the CPU
#define INV_COPPER_TEMP_COEF_C (1.0/COPPER_TEMP_COEF_INV_C)
#define INV_RS_AT_ROOM_TEMP_INV_OHMS(1.0/RS_AT_ROOM_TEMP_OHMS)
CTRL_Obj *obj = (CTRL_Obj *)ctrlHandle;
float_t RsOnLine_Ohm = EST_getRsOnLine_Ohm(obj->estHandle);
float_t Temperature_C = \
(ROOM_TEMP_C) + \
(RsOnLine_Ohm * (INV_RS_AT_ROOM_TEMP_INV_OHMS) - 1.0) * \
(INV_COPPER_TEMP_COEF_C);
This code example can be executed in the background outside of the interrupts. The execution time is not critical at all, since temperature changes are much slower compared to the CPU timing.
So by using Rs Online, users can set a same temperature limit to their motor to avoid damage and malfunction of the system. For easier computation of the temperature, a look up table is recommended, to avoid the execution penalty of this equation in real time.