COVID-19 impact: We are still operating and shipping all orders! We are operating with a reduced staff, so for critical requirements, including fighting COVID-19, please contact us so we can identify priorities. Click here for more info.

1. Introduction

This guide is for an older version of the QTRSensors Arduino library (3.1.0). The current version of the library can be found on GitHub, and its documentation is here.

QTR sensor size comparison. Top row: QTRX-HD-07, QTR-HD-07; middle row: QTR-3, QTR-1, QTR-L-1; bottom row: QTR-8.

The Pololu QTR reflectance sensors carry infrared LED and phototransistor pairs that can provide analog measurements of IR reflectance, which makes them great for close-proximity edge detection and line-following applications. The modules come as compact, single-sensor units (QTR-1A and QTR-1RC; QTR-L-1A and QTR-L-1RC), 3-sensor arrays (QTR-3A and QTR-3RC), or as 8-sensor arrays (QTR-8A and QTR-8RC) that can be optionally split into a 2-sensor array and a 6-sensor array.

The modules are available in two different output formats: the QTR-xA outputs an analog voltage between 0 and Vcc that can be measured by an analog-to-digital converter (ADC), and the QTR-xRC outputs require a digital I/O line capable of driving the output line high and then measuring the time for the output voltage to decay (which provides an analog measurement of reflectance).

QTR-L-1A reflectance sensor schematic diagram.

QTR-1A reflectance sensor schematic diagram.

QTR-1RC and QTR-L-1RC reflectance sensor schematic diagram.

Please see the product pages for more information on how these sensors work.

This document will explain how to install Arduino libraries for the Pololu QTR reflectance sensors, and it will provide sample sketches as well as links to library documentation. The libraries will give you everything you need to interface with a QTR-8x reflectance sensor array or multiple QTR-1x reflectance sensors, including advanced features like automatic calibration and, in the case of line detection, calculation of the line’s position.

New Products

VL53L3CX Time-of-Flight Multi-Target Distance Sensor Carrier with Voltage Regulator, 300cm Max
19:1 Metal Gearmotor 37Dx68L mm 24V with 64 CPR Encoder (Helical Pinion)
Pololu Wheel for Micro Servo Splines (20T, 4.8mm) - 40×7mm, Black, 2-Pack
Magnetic Encoder Pair Kit with Side-Entry Connector for Micro Metal Gearmotors, 12 CPR, 2.7-18V
3-Channel Wide FOV Time-of-Flight Distance Sensor Using OPT3101 (No Headers)
15:1 Micro Metal Gearmotor HPCB 6V
6.3:1 Metal Gearmotor 37Dx65L mm 12V with 64 CPR Encoder (Helical Pinion)
Free Circuit Cellar magazine April 2020
USB 2.0 Type-C Connector Breakout Board (usb07b)
9V, 5A Step-Down Voltage Regulator D36V50F9
Log In
Pololu Robotics & Electronics
Shopping cart
(702) 262-6648
Same-day shipping, worldwide
Menu
Shop Blog Forum Support
My account Comments or questions? About Pololu Contact Ordering information Distributors