Here are 6 key tips for servo motor tuning:
01 Initialization Parameters
Initialize the parameters before wiring.
On the control card: Select the control mode; clear the PID parameters; ensure the enable signal is off by default when the control card is powered on; save this state to ensure that the control card is in this state when it is powered on again.
For servo motors: Set the control mode; enable external control; set the gear ratio of the encoder signal output; set the ratio between the control signal and the motor speed. Generally, it is recommended that the maximum design speed of the servo motor correspond to a control voltage of 9V.
02 wiring
Power off the control card and connect the signal lines between the control card and the servo motor. The following lines are mandatory: the analog output line of the control card, the enable signal line, and the encoder signal line output by the servo motor. After verifying that the wiring is correct, power on the servo motor and the control card (and PC). The motor should not move at this point and can be easily rotated with external force. If not, check the enable signal settings and wiring. Rotate the motor with external force to check if the control card can correctly detect changes in motor position; otherwise, check the encoder signal wiring and settings.
03 Trial Direction
In a closed-loop control system, if the feedback signal is in the wrong direction, the consequences will be disastrous. The servo's enable signal is activated via the control card. This allows the servo to rotate at a low speed, which is the legendary "zero drift."
Most control cards have instructions or parameters for suppressing zero drift. Use these instructions or parameters to see if the motor's speed and direction can be controlled by them.
If the problem cannot be controlled, check the analog signal wiring and control mode parameter settings. Confirm that when a positive number is input, the motor rotates forward and the encoder count increases; when a negative number is input, the motor rotates in reverse and the encoder count decreases.
If the motor is under load and has limited travel, do not use this method. Do not apply excessive voltage during testing; below 1V is recommended. If the directions are inconsistent, modify the parameters on the control card or motor to make them consistent.
04 Suppress zero drift
In closed-loop control, zero drift can negatively impact control performance, and it's best to suppress it. Carefully adjust the zero drift suppression parameters on the control card or servo motor to bring the motor speed close to zero. Since zero drift itself has a degree of randomness, it's not necessary to require the motor speed to be absolutely zero.
05. Establish closed-loop control
Re-enable the servo enable signal via the control card. Input a small proportional gain on the control card; what constitutes "small" is subjective and can be determined by feel. If unsure, input the minimum value allowed by the control card. Enable the control card and the servo again. At this point, the motor should be able to roughly perform movements according to motion commands.
06 Adjust closed-loop parameters
Fine-tuning the control parameters to ensure the motor moves according to the control card's instructions is a necessary task, and this part relies heavily on experience, so we'll skip the details here.