Pololu Robotics & Electronics
Menu
My account Comments or questions? About Pololu Contact Ordering information Distributors

Pololu Forum

QTRX-MD-16A even and odd sensing issue

#1

I’ve been working with a QTRX-MD-16A for line sensing application. I have set individual threshold values for each of the 16 sensor in program by obtaining max and min values of each sensor.
When I move the sensor array from left to right over a line, the sensors should detect the line in the order 1,2,3,4,5…12,13,14,15,16. But the sensors are actually detecting the line in the order 2,1,4,3,6,5…14,13,16,15. i.e., the even sensors are detecting the line first before the adjacent odd sensor does. I’ve checked the state of all 16 emitters through a camera and all 16 are in ON state. I have also checked the 16-bit values from ADC and it also shows similar result. i.e., the even sensors shows high value before the odd does. So I don’t think the problem is with the threshold values.
Why is it that the sensors are detecting the line in this order (even no. first followed by odd no.)? Is there any way I can solve this issue?

#2

Hello.

That is very strange behavior. The simplest explanation would be if you are confusing which pins map to which sensors. Please note that the odd number sensors’ outputs are located against the edge of the board while the even number sensors’ outputs are along the inside row of connectors as shown in this figure. Can you confirm that you are interpreting them in this way?

If that isn’t the problem, the next thing to check is that the sensors are working properly in a way that isolates to performance of each individual sensor. Instead of moving the sensor array over a line, I would put the sensor in a static position facing an ambient light source and test each sensor by covering one and only one sensor at a time. In addition to using your ADC, you could also use a multimeter to directly measure the voltage output as you test each sensor.

If you determine that each of your sensors is working properly, then the problem must be caused by your line sensing setup. Maybe your sensors are too far away from the line or face the line at an awkward angle. You could try modifying the brightness of the IR emitters as described on the product page’s emitter control section to see if that improves the sensors’ performance.

Please contact me if you continue having trouble.

-Patrick

#3

Hi Patrick.

Thanks for the suggestion. The problem is now solved.

I was using dual row right angle headers (male header on sensor array and female header on prototype board). It didn’t occur to me earlier that the front row pins of sensor array would be connected to the back row pins on the circuit board when using a dual row right angle header pair.

I’ve made necessary changes in my program and now it works well and good.

One question though. As a result of above, I have connected the EVEN control pin to a digital output pin. For MD arrangement, I only need the ODD control pin to control the emitters. Can I solder the EVEN & ODD pins together so that I can turn on and off the emitters? Will that yield the same result of connecting the digital pin only to the ODD control pin? (since I have a little space constraint on my circuit board to re-route the connection).

Thanks,
Midhun

#4

Hello.

I am glad you got your sensor array working. If you want to control all of the emitters uniformly with only one digital output, then you can connect the output to either of the control pins and leave the other control pin disconnected. You do not need any additional soldering. The emitter control section of the product page contains more detailed information.

-Patrick