QTR-8RC Infra Red Reflectance Sensor Array

Pololu QTR-8RC Infra Red Reflectance Sensor Array
Click to enlarge
Price: £8.40
(£7.00 + VAT)
Stock Quantity: 10
Model: QTR-8RC
Manufacturer: Pololu
Average Rating: Not Rated

Pololu

QTR-8RC Infra Red Reflectance Sensor Array

The QTR-8RC Infra Red Reflectance Sensor Array has 8 IR LED/phototransistor pairs mounted on a 0.375" pitch, making it a great detector for a line-following robot. Pairs of LEDs are arranged in series to halve current consumption, and a MOSFET allows the LEDs to be turned off for additional sensing or power-savings options. Each sensor provides a separate digital I/O-measurable output.

The QTR-8RC reflectance sensor array is intended as a line sensor, but it can be used as a general-purpose proximity or reflectance sensor. The module is a convenient carrier for eight IR emitter and receiver (phototransistor) pairs evenly spaced at intervals of 0.375" (9.525 mm). Each phototransistor uses a capacitor discharge circuit that allows a digital I/O line on a microcontroller to take an analog reading of reflected IR by measuring the discharge time of the capacitor. Shorter capacitor discharge time is an indication of greater reflection.

The outputs are all independent, but the LEDs are arranged in pairs to halve current consumption. The LEDs are controlled by a MOSFET with a gate normally pulled high, allowing the LEDs to be turned off by setting the MOSFET gate to a low voltage. Turning the LEDs off might be advantageous for limiting power consumption when the sensors are not in use or for varying the effective brightness of the LEDs through PWM control.

The LED current-limiting resistors for 5 V operation are arranged in two stages; this allows a simple bypass of one stage to enable operation at 3.3 V. The LED current is approximately 20-25 mA, making the total board consumption just under 100 mA. The schematic diagram of the module is shown below:

QTR-8RC Sensor Array Diagram

Specifications

  • Dimensions: 2.95" x 0.5" x 0.125" (without header pins installed)
  • Operating voltage: 3.3-5.0 V
  • Supply current: 100 mA
  • Output format: digital I/O compatible
  • Optimal sensing distance: 0.125" (3 mm)
  • Maximum recommended sensing distance: 0.375" (9.5 mm)
  • Weight without header pins: 0.11 oz (3.09 g)

Interfacing the QTR-8RC Outputs to Digital I/O Lines

Like the Parallax QTI, the QTR-8RC module has eight identical sensor outputs that require a digital I/O line capable of first charging the output capacitor (by driving the line high) and then measuring the time for the capacitor to discharge through the phototransistor. This measurement approach has several advantages, especially when coupled with the ability of the QTR-8RC module to turn off LED power:

  • 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

The typical sequence for reading a 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.

To make your programming life easier, Pololu have made library functions for the Arduino and AVR, and sample code is available below.

With a strong reflectance, the discharge time can be as low as several dozen microseconds; with no reflectance, the discharge time can be up to a few milliseconds. 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 turning 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.

Our Pololu AVR library provides functions that make it easy to use these sensors with our Orangutan robot controllers and other AVR-based controller boards such as Arduinos. Please see section 11 of our library command reference for more information.

Breaking the Module in Two

If you don’t need or cannot fit all eight sensors, you can break off two sensors and still use all 8 sensors as two separate modules, as shown below. The PCB can be scored from both sides along the perforation and then bent until it snaps apart. Each of the two resulting pieces will function as an independent line sensor.

Breaking the QTR-8RC up

The resistor is required to make the two-sensor array functional after the original eight-sensor array is broken into two pieces. This resistor is only needed once the board has been broken.

Resistor

Documents

Pololu QTR Reflectance Sensor Application Note
Arduino Library for the Pololu QTR Reflectance Sensors
Building Line Following and Line Maze Courses

Example Arduino Code

The following Example Arduino code is a much cut down version of the Pololu example code, to show the ease of simply getting the values from the sensor and outputting them on the serial port.

#include <PololuQTRSensors.h>

// This example is designed for use with a QTR-8RC sensor 
// This is a much cut-down version of the Pololu Example code

#define NUM_SENSORS   8     // number of sensors used
#define TIMEOUT       2500  // waits for 2500 us for sensor outputs to go low

// Create instance of sensors. Sensors connected to pins 5 to 12
PololuQTRSensorsRC qtrrc((unsigned char[]) {5,6,7,8,9,10,11,12},  NUM_SENSORS, 
                          TIMEOUT, QTR_NO_EMITTER_PIN); 
unsigned int sensorValues[NUM_SENSORS];

void setup()
{
  Serial.begin(9600);
  delay(1000);
}

void loop()
{
  qtrrc.read(sensorValues);

  // print the sensor values
  unsigned char i;
  for (i = 0; i < NUM_SENSORS; i++)
  {
    Serial.print(sensorValues[i]);
    Serial.print("   ");
  }
  Serial.println(" ");
  delay(250);
}

 

Write Review
Your Name:


Your Review: Note: HTML is not translated!

Rating: Bad            Good

Enter the code in the box below:

QTR-8RC Infra Red Reflectance Sensor Array
Click to enlarge
QTR-8RC Infra Red Reflectance Sensor Array
Click to enlarge
QTR-8RC Infra Red Reflectance Sensor Array
Click to enlarge
QTR-8RC Infra Red Reflectance Sensor Array
Click to enlarge
QTR-8RC Infra Red Reflectance Sensor Array
Click to enlarge
QTR-8RC Infra Red Reflectance Sensor Array
Click to enlarge
QTR-8RC Infra Red Reflectance Sensor Array
Click to enlarge
QTR-8RC Infra Red Reflectance Sensor Array
Click to enlarge
QTR-8RC Infra Red Reflectance Sensor Array
Click to enlarge
QTR-8RC Infra Red Reflectance Sensor Array
$ 8.40 New In Stock
Shopping Cart
0 items
 
DELIVERY/PAYMENT

Free Delivery Orders over £50

UK - £2.40 orders under £50
Airmail from £2.95 (+VAT)
More Details...

 
Brands
 
 Check out our videos
Follow us on:
acebook