PID controller for Line following robot help [Arduino]?

Microcontroller, DSP and FPGA Topics

PID controller for Line following robot help [Arduino]?

Postby PraveenAlexis » Wed Aug 26, 2015 12:58 pm

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!
User avatar
PraveenAlexis
 
Posts: 91
Joined: Wed Jul 20, 2011 9:36 am
Cash on hand: 4,728.60
Location: Sri lanka,Wattala

Invitations sent: 0
Registered friends: 0
Reputation point: 10
Corporal

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

Postby Neo » Wed Nov 11, 2015 7:51 pm

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 :)
User avatar
Neo
Site Admin
Site Admin
 
Posts: 2612
Joined: Tue Jul 14, 2009 8:37 pm
Cash on hand: 221,202.10
Bank: 15,536,454.00
Location: Colombo/London
Medals: 2
EC_Bronze_Star (1) EC_Achievment (1)

Invitations sent: 94
Registered friends: 12
Highscores: 13
Reputation point: 74
Lieutenant

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

Postby PraveenAlexis » Thu Nov 12, 2015 5:31 pm

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:
User avatar
PraveenAlexis
 
Posts: 91
Joined: Wed Jul 20, 2011 9:36 am
Cash on hand: 4,728.60
Location: Sri lanka,Wattala

Invitations sent: 0
Registered friends: 0
Reputation point: 10
Corporal

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

Postby Shenal » Wed Nov 18, 2015 3:43 am

Well done Praveen
Sorry I couldn't  help you.
User avatar
Shenal
 
Posts: 26
Joined: Tue Feb 09, 2010 9:59 am
Cash on hand: 1,182.20
Location: Wattala

Invitations sent: 2
Registered friends: 0
Reputation point: 1
Lance Corporal


Return to Embedded Processors & Programming

Who is online

Users browsing this forum: No registered users and 2 guests