Line Sensor- QRE1113 (Analog) Interfacing With Arduino Uno

ABOUT THE PROJECT:

On this tutorial, we will show how to use the QRE1113 line sensor with an Arduino board. This kind of sensor is usually used in line following robots. It works measuring the surface reflectiveness.

Here we will show the digital version. On this version, and on this breakout board type, the sensor discharges a capacitor proportional to the surface reflectiveness. So, faster discharge means more reflex.

Looking to its schematic, we can see that it is attached to a 10nF capacitor.

HARDWARE REQUIRED:

Electronics

COMPONENTS USED

QUANTITY

Line Sensor- QRE1113 1
ARDUINO UNO 1
R1 100ohm
R2 220ohm
C1 10nF


ABOUT THE SENSOR

Description: This version of the QRE1113 breakout board features an easy-to-use analog output, which will vary depending on the amount of IR light reflected back to the sensor. This tiny board is perfect for line sensing applications and can be used in both 3.3V and 5V systems.

The board’s QRE1113 IR reflectance sensor is comprised of two parts – an IR emitting LED and an IR sensitive phototransistor. When you apply power to the VCC and GND pins the IR LED inside the sensor will illuminate. A 100Ω resistor is on-board and placed in series with the LED to limit current. A 10kΩ resistor pulls the output pin high, but when the light from the LED is reflected back onto the phototransistor the output will begin to go lower. The more IR light sensed by the phototransistor, the lower the output voltage of the breakout board.

These sensors are widely used in line following robots – white surfaces reflect much more light than black, so, when directed towards a white surface, the voltage output will be lower than that on a black surface.

The power input and analog output pins are brought out to a 3-pin, 0.1″ pitch header. The board also has a single mounting hole if you want to screw the board onto something.

Looking to its schematic, we can see that it is attached to a 10nF capacitor.

Dimensions: 0.30 x 0.55 “ (7.62 x 13.97 mm)

Features:

  • 5VDC operating voltage
  • 25mA supply current
  • Optimal sensing distance: 0.125″ (3mm)

 

Documents:

imageedit_1_7493397999

 

file-pdf-icon

DATASHEET OF FINGERPRINT SCANNER(clickable image)

PIN CONFIGURATION

SOFTWARE REQUIRED

ARDUINO IDE (for windows)

SCHEMATICS

 

ARDUINO SOURCE CODE

arduino-icon-2

int SensorPin=2;
int SensorValue=LOW;

void setup()
{
pinMode(13,OUTPUT);
Serial.begin(9600);
}

void loop()
{

pinMode(2,OUTPUT);

digitalWrite(2,HIGH);

delayMicroseconds(10);

pinMode(2,INPUT);

long time = micros();

while (digitalRead(SensorPin) == HIGH && micros() – time < 3000);

int diff = micros() – time;

SensorValue=diff;

if(Serial.available()>0);
{
Serial.println(SensorValue);
}
delay(500);
}

HAPPY INTERFACING:)

SHUBHAM GUPTA-TECEX

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s