QTR-8RC Linearity

Hello,
I bought the qtr-8rc sensors some time ago to use in a linefollower.
But i noticed they weren’t really linear.
Does anyone have a graph of the sensor value in comparison to the grey value ( 0% - 100% ) ?
Or even a formula to make it linear ?
As a linear sensor for line following would make more sense…
Also, is there any difference in linearity between the analog and digital versions ?


Thanks Cyragia

Hello.

The sensor output is going to be a function of the IR reflectance, and that might differ from the visible light reflectance you perceive as a certain shade of gray. When it comes to line-following, however, the important factor is usually clearly distinguishing the line from the background. Why do you want the sensor response to be linear with the gray value?

- Ben

It would be easier to determine the exact position of a single sensor to the line if it would be linear.
for example, if the sensor is half on and half off the line, it should return a value of 50%
This makes for more predictable results.

You definitely can tell when the sensor is partially over the line, but I think you don’t get much by having that response be linear. What you really want is a function that can take the values of all the sensors and turn it into a “line position” value. As long as this function is monotonic, it will work for PID calculations. One example is the qtr_read_line() function, which is documented in the QTR section of the Pololu AVR library command reference.

- Ben