Grove - IR Distance Interrupter is used to detect any object blocking the path of light. The module consists of an IR LED and a photosensor (phototransistor) pair. The light emitted by the IR LED gets reflected by any object placed in front of the sensor and this reflection is detected by the photosensor(phototransistor). Any white (or lighter) colored surface reflects more than black (or darker) colored surface.
When the reflected light is detected, it produces Digital HIGH (or Binary 1) output on the SIG pin. The on-board LED indicator will also glow. If no reflection is detected or if the object is too far from the sensor, the output on the SIG pin stays at Digital LOW (Binary 0). The on-board LED indicator will be off as well. The detectable range of this sensor is 7.5–40 cm. The module incorporates a Rail-to-Rail Operational Amplifier to amplify the output of phototransistor. There is a potentiometer which can be used to adjust the gain of the amplifier, that is, sensitivity of detection.
With this sensor, you can build the following (but not limited to) applications: line following robots, optical encoders and object counting applications.
Note that this product is also mildly sensitive to non-IR radiations and hence any bright light on photosensor impairs or disturbs IR light detection.
Tip: the instructions to use this product are same with Grove - Infrared Reflective Sensor's. You can use this product directly if you have used Grove - Infrared Reflective Sensor.
Product version | Release date | Support status | Notes |
Versions older than v1.2 | June 2012 | Not supported | None |
Grove - IR Distance Interrupter v1.2(current version) | April 2016 | Supported | None |
Operating voltage(V) | 3.3 or 5 Volts |
Operating current(mA) | Maximum: 20 mA |
Effective detectable distance | 7.5–40 cm |
Reflective photosensor | datasheet |
Output operational amplifiers | datasheet |
Weight | 2.5 g(for the module), 8.5 g(for all single package) |
Platform | Seeeduino/Arduino | Rasberry Pi | Beaglebone | LinkIt ONE | |
Supported status | Supported | Supported | Supported | Supported | |
Notes | If no version number is mentioned for a specific platform, it means this product supports all versions within this platform. But, you will need additional Grove Shield like Grove - Base shield v2 board. |
Parts name | Quantity |
---|---|
Grove - Infrared Reflective Sensor | 1 piece |
Grove cable | 1 piece |
Let us see how to implement few basic applications with this module:
void setup() { Serial.begin(9600); pinMode(6,INPUT); } void loop() { while(1) { delay(500); if(digitalRead(6)==LOW) { Serial.println("Somebody is here."); } else { Serial.println("Nobody."); } } }
import time import grovepi # Connect the Grove Infrared Distance Interrupt Sensor to digital port D4 # SIG,NC,VCC,GND sensor = 4 grovepi.pinMode(sensor,"INPUT") while True: try: # Sensor returns LOW and onboard LED lights up when the # received infrared light intensity exceeds the calibrated level if grovepi.digitalRead(sensor) == 0: print "found something" else: print "nothing" time.sleep(.5) except IOError: print "Error"
Copyright (c) 2008-2016 Seeed Development Limited (www.seeedstudio.com / www.seeed.cc)