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.

drv8301 real speed

Other Parts Discussed in Thread: MOTORWARE

Hi all,

  I use C2000 LaunchPad XL TMS320F28027F + BOOSTXL-DRV8301 REVB, and has strange situation:

I set gMotorVars.SpeedRef_krpm = 2.0, motor run at 2000 rpm, and  gMotorVars.Speed_krpm is closed to 2.0, is right. This time, disconnnect motor wire A/B/C, motor does not run, but gMotorVars.Speed_krpm is also closed to 2.0, why?


I watched gAdcData varialbe, but i cannot find any rule.

please help me, thank you

  • Hi Amos,

    Your post is being moved to the C2000 forum for better support.
  • Can anyone help me?

  • Hi Amos,

    Sorry for the delay. It appears the post was not moved. Let me try again.
  • Amos,
    When the motor is disconnected we are still measuring voltages from the PWMs we are applying to the inverter, and we are using that to estimate the speed. Yes, even with no motor attached.

    If you wanted to add some logic for how to detect if a motor wasn't present here are some ideas:

    You can use Rs Recalibration to know if the resistance has changed, but it can also be used to see if the motor is even connected. For example, if the motor has been shorted, you would get a very low Rs. If the motor is disconnected, you get a very high Rs.

    This is how you enable it:

    // enable/disable Rs recalibration during motor startup
    EST_setFlag_enableRsRecalc(obj->estHandle,true);

    If this needs to be detected while the motor is running, I would consider a few ideas:

    1. Look at the current measurement. Even if the motor has no load at all, measuring all zeros in the currents is a flag that the motor is not even connected.

    2. Enable Rs Online feature (explained in lab 7 of motorware). If Rs goes too high, the motor was disconnected, same if it goes too low the motor has some sort of a short.
  • Hi Rick,
        Thanks.

    Hi Chris,

    Thanks for your help.

    I copy code runRsOnLine(ctrlHandle)  from lab7, it like this:

    // run Rs online
    runRsOnLine(ctrlHandle);
    
    // update CPU usage
    updateCPUusage();
    
     // enable/disable the forced angle
    EST_setFlag_enableForceAngle(obj->estHandle,gMotorVars.Flag_enableForceAngle);
    
    // enable or disable power warp
    CTRL_setFlag_enablePowerWarp(ctrlHandle,gMotorVars.Flag_enablePowerWarp);

    this is connected to motor with 3000 rpm

    this is disconnected motor

    the RsOnLine_Ohm has not much difference.

    In my first post, it is disconnected motor, but current of gAdcData not zero, I[0], I[1], I[2] are randomly between plus and minus. So i cannot judge speed by gAdcData.

    In my goal, I hope to detect the motor real speed, if the load is too heavy, motor will stop, i want to know this situation.

    thanks for your help again.

  • in the 2nd one your Rs is 300% lower. That is a huge difference.

    gAdcData may not be exactly zero, but the values should bounce around zero. This will tell you there is no current, but you are showing a speed estimate, so the motor must be disconnected.

    "In my goal, I hope to detect the motor real speed, if the load is too heavy, motor will stop, i want to know this situation."

    This is a different situation than disconnected. This is a stalled motor situation.

    If you are commanding a speed/torque and the estimated speed goes near zero for an extended period of time, it is stalled and you should take some action in your applicaton.

  • Hi Chris,
    I will try it, and make a fine tune.

    Thank you for your help