2019-05-16 04:33 PM
I have the ST FOC motor control kit (Nucleo F302R8 , X-Nucleo- IMH07M1. I have been successful using FOC with sensorless feedback. I have installed and wired an absolute encoder and configured the number of pulses in the workbench. What I cannot find are instructions for aligning the encoder. I see the GUI in the motor control workbench has a button for "align encoder" but it is not clear to me how the offset is properly set. I have clicked align (small movement) and then start motor but I get no rotation, just high current draw and a locked rotor.
Any help would be appreciated. Thanks!
2019-05-22 07:11 AM
Hello,
the ST Motor control kit supports for now only the incremental encoder.
Could you describe the encoder you use. How many pluses and how many wires does your encoder have ?
Regards
Cedric
2019-05-22 11:02 AM
Hi Cedric!
Thanks for the response. I'm using a quadrature single-ended encoder (ABZ pulses) with 2048 ppr. I actually have made process with the running bull motor included in the kit and I am actually able to use sensorless and encoder based feedback (in separate builds) with this motor. However, when i moved the encoder over to a different larger motor I am having issues such that when I click "align encoder" the rotor moves, but when I click "start motor" the shaft is locked and a the unit draws quite a bit of current (2A) but no fault occurs. To be clear with the new motor I have run the motor profiler and I am able to drive this larger motor in sensorless PLL+observer mode without any issue, it's just that when I configure the system for encoder based feedback I cannot get it to spin. I know the encoder works (validated with o-scope) and i'm confident in my settings for PPR and selecting the correct motor model in the workbench.
So I suppose my questions are:
1.Am I correct to assume the only thing that is needed to align the encoder to 90degrees is to set this alignment value in motor control work bench, build the project and then from the monitor click "align encoder" (shaft moves) then "start motor" and the motor should spin? Right now it just locks up.
2.Since the motor is not spinning but locked and drawing current I have tried reversing the counts (from workbench) and re-building, also tried different sequence wiring on the motor. The rotor is still locked, do you have any suggested next steps? This would be greatly appreciated. Thank you! Dan
2019-05-23 12:52 AM
Hello Daniel,
From my experience, your issue could be the connection order of your different motor phases. When using encoder or Hall sensors, you need to respect the U,V,W phases from the motor.
From now, the library does not make use of Z, it means that the angle will not be absolute but relative to the position of the shaft at T0.
Let me know if it works.
Cedric
2019-05-27 11:15 PM
Hi,Cedric.
I have the same problem with Daniel. I checked the PWM pins defined in "main.h" and the actual connection on my custom board, they are all correct.
Anyway, I switched the "U" and "W" on the motor side, and the motor do working. I ramp the speed to max forward and backward, it looked all fine.
But when I set the speed to 0 without the "Stop motor" instruction, the switch chip was breakdown about 10 Seconds later.
2020-05-17 06:44 AM
Hello Daniel,
Do you have any update on that, I have the same issue as you now
2020-05-17 09:09 AM
Unfortunately I don't. When I learned the library wasn't using the Z pulse this actually changed what I wanted to accomplish. It also explained why the motor moves each time it is re-started, it seems to re-align itself with a given pole and then start counting A&B pulses as a reference point for the rotor position. I did get it work in sensor mode eventually but it is really inconsistent. I was getting speed errors and I have to think that it is due to noise or false edges on the AB signals but I didn't take it any further as I just went sensorless. I would love to know if anyone learns any tips/tricks for this with the library working in sensored mode.
2020-05-18 02:57 AM
I tried today again and it worked.
THis may help you:
Start up waveform
align waveform
2020-05-18 04:48 AM
awesome thanks for the reply and post!
2020-05-18 04:59 AM
you are welcome!
My motor with encoder control is much better than hall or sensorless now