Skip to main content
Associate II
July 16, 2023
Solved

Motor only moving when quadrature encoder is rotated

  • July 16, 2023
  • 4 replies
  • 5128 views

I am trying to move a BLDC motor with encoder feedback in closed loop. When passing a speed/torque reference nothing happens. But when I move/rotate the encoder, the motor starts spinning according to the speed of the encoder rotating. The motor is otherwise just locked in its place. I've clicked through several settings, read through many posts, the only "clue" I found was one poster saying that they had to check "Reverse counting direction" under the speed sensing settings. Well, that doesn't do much other than changing the direction the motor spins whenever the encoder is being rotated. I am probably missing something but how could I solve this issue?

For the record: The motor moves without any issues in sensorless mode.

My setup is as follows: stm32g431rb with an IHM16M1, a BLDC motor, an AMT103V quadrature encoder. Also using Motor Control Workbench 5.4.8 (I already tried 6.1.2, motor profiler is worse or rather non functional most of the time and when it works, the results are the same)

    This topic has been closed for replies.
    Best answer by Gael A

    Hello UmutU,

    Thank you for the picture and the video, I think I have a better understanding of your issue. Are you using the MotorPilot to control your motor ? Does it give back any error ?

    I really recommend the use of MCSDK 6.1.2. Even if the MotorProfiler is less stable, the generated firmware by Workbench is much more efficient and the MotorPilot provides interesting features that could be useful in your case, such as the possibility to see the currents going to your motor.

    In the meantime, the way I see it maybe the counter torque applied by the encoder is too high. As the frame of your encoder is loose, and not fixed to your motor, the system struggles.
    Have you tried holding the frame of the encoder when starting the motor ? Ideally the frame of the motor and the encoder should be considered the same (they are both not moving).

    Try taking a look at your currents when starting the motor, to see if your motor is receiving current or if the issue comes from the firmware.

    Hope this will help,
    Gaël A.

    4 replies

    Gael A
    ST Employee
    July 18, 2023

    Hello UmutU,

    Since your motor runs in sensorless, maybe your motor phases are not plugged in the right order. Please check that each phases of your motor is correctly plugged to the corresponding phase of the IHM16 power board. Indeed, it doesn't matter for sensorless mode, but it does for Encoder.

    Hope this will help,
    Gaël A.

    If you agree with my answer, please consider accepting it by clicking on 'Accept as solution'.Hope this will help,Gaël A.
    UmutUAuthor
    Associate II
    July 21, 2023

    Well, swapped the cables as much as I could and the result is the same. The motor only moves if I manually rotate the encoder by putting my finger inside the hollow shaft (sorry for this sentence). I might have worded my initial post a bit too long. The motor does not move until the encoder is being moved.

    Gael A
    ST Employee
    July 24, 2023

    Hello UmutU,

    I don't really get what you are saying. Is your encoder fixed to your motor shaft or is it on the side ?
    Otherwise, may I ask you to send a picture of your setup so I can get a better idea on what you are working on please ?

    Regards,
    Gaël A.

    If you agree with my answer, please consider accepting it by clicking on 'Accept as solution'.Hope this will help,Gaël A.
    UmutUAuthor
    Associate II
    August 6, 2023

    @Gael A I honestly still struggle with this. Do you have any other ideas or maybe updates?

    Gael A
    ST Employee
    August 8, 2023

    Hello UmutU,

    Did you specify the encoder specifications in your motor file after profiling it ? You can easily check it via WB by clicking on "Create a clone of this motor" while selecting the motor in WorkBench. Make sure your "Pulses per mechanical revolution" is the corresponding value.

    Hope this will help,
    Gaël A.

    If you agree with my answer, please consider accepting it by clicking on 'Accept as solution'.Hope this will help,Gaël A.
    UmutUAuthor
    Associate II
    September 2, 2023

    @Gael A Hey,

    Sorry for not answering for a while. I decided to buy some filament and dust off my extreme budget 3d printer and created a new setup with a new axis and better mounting for the encoder. It's not perfect BUT this seems to fix the issue (kind off). I guess just holding the encoder on top of the motor isn't precise enough for a first test with it. Sorry for wasting your time...

    Gael A
    ST Employee
    September 4, 2023

    Hello UmutU,

    I am glad you finally found a way to solve your issue ! No worries about the delay.

    As said in my signature, please consider acknowledging the solution I gave to you (the one from 25/07 I guess) by clicking on "Accept as solution" if it helped you tackle your issue.

    If you agree with my answer, please consider accepting it by clicking on 'Accept as solution'.Hope this will help,Gaël A.