Author Topic: PID Line following !  (Read 9097 times)

0 Members and 1 Guest are viewing this topic.

Offline andreahmedTopic starter

  • Jr. Member
  • **
  • Posts: 37
  • Helpful? 0
PID Line following !
« on: March 20, 2008, 03:38:15 PM »
Hi, I used only P control to make a line follower robot , which is like if (000001) do pwm on the faster wheel .. i think that's only P control , at fast speed i found my robot overshoots and crawls over the line , and after searching i found that i need to add the D term to compensate for that shoots .. how do i implement the idea in C code ? i already read the tutorial here about pid but its only for motors ...

Offline hazzer123

  • Supreme Robot
  • *****
  • Posts: 460
  • Helpful? 3
Re: PID Line following !
« Reply #1 on: March 21, 2008, 04:03:17 AM »
Derivative is implemented into microcontrollers by finding the difference between consecutive input values, multiplying them by a suitable derivative constant, and adding it to the output.

To learn why PID works see this link -

And to find out how calculate the most efficient constants, search google -

Imperial College Robotics Society


Get Your Ad Here