You’ve programmed the robot to drive forward 50 centimeters. You run it. It goes 50 centimeters. You cheer.
Then you run it again. It goes 48 centimeters. Then 52. Then 47. Then somehow it veers slightly left and clips the loading dock and you lose 20 points and your coach makes that face.
If this sounds familiar, you don’t need a faster robot or a fancier attachment. You need a PID controller.

What Is a PID Controller, Really?
PID stands for Proportional, Integral, Derivative — three fancy words for a pretty simple idea:
“How far off am I, how long have I been off, and how fast am I getting back on track?”
That’s it. A PID controller is just your robot constantly asking itself those three questions and adjusting its motors in real time. Instead of telling your robot “drive forward at 50% power for 2 seconds and hope for the best,” you tell it “drive forward in a straight line, and if you start drifting, fix it.”
The difference between those two approaches is the difference between losing that mission every other round and nailing it every time.

The Three Letters, Explained Like You’re 12 (Because You Might Be)
Imagine you’re riding a bike down a straight path, and you want to stay exactly in the middle.
P — Proportional: “How far off am I right now?”
If you’re a tiny bit to the left, you steer a tiny bit right. If you’re WAY to the left, you steer hard right. The bigger the error, the bigger the correction. This is the main thing doing the work.
But P alone has a problem: it can overshoot. You correct too hard, fly past the middle, then correct back, then fly past again — wiggling all the way down the path like you just learned to ride.
D — Derivative: “How fast am I getting back on track?”
If P is over-correcting and you’re zooming back toward the center too fast, D says “whoa, ease up — you’re about to overshoot.” It dampens the wiggle. D is what makes the difference between a robot that snakes down the field and a robot that glides.
I — Integral: “How long have I been off?”
If there’s a tiny, persistent error that P keeps ignoring (like a wheel that’s slightly underinflated, or a motor that’s a hair weaker than the other), I notices the error is adding up over time and slowly pushes harder until it’s fixed.
Most FLL teams don’t actually need I. A well-tuned PD controller handles 95% of what you’ll do on the field.
Where PID Actually Shows Up on Your Robot
Three places, mainly:
1. Driving straight. Your gyro sensor tells you which direction you’re facing. PID uses that to constantly nudge your motors so you stay pointed forward. No more clipping the loading dock.
2. Turning to an exact angle. Instead of “turn for 0.5 seconds and hope it’s 90 degrees,” you tell the robot “turn until the gyro reads 90,” and PID slows down smoothly as you approach the target. No more 87-degree turns that ruin the next move.
3. Line following. Your color sensor reads how dark the surface is. PID uses the distance from the edge of a black line as the error, and your robot hugs the line smoothly instead of zigzagging.
How To Tune It Without Losing Your Mind
Here’s the dirty secret nobody tells you: the math is easy, the tuning is the hard part. You don’t calculate your PID constants — you experiment until they work.
A method that actually works for FLL:
- Set I and D to 0. Only use P.
- Start with a small P value (like 1 or 2). Run the robot.
- If it doesn’t correct fast enough, double P.
- If it wiggles back and forth like a fish, your P is too high — cut it down.
- Once P is “almost right but a little wiggly,” add a small D (start around 5–10x smaller than P). D smooths out the wiggle.
- If you still have a tiny consistent error that won’t go away, add a very small I.
Write down every value you try. Seriously. You will forget which one worked.
Why Judges Care
If you mention PID in your Robot Design judging session and you can actually explain how you tuned it, judges’ eyebrows go up. It tells them your team isn’t just running pre-built code — you understand control theory, which is the same thing engineers at NASA, Boston Dynamics, and your local HVAC company use every day.
Bonus points if you can show the values you tried and explain why you settled on the ones you did. That’s the engineering process they want to see.
The Bottom Line
A robot without PID is a robot that hopes. A robot with PID is a robot that knows.
You don’t need to understand the calculus behind it (there is calculus, and it’s fine, and you can ignore it for now). You just need to understand the three questions — how far off, how long off, how fast back — and start experimenting.
Your missing 20 points are waiting.

