QTRX-HD-02A sensor reading only low values

Hello forum,

I’m facing an issue with my minisumo robot project for university. Last night, one of my QTR-1A sensors broke, so I improvised and borrowed a QTRX-HD-02A sensor (QTRX-HD-02A Reflectance Sensor Array: 2-Channel, 4mm Pitch, Analog Output, Low Current). I connected the CTRL pin to VCC, GND to GND, and OUT2 to pin A3 on my Arduino.

The problem is that, initially, the sensor was reading high values (>950), but now it’s only reading very low values (<15). I’m not sure what went wrong. The other QTR-1A sensor is still reading normally (values between 0 and 1024).

Does anyone have any ideas on what might be causing this issue and how to fix it?

Here is some part of my code.

#include <QTRSensors.h>

const uint8_t sensorPins[] = {A3, A4}; //A3 - QTRX-HD-02A ; A4 - QTR-1A
QTRSensors qtr;

void setup() {
  qtr.setTypeAnalog();
  qtr.setSensorPins(sensorPins, sizeof(sensorPins) / sizeof(sensorPins[0]));
  Serial.begin(9600);
}

void loop() {
    uint16_t sensorValues[2];
    qtr.read(sensorValues);
    int CLS = sensorValues[0];
    int CLD = sensorValues[1];
      Serial.println("Reading sensor:");
      delay(1000);
      Serial.print("Reading left sensor: "); Serial.println(CLS);
      Serial.print("Reading right sensor: "); Serial.println(CLD);
      delay(2000);
}

Serial monitor:

20:55:20.444 → Reading left sensor: 5
20:55:20.444 → Reading right sensor: 432
20:55:43.513 → Reading sensors:
20:55:44.484 → Reading left sensor: 14
20:55:44.484 → Reading right sensor: 989
20:55:46.483 → Reading sensors:
20:55:47.493 → Reading left sensor: 11
20:55:47.493 → Reading right sensor: 742
20:55:49.493 → Reading sensors:
20:55:50.503 → Reading left sensor: 15
20:55:50.503 → Reading right sensor: 1007

Hello.

Just to clarify, are you also providing power for the sensor to VCC (e.g. from the 3.3V or 5V pin on the Arduino, depending on its operating voltage)? Could you post some pictures of your setup that show all of your connections?

Brandon

Thank you for your response!
Just to clarify in case it’s not clear from the pictures:
I’ve connected the CTRL pin to the VCC pin on the sensor.

The connections between the sensor and the PCB are as follows:

  • OUT2 (Sensor)Signal/A3 (PCB)
  • GND (Sensor)GND (PCB)
  • VCC (Sensor)+ (PCB)

I should also mention that the PCB is connected to an Arduino Nano and powered by an 11.1V 1000mAh battery. The PCB includes a voltage regulator that ensures no more than 5V reaches the Arduino board or the sensors. Only the motors receive higher voltages.Additionally, I’ve tried powering it with a 9V battery and directly through the laptop, but the issue persists.



Thank you for the additional information and pictures. It look like you are actually using the “RC” version of that sensor, which is the QTRX-HD-02RC Reflectance Sensor Array. (By the way, in case it contributed to your confusion, we just noticed that a couple pictures on the QTRX-HD-02A product page were showing the QTRX-HD-02RC instead and have fixed it).

Additionally, it’s not clear if you tried to power the sensor array from a 9V battery or just your Arduino, but please note that the sensor has an operating voltage of 2.9-5.5V so if you powered it from higher than that, there’s a chance it could have been damaged.

Also, please note that the board pulls the CTRL pin high by default, so you shouldn’t need to drive it high (but doing so shouldn’t cause any problems either).

Brandon