{"product_id":"pololu-qtrx-md-01rc-s-reflectance-sensor-rc-output","title":"Pololu QTRX-MD-01RC-S Reflectance Sensor (RC Output)","description":"\u003cp\u003eThis \u003ca href=\"\/collections\/pololu\" title=\"Pololu\"\u003ePololu\u003c\/a\u003e sensor uses an IR LED and a phototransistor to measure the light reflected from nearby surfaces. It operates from \u003cstrong\u003e2.9–5.5V\u003c\/strong\u003e, with \u003cstrong\u003edimmable brightness control\u003c\/strong\u003e independent of the supply voltage. This change in reflectivity can be due to a colour change at a fixed distance, such as when sensing a black line on a white background, as well as due to a change in the distance to or presence of an object in front of the sensor. \u003c\/p\u003e\n\u003cp\u003eThe \u003cstrong\u003eoptimal range is \u0026lt;5 mm\u003c\/strong\u003e, but it \u003cstrong\u003ecan detect high-reflectance objects out to around 30mm\u003c\/strong\u003e. This version features a high-performance, \u003cstrong\u003elow-current QTRX sensor\u003c\/strong\u003e with lenses and a \u003cstrong\u003econnector that works with 4-pin JST SH-style cables\u003c\/strong\u003e (compatible with \u003ca href=\"\/collections\/qwiic-stemma-qt\" title=\"Qwiic\"\u003eQwiic\u003c\/a\u003e, but the \u003cstrong\u003einterface is not I²C\u003c\/strong\u003e), and has an\u003cstrong\u003e RC (digital) output.\u003c\/strong\u003e\u003c\/p\u003e\n\u003cp\u003eOur \u003ca href=\"https:\/\/www.pololu.com\/docs\/0J19\" rel=\"noopener\" title=\"Arduino library\" target=\"_blank\"\u003eArduino library\u003c\/a\u003e makes it easy to use these sensor modules with an Arduino or compatible controller by providing methods for controlling the emitters, calibrating the module, and reading the individual sensor values. It also has a method specifically for line-following applications to compute the location of the line under the array.\u003c\/p\u003e\n\u003ch2\u003eSpecifications\u003c\/h2\u003e\n\u003cul\u003e\n\u003cli\u003e\n\u003cstrong\u003eModel:\u003c\/strong\u003e QTRX-MD-01RC-S\u003c\/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eDimensions:\u003c\/strong\u003e 8.1 × 15.2 × 6.0 mm\u003c\/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eWeight:\u003c\/strong\u003e 0.4 g\u003c\/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eOperating voltage:\u003c\/strong\u003e 2.9 V to 5.5 V\u003c\/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eSensor type:\u003c\/strong\u003e QTRX\u003c\/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eSensor count:\u003c\/strong\u003e 1\u003c\/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eLED current:\u003c\/strong\u003e 3.5 mA at full brightness, independent of supply voltage\u003c\/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eMaximum board current:\u003c\/strong\u003e 5 mA\u003c\/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eOptimal sensing distance:\u003c\/strong\u003e 10 mm\u003c\/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eMaximum recommended sensing distance:\u003c\/strong\u003e 30 mm\u003c\/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eConnector:\u003c\/strong\u003e side-entry, 4-pin JST SH-type\u003c\/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eOutput type:\u003c\/strong\u003e RC (digital), providing a digital I\/O-compatible signal that can be read as a timed high pulse\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003ch3\u003eConnections\u003c\/h3\u003e\n\u003cp\u003eThis sensor features JST SH-style, 4-pin, side-entry connector that works with 4-pin JST SH-style 'Qwiic' cables (cable not included), but please note that the interface is not I²C.\u003c\/p\u003e\n\u003cp\u003e\u003cimg src=\"https:\/\/cdn.shopify.com\/s\/files\/1\/0176\/3274\/files\/QTRX-MD-01RC-S_-_pinout_1.jpg\" alt=\"\"\u003e\u003c\/p\u003e\n\u003ch3\u003eInterfacing with the outputs of the RC versions\u003c\/h3\u003e\n\u003cp\u003eEach sensor on the RC versions 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\u003cul\u003e\n\u003cli\u003eTurn on IR LEDs (optional)\u003c\/li\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\u003cli\u003eTurn off IR LEDs (optional)\u003c\/li\u003e\n\u003c\/ul\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 a few 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 of all sensors.\u003c\/p\u003e\n\u003cp\u003eIf lower-frequency sampling is sufficient, you can achieve substantial power savings 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 125 mA to 13 mA.\u003c\/p\u003e\n\u003ch2\u003eEmitter control\u003c\/h2\u003e\n\u003cp\u003eThese reflectance sensor arrays maintain a constant current through their IR emitters, keeping the emitters’ brightness constant, independent of the supply voltage (2.9 V to 5.5 V). The emitters can be controlled with the board’s CTRL pins, and the details of the control depends on the array size and density.\u003c\/p\u003e\n\u003cp\u003e\u003cstrong\u003eMD\u003c\/strong\u003e units with 2 or fewer sensors have a \u003cstrong\u003esingle CTRL pin\u003c\/strong\u003e that controls all of the emitters.\u003c\/p\u003e\n\u003cp\u003eDriving a CTRL pin low for at least 1 ms turns off the associated emitter LEDs, while driving it high (or allowing the board to pull it high) turns on the emitters with the board’s default (full) LED current, \u003cstrong\u003ewhich is 3.5 mA for “QTRX” versions\u003c\/strong\u003e. (The emitter LEDs are generally driven in pairs, with the two emitters in each pair connected in series, so the total board current is not the LED current times the number of LEDs as you might otherwise expect; it is usually closer to half that.)\u003c\/p\u003e\n\u003cp\u003eFor more advanced use, the CTRL pin can be pulsed low to cycle the associated emitters through 32 dimming levels. To send a pulse, drive the CTRL pin low for at least 0.5 μs (but no more than 300 μs), then high for at least 0.5 μs; (it should remain high after the last pulse). Each pulse causes the driver to advance to the next dimming level, wrapping around to 100% after the lowest-current level.\u003c\/p\u003e\n\u003cp\u003eEach dimming level corresponds to a 3.33% reduction in current, except for the last three levels, which represent a 1.67% reduction, as shown in the table below. Note that turning the LEDs off with a \u0026gt;1 ms pulse and then back on resets them to full current.\u003c\/p\u003e\n\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003e\u003cstrong\u003eDimming level (pulses)\u003c\/strong\u003e\u003c\/th\u003e\n\u003cth\u003eEmitter current (%)\u003c\/th\u003e\n\u003cth\u003e\u003cstrong\u003eDimming level (pulses)\u003c\/strong\u003e\u003c\/th\u003e\n\u003cth\u003eEmitter current (%)\u003c\/th\u003e\n\u003c\/tr\u003e\n\u003c\/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cstrong\u003e0\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e100.00%\u003c\/td\u003e\n\u003ctd\u003e\u003cstrong\u003e16\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e46.67%\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cstrong\u003e1\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e96.67%\u003c\/td\u003e\n\u003ctd\u003e\u003cstrong\u003e17\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e43.33%\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cstrong\u003e2\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e93.33%\u003c\/td\u003e\n\u003ctd\u003e\u003cstrong\u003e18\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e40.00%\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cstrong\u003e3\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e90.00%\u003c\/td\u003e\n\u003ctd\u003e\u003cstrong\u003e19\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e36.67%\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cstrong\u003e4\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e86.67%\u003c\/td\u003e\n\u003ctd\u003e\u003cstrong\u003e20\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e33.33%\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cstrong\u003e5\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e83.33%\u003c\/td\u003e\n\u003ctd\u003e\u003cstrong\u003e21\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e30.00%\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cstrong\u003e6\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e80.00%\u003c\/td\u003e\n\u003ctd\u003e\u003cstrong\u003e22\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e26.67%\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cstrong\u003e7\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e76.67%\u003c\/td\u003e\n\u003ctd\u003e\u003cstrong\u003e23\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e23.33%\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cstrong\u003e8\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e73.33%\u003c\/td\u003e\n\u003ctd\u003e\u003cstrong\u003e24\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e20.00%\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cstrong\u003e9\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e70.00%\u003c\/td\u003e\n\u003ctd\u003e\u003cstrong\u003e25\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e16.67%\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cstrong\u003e10\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e66.67%\u003c\/td\u003e\n\u003ctd\u003e\u003cstrong\u003e26\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e13.33%\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cstrong\u003e11\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e63.33%\u003c\/td\u003e\n\u003ctd\u003e\u003cstrong\u003e27\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e10.00%\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cstrong\u003e12\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e60.00%\u003c\/td\u003e\n\u003ctd\u003e\u003cstrong\u003e28\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e6.67%\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cstrong\u003e13\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e56.67%\u003c\/td\u003e\n\u003ctd\u003e\u003cstrong\u003e29\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e5.00%\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cstrong\u003e14\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e53.33%\u003c\/td\u003e\n\u003ctd\u003e\u003cstrong\u003e30\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e3.33%\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cstrong\u003e15\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e50.00%\u003c\/td\u003e\n\u003ctd\u003e\u003cstrong\u003e31\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd\u003e1.67%\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003c\/tbody\u003e\n\u003c\/table\u003e\n\u003cp\u003eFor example, to reduce the emitter current to 50%, apply 15 low pulses to the CTRL pin and then keep it high after the last pulse.\u003c\/p\u003e\n\u003ch2\u003eResources\u003c\/h2\u003e\n\u003cul\u003e\n\u003cli\u003e\u003ca href=\"https:\/\/www.pololu.com\/docs\/0J13\" rel=\"noopener\" title=\"Application note\" target=\"_blank\"\u003eApplication note\u003c\/a\u003e\u003c\/li\u003e\n\u003cli\u003e\u003ca href=\"https:\/\/github.com\/pololu\/qtr-sensors-arduino\" rel=\"noopener\" title=\"Arduino library\" target=\"_blank\"\u003eArduino library\u003c\/a\u003e\u003c\/li\u003e\n\u003cli\u003e\u003ca href=\"https:\/\/www.pololu.com\/file\/0J1558\/qtr-qtrx-qtrxl-hd-md-reflectance-sensor-array-schematic.pdf\" rel=\"noopener\" title=\"Schematic\" target=\"_blank\"\u003eSchematic\u003c\/a\u003e\u003c\/li\u003e\n\u003cli\u003e\u003ca href=\"https:\/\/www.pololu.com\/file\/0J1552\/qtr-qtrx-dimensions.pdf\" rel=\"noopener\" title=\"Dimensions\" target=\"_blank\"\u003eDimensions\u003c\/a\u003e\u003c\/li\u003e\n\u003cli\u003e\u003ca href=\"https:\/\/www.pololu.com\/file\/0J1553\/qtr-qtrx-models.zip\" rel=\"noopener\" title=\"3D STEP model\" target=\"_blank\"\u003e3D STEP model\u003c\/a\u003e\u003c\/li\u003e\n\u003cli\u003e\u003ca href=\"https:\/\/www.pololu.com\/file\/0J1551\/qtr-qtrx-drill-drawings.zip\" rel=\"noopener\" title=\"Drill guides\" target=\"_blank\"\u003eDrill guides\u003c\/a\u003e\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003ch2\u003ePackage Contents\u003c\/h2\u003e\n\u003cul\u003e\n\u003cli\u003e1x Pololu QTRX-MD-01RC-S Reflectance Sensor (RC Output)\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cp\u003e\u003cstrong\u003eCables\/headers not included\u003c\/strong\u003e\u003c\/p\u003e","brand":"Pololu","offers":[{"title":"Default Title","offer_id":56333815710081,"sku":"POL-4340","price":4.2,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0176\/3274\/files\/pololu-qtrx-md-01rc-s-reflectance-sensor-rc-output-pololu-pol-4340-1260283293.jpg?v=1790700222","url":"https:\/\/thepihut.com\/products\/pololu-qtrx-md-01rc-s-reflectance-sensor-rc-output","provider":"The Pi Hut","version":"1.0","type":"link"}