An explanation video of what PID control is, why it is needed, and how the various parameters affect the aggressiveness of the reaction.

In short, PID stands for Proportional, Integral, and Derivative. Each part of the controller has its own gain factor, that determines its significant among the three values when calculating the correction. (Or in this case the steering angle).

Each value does:

  • P – correction by multiplying the error by a constant factor
  • I – For a given error, correction increases as time passes
  • D – Aggressive compensation for sudden change in error

Consequently, what I consider while tuning these parameters is:

  • If P is too high, the correction will be too rough and may cause the robot to lose the line, although if it is too low, the maximum steering angle will not be sharp enough.
  • If I is too high, the correction(s) will accumulate very fast, and cause the steering angle to raise quickly. If it is too low, an ongoing given error will persist, and won’t be taken care of.
  • If D is too high, every minute movement will be grasped as sudden, and be treated roughly, steering the robot off course. A too low D gain will not be as harmful, although it may make the robot’s reactions slower and less agile.



  1. awesome project sir..can i build it for my final year project ..if can ..can u email me i want to know detail about pacerbot project

  2. Hi Jahid! Thanks for your comment 🙂
    The code is not currently online, I’ll try to upload it to GitHub in the next few days.
    You are welcome to study it and learn from the way it is designed, though I would recommend that for your project you write your own – it is simply more fun and educating (and also my code will probably not work with a different setup than mine). Anyway, I’ll update this comment when the code will be online!

    Check this out
    It might be helpful!

    • I’m sorry but I don’t have a schematics diagram for this robot – I do believe you could find out most things you’d want to know by watching the videos 🙂 Again, if you have more questions let me know!

    • Hi! Below the Arduino is an Adafruit I2C multiplexer board, that enables the use of multiple I2C devices that have the same address. If you refer to a motor driver, then yes. I’m using a “vex motor controller 29” 🙂

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s