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

QTR-8a LED brightness control


I am working on a project using the QTR-8a sensor array to detect tape lines on various surfaces. The problem I am having is that the IR led’s are over saturating the the transistors and I am not able to see a difference between the blue tape line and other surface. I have had luck by applying an analog voltage to the LED on pin to control brightness but this isn’t feasible because I don’t have a specific power supply that I can use to do this all the time. Instead I’m trying to use a PWM signal to control brightness but readings are no longer steady, they jump from high numbers to low numbers all the time. I am wondering if you have any information about using PWM to control brightness because the product page says it’s possible. I will say the array works well under some lighting/surface conditions, but I need it to be able to work on all surface conditions and I think I can do that by controlling the LED brightness.



We generally recommend using this sensor with high contrast materials such as black electrical tape on a white markerboard, but it seems like you are already having some success using the sensor with various materials and colors. What PWM frequency are you using to control the brightness? Generally, a higher PWM frequency will result in a smoother output. Also, adding some capacitance (like an electrolytic capacitor) between one of the 3.3V bypass pins and GND on the sensor PCB might help smooth the PWM output.