Introduction
This adjustable infrared sensor features a high-sensitivity photoreflector to perform distance detection function,ranging from 3cm to 40cm. When the infrared light emitted by the emitter gets reflected on a surface that blocked it, the phototransistor can pick up the signal for distance calculation. Also a potentiometer for adjustment is arranged for easy and clear use. Compared with regular infrared sensor switch, it has advantages in distance, low interference by visible light, affordable, easy to assemble, easy to use, and can be widely used in robot obstacle avoidance, assembly lines and many other occasions.
The obstacle detection distance can be adjusted with a potentiometer in copper screw, once done adjusting (e.g. max 60cm), the sensor will output low flat within the effective distance (e.g. obstructions at 40cm & 10cm ) to the microcontroller.
Specification
- Power supply: 5V
- Control Outout:100mA when supply 5V
- Circuit consume: <25mA
- Response time: <2ms
- Direction: ≤15°
- Range: 3~40cm adjustable for opacity and transparent objects
- Shell marterial: plastic
- A low voltage output will be given when a object is in its detecting scope
- When connect to MCU pins, you need to add an 1~10K Ohm resistor for pull-up
- Sharp: 30mm(length) x 20mm(wide) x 13mm(thickness) with a 45cm lead wire
Connecting Diagram
- RED--->VCC
- YELLOW-->Signal
- GREY-->GND
Notice: For making the sensor working more stable with your arduino processor, we use an external resistor(range from 1K to 10K) for pull-up!
However, it's also available to connect the signal pin directly to the Arduino digital pin for testing. Just take care of the pin mode initialization in your Arduino software. Set the "INPUT_PULLUP" mode for the digital detection. For more details, please check the official PinMode function description.
Sample code
void setup()
{
pinMode(3,INPUT);
Serial.begin(9600);
}
void loop()
{
int val=digitalRead(3);
Serial.println(val);
delay(500);
}