Controlling a BLDC with an encoder

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
user_2884081
Level 4
Level 4
50 replies posted 25 replies posted 10 replies posted

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?

Thanks

0 Likes
1 Solution

Sensorless FOC Motor control project source code is not released to public. So it will be hard to modify the project. You can refer the AN: http://www.cypress.com/file/157806/download

if it will help with your development.

Thanks

Jobin GT

View solution in original post

0 Likes
3 Replies
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

andresgalu,

Take a look on this video

Very simple way to drive BLDC only with encoder and MCU!!!!!! - YouTube

/odissey1

0 Likes

Thanks, but I am trying to use the same code of the example "Sensorless FOC Motor Control" to have the same control loops and the SVPWM calculations implemented in an efficient way.

Is there a way to modify this code to implement an encoder?

Sensorless FOC Motor control project source code is not released to public. So it will be hard to modify the project. You can refer the AN: http://www.cypress.com/file/157806/download

if it will help with your development.

Thanks

Jobin GT

0 Likes