Which fixes fail against backlash oscillation on a servo-driven 5-DOF arm?
A 5-DOF arm built from 3D printed links and geared servos hunts around its target because gear backlash sits between the angle the servo reports and the angle the joint actually has. Four fixes get tried first, and each fails for a specific reason.
- Raise the position gain. Higher gain shrinks the error that triggers a correction, but the correction still has to traverse the dead zone before the joint moves. The controller overshoots on the far side of the gap and reverses. Hunting gets faster and larger, not smaller.
- Tighten the bearing fit to remove slop. Printed bearing seats rotate slightly eccentric. A snug fit makes the joint lock up at some angles, which adds a torque disturbance and does nothing about gear backlash.
- Re-derive the D-H frames or refine the IK. Kinematic error and backlash error are different failure modes. A correct model still commands the right angle to a joint that cannot hold it.
- Judge the gears by hand feel. A servo gearbox feels solid when turned by hand. At a lever arm of 100 mm or more, the same angular slop becomes millimetres at the tip, and the slop from each joint adds up.
Why does the arm oscillate instead of settling?
The built-in servo encoder measures the motor side of the gear train. The servo closes its loop on that angle, so it can report zero error while the output joint sits anywhere inside the backlash band. Gravity and load torque push the joint to one side of the gap, and motion reversals push it across.
When the target sits near the edge of that band, the loop sees an error, drives the motor across the gap, and the output joint jumps the other way. The controller then overcompensates in the opposite direction. This is a limit cycle caused by a deadband (a nonlinearity) inside the loop, and no linear gain setting removes it.
Tip error follows error = L x theta, with theta in radians. As an illustration, 1 degree of slop at a 100 mm lever gives 100 x 0.01745 = 1.75 mm. A tip uncertainty of roughly +/-5 mm (an estimate, not a measurement) corresponds to about 2.9 degrees if a single joint at 100 mm accounted for all of it. In a real arm each joint contributes its own slop multiplied by its distance to the tip, so the errors compound outward from the base.
How do you measure the backlash before touching any setting?
Quantify the slop per joint and trend the signals first. Retuning without numbers only moves the oscillation around.
- Hold the arm at a representative pose with power applied to the joint under test and its neighbours locked.
- Mount a dial indicator or fixed reference at a known radius from the joint axis, ideally 100 mm or more.
- Apply light torque one way, zero the indicator, then reverse. Record total travel and convert with
theta = travel / radius. - Repeat at two or more poses. Gravity preload changes which side of the gap the joint rests on, so the apparent slop varies with pose.
- Log the commanded angle from the PC and the servo-reported angle during a hold at target. If the reported angle is steady while the tip visibly moves, the oscillation is inside the backlash band and the motor-side encoder cannot see it. If the reported angle itself oscillates, the servo loop is hunting and gain or deadband is the first lever.
- Rotate each joint through full travel by hand with the servo unpowered. A tight spot or lockup points at the printed bearing seat and eccentricity, not at gears.
What does each signal in the chain tell you when it is wrong?
Follow the signal from the IK output on the PC to the tip. The table lists what each stage carries and how a wrong value shows up.
| Signal | Source | Wrong-value symptom |
|---|---|---|
| Commanded joint angle | IK solution computed on the Ubuntu PC | Tip lands at a repeatable offset from target in every approach direction: frame assignment or link-length error, not backlash |
| Frame parameters (D-H table) | Model of the arm | Forward kinematics at a known pose does not match the physical pose; joints move correctly but the tip is wrong |
| Servo-reported position | Built-in servo encoder (motor side) | Reads on target while the tip still moves; error changes with approach direction |
| Joint-side position | External encoder on the joint output (not yet fitted) | Absent: the controller cannot see backlash. Potentiometer-type sensing drifts and gives positioning error |
| Joint free rotation | Printed bearing seat and fit | Lockup at certain angles, torque spikes, jerky starts |
| Setpoint stream | Binary protocol over the PC socket server | Mis-scaled or mis-ordered fields give a joint moving to the wrong angle or full-scale; irregular update timing gives stepped motion |
Separate wiring and protocol faults from tuning: a joint that goes to a wrong but repeatable angle points at scaling or field order in the frame, while a joint that reaches the right angle and then hunts points at backlash or loop settings.
How do you stop the hunting without changing the gearbox?
These steps reduce the effect without replacing hardware. Apply them in order and re-measure after each.
- Add a position deadband on the PC side. Stop issuing corrections when the error is inside the measured backlash band. Size it from the dial-indicator numbers, not by guess.
- Approach every target from one direction. Drive slightly past and return, or always finish the last few degrees in the same rotation sense, so the gear teeth stay loaded on the same flank. Repeatability improves even though absolute slop is unchanged.
- Slow the final approach. Limit velocity near target so the motor does not overrun the gap and trigger the reversal.
- Reduce loop gain if the reported angle itself oscillates. Lower it only after the measurement step shows the servo loop is hunting.
- Fit joint-side encoders and close the outer loop on them. Quality rotary encoders on the joint output measure the position after the backlash. Correct the setpoint from that reading while the servo's internal encoder keeps the fast inner loop. Avoid cheap potentiometers for this role because drift becomes positioning error.
- Fix the printed bearing seat. Rework the seat so the bearing turns freely through full travel, with a fit that holds it without pinching. Eccentric rotation from a printed bore is a manufacturing tolerance issue and needs a dimensional change or a machined seat.
Mechanical backlash remains the limit on accuracy. Software steps reduce hunting and improve repeatability, but only a joint-side sensor or lower-backlash gearing improves true positional accuracy.
Why is pure position control not enough for smooth motion?
Commanding every joint to its final angle at once makes each joint move a different amount. If all joints run at the same speed, the smallest move finishes first and the largest finishes last, so the tip leaves the intended path and the motion looks jerky. Smooth motion needs the joints coordinated in time.
- Compute the angle change for each joint and pick a common move duration, typically set by the joint with the largest change and its speed limit.
- Scale each joint's velocity so all joints arrive together, then stream intermediate setpoints at a fixed rate.
- For a straight tip path, interpolate in Cartesian space and run the IK at every step instead of interpolating joint angles.
Decoupling simplifies that IK. The first three joints set the position of the wrist, and the wrist joints set orientation, so the analytic solution splits into two smaller problems. For the frame assignment, D-H conventions differ between references and some explanations are ambiguous. Pick one convention, write the table, and verify it by running forward kinematics at poses you can set physically, such as all joints at zero and one joint at 90 degrees. Do not trust a frame table that has not matched the real arm at those poses.
How do you confirm the arm now holds position and moves smoothly?
- Hold test. Command a target and log the servo-reported angle and, if fitted, the joint-side angle for a fixed hold period. Both traces stay flat with no periodic reversal.
- Repeatability test. Send the same target repeatedly from both directions and record tip position with a dial indicator or fixed reference. Compare the spread against the +/-5 mm estimate, which was never measured, and set a real baseline.
- Directional bias. Compare mean landing points for the two approach directions. A large gap confirms residual backlash, and unidirectional approach should shrink it.
- Full-travel test. Move each joint end to end and watch the current or reported error for spikes. Spikes at repeatable angles indicate the bearing seat.
- Coordinated move test. Run a multi-joint move and check that all joints finish together and the tip follows the intended path without stepping.
- Kinematics check. Command the FK-verified poses and confirm the tip lands where the model predicts.
FAQ
How do I tell backlash oscillation from a tuning problem?
Log the servo-reported angle during a hold. If it stays steady while the tip moves, the slop is downstream of the motor encoder and no gain change will fix it. If the reported angle itself cycles, reduce the position gain and add a deadband.
How do I measure backlash at the tip of a 100 mm lever arm?
Lock the other joints, place a dial indicator at a known radius, apply light torque each way, and record total travel. Convert with theta = travel / radius in radians, and repeat at several poses because gravity preload changes the result.
How do I get smooth multi-joint motion from a 5-DOF arm?
Compute each joint's angle change, choose one move duration, and scale joint velocities so all joints arrive together. Stream setpoints at a fixed rate, and use Cartesian interpolation with IK at each step if the tip path must be straight.
When should I stop tuning and contact the servo manufacturer's support?
Stop when the measured backlash is larger than what the mechanical fit can tolerate and the reported angle is steady, because that slop is in the gearbox and settings cannot remove it. Contact the servo manufacturer's official support channel with the datasheet model, your measured backlash per joint, and the hold and repeatability logs to ask about a lower-backlash gear set or an output-shaft sensing option.