Author Topic: pid contol  (Read 1093 times)

0 Members and 1 Guest are viewing this topic.

Offline hinduja.prasadTopic starter

  • Beginner
  • *
  • Posts: 2
  • Helpful? 0
pid contol
« on: September 29, 2009, 06:39:29 PM »
hi ppl.........i am planning to use pid control for my linefolllower . i got the essence of the algo but the problem is how to read the analog values from the IR sensors ? i came across many codes and tutorials fo pid where in they set the values of the sensors for eg.like 0-255 or 2000. how exactly 2 set this range?

Offline mayukh

  • Jr. Member
  • **
  • Posts: 8
  • Helpful? 0
Re: pid contol
« Reply #1 on: September 30, 2009, 10:18:27 AM »
Read up on ADC... that would help solving your mystery.




Offline Kohanbash

  • Supreme Robot
  • *****
  • Posts: 430
  • Helpful? 1
Re: pid contol
« Reply #2 on: September 30, 2009, 08:54:38 PM »
As the last post said you will need some type of analog to digital conversion.

After that you want to record the minimum and maximum value that the sensor reports; and those are the values that you will use.
Also for the PID you need to develop a command for the motors based on the distance reported by the sensor so you will probably want to calibrate it so you know what the values from the sensor mean.
Robots for Roboticists Blog - http://robotsforroboticists.com/


Get Your Ad Here