This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMDSHVMTRPFCKIT: TMS320F28035

Part Number: TMDSHVMTRPFCKIT


I have designed my own PCB similar to the TMDSHVMTRPFCKIT using the F28035 microcontroller.  I've run through all the levels in HVACI_Scalar completing Level3.  For my purposes I need to be able to spin the motor in both forward and reverse direction.  The motor spins fine in the forward direction but it doesn't spin at all in the reverse direction when using a negative value SpeedRef.  I have tried to modify the original code with the following to swap the A and B lines using software but it didn't make a difference.  

if(rc1.SetpointValue >= 0)
{
pwm1.MfuncC1 = svgen_mf1.Ta;
pwm1.MfuncC2 = svgen_mf1.Tb;
}
else
{
pwm1.MfuncC1 = svgen_mf1.Tb;
pwm1.MfuncC2 = svgen_mf1.Ta;
}

pwm1.MfuncC3 = svgen_mf1.Tc;
PWM_MACRO(1,2,3,pwm1) // Calculate the new PWM compare values

Anybody have an idea what may be the issue?

Regards,

  • I am able to rotate the motor in reverse using a positive SpeedRef value when I swap the lines between:

    pwm1.MfuncC1 = svgen_mf1.Ta;
    pwm1.MfuncC2 = svgen_mf1.Tc;                                                                                                                                                                                                                  pwm1.MfuncC3 = svgen_mf1.Tb;

    The issue I have is I don't think I will be able to run the motor in closed loop when configured this way.  I haven't tried it because I'm worried about conflicts between the positive and negative sign difference between rc1.SetpointValue and speed1.Speed.

    I read through one old post here on the forums that one option is to change the angle generation in SVGENMF_MACRO.  What do I need to change in SVGENFM_MACRO to spin a motor in the opposite direction?

    Regards,

  • The issue I have is I don't think I will be able to run the motor in closed loop when configured this way.  I haven't tried it because I'm worried about conflicts between the positive and negative sign difference between rc1.SetpointValue and speed1.Speed.

    What do you mean to run the motor in closed-loop? This example with v/f scalar is open-loop control. 

    Yes, you just need to swap the output as you mentioned above.

  • Level 3 in HVACI_Scalar tests the function of V/f control in closed loop.

  • Run the motor in build level 2 first to check if the feedback speed of the motor is correct as you want. If not, you need to change the function for QEP or CAP for measuring the motor speed correctly.

    BTW, generally, just need to run the motor in build level 2 for most of v/f scalar control. The sensored-foc will be impelemented if a QEN based encoder is used.

  • Yes, the encoder reads correctly when the motor is spinning in the +ve SpeedRef direction in Level 2 and Level 3.  The motor doesn't work at all (in Levels 2 or Level 3) if I simply change the SpeedRef value to -ve unless I modify the software connections between the SVGENMF_MACRO and PWM_MACRO and enter a +ve SpeedRef value as discussed above.  Something in the SVGENMF_MACRO doesn't like -ve values.  I've started to review the Math Library reference information but I haven't been able to figure it out yet.

    I am slowing working towards the HVACI_SENSORED tutorials.  Do you mean that the HVACI_SENSORED (sensored-foc) will rotate the motor in both directions using -ve and +ve SpeedRef values?

  • Both examples can rotate the motor in bi-direction. The voltage for SVGENMF_MACRO should be positive always, you should change the rotation direction for angle generation. 

    For v/f scalar control, you can run the example in build level 2 as you mentioned above to change the PWM output sequence. The example only supports single direction rotation by default.

    HVACI_SENSORED uses SVGENDQ_MACRO that is different as SVGENMF_MACRO, and can support the bi-direction rotation by setting the reference speed to positive or negative value.

  • Ok thanks for the help.  I'll move on to HVACI_SENSORED tutorials.