3 Replies Latest reply on Sep 16, 2018 11:21 PM by JobinT_31

    Controlling a BLDC with an encoder


      I am working with Kit-037 right now. The example project "Sensorless FOC Motor Control" works correctly.


      Now I want to modify it so the position is obtained by an encoder.

      If I'm right, the position and speed are now calculated by this function: MotorPll_PostionEstimate(), which I think uses the structure Motor_stcPll as an output.

      I already have a quadrature decoder running so I know the angle at any given time.


      I have 2 questions:

      1. If I stop using MotorPll_PostionEstimate(), what variables should I update with my calculated angle and speed? The structure Motor_stcPll has a lot of variables, which one should I modify?
      2. I have seen that another board has a similar code to control a BLDC using an encoder, but the code I'm interested in is in a .a file. Is there a way for me to see that code so I know what variables should I modify?