IR Sensor

Introduction



    IR sensors come in different shapes and implementations, this IR sensor in particular is used to detect how much IR light does a surface reflect. Using this sensor, robots can follow printed tracks and perform different functions depending on the marks on the track.


Theory of Operation


    IR sensors consist of an IR emitter and an IR receiver, the emitter will shine IR light on the surface while the receiver measures how much light is reflected. Based on the amount of light reflected, the color of the surface can be known.


Technical Details



•    Dimensions: 0.3" x 0.5" x 0.1" (without optional header pins installed)
•    Operating voltage: 5.0 V
•    Supply current: 17 mA
•    Output format:     
                        o    Analog (for analog version of the sensor)
                         o    Digital I/O-compatible signal that can be read as a timed high pulse (for RC type version of the senspr)
•    Optimal sensing distance: 0.125" (3 mm)
•    Maximum recommended sensing distance: 0.375" (9.5 mm)
•    Weight without header pins: 0.008 oz (0.2 g)



Connections


      


Code:


int sensorPin = A0;   // Select the input pin for the sensor
int ledPin = 13;      // Select the pin for the LED
int sensorValue = 0;  // Variable to store the value coming from the sensor

void setup() {
  // Declare the ledPin as an OUTPUT:
  pinMode(ledPin, OUTPUT);
  // Starting serial
  Serial.begin(9600);
}

void loop() {
  // read the value from the sensor:
  sensorValue = analogRead(sensorPin);
  // Print value to serial
  Serial.println(sensorValue);
}



We ship to the GCC and MENA regions.

Reliable and fast shipping to your door, quality assured.

More about shipping

Find us on
Instagram

Just type @idea_link

Visit our profile