Home > Blog > Line Sensing. QRE1113 Reflectance Sensor + Arduino

Line Sensing. QRE1113 Reflectance Sensor + Arduino

Summary of Line Sensing. QRE1113 Reflectance Sensor + Arduino


The QRE1113 is a reflectance sensor used for robotic line following and proximity detection under an inch. It operates by emitting IR light and measuring the reflection with a phototransistor to distinguish between dark and light surfaces. Available in analog and digital versions, the analog model outputs voltage proportional to reflected light, while the digital version estimates this value by timing how long a capacitor takes to discharge. This allows microcontrollers without analog inputs to still detect line positions effectively.

Parts used in the QRE1113 Reflectance Sensor Project:

  • QRE1113 Reflectance Sensor
  • IR LED
  • Phototransistor
  • Breakout Board (Analog or Digital)
  • Capacitor
  • Microcontroller (Arduino)
  • 5V Power Source
  • Ground Connection

The QRE1113 is a common reflectance sensor often used in robotic line followers. The sensor works by shining an IR LED down and seeing how much of that light bounces back using a phototransistor. Because dark colors will bounce back less of the light, the sensor can be used to tell the difference between white and black areas. So an array of these can be used to help a robot determine where a dark line is on the ground so it can follow it. But they can also be used to determine proximity under an inch.Line Sensing. QRE1113 Reflectance Sensor + Arduino

Both Pololu and Sparkfun sell digital and analog models of a QRE1113 breakout board. The analog version is very simple, it just outputs an analog voltage on the signal pin relative to how much light was reflected. And you might think the digital version, especially being called a line sensor by sparkfun, would just output HIGH when it sees a line, and LOW when it does not. But this is not the case.

The digital version is designed for times you do not have an analog input on your microcontroller but still need an analog reading of how much light was reflected. It does this by allowing you to charge a capacitor on the board, and then timing how long it takes to discharge. The more light that is reflected, the less time it takes to discharge the capacitor. In my tests, the times ranged between 10 microseconds (10/million) to 2.5 milliseconds, so this is all done very quickly and wont put much of a delay in your code.Schematic Line Sensing. QRE1113 Reflectance Sensor + Arduino

Hooking Them Up

Hooking the QRE1113 to your Arduino is very simple. It just needs power (5V), ground, and an analog or digital pin depending on what version you have.

For more detail: Line Sensing. QRE1113 Reflectance Sensor + Arduino 

Quick Solutions to Questions related to QRE1113 Reflectance Sensor Project:

  • How does the QRE1113 sensor work?
    The sensor works by shining an IR LED down and seeing how much of that light bounces back using a phototransistor.
  • Can the QRE1113 be used for proximity detection?
    Yes, they can also be used to determine proximity under an inch.
  • What is the difference between the analog and digital versions?
    The analog version outputs an analog voltage relative to reflected light, while the digital version times how long it takes a capacitor to discharge.
  • Does the digital version output HIGH when it sees a line?
    No, the digital version is not designed to simply output HIGH or LOW but instead measures discharge time.
  • How fast is the measurement process on the digital version?
    The times ranged between 10 microseconds to 2.5 milliseconds, so this is all done very quickly.
  • How do you hook the QRE1113 to an Arduino?
    It just needs power (5V), ground, and an analog or digital pin depending on what version you have.
  • What determines the discharge time on the digital board?
    The more light that is reflected, the less time it takes to discharge the capacitor.

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter
Scroll to Top