Hello, I am using the MA730 encoder (I checked that it reads ok with the MPS SPI demo, also read the angle with the simpleFOC library and it seems to read the correct angle, no noises or oscillations)
I also use the MP6540H driver from MPS, it is very simple and looks like the L6234. 6 inputs (PWM and ENA) and that’s basically it.
I use the angle_control example. The motor moves smoothly at the beginning of the program, indicating a good encoder and setup.
this is log from the start of it:
MOT: Monitor enabled!
MOT: Enable driver.
MOT: Align sensor.
MOT: PP check: fail - estimated pp:10.5160
MOT: Zero elec. angle: 3.10
MOT: No current sense.
Set the target angle using serial terminal:
the thing is, this motor has 2 poles. but the PP check always fails and gives 10.5-11 pole pairs reading. If I set it to 11 in the code, the motor PP check reports as “good” but the motor can’t maintain position and I can revolve it with my hand if I exert some force.
With the “1” setting, the motor shaft seems to maintain the position with no noises or vibrations.
However, when I try to move it to a certain angle, it only moves if the previous one’s offset is larger enough. For example, I move it to “6” and then to “0” - it moves 90 degrees and stops. but lower values than 6 will not work - the motor will not move. setting any value other than “6” moves the motor to the same position as “6” did. Very strange. it doesn’t matter what value I put in, “0” moves it to place A, other value higher then “6” moves it to position “B”, same place every time.
I measured the phase currents, they are low. The motor and the the driver are not getting hot.
The control loop keeps the shaft’s position all the time.
I tried to play with the PID gains but all I got are oscillations.
What can be the problem?