The Dual-Channel I/R Reflectance Sensor incorporates a pair of QRE1113 infra-red sensors on a single PCB, allowing you to use it to build a line-following robot or snap it in half to use two separate single sensors.

Connections: Dual Channel

The 5V and GND connections are linked directly on the PCB, so if you will use the module as supplied you do not need to connect both 5V and both GND headers. You only need to connect one 5V, one GND, and the pair of outputs. For example:

Connections: Separate Sensors

If you snap the PCB down the middle (where it has been deliberately weakened by a row of holes) you can connect the sensors individually. This allows them to be used in different projects, or physically mounted using different spacing to that provided by the PCB. In this case you need to supply 5V and GND connections to the modules separately. For example:

Reading Sensor Values

Each sensor outputs an analog signal between 0V and 5V, depending on the amount of infra-red light that is reflected back into the sensor by a nearby surface. A highly reflective or light coloured surface will reflect more, while a dark surface will reflect less.

A very simple example of how to read values from the sensors can be found built in to the Arduino IDE, under:

  File > Examples > 01.Basics > AnalogReadSerial

This will read the sensor value from analog input A0 and display it in the serial console of the IDE.

To read and display both sensors together, you can modify the AnalogReadSerial example to read from both sensors as follows:

 

void setup() {
  Serial.begin(9600);
}

void loop() {
  // read the input on analog pin 0:
  int sensorValue1 = analogRead(A0);
  // read the input on analog pin 1:
  int sensorValue2 = analogRead(A1);
  // print out the values you read:
  Serial.print(sensorValue1);
  Serial.print("    ");
  Serial.println(sensorValue2);
  // delay in between reads for stability
  delay(100);
}