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.

instaspin Lab12 problem

Hello

I have some problem with Lab12. The motor connected and encoder too (A,B), but the motor don't spin.

I verified the motor phase lines are correcte, The USER_MOTOR_ENCODER_LINES=2048ppr, also i verified the motor encoder lines connections are correcte

before this lab12 i do lab5c as mentioned.

I have encoder output (A and B outputs) figure when the motor spin. There are some noise. is this noise can have effect?

.

  • Hanane,

    Noise on the encoder will cause some issues, but this isn't enough noise that I would expect it to cause issues.

    We also need to verify that the encoder is going in the correct direction.  After you load Lab 12, do NOT set "gMotorVars.Flag_enableSys" & "gMotorVars.Flag_Run_Identify".  Add "st_obj.vel.conv.Pos_mrev" (Q24 variable) into the watch window.  This variable will tell us what the encoder is reading.  Manually rotate the motor in the direction that it spun in Lab 05c (usually anti-clockwise).  You should see the value in "st_obj.vel.conv.Pos_mrev" increase.  And after 1 manual rotation the value should be 1.0.  

    If that value decreases as you manually rotate the motor, you should switch A & B.

  • Adam, Thank you for your help

    I switch phase lines U and W, and the motor spin but chopped

    When i put Speed reference=0 rpm or any other speed reference, the motor continue to spin chopped with the same speed (low shopped speed)

    The motor caracteristics:

    #define USER_MOTOR_TYPE                 MOTOR_Type_Pm
    #define USER_MOTOR_NUM_POLE_PAIRS       (3)
    #define USER_MOTOR_Rr                   (NULL)
    #define USER_MOTOR_Rs                   (1.547971)
    #define USER_MOTOR_Ls_d                 (0.0016004646)
    #define USER_MOTOR_Ls_q                 (0.0016004646)
    #define USER_MOTOR_RATED_FLUX           (0.1670106)
    #define USER_MOTOR_MAGNETIZING_CURRENT  (NULL)
    #define USER_MOTOR_RES_EST_CURRENT      (2)
    #define USER_MOTOR_IND_EST_CURRENT      (-1)
    #define USER_MOTOR_MAX_CURRENT          (3)
    #define USER_MOTOR_FLUX_EST_FREQ_Hz     (20.0)
    #define USER_MOTOR_ENCODER_LINES        (2048.0)
    #define USER_MOTOR_MAX_SPEED_KRPM       (6.0)
    #define USER_SYSTEM_INERTIA             (0.5107931495)
    #define USER_SYSTEM_FRICTION            (1.101282179)

  • Hanane,

    What do you mean by chopped?  Is the motor very steppy in its movements?

    What is the bandwidth that you are using when you run this lab?  

  • hI,


    The motor spins aggressive, even if I change the reference speed, the engine tune in the same way (aggressive)

    the bandwidth=1

    I tried to change the bandwidth but i have the same things

  • Hanane,

    We can check if the encoder noise is causing issues.  

    1. Add "st_obj.vel.ctl.RES" into the watch window, this will place the speed controller into reset

    2. Add "st_obj.vel.conv.Por_erev" (this is Q24) into the watch window, this is the electrical angle reading from the encoder.

    3. Set "gMotorVars.Flag_enableSys" & "gMotorVars.Flag_Run_Identify" to 1.

    4. Set "st_obj.vel.ctl.RES" to 1, this will place the velocity controller into reset and our Iq reference will be 0.

    5. Watch the value in "st_obj.vel.conv.Pos_erev" unless you manually move the motor this value should not be changing.  If this value is changing than the noise on the encoder is causing issues.

  • Hello,


    I put a filter in the encoder, it works well without connecting with Instaspin. When I connect A and B and GND to Instaspin, there a lot of noise

  • Hanane,

    That is not surprising.  You are most likely going to see noise on the encoder signals when the PWM is running.  Fi the PWM is not running I would not expect you to see noise.  You could also try shielding the encoder cable and grounding the motor case.  Both of these should help with the noise issue.

  • Dear Adam,

    I have a question that whether I can use Encoder/QEP in the F28054F (not F28069F/M) or not? How to use it to get motor speed from enc/qep modules?

    Thanks in advance,

    Mr. Tran
  • Hi Tran Binh Duong,

    Please create a new post so that it has a better chance of getting answered. It is less likely that your question will get answered if it is posted on an older post.

    Thanks,
    Ozino
  • Hi Ozino Odharo,

    Thank you for your advice. I have already posted my question on a new topic at e2e.ti.com/.../501438 , but I have not received any reply! :(

    If you have ever used ENC/QEP with F28054F to get motor speed, please share your experience!
  • Hi Tran Binh Duong,

    Unfortunately, I do not have any experience using ENC/QEP. However, I have assigned this to someone who has more experience in this area. They should be in contact with you soon.

    Regards,
    Ozino
  • Thanks Ozino for your willingness!