{"product_id":"2455-qtr-l-1rc-reflectance-sensor-2-pack","title":"QTR-L-1RC Reflectance Sensor (2-Pack)","description":"\u003cp\u003eThe QTR-L-1RC reflectance sensor incorporates a right-angle infrared LED and a right-angle phototransistor in an inexpensive, tiny 0.35″ × 0.3″ module that can be mounted almost anywhere and is great for edge detection and line following.  \u003cstrong\u003eThe output is designed to be measured by a digital I\/O line.\u003c\/strong\u003e This sensor is sold in packs of \u003cstrong\u003etwo\u003c\/strong\u003e units.\u003c\/p\u003e\n\u003cbr\u003e\u003cp class=\"note\"\u003e\u003cstrong\u003eNote:\u003c\/strong\u003e  The QTR-L-1RC reflectance sensor requires a digital I\/O line to take readings.  The similar \u003ca href=\"https:\/\/www.pololu.com\/product\/2454\"\u003eQTR-L-1A reflectance sensor\u003c\/a\u003e is available with an analog output.\u003c\/p\u003e\n\u003ch3\u003eFunctional Description\u003c\/h3\u003e\n\u003ctable class=\"picture_with_caption right\"\u003e\u003ctr\u003e\n\u003ctd\u003e\u003cimg alt=\"\" class=\"\" data-gallery-pictures=\"[{\" id and qtr-l-1rc reflectance sensor schematic diagram. data-picture-id=\"0J631\" data-picture-longest_side=\"300\" src=\"https:\/\/a.pololu-files.com\/picture\/0J631.297.png?ae9455b459ff6470ff8055966838a530\"\u003e\u003c\/td\u003e\n\u003cp\u003e\u003c\/p\u003e\n\u003c\/tr\u003e\u003c\/table\u003e\n\u003cp\u003eThe Pololu QTR-L-1RC reflectance sensor carries a right-angle infrared LED and a right-angle phototransistor, both pointing toward the front edge of the board.  To use the sensor, you must first charge the output node by applying a voltage to the OUT pin.  You can then read the reflectance by withdrawing that externally applied voltage on the OUT pin and timing how long it takes the output voltage to decay due to the integrated phototransistor.  Shorter decay time is an indication of greater reflection.  This measurement approach has several advantages, especially when multiple units are used:\u003c\/p\u003e\n\u003cul\u003e\n\t\u003cli\u003eNo analog-to-digital converter (ADC) is required\u003c\/li\u003e\n\t\u003cli\u003eImproved sensitivity over voltage-divider analog output\u003c\/li\u003e\n\t\u003cli\u003eParallel reading of multiple sensors is possible with most microcontrollers\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cp\u003eThe LED current-limiting resistor is set to deliver approximately 17 mA to the LED when VIN is 5 V.  The current requirement can be met by some microcontroller I\/O lines, allowing the sensor to be powered up and down through an I\/O line to conserve power.\u003c\/p\u003e\n\u003cp\u003eThis sensor was designed to be used with the board perpendicular to the surface being sensed, and narrow-angle lenses built into the infrared LED and phototransistor packages allow it to be effective to a range of about 1″ (25 mm). Because of its small size, multiple units can easily be arranged to fit various applications such as line sensing and proximity\/edge detection. The QTR-L-1RC is sold in packs of \u003cstrong\u003etwo\u003c\/strong\u003e units.\u003c\/p\u003e\n\u003cp\u003eFor a similar sensor that can be used with the board parallel to the surface, but with shorter range, please see the \u003ca href=\"https:\/\/www.pololu.com\/product\/2459\"\u003eQTR-1RC reflectance sensor\u003c\/a\u003e. We also offer arrays of three and eight sensors: the \u003ca href=\"https:\/\/www.pololu.com\/product\/2457\"\u003eQTR-3RC reflectance sensor array\u003c\/a\u003e and the \u003ca href=\"https:\/\/www.pololu.com\/product\/961\"\u003eQTR-8RC reflectance sensor array\u003c\/a\u003e.\u003c\/p\u003e\n\u003ctable class=\"picture_with_caption center\"\u003e\n\u003ctr\u003e\n\u003ctd style=\"max-width: 400px\"\u003e\u003ca href=\"https:\/\/a.pololu-files.com\/picture\/0J4642.1200.jpg?9ae24a3959a88fee8dd66d333023e2dc\" class=\"noscript-fallback\"\u003e\u003cimg alt=\"\" class=\"zoomable\" data-gallery-pictures=\"[{\" id sensor size comparison. top row: qtrx-hd-07 qtr-hd-07 middle qtr-3 qtr-1 qtr-l-1 bottom qtr-8. data-picture-id=\"0J4642\" data-picture-longest_side=\"934\" src=\"https:\/\/a.pololu-files.com\/picture\/0J4642.400.jpg?9ae24a3959a88fee8dd66d333023e2dc\"\u003e\u003c\/a\u003e\u003c\/td\u003e\n\u003cp\u003e\u003c\/p\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\u003cth style=\"max-width: 400px\"\u003e\u003cp\u003eQTR sensor size comparison. Top row: QTRX-HD-07, QTR-HD-07; middle row: QTR-3, QTR-1, QTR-L-1; bottom row: QTR-8.\u003c\/p\u003e\u003c\/th\u003e\u003c\/tr\u003e\n\u003c\/table\u003e\n\u003ch3\u003eSpecifications\u003c\/h3\u003e\n\u003ctable class=\"picture_with_caption right\"\u003e\u003ctr\u003e\n\u003ctd\u003e\u003ca href=\"https:\/\/a.pololu-files.com\/picture\/0J4435.1200.jpg?57e3d5c3be730a1941117071097bd67f\" class=\"noscript-fallback\"\u003e\u003cimg alt=\"\" class=\"zoomable\" data-gallery-pictures=\"[{\" id reflectance sensor emitter and detector sides with labeled pinout. data-picture-id=\"0J4435\" data-picture-longest_side=\"600\" src=\"https:\/\/a.pololu-files.com\/picture\/0J4435.300.jpg?57e3d5c3be730a1941117071097bd67f\"\u003e\u003c\/a\u003e\u003c\/td\u003e\n\u003cp\u003e\u003c\/p\u003e\n\u003c\/tr\u003e\u003c\/table\u003e\n\u003cul\u003e\n\t\u003cli\u003eDimensions: 0.3″ × 0.35″ × 0.12″ (without optional header pins installed)\u003c\/li\u003e\n\t\u003cli\u003eOperating voltage: 5.0 V\u003c\/li\u003e\n\t\u003cli\u003eSupply current: 17 mA\u003c\/li\u003e\n\t\u003cli\u003eOutput format: digital I\/O-compatible signal that can be read as a timed high pulse\u003c\/li\u003e\n\t\u003cli\u003eOptimal sensing distance: 0.125″ to 0.25″ (3 mm to 6 mm)\u003c\/li\u003e\n\t\u003cli\u003eMaximum recommended sensing distance: 1″ (25 mm)\u003c\/li\u003e\n\t\u003cli\u003eWeight without header pins: 0.006 oz (0.2 g)\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003ch3\u003eInterfacing the QTR-L-1RC Output to a Digital I\/O Line\u003c\/h3\u003e\n\u003cp\u003eLike the Parallax QTI, the QTR-L-1RC module has sensor outputs that require a digital I\/O line capable of driving the output line high and then measuring the time for the output voltage to decay.  The typical sequence for reading a sensor is:\u003c\/p\u003e\n\u003col\u003e\n\t\u003cli\u003eSet the I\/O line to an output and drive it high.\u003c\/li\u003e\n\t\u003cli\u003eAllow at least 10 us for the sensor output to rise.\u003c\/li\u003e\n\t\u003cli\u003eMake the I\/O line an input (high impedance).\u003c\/li\u003e\n\t\u003cli\u003eMeasure the time for the voltage to decay by waiting for the I\/O line to go low.\u003c\/li\u003e\n\u003c\/ol\u003e\n\u003cp\u003eThese steps can typically be executed in parallel on multiple I\/O lines.\u003c\/p\u003e\n\u003cp\u003eWith a strong reflectance, the decay time can be as low as several dozen microseconds; with no reflectance, the decay time can be up to a few milliseconds.  The exact time of the decay 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. The following table shows some typical decay times (from 5 V down to a 2 V threshold) of the sensor over different surfaces and at different distances:\u003c\/p\u003e\n\u003ctable class=\"center active_controller_comparison\"\u003e\n\t\u003ctr\u003e\n\t\t\u003ctd\u003e\u003c\/td\u003e\n\t\t\u003cth\u003eWhite surface\u003c\/th\u003e\n\t\t\u003cth\u003e3\/4″ black electrical tape\u003c\/th\u003e\n\t\u003c\/tr\u003e\n\t\u003ctr\u003e\n\t\t\u003cth style=\"text-align:right;\"\u003e0.25″ distance\u003c\/th\u003e\n\t\t\u003ctd\u003e100 μs\u003c\/td\u003e\n\t\t\u003ctd\u003e320 μs\u003c\/td\u003e\n\t\u003c\/tr\u003e\n\t\u003ctr\u003e\n\t\t\u003cth style=\"text-align:right;\"\u003e1″ distance\u003c\/th\u003e\n\t\t\u003ctd\u003e160 μs\u003c\/td\u003e\n\t\t\u003ctd\u003e260 μs\u003c\/td\u003e\n\t\u003c\/tr\u003e\n\u003c\/table\u003e\n\u003cp class=\"note\"\u003eAmbient light, especially sunlight, can affect the sensor readings significantly. If the decay time of the QTR-L-1RC is consistently low, you might need to add shielding around the sensor or mount it in a different location to reduce interference from outside light sources.\u003c\/p\u003e\n\u003cp\u003eOur \u003ca href=\"https:\/\/www.pololu.com\/docs\/0J20\"\u003ePololu AVR library\u003c\/a\u003e provides functions that make it easy to use these sensors with our \u003ca href=\"https:\/\/www.pololu.com\/category\/8\/robot-controllers\"\u003eOrangutan robot controllers\u003c\/a\u003e; please see the \u003ca href=\"http:\/\/www.pololu.com\/docs\/0J18\/16\"\u003eQTR Reflectance Sensors section\u003c\/a\u003e of our library command reference for more information.  We also have a \u003ca href=\"https:\/\/www.pololu.com\/docs\/0J19\"\u003eArduino library\u003c\/a\u003e for these sensors.\u003c\/p\u003e\n\u003ch3\u003eIncluded Components\u003c\/h3\u003e\n\u003cp\u003eEach pack of two reflectance sensors includes sets of \u003ca href=\"https:\/\/www.pololu.com\/product\/965\"\u003estraight male header strips\u003c\/a\u003e and \u003ca href=\"https:\/\/www.pololu.com\/product\/967\"\u003eright-angle male header strips\u003c\/a\u003e, which allow you to mount them in the orientation of your choice. You can also solder wires, such as ribbon cable, directly to the pads for the most compact installation.\u003c\/p\u003e\n\u003ctable class=\"side_by_side_pics\"\u003e\n\t\u003ctr\u003e\n\t\t\u003ctd\u003e\u003ctable class=\"picture_with_caption center\"\u003e\n\u003ctr\u003e\u003ctd style=\"max-width: 300px\"\u003e\u003ca href=\"https:\/\/a.pololu-files.com\/picture\/0J4434.1200.jpg?5502acfb8dfeeb48866b1b9de114a262\" class=\"noscript-fallback\"\u003e\u003cimg alt=\"\" class=\"zoomable\" data-gallery-pictures=\"[{\" id or qtr-l-1rc reflectance sensor with included header pins. data-picture-id=\"0J4434\" data-picture-longest_side=\"800\" src=\"https:\/\/a.pololu-files.com\/picture\/0J4434.300.jpg?5502acfb8dfeeb48866b1b9de114a262\"\u003e\u003c\/a\u003e\u003c\/td\u003e\u003c\/tr\u003e\n\u003ctr\u003e\u003cth style=\"max-width: 300px\"\u003e\u003cp\u003eQTR-L-1A or QTR-L-1RC reflectance sensor (2-pack) with included header pins.\u003c\/p\u003e\u003c\/th\u003e\u003c\/tr\u003e\n\u003c\/table\u003e\u003c\/td\u003e\n\t\t\u003ctd\u003e\u003ctable class=\"picture_with_caption center\"\u003e\n\u003ctr\u003e\u003ctd style=\"max-width: 300px\"\u003e\u003ca href=\"https:\/\/a.pololu-files.com\/picture\/0J4432.1200.jpg?2318f2abcb3577ccfcf6b7114bcdec6c\" class=\"noscript-fallback\"\u003e\u003cimg alt=\"\" class=\"zoomable\" data-gallery-pictures=\"[{\" id and qtr-l-1rc reflectance sensors plugged into a breadboard in two possible orientations. data-picture-id=\"0J4432\" data-picture-longest_side=\"800\" src=\"https:\/\/a.pololu-files.com\/picture\/0J4432.300.jpg?2318f2abcb3577ccfcf6b7114bcdec6c\"\u003e\u003c\/a\u003e\u003c\/td\u003e\u003c\/tr\u003e\n\u003ctr\u003e\u003cth style=\"max-width: 300px\"\u003e\u003cp\u003eQTR-L-1A and QTR-L-1RC reflectance sensors plugged into a breadboard in two possible orientations.\u003c\/p\u003e\u003c\/th\u003e\u003c\/tr\u003e\n\u003c\/table\u003e\u003c\/td\u003e\n\t\u003c\/tr\u003e\n\u003c\/table\u003e\n\u003ch3\u003eHow it works in detail\u003c\/h3\u003e\n\u003cp\u003eWith only five components, the operation of this sensor is relatively basic.  The emitter side is just an IR LED with an appropriate current-limiting resistor.  The light from the emitter leaves the sensor, reflects off a nearby surface, and returns to the detector.\u003c\/p\u003e\n\u003cp\u003eThe detector side is a resistor-capacitor (RC) circuit, where the resistance comes from the phototransistor and is a measure of the incident infrared light, and the decay time is proportional to the resistance.  The first step of the sensor-reading process—driving the sensor output high—discharges the integrated 10 nF capacitor and puts both sides at the same voltage (VIN).  Alternatively, you can think of this as “charging the output node”, and it is functionally equivalent to charging a capacitor with one side connected to ground.  Once you are no longer supplying an external voltage to the output pin, the capacitor can slowly charge through the phototransistor, with the rate of charging being a function of the phototransistor’s resistance (which is in turn a function of the incident IR).  As the capacitor charges, the voltage on the output side drops, eventually reaching zero when the capacitor is fully charged.  Alternatively, you can think of this as “discharging the output node”, and it is functionally equivalent to discharging a capacitor with one side connected to ground.\u003c\/p\u003e\n\u003cp\u003eThe 220 Ω resistor on the OUT line serves to limit the current flow, making it possible for a microcontroller output to safely charge the output node prior to each reading.  It has very little effect on the sensor output.\u003c\/p\u003e\n\u003ctable class=\"side_by_side_pics\"\u003e\n\t\u003ctr\u003e\n\t\t\u003ctd\u003e\u003ctable class=\"picture_with_caption center\"\u003e\n\u003ctr\u003e\u003ctd style=\"max-width: 230px\"\u003e\u003cimg alt=\"\" class=\"\" data-gallery-pictures=\"[{\" id and qtr-l-1rc reflectance sensor schematic diagram. data-picture-id=\"0J631\" data-picture-longest_side=\"300\" src=\"https:\/\/a.pololu-files.com\/picture\/0J631.230.jpg?ae9455b459ff6470ff8055966838a530\"\u003e\u003c\/td\u003e\u003c\/tr\u003e\n\u003ctr\u003e\u003cth style=\"max-width: 230px\"\u003e\u003cp\u003eQTR-1RC and QTR-L-1RC reflectance sensor schematic diagram.\u003c\/p\u003e\u003c\/th\u003e\u003c\/tr\u003e\n\u003c\/table\u003e\u003c\/td\u003e\n\t\t\u003ctd\u003e\u003ctable class=\"picture_with_caption center\"\u003e\n\u003ctr\u003e\u003ctd style=\"max-width: 300px\"\u003e\u003ca href=\"https:\/\/a.pololu-files.com\/picture\/0J633.1200.png?75a67e4dd688dd72dc2febd14d37d3a5\" class=\"noscript-fallback\"\u003e\u003cimg alt=\"\" class=\"zoomable\" data-gallery-pictures=\"[{\" id output when above a white interface and microcontroller timing of that data-picture-id=\"0J633\" data-picture-longest_side=\"1024\" src=\"https:\/\/a.pololu-files.com\/picture\/0J633.300.jpg?75a67e4dd688dd72dc2febd14d37d3a5\"\u003e\u003c\/a\u003e\u003c\/td\u003e\u003c\/tr\u003e\n\u003ctr\u003e\u003cth style=\"max-width: 300px\"\u003e\u003cp\u003eQTR-1RC output (yellow) when 1\/8\" above a white\/black interface and microcontroller timing of that output (blue).\u003c\/p\u003e\u003c\/th\u003e\u003c\/tr\u003e\n\u003c\/table\u003e\u003c\/td\u003e\n\t\u003c\/tr\u003e\n\u003c\/table\u003e","brand":"Pololu","offers":[{"title":"2-4 Settimane","offer_id":47696677503321,"sku":"POL-2455","price":7.25,"currency_code":"EUR","in_stock":true},{"title":"1 Giorno","offer_id":47885990461785,"sku":"POL-2455\/A","price":7.25,"currency_code":"EUR","in_stock":false}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0781\/1009\/7753\/files\/0J4429.1200.jpg?v=1705455887","url":"https:\/\/xernuqvalzi.pro\/products\/2455-qtr-l-1rc-reflectance-sensor-2-pack","provider":"Robot Italy","version":"1.0","type":"link"}