Cant't find a single wrong bit here. That is exactly the right way to measure the phase reference between rotor and encoder. What does the motor do when you start the adjustment? It should forcedly snap into a certain rotor position.
Apparently nothing.
I was hoping the current of my power supply would increase. But that does not happen.
- the encoder angular resolution matches the reality, in your case 512 (I see that the encoder chip is programmable)
I already received the motor with the encoder mounted. Initially I thought it was 1024 pulses per mec/rev (this is the default value).
However, I activated the oscilloscope pulse count and it counts ~ 512 pulses per 1 mec/rev (without the reduction box, of corse).
- the motor pole pair count is correct. If you are unsure about that, you can use a lab supply and push some current through two phases, and turn the motor by hand by exactly one mechanical revolution. The number of 'snaps' is the number of pole pairs.
If one or the other is wrong, the motor will lock into a certain angle and become a heater.
I think the motor has 3 pairs of poles, but the seller says it has 4 poles, 2 pairs.
Tomorrow I will do this test to verify. Thank you!
Checked the file and have a few questions.
Luckily for me
.
- you have enabled motor temperature sensing, are you sure that this is not triggering? Maybe temporarily disable it, maybe also disable bus voltage monitoring and over-current protection to be on the safe side
The temperature is measured next to the motor driver.
It rarely rises above 40 ° C (my tests are very short).
But I can deactivate all these safety features momentarily.
- I saw the nucleo power board can be configured to one-shunt and 3-shunt, is that set to 3-shunt?
It is indeed.
All headers are in the correct position for FOC and 3 shunt measurement.
- 15kHz current loop update rate is quite high, don't know if the CPU can handle that. Maybe try :4 ratio from PWM instead of :2
I'll try this and also lower the PWM frequency to 25KHz.
With a ratio of :4, the loop current control is done at 6.25KHz.
- you have enabled current feed forward ("Additional Features and PFC settings"). Possible instability if motor parameters are not perfect, suggest to disable that temporarily
I enabled this feature for testing.
Since I was having poor results, I activated this function to see if the system would react differently.
I do not understand, if everything is set up to work with the encoder (and this sensor is the only feedback), why can I remove the wires and it will continue to work fine.
The encoder reading is certainly not being activated.