Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use QTR-MD-05RC: Examples, Pinouts, and Specs

Image of QTR-MD-05RC
Cirkit Designer LogoDesign with QTR-MD-05RC in Cirkit Designer

Introduction

The QTR-MD-05RC, manufactured by Pololu, is an infrared (IR) reflective sensor array designed for line-following and object detection applications in robotics. This compact and versatile module features five IR emitter and phototransistor pairs, enabling it to detect the presence of nearby objects or track lines on a surface by measuring the reflection of infrared light. The QTR-MD-05RC is ideal for use in autonomous robots, industrial automation, and educational projects.

Explore Projects Built with QTR-MD-05RC

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Arduino Nano-Powered PID Line Following Robot with Reflectance Sensor Array and Dual Motor Driver
Image of Line following bot: A project utilizing QTR-MD-05RC in a practical application
This circuit is designed for an advanced line-following robot that uses a QTRX-HD-07RC Reflectance Sensor Array for line sensing and a Motor Driver 1A Dual TB6612FNG to control two DC Mini Metal Gear Motors. The Arduino Nano serves as the microcontroller, running a PID control algorithm to adjust the motor speeds for precise tracking. Power is supplied by a 5V battery for the logic and a 12V battery for the motor driver.
Cirkit Designer LogoOpen Project in Cirkit Designer
Battery-Powered RC Car with Massive RC MDEx and MDD10A Motor Driver
Image of Massive RC MDEx: A project utilizing QTR-MD-05RC in a practical application
This circuit is a remote-controlled motor driver system powered by a LiPo battery. It uses a Massive RC MDEx microcontroller to control an MDD10A dual motor driver, which in turn drives two GM25 DC motors. The R6FG receiver receives remote control signals to manage the motor directions and speeds.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino Mega 2560 Battery-Powered Robotic Vehicle with Reflectance Sensor and Motor Control
Image of PID Line Following Robot (No ESP32 or US): A project utilizing QTR-MD-05RC in a practical application
This circuit is a motor control system powered by 18650 Li-ion batteries, featuring an Arduino Mega 2560 microcontroller that controls two gear motors with integrated encoders via a TB6612FNG motor driver. It also includes a QTRX-HD-07RC reflectance sensor array for line following, and power management components such as a lithium battery charging board, a step-up boost converter, and a buck converter to regulate voltage.
Cirkit Designer LogoOpen Project in Cirkit Designer
Bluetooth-Controlled Multi-Function Arduino Nano Gadget
Image of Copy of Smarttt: A project utilizing QTR-MD-05RC in a practical application
This is a portable, microcontroller-driven interactive device featuring Bluetooth connectivity, visual (RGB LED), auditory (loudspeaker), and haptic (vibration motor) feedback, user input (pushbutton), and a rechargeable power system (TP4056 with Li-ion battery).
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with QTR-MD-05RC

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of Line following bot: A project utilizing QTR-MD-05RC in a practical application
Arduino Nano-Powered PID Line Following Robot with Reflectance Sensor Array and Dual Motor Driver
This circuit is designed for an advanced line-following robot that uses a QTRX-HD-07RC Reflectance Sensor Array for line sensing and a Motor Driver 1A Dual TB6612FNG to control two DC Mini Metal Gear Motors. The Arduino Nano serves as the microcontroller, running a PID control algorithm to adjust the motor speeds for precise tracking. Power is supplied by a 5V battery for the logic and a 12V battery for the motor driver.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Massive RC MDEx: A project utilizing QTR-MD-05RC in a practical application
Battery-Powered RC Car with Massive RC MDEx and MDD10A Motor Driver
This circuit is a remote-controlled motor driver system powered by a LiPo battery. It uses a Massive RC MDEx microcontroller to control an MDD10A dual motor driver, which in turn drives two GM25 DC motors. The R6FG receiver receives remote control signals to manage the motor directions and speeds.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of PID Line Following Robot (No ESP32 or US): A project utilizing QTR-MD-05RC in a practical application
Arduino Mega 2560 Battery-Powered Robotic Vehicle with Reflectance Sensor and Motor Control
This circuit is a motor control system powered by 18650 Li-ion batteries, featuring an Arduino Mega 2560 microcontroller that controls two gear motors with integrated encoders via a TB6612FNG motor driver. It also includes a QTRX-HD-07RC reflectance sensor array for line following, and power management components such as a lithium battery charging board, a step-up boost converter, and a buck converter to regulate voltage.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Copy of Smarttt: A project utilizing QTR-MD-05RC in a practical application
Bluetooth-Controlled Multi-Function Arduino Nano Gadget
This is a portable, microcontroller-driven interactive device featuring Bluetooth connectivity, visual (RGB LED), auditory (loudspeaker), and haptic (vibration motor) feedback, user input (pushbutton), and a rechargeable power system (TP4056 with Li-ion battery).
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications

  • Line-following robots
  • Edge detection for robotic navigation
  • Object detection and proximity sensing
  • Industrial automation systems
  • Educational robotics projects

Technical Specifications

The QTR-MD-05RC sensor array is designed for ease of use and compatibility with a wide range of microcontrollers. Below are its key technical details:

Key Technical Details

Parameter Value
Operating Voltage 2.9 V to 5.5 V
Average Current Consumption 7 mA (typical)
Output Type Digital pulse width (RC time measurement)
IR Wavelength 940 nm
Detection Range 3 mm to 30 mm (depending on surface)
Dimensions 33 mm × 8 mm × 3 mm
Weight 0.6 g

Pin Configuration and Descriptions

The QTR-MD-05RC has an 8-pin interface. The table below describes each pin:

Pin Number Name Description
1 VCC Power supply input (2.9 V to 5.5 V).
2 GND Ground connection.
3 OUT1 Digital output for sensor 1 (leftmost sensor).
4 OUT2 Digital output for sensor 2.
5 OUT3 Digital output for sensor 3 (center sensor).
6 OUT4 Digital output for sensor 4.
7 OUT5 Digital output for sensor 5 (rightmost sensor).
8 CTRL Control pin for enabling/disabling the IR emitters (active low).

Usage Instructions

The QTR-MD-05RC is straightforward to use in a circuit. It outputs digital signals that correspond to the reflectivity of the surface beneath each sensor. Follow the steps below to integrate the sensor array into your project:

Connecting the QTR-MD-05RC

  1. Power the Module: Connect the VCC pin to a 3.3 V or 5 V power source and the GND pin to ground.
  2. Connect Outputs: Connect the OUT1 to OUT5 pins to the digital input pins of your microcontroller.
  3. Control Pin: Optionally, connect the CTRL pin to a digital output pin of your microcontroller to enable or disable the IR emitters. Leave it unconnected if you want the emitters to remain enabled.

Reading Sensor Outputs

The QTR-MD-05RC outputs a digital pulse whose width corresponds to the reflectivity of the surface. A shorter pulse indicates a more reflective surface (e.g., white), while a longer pulse indicates a less reflective surface (e.g., black).

Example: Using with Arduino UNO

Below is an example Arduino sketch to read the sensor outputs and print the results to the Serial Monitor:

// QTR-MD-05RC Example Code for Arduino UNO
// This code reads the pulse width from each sensor and prints the values
// to the Serial Monitor. Ensure the QTR-MD-05RC is properly connected.

#define NUM_SENSORS 5  // Number of sensors on the QTR-MD-05RC
const int sensorPins[NUM_SENSORS] = {2, 3, 4, 5, 6}; // Digital pins for OUT1-OUT5

void setup() {
  Serial.begin(9600); // Initialize Serial communication
  for (int i = 0; i < NUM_SENSORS; i++) {
    pinMode(sensorPins[i], INPUT); // Set sensor pins as inputs
  }
}

void loop() {
  for (int i = 0; i < NUM_SENSORS; i++) {
    pinMode(sensorPins[i], OUTPUT); // Set pin to output mode
    digitalWrite(sensorPins[i], LOW); // Discharge capacitor
    delayMicroseconds(10); // Wait for capacitor to discharge
    pinMode(sensorPins[i], INPUT); // Set pin back to input mode

    // Measure the time it takes for the pin to go HIGH
    unsigned long duration = pulseIn(sensorPins[i], HIGH, 3000);

    // Print the duration for each sensor
    Serial.print("Sensor ");
    Serial.print(i + 1);
    Serial.print(": ");
    Serial.print(duration);
    Serial.print(" us\t");
  }
  Serial.println(); // Print a new line after all sensor readings
  delay(100); // Small delay before the next reading
}

Important Considerations

  • Surface Reflectivity: The sensor's performance depends on the reflectivity of the surface. For best results, use high-contrast lines (e.g., black lines on a white background).
  • Emitter Control: Use the CTRL pin to disable the IR emitters when not in use to save power.
  • Ambient Light: Minimize ambient IR light interference by shielding the sensor or using it in controlled lighting conditions.

Troubleshooting and FAQs

Common Issues and Solutions

  1. No Output from Sensors

    • Ensure the VCC and GND pins are properly connected.
    • Verify that the CTRL pin is not being held low (disabling the emitters).
  2. Inconsistent Readings

    • Check for ambient IR light interference and reduce it if possible.
    • Ensure the sensor array is positioned at the correct height (3 mm to 30 mm) above the surface.
  3. Sensors Not Detecting Lines

    • Verify that the line has sufficient contrast with the background.
    • Clean the sensor array to remove dust or debris.

FAQs

Q: Can the QTR-MD-05RC be used with a 3.3 V microcontroller?
A: Yes, the QTR-MD-05RC operates within a voltage range of 2.9 V to 5.5 V, making it compatible with 3.3 V systems.

Q: How do I adjust the sensitivity of the sensors?
A: The sensitivity is determined by the reflectivity of the surface and the height of the sensor array. Adjust the height for optimal performance.

Q: Can I use fewer than five sensors?
A: Yes, you can use only the outputs you need and leave the unused outputs unconnected.

Q: What is the purpose of the CTRL pin?
A: The CTRL pin allows you to enable or disable the IR emitters. This is useful for saving power or reducing interference when the sensor is not in use.