{"product_id":"qtr-1rc-reflectance-sensor-2-pack","title":"QTR-1RC Reflectance Sensor (2-Pack)","description":"\u003cp\u003eThe QTR-1RC reflectance sensor carries a single infrared LED and phototransistor pair in an inexpensive, tiny 0.5\" x 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\u003c\/p\u003e\n\u003cp\u003eThis sensor is sold in packs of \u003cstrong\u003etwo\u003c\/strong\u003e\u003cspan\u003e units.\u003c\/span\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cstrong\u003eNote:\u003c\/strong\u003e The QTR-1RC reflectance sensor requires a digital I\/O line to take readings. The similar \u003ca href=\"\/en-eu\/products\/qtr-1a-reflectance-sensor-2-pack\" target=\"_blank\"\u003eQTR-1A reflectance sensor\u003c\/a\u003e is available with an analog output.\u003c\/p\u003e\n\u003cp\u003eThe Pololu QTR-1RC reflectance sensor carries a single infrared (IR) LED and phototransistor pair. 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 the externally supplied voltage 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\u003cli\u003eNo analog-to-digital converter (ADC) is required\u003c\/li\u003e\n\u003cli\u003eImproved sensitivity over voltage-divider analog output\u003c\/li\u003e\n\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 parallel to the surface being sensed. Because of its small size, multiple units can easily be arranged to fit various applications such as line sensing and proximity\/edge detection.\u003c\/p\u003e\n\u003cp\u003e\u003cstrong\u003eSpecifications\u003c\/strong\u003e\u003c\/p\u003e\n\u003cul\u003e\n\u003cli\u003eDimensions: 0.3\" x 0.5\" x 0.1\" (without optional header pins installed)\u003c\/li\u003e\n\u003cli\u003eOperating voltage: 5.0 V\u003c\/li\u003e\n\u003cli\u003eSupply current: 17 mA\u003c\/li\u003e\n\u003cli\u003eOutput format: digital I\/O-compatible signal that can be read as a timed high pulse\u003c\/li\u003e\n\u003cli\u003eOptimal sensing distance: 0.125\" (3 mm)\u003c\/li\u003e\n\u003cli\u003eMaximum recommended sensing distance: 0.375\" (9.5 mm)\u003c\/li\u003e\n\u003cli\u003eWeight without header pins: 0.008 oz (0.2 g)\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cp\u003e\u003cstrong\u003eInterfacing the QTR-1RC output to a digital I\/O line\u003c\/strong\u003e\u003c\/p\u003e\n\u003cp\u003eLike the Parallax QTI, this sensor requires 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\u003cli\u003eSet the I\/O line to an output and drive it high.\u003c\/li\u003e\n\u003cli\u003eAllow at least 10 μs for the sensor output to rise.\u003c\/li\u003e\n\u003cli\u003eMake the I\/O line an input (high impedance).\u003c\/li\u003e\n\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.\u003c\/p\u003e\n\u003cp\u003eFor more resources check out the \u003ca href=\"https:\/\/www.pololu.com\/docs\/0J20\" target=\"_blank\"\u003ePololu AVR library\u003c\/a\u003e and \u003ca href=\"https:\/\/www.pololu.com\/docs\/0J19\"\u003eArduino library\u003c\/a\u003e for these sensors.\u003c\/p\u003e\n\u003cp\u003e\u003cstrong\u003eIncluded components\u003c\/strong\u003e\u003c\/p\u003e\n\u003cp\u003eThis module has a single mounting hole intended for a #2 screw (not included); if this mounting hole is not needed, this portion of the PCB can be ground off to make the unit even smaller. Each pack of two reflectance sensors includes sets of straight male header strips and right-angle male header strips, which allow you to mount them in the orientation of your choice (note: the header pins might ship as 1×6 strips that you can break into two 1×3 pieces). You can also solder wires, such as ribbon cable, directly to the pads for the most compact installation.\u003c\/p\u003e\n\u003cp\u003e\u003cstrong\u003eHow it works in detail\u003c\/strong\u003e\u003c\/p\u003e\n\u003cp\u003eWith only four components (or five, if you count the coupled IR LED and phototransistor separately), 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","brand":"Pololu","offers":[{"title":"Default Title","offer_id":32140162762,"sku":"POL-2459","price":4.95,"currency_code":"EUR","in_stock":false}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0174\/1800\/products\/0J4716.1200.jpg?v=1476282492","url":"https:\/\/shop.pimoroni.com\/en-eu\/products\/qtr-1rc-reflectance-sensor-2-pack","provider":"Pimoroni Ltd","version":"1.0","type":"link"}