Page 1 of 1

PID controller for Line following robot help [Arduino]?

Posted: Wed Aug 26, 2015 6:28 pm
by PraveenAlexis
Well im making an arduino line following robot for a project, and i need some help with using a PID controller for the sensors.
Im a total beginner and i have no idea whats PID is and how to use that concept in the MCU code, if there is an example code anyone can provide is much appreciated :)

Thank you!

Re: PID controller for Line following robot help [Arduino]?

Posted: Thu Nov 12, 2015 1:21 am
by Neo
For a line following robot, I'm wondering whether it is really necessary to use a PID controller for the motors. You may use stepper motors to make it simple. PID controllers is a bit of an advance concept where each letter stands for Proportional Integral Derivative respectively. If you are using DC motors, it is essential to use a PID controller for smooth control of the robot.

As always wikiperdia article is a good starting point.
https://en.wikipedia.org/wiki/PID_controller

This is another good article that covers the theoretical background of the PIC controllers.
http://ctms.engin.umich.edu/CTMS/index. ... ControlPID

There is a Arduino library which you can directly use.
http://playground.arduino.cc/Code/PIDLibrary

Hope these will give you a good start.

PS: Sorry for the delay in answering the question. I missed it :)

Re: PID controller for Line following robot help [Arduino]?

Posted: Thu Nov 12, 2015 11:01 pm
by PraveenAlexis
Hey thanks for the reply, well yeah its a bit late but thank you for the reply, i managed to use PID controller and it worked pretty smooth on the line but i had some issues while i was calibrating KP,Ki,Kd constants :roll:

i didn't use the arduino PID library instead i coded my own PID algorithm :)

ps : i can attach the code here for references :geek:

Re: PID controller for Line following robot help [Arduino]?

Posted: Wed Nov 18, 2015 9:13 am
by Shenal
Well done Praveen
Sorry I couldn't help you.