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.

TMS320F28035: Negative values for PWM for InstaSpin BLDC

Part Number: TMS320F28035

I have the InstaSpin BLDC running an 8 pole 12 volt motor. The motor turns fine, but some times at start up my system gets a high current and the motor does not start. In this state I noticed that the current PID is doing what it is suppose to do by taking its output to Umin (-0.95). However the PWM is not responding to the -0.95. It keeps the current at a high state. If I change the current PID Umin to (0.20), the over current goes down and prevents the high current state from occurring. Its almost as if the PWM does not respond to negative numbers even though it states its range is -1 to 1. Maybe the actual range is 0 to 1. I will try to confirm this by looking at the TI source code. Maybe this is a known bug with the TI InstaSpin BLDC lab code. I am using the level 8 Cascaded example.

  • I looked at the source code and the PWM_CNTL_MACRO(v) does take a negative duty and scale it to be zero duty. Hoever, when I run my motor and give it a zero duty I would expect to get 50%, but I get no current into the motor. When I give it 0.3 the motor runs fine, when I give it -0.3 the motor runs but makes a load noise. I can see why the current PID going to -0.95 with high current causes my system to draw a lot of current. I have limited the current PID range from 0.2 to 0.95 to prevent this, but still don't completely understand why I need to do this.

    Can someone explain how the PWM is setup in the InstaSpin BLDC lab and why a negative PWM duty is not working. I would think a -1 duty would give zero % duty, but that's not what's happening.
  • The root cause is the feedback speed is opposite direction of target speed, so the reference current is negative and the output of current PI regulator will be also negative, the output is ZERO which means the PWM duty is 50%.
    You can change the Int_Threshold and tune the Kp&Ki to solve this, or set the Umin to ZERO if you only need a single direction rotation.
  • Thanks, its is making since now.