QTR-8 Reflectance Sensor Array User's Guide
Table Of Contents
you are not taking a reading. Additionally, you can connect this pin to a high-frequency PWM to control effective
LED brightness and decrease power consumption.
QTR-8A Sensor Outputs
The QTR-8A reflectance sensor array has eight distinct sensor outputs, one from each LED/phototransistor pair.
These outputs are analog voltages ranging from 0 V to Vcc (which must be between 3.3 and 5 V). With a strong
reflectance, such as when the sensor is over a white surface, its output voltage will tend towards 0 V; with very weak
reflectance, such as when the sensor is over a black surface, its output voltage will tend towards Vcc. To get a good
range of readings between white and black surfaces, we recommend you mount your sensor no more than 0.25"
away from the surface. In our tests, the optimal distance between the sensor and the surface has been 0.125". Please
see our QTR Sample Output Data document [http://www.pololu.com/docs/0J13] for more information.
QTR-8RC Sensor Outputs
The QTR-8RC reflectance sensor array also has eight distinct sensor outputs, one from each LED/phototransistor
pair. In the 8RC sensor model, each phototransistor uses a capacitor discharge circuit that allows a digital I/O line on
a microcontroller to take an analog reflectance reading by measuring the discharge time of the capacitor. This format
has several advantages over the 8A sensor model:
• No analog-to-digital converter (ADC) is required
• Improved sensitivity over voltage-divider analog output
• Parallel reading of all eight sensors is possible with most microcontrollers
• Parallel reading allows optimized use of LED power enable option
When you have a microcontroller digital I/O connected to a sensor output, the typical sequence for reading that
sensor is:
1. Turn on IR LEDs (optional)
2. Set the I/O line to an output and drive it high
3. Allow at least 10 us for the 10 nF capacitor to charge
4. Make the I/O line an input (high impedance)
5. Measure the time for the capacitor to discharge by waiting for the I/O line to go low
6. Turn off IR LEDs (optional)
These steps can typically be executed in parallel on multiple I/O lines.
With a strong reflectance, such as when a sensor is over a white surface, the discharge time can be as low as several
dozen microseconds; with very weak reflectance, such as when the sensor is over a black surface, the discharge time
will typically be a few milliseconds, but can be several dozen milliseconds in the worst case. The exact time of the
discharge depends on your microcontroller’s I/O line characteristics. Meaningful results can be available within
1 ms in typical cases (i.e. when not trying to measure subtle differences in low-reflectance scenarios), allowing up to
1 kHz sampling of all 8 sensors. If lower-frequency sampling is sufficient, substantial power savings can be realized
by using the LEDON pin to turn off the LEDs. For example, if a 100 Hz sampling rate is acceptable, the LEDs can
be off 90% of the time, lowering average current consumption from 100 mA to 10 mA.
If you want to achieve high frequency sampling rates, we recommend you mount your sensors 0.125" away from the
surface. The greater your distance from the surface, the lower the overall reflectance will be, which in turn will
result in longer capacitor discharge times. We recommend you mount your sensors no more than 0.375" away from
the surface. Please see our QTR Sample Output Data document [http://www.pololu.com/docs/0J13] for more
information.
QTR-8A and QTR-8RC Reflectance Sensor Array User's Guide © 2001–2009 Pololu Corporation
5. Module Connections Page 7 of 9









