Other Parts Discussed in Thread: TMDXIDDK379D, AMC1304M25
Hello !
I use the TMDXIDDK379D Motor control demoboard with the original SW-project. I want to compare the current measurementd of the LEMs and Sigma-Deltas. I use a current source in Phase W - so a current of 5.0A flows through the LEM current sensor and the Sigma-Delta-Shunt. In the debug window, I can look at the values (current_sensor[1 or 2].Bs):
The base value for the emitter shunt measurement ist 9.98A, so I must multiply the normalized values (from -1 to 1) with 9.98A. So the LEM sensor measured 5.016A, the Sigma-Delta only 4.509A. Why this big different?
The realization in the software seems to be right for me.
/*******************************************************/
/* Sinc filter Module */
/*******************************************************/
//Configure Data filter modules filter type, OSR value and enable / disable data filter
// 16 bit data representation is chosen for OSR 128 using Sinc3, from the table in the TRM
// the max value represented for OSR 128 using sinc 3 is +/-2097152 i.e. 2^21
// to represent this in 16 bit format where the first bit is sign shift by 6 bits
Sdfm_configureData_filter(1, FILTER1, FILTER_ENABLE, SINC3, OSR_128, DATA_16_BIT, SHIFT_6_BITS);
Sdfm_configureData_filter(1, FILTER2, FILTER_ENABLE, SINC3, OSR_128, DATA_16_BIT, SHIFT_6_BITS);
Sdfm_configureData_filter(1, FILTER3, FILTER_ENABLE, SINC3, OSR_128, DATA_16_BIT, SHIFT_6_BITS);
inline void currentSensorSuite()
{
volatile int16 temp; // temp variable used to avoid warning msgs
current_sensor[SHUNT_CURRENT_SENSE-1].As = (float)IFB_SV_PPB* ADC_PU_PPB_SCALE_FACTOR;
current_sensor[SHUNT_CURRENT_SENSE-1].Bs = (float)IFB_SW_PPB* ADC_PU_PPB_SCALE_FACTOR;
current_sensor[SHUNT_CURRENT_SENSE-1].Cs = -current_sensor[SHUNT_CURRENT_SENSE-1].Cs
-current_sensor[SHUNT_CURRENT_SENSE-1].Bs;
current_sensor[LEM_CURRENT_SENSE-1].As = (float)IFB_LEMV_PPB* ADC_PU_PPB_SCALE_FACTOR * LEM_TO_SHUNT;
current_sensor[LEM_CURRENT_SENSE-1].Bs = (float)IFB_LEMW_PPB* ADC_PU_PPB_SCALE_FACTOR * LEM_TO_SHUNT;
current_sensor[LEM_CURRENT_SENSE-1].Cs = -current_sensor[LEM_CURRENT_SENSE-1].Cs
-current_sensor[LEM_CURRENT_SENSE-1].Bs;
current_sensor[SD_CURRENT_SENSE-1].As = ((temp=SDFM1_READ_FILTER1_DATA_16BIT)*SD_PU_SCALE_FACTOR -
offset_SDFM1) * SDFM_TO_SHUNT;
current_sensor[SD_CURRENT_SENSE-1].Bs = ((temp=SDFM1_READ_FILTER2_DATA_16BIT)*SD_PU_SCALE_FACTOR -
offset_SDFM2) * SDFM_TO_SHUNT;
current_sensor[SD_CURRENT_SENSE-1].Cs = -current_sensor[SD_CURRENT_SENSE-1].Cs
-current_sensor[SD_CURRENT_SENSE-1].Bs;
SD_Phasen[0] = SDFM1_READ_FILTER1_DATA_16BIT;
SD_Phasen[1] = SDFM1_READ_FILTER2_DATA_16BIT;
return;
}
Thanks for your help !
