Other Parts Discussed in Thread: MOTORWARE
Dear TI members,
I am developing custom board of BLDC driver with hall sensor
I think lab11e of motorware is good example for my application, and use it as reference code.
looking into lab11e code, I have found it required 3 current sensor at following code at HALLBLDC_Ctrl_Run()
if(gHall_Flag_EnableBldc) { angle_pu = angle_est_pu; speed_pu = gHall_speed_fdb_pu; if(gHall_Flag_CurrentCtrl == true) // Torque Control Mode { gHall_BLDC_Is_fdb_pu = gAdcData.I.value[gHall_BLDC_Flag_Is_fdb]; gHall_BLDC_Is_ref_pu = speed_pid_out; // BLDC current loop PID_run(pidHandle[3],gHall_BLDC_Is_ref_pu,gHall_BLDC_Is_fdb_pu,&gHall_PwmDuty); HALLBLDC_Ctrl_PwmSet(gHall_PwmState, gHall_PwmDuty); } else // Speed Control Mode { gHall_PwmDuty = speed_pid_out; HALLBLDC_Ctrl_PwmSet(gHall_PwmState, gHall_PwmDuty); } } else
As I have checked, gHall_BLDC_Flag_Is_fdb have 3 values, 0 or 1 or 2.
so gAdcData.I.value[gHall_BLDC_Flag_Is_fdb] should have sensored value for 3 currents.
but, my custom board has only 2 current sensor. phase A and C.
Would you please let me know how to modify code for this ?
Is it OK to set USER_NUM_CURRENT_SENSORS to be 3 in user.h,
and set third value to be Ia + Ib + Ic = 0 ?
please let me know your idea.
Thanks in advance.
Best Regards,
Hae Ryong