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.

BOOSTXL-DRV8323RS: InstaSPIN-Motion project

Part Number: BOOSTXL-DRV8323RS
Other Parts Discussed in Thread: LAUNCHXL-F28069M, , DRV8305, DRV8312, DRV8301, MOTORWARE, BOOSTXL-DRV8323RH, DRV8323, BOOSTXL-DRV8301, CONTROLSUITE

Hi,

I have Launchxl-F28069M and BOOSTXL-DRV8323RS to control BLDC. I download BOOSTXL-DRV8323RS labs and build. But the project only InstaSPIN-FOC. I want to use InstaSPIN-Motion but it don't have any project. 

1. Does BOOSTXL-DRV8323RS have any InstaSPIN-Motion project to download?

2. Should I modify  InstaSPIN-Motion project to generate a new case so that  BOOSTXL-DRV8323RS  can be used? I see some board pin map and circuit diagram are not as same as BOOSTXL-DRV8323RS.

3. If I edit project, is there a risk of damaging the circuit board?

4. From which board should I start to edit the file?(Drv8301,Drv8305,Drv8312)

I mainly use QEP as the basis for speed control. QEP is not used in instaSPIN-FOC.
And instaSPIN-Motion provides QEP speed control, so I want to use instaSPIN-Motion to control the motor.
Can you give me better advice?

Thanks

  • 1. Does BOOSTXL-DRV8323RS have any InstaSPIN-Motion project to download?

    No. You have to port the current examples by yourself.

    2. Should I modify  InstaSPIN-Motion project to generate a new case so that  BOOSTXL-DRV8323RS  can be used? I see some board pin map and circuit diagram are not as same as BOOSTXL-DRV8323RS.

    Yes, you might refer to the Instaspin-foc examples below

    [FAQ] BOOSTXL-DRV8323RS and BOOSTXL-DRV8323RH InstaSPIN and MotorWare support

    https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/635499

    3. If I edit project, is there a risk of damaging the circuit board?

    Follow the instaspin lab guide or the quick start guide above to run the labs.

    4. From which board should I start to edit the file?(Drv8301,Drv8305,Drv8312)

    As answered in Q2.

  • Thanks your reply

    Finally, I ask another question, because I see QEP related content in the instaSPIN-FOC file.
    If QEP is enabled from instaSPIN-FOC to control BLDC, it is more stable.(Or the instaSPIN-FOC itself cannot enable the encoder)
    Or after using the instaSPIN-Motion editing program, the motor control is relatively stable.

    I know they are the same FOC control method. But the motor parameter settings of the two are different, I would like to ask about these settings

     

    And then, I follow your suggest to edit InstaSPIN-Motion project, but it have some problem.

    [FAQ] BOOSTXL-DRV8323RS and BOOSTXL-DRV8323RH InstaSPIN and MotorWare support
    I took it step by step, thinking that I could get the QEP value, but I couldn't get the correct voltage.
    My power supply voltage is 24V, but it only has 19V in the GUI.

    The motor can run(maybe), but it is not stable. I set Iqd_kp value 0.01, motor run and stop, and  it is so hot.
    Does the speed control have any PI control? I don't see any PI value in GUI.

    Thanks

  • The instaspin-foc is a sensorless based solution that doesn't need position sensor. The QEP related content is for instaspin-motion.

    Please follow the instaspin lab guide to run the related labs. You need to run the lab02b or lab02c to identify the motor first for running the other torque or speed closed-loop control labs.

    set Iqd_kp value 0.01, motor run and stop, and  it is so hot.
    Does the speed control have any PI control?

    There is no "Iqd_kp" variables in the example labs. Please run the labs within CCS, the GUI doesn't support the labs for DRV83232.

  • Hello, 

    I follow your suggest use CCS to run lab, and I have some question. I'm not sure it these problem that my motor can run instaSPIN-Motion.

    Q1. I follow qsg_hw_boostxl-drv8323rs_reva.pdf the page 6 first step to copy project. Labs debug successful, but in CCS gMotorVars.VdcBus_kV value is not true. I try many method but the value is not as same as my power supply. Though it can run instaSPIN-FOC labs successful, but in instaSPIN-MOTION my motor is not spin. How to fix gMotorVars.VdcBus_kV to get correct value?

    Q2. In problem Q1, I try to run lab02a to identify the motor. When the Vbus value is error, I got the motor Rs, Lsd,Lsq and RATED_FLUX is correct ? 

    Q3. I download example boostxldrv8323_package_mw.zip. In these labs I test instaSPIN-FOC is successful, and the gMotorVars.VdcBus_kV is correct. So maybe projects Drv8323 pin setting and Drv8305 pin setting are error, but I don't find any pin setting in the project. Can you tell me how TI to define the pin in CCS?

    Q4. I try to use  instaSPIN-Motion so I follow same steps qsg_hw_boostxl-drv8323rs_reva.pdf. But when I try to run lab12 to control my motor, it doesn't work and my motor so hot and I smell burnt. Although my board and my motor are not boken, but I want to know why this problem occurs.

    Thanks

  • Q1. I follow qsg_hw_boostxl-drv8323rs_reva.pdf the page 6 first step to copy project. Labs debug successful, but in CCS gMotorVars.VdcBus_kV value is not true. I try many method but the value is not as same as my power supply. Though it can run instaSPIN-FOC labs successful, but in instaSPIN-MOTION my motor is not spin. How to fix gMotorVars.VdcBus_kV to get correct value?

    Please run the example instaspin-foc first to make sure that the hardware is setup correctly.

    Q2. In problem Q1, I try to run lab02a to identify the motor. When the Vbus value is error, I got the motor Rs, Lsd,Lsq and RATED_FLUX is correct ? 

    No. The correct dc bus voltage sensing value is must have.

    Q3. I download example boostxldrv8323_package_mw.zip. In these labs I test instaSPIN-FOC is successful, and the gMotorVars.VdcBus_kV is correct. So maybe projects Drv8323 pin setting and Drv8305 pin setting are error, but I don't find any pin setting in the project. Can you tell me how TI to define the pin in CCS?

    You might take a look at the "motorware_hal_tutorial.pdf" in the folder below. And you can refer to the instaspin-foc example to configure the peripheral in instaspin-motion labs in hal.c and hal.h.

    C:\ti\motorware\motorware_1_01_00_18\docs\tutorials

    Q4. I try to use  instaSPIN-Motion so I follow same steps qsg_hw_boostxl-drv8323rs_reva.pdf. But when I try to run lab12 to control my motor, it doesn't work and my motor so hot and I smell burnt. Although my board and my motor are not boken, but I want to know why this problem occurs.

    Make sure that the motor wires and encoder lines are connected correctly, GPIO and QEP are configured accordingly as well.

    Recommend that you might use boosxl-drv8305 or boostxl-drv8301 directly as a starting point if you just want to do an evaluation.

  • Sorry, I only have boosxl-drv8323RS. I use TI equipment mainly because I want to use a quadrature encoder to control the speed and position of the BLDC motor, so I choose Launchxl-F28069M and BOOSTXL-DRV8323RS.

    Now, I edit user_j1.h and my board get power supply is correct. I run lab02a to identify the motor, and run lab5b to speed control. instaSPIN-FOC labs are test ok, but I try again lab12a still fail.

    When I run the SpinTAC but my motor can't run. In the instaspin_labs page 279

    Does It mean that it can't get my encoder?

    I check GPIO and QEP are configured correct.
    And my encoder ppr is 1024.

    #elif (USER_MOTOR == EC2248)
    #define USER_MOTOR_TYPE MOTOR_Type_Pm
    #define USER_MOTOR_NUM_POLE_PAIRS (1)
    #define USER_MOTOR_Rr (NULL)

    #define USER_MOTOR_Rs (0.49660033)//(0.49660033)
    #define USER_MOTOR_Ls_d (0.000830315277)//(8.65038164e-05)
    #define USER_MOTOR_Ls_q (0.000830315277)//(8.65038164e-05)
    #define USER_MOTOR_RATED_FLUX (0.0386525951)//(0.0351188257)

    #define USER_MOTOR_MAGNETIZING_CURRENT (NULL)
    #define USER_MOTOR_RES_EST_CURRENT (1.0)
    #define USER_MOTOR_IND_EST_CURRENT (-1.0)
    #define USER_MOTOR_MAX_CURRENT (6.0)
    #define USER_MOTOR_FLUX_EST_FREQ_Hz (20.0)
    #define USER_MOTOR_ENCODER_LINES (1024.0)
    #define USER_MOTOR_MAX_SPEED_KRPM (15.0)
    #define USER_SYSTEM_INERTIA (0.02)
    #define USER_SYSTEM_FRICTION (0.01)

    At first I thought it was because the motor parameters were incorrect and it was impossible to control. Now I am not sure where the problem is. Is the product DRV8323 not supporting instaSPIN-MOTION?

  • As mentioned above, please make sure that the motor wires and encoder lines are connected correctly, GPIO and QEP are configured accordingly as well. And set the right encoder lines in user.h if you can run lab05b.

    Or you might try to run the sensroless instaspin-motion lab first, like lab05c and then la05d.

    Is the product DRV8323 not supporting instaSPIN-MOTION?

    No, boostxl-drv8323 can be also used to instaspin-motion.

    You should run lab02b/lab02c to identify the motor parameters, and run lab05c or lab12a to identify the motor inertia for other instaspin-motion labs. Please have a look at the instaspin lab guide before you run the related labs.

  • Thanks your reply, I will try to test some instalSPIN-MOTION project.

    Or you might try to run the sensroless instaspin-motion lab first, like lab05c and then la05d.

    I have run lab05c and lab05d, but I'm not sure motor run correct. 

    I know lab05c mainly to get Inertia and Friction and lab05d is SpinTACTmspeed controller.

    In lab05c,I don't set Kp and Ki when lab05c the motor have loud noise, so I set the value that the motor run quiet and stability.
    When I set “gMotorVars.SpinTAC.VelIdRun” to 1, the motor run forward then reverse and then high spin.
    The “gMotorVars.SpinTAC.VelIdErrorID” is zero but I got Friction value is -0.014,and the motor run -19 krpm but my motor "USER_MOTOR_MAX_SPEED_KRPM" is 15 krpm.

    In lab5d, I set lab5c get Inertia and Friction and use SpinTACTmspeed controller. The motor run fast 2 second and stop 2 second. I know it is fail speed control but I set kp_Idq, ki_Idq, kp_Spd and ki_Spd the motor is not better at all.

    Is the control unstable because I adjusted the Kp and Ki parameters?

    And I run lab2a some times,because I want to get average parameters value. But some times when lab02a halfway through, the enable system value is 0 and the motor stop. Can you tell me what might be wrong with the system?

  • It seems like the motor was not identified properly. Please don't add any load on the motor for identification, and set the correct identification variables value in the file of user.h according to the specification of the motor, to make sure the motor spin smoothly during Flux measurement and Ls identification states. 

    #define USER_MOTOR_RES_EST_CURRENT     (1.0)                               // A - 10-30% of rated current of the motor

    #define USER_MOTOR_IND_EST_CURRENT     (-1.0)                             // A - 10-30% of rated current of the motor, just enough to enable rotation

    #define USER_MOTOR_MAX_CURRENT           (5.0)                               // A - 30~150% of rated current of the motor

    #define USER_MOTOR_FLUX_EST_FREQ_Hz     (20.0)                           // Hz - 10~30% rated frequency of the motor

    Please follow the lab guide to run the lab project from lab01 if you are using a new kit or board without supporting in motorWare.

  • I run lab02a identified fail, so all the project instaSPIN-FOC & instaSPIN-MOTION are not correct? Is the motor krpm high than MAX_SPEED_KRPM so it is fail?

    Umm, I don't add any load on my motor.
    I change user_j1.h to set correct value but I get similar value. 

    Maybe the some setting that I set fail?

    1. #define USER_IQ_FULL_SCALE_FREQ_Hz (800.0) // 800 Example with buffer for 8-pole 6 KRPM motor to be run to 10 KRPM with field weakening; Hz =(RPM * Poles) / 120
    It say value :Hz =(RPM * Poles) / 120. But my motor is 1-pole 12krpm so value is: 250
    But I set value 250, when I debuger and chage "enable system" value, it doesn't let me change.
    And I  follow pdf(InstaSPIN-FOCTm and InstaSPIN-MOTIONTm User's Guide) the page  205, this value must be larger than the maximum speed that you are expecting from the motor. So I set 800 Hz

    2.#define USER_PWM_FREQ_kHz                (10.0) //30.0 Example, 8.0 - 30.0 KHz typical; 45-80 KHz may be required for very low inductance, high speed motors
    Normal BLDC is set 8~30Hz. I see some E2E somebody test if value is too high, lab02a doesn't get value. So I set 10. And I test 30kHz, when was identified Ls_q,  Ls_d, the motor doesn't get value, and I want to stop motor set "gMotorVars.Flag_Run_Identify" to 0 ,but it does not control.
    My motor max_speed is 15 krpm, is it low inductance, high speed motors?

    And some setting motor parametric in user_j1.h. 
    In addition to file user_j1.h, what other files need to be edited?
    I only found the part about setting the motor parameters from the pdf.

    I run lab02a and the gMotorVars.Speed_krpm is 18krpm. It is larger than maximum speed(15krpm) so it is not identified properly?

    And when run lab02 (lab02a or lab02c) finaly identified, so is there any way I can prove that the identified value is correct?  Or can tell me when I run lab02 the motor speed normal range? I test some times the speed is large than max speed, or the "gMotorVars.Rs_Ohm" get 8e15, or hold motor can find so hot. I am not sure the range is correct, because the User error code show No error.

    I will test from the beginning to see other projects.

     5518.user_j1.h

  • The software package you downloaded from the link below that includes lab02b/lab02c do the motor identification successfully. You just need to set the identification parameters as mentioned above, and don't need to change other parameters.

    [FAQ] BOOSTXL-DRV8323RS and BOOSTXL-DRV8323RH InstaSPIN and MotorWare support

    https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/635499

  • I run the lab02c 9 times and compare the motor identification parameters.

    The data of Ls_d and Ls_q are not the same every time.
    I put 9 motor parameters into lab05c to run. If Ls_d and Ls_q value less than 0.0001, the "gMotorVars.Flag_enableSys" can't set value 1.
    The other can run stable.

      motor parameters  value gMotorVars.Speed_krpm
    State_RatedFlux
    lab05b
    gMotorVars.Flag_enableSys
    1 #define USER_MOTOR_Rs 1.28568017 1.2 KRPM FAIL
    #define USER_MOTOR_Ls_d 6.35E-05
    #define USER_MOTOR_Ls_q 6.35E-05
    #define USER_MOTOR_RATED_FLUX 0.059509806
    2 #define USER_MOTOR_Rs 1.27680027 1.2 KRPM FAIL
    #define USER_MOTOR_Ls_d 1.59E-05
    #define USER_MOTOR_Ls_q 1.59E-05
    #define USER_MOTOR_RATED_FLUX 0.059333995
    3 #define USER_MOTOR_Rs 1.24344027 1.2 KRPM TRUE
    #define USER_MOTOR_Ls_d 1.52E-04
    #define USER_MOTOR_Ls_q 1.52E-04
    #define USER_MOTOR_RATED_FLUX 0.059321258
    4 #define USER_MOTOR_Rs 1.26324022 1.2 KRPM TRUE
    #define USER_MOTOR_Ls_d 1.28E-04
    #define USER_MOTOR_Ls_q 1.28E-04
    #define USER_MOTOR_RATED_FLUX 0.059288468
    5 #define USER_MOTOR_Rs 1.29420006 14 KRPM FAIL
    #define USER_MOTOR_Ls_d 7.94E-06
    #define USER_MOTOR_Ls_q 7.94E-06
    #define USER_MOTOR_RATED_FLUX 0.056845453
    6 #define USER_MOTOR_Rs 1.22364032 1.2 KRPM FAIL
    #define USER_MOTOR_Ls_d 6.32E-05
    #define USER_MOTOR_Ls_q 6.32E-05
    #define USER_MOTOR_RATED_FLUX 0.05891826
    7 #define USER_MOTOR_Rs 1.24440026 14 KRPM FAIL
    #define USER_MOTOR_Ls_d 7.94E-06
    #define USER_MOTOR_Ls_q 7.94E-06
    #define USER_MOTOR_RATED_FLUX 0.056577422
    8 #define USER_MOTOR_Rs 1.25328016 1.2 KRPM TRUE
    #define USER_MOTOR_Ls_d 1.62E-04
    #define USER_MOTOR_Ls_q 1.62E-04
    #define USER_MOTOR_RATED_FLUX 0.059075512
    9 #define USER_MOTOR_Rs 1.23552024 1.2 KRPM FAIL
    #define USER_MOTOR_Ls_d 6.38E-06
    #define USER_MOTOR_Ls_q 6.38E-06
    #define USER_MOTOR_RATED_FLUX 0.058900259

    But when I run lab05c or lab12a have problem.

    1. In the user_j1.h
    #define USER_IQ_FULL_SCALE_FREQ_Hz (USER_MOTOR_NUM_POLE_PAIRS/0.008) // (4/0.008) = 500 Example with buffer for 8-pole 6 KRPM motor to be run to 6 KRPM; Hz = (RPM * Poles) / 120
    I calculated my USER_IQ_FULL_SCALE_FREQ_Hz is 125.
    But I set value, the "gMotorVars.Flag_enableSys" can't set value 1 when I run the project, so I set 800 Hz.

    2. When I run lab12a.
    SpeedRef_krpm value is 0, and I can't set it.

    3.When I run lab05c.
    I follow "InstaSPIN Projects and Labs User’s Guide.pdf", run and get 

    I follow set “gMotorVars.SpinTAC.VelIdGoalSpeed_krpm” equal to the rated speed (12.825 krpm) of my motor.
    And when the set VeldRun to 1, get the value like the picture. And it show speedrpm is 18 krpm. 

    I run lab05d, and set refRPM. But the motor can't speed control. The "gMotorVars.SpeedRef_krpm" is always 0.199 krpm, but I set refspeedrpm is 10 krpm.
    First I find the Kp_spd and Ki_spd is 0, but I set 1.5 and 0.1, the motor can't spin. Only "gMotorVars.SpeedTraj_krpm" are same as  "gMotorVars.SpeedRef_krpm". And I set some value change, the motor can spin but it only spin 18krpm and it doesn't control.

    I don't have no idea. Do I change the instaSPIN-Motion steps fail?
    I follow the [FAQ] BOOSTXL-DRV8323RS and BOOSTXL-DRV8323RH InstaSPIN and MotorWare support, and step by step page 6-7.

  • Is your motor a servo motor? It seems like the motor is a low inductance motor, do you need to run this motor for position control? or just speed control. I don't think it's better to use instaspin-motion.

    BTW, as mentioned above, you should tune the following parameters to identify the motor without load. Generally, the identification process should be done successfully every times.

    #define USER_MOTOR_RES_EST_CURRENT     (1.0)                               // A - 10-30% of rated current of the motor

    #define USER_MOTOR_IND_EST_CURRENT     (-1.0)                             // A - 10-30% of rated current of the motor, just enough to enable rotation

    #define USER_MOTOR_MAX_CURRENT           (5.0)                               // A - 30~150% of rated current of the motor

    #define USER_MOTOR_FLUX_EST_FREQ_Hz     (20.0)                           // Hz - 10~30% rated frequency of the motor

  • My motor is BLDC. I mainly control the speed and reach a specific position to stop, so position feedback is needed. I know the instaSPIN-FOC is stable, but I have to get precise postion, I have to use quadrature encoder.

    I don't think it's better to use instaspin-motion.

    Is it because my motor is a low-inductance motor? According to the motor parameters provided to me by the manufacturer, the inductance value is 0.192 mH. I don’t know if the inductance value is a low inductance motor. Is the control of a low-inductance motor easy to be unstable?

    BTW, as mentioned above, you should tune the following parameters to identify the motor without load. Generally, the identification process should be done successfully every times.

    I try this method again, and I get same value. So I try other motor run lab02c, lab05b, lab05c and lab05d. The result is successful. When I run lab05b, I don't have to edit  Kp_spd and Ki_spd the motor spin stable. I know that KpKi will be affected by the motor settings, so maybe in lab05b can check my motor identification process successfully or fail. 

    The motor specifications are shown in the table. The parameters measured by Lab02C will be lower than the parameters on the table. Therefore, it may be that the inductance is too low and cannot be identified. Or the POLE_PAIRS is 1, so control unstable.

    A B
    USER_MOTOR_NUM_POLE_PAIRS 1 4
    Rate point Current  1.83 A 5.9A
    Rate point Speed 12825 RPM 2500 RPM
    Resistance 2.07 ohm 0.415 ohm
    L 0.192 mH 1.24 mH
    No load current 0.17 A 0.8A

    I currently use FOC to control it very stable. If instaSPIN-Motion fails, I will use FOC+encoder to control my motor.
    Now compare lab05c and lab12b, edit the former and add QEP to get RPM. However, obtaining QEPkrpm from the data requires inertia and friction. I will try to understand if I can skip these two parameters to get the encoder position and speed.

  • The Instaspin-Motion must have these two parameters for setting spinTAC controller. As mentioned above, you didn't identify the motor electrical parameters (Rs, Ls, and Flux) successfully with lab02c. Both Instaspin-foc and instaspin-motion need a precise motor parameters.

    You might try to use the sensored-foc for position control since the motor has encoder. There are some example about sensored-FOC in both controlSUITE and motorControlSDK.