Line follower PID tuning, lessons from a season

Show off what you have built. Photos, videos, build logs, and parts lists.
Post Reply
jm_robotics
Posts: 11
Joined: Tue May 05, 2026 10:51 am

Comp ended. Bot finished 3rd. Sharing what worked on PID after months of bench testing.

Starting point: Kp=20, Kd=0, Ki=0. Bot oscillates, can't track curves.

Final values that worked: Kp=14, Kd=380, Ki=0.05. Wheel diameter 40mm, track speed 1.2m/s.

Key insights:
  • Kd is your friend on tight curves. Without it, bot overshoots and never settles.
  • Ki small but non-zero saves you on long straights with sensor bias.
  • Always anti-windup the integral. Mine clamped at +/-50.
  • Sample at ~200Hz minimum. Slower and PID fights itself.
Sensor: 8x QTR-8RC array, weighted average position.

Anyone tried PIDF (F=feed-forward)? Heard it helps on speed transitions but never implemented.
Post Reply