Unable to read from Pololus QTRx Sensor on Custom Board

Hello i have a custom pcb using the DUE's atsam3x and i am having trouble reading from pololus QTRX sensors . Based on an actual board and pololus documentation i was able to reverse engineer the schematic and copied it on my own pcb. Basically the schematic is this

Of course pololu doesnt reveal their part names, so i just de-solderd the components from the one i bought.

Image - (Preview doesnt show second Image)

here is the schematics on the custom board. I have verified the connections and all are soldered properly. Damage to the part due to the desoldering process is also unlikely, i am confident that i desoldered and solderd it properly. Extra care was done with the temperature of the hot air.

Although the code i used is not using pololus library, it should still work because im sure pololus just also use digitalRead but pulsed to very the reading.

void setup(){
  pinMode (24, INPUT);
  pinMode (23, INPUT);
  pinMode (16, INPUT);
  pinMode (17, INPUT);
  pinMode (18, INPUT);
  pinMode (19, INPUT);
  pinMode (1, INPUT);
  pinMode (22, INPUT);
  pinMode (2, INPUT);
  pinMode (78, INPUT);
  pinMode (53, INPUT);
  pinMode (3, INPUT);
  pinMode (5, INPUT);
  pinMode (6, INPUT);
  pinMode (36, INPUT);
}

void loop(){
  SerialUSB.println(String(digitalRead(24))
                    + String(digitalRead(23))
                    + String(digitalRead(16))
                    + String(digitalRead(17))
                    + String(digitalRead(18))
                    + String(digitalRead(19))
                    + String(digitalRead(1))
                    + String(digitalRead(22))
                    + String(digitalRead(2))
                    + String(digitalRead(78))
                    + String(digitalRead(53))
                    + String(digitalRead(3))
                    + String(digitalRead(5))
                    + String(digitalRead(6))
                    + String(digitalRead(36)));
}

This code just displays me all 0

What i have tried:

  • Shorting the signal pin to 3.3v and the serial verified it
  • Verifying the polarity of the components. Using Images from pololu and the continuity on actual board i have. both of them agrees with eachother
  • Waving a phone flashlight and IRleds over the sensors but values dont change

Although the code i used is not using pololus library, it should still work because im sure pololus just also use digitalRead but pulsed to very the reading.

I would say Pololu pulses the LEDs to get any reading. If you constantly power the LEDs you only see any signal if you change the visible pattern.

pylon:
I would say Pololu pulses the LEDs to get any reading. If you constantly power the LEDs you only see any signal if you change the visible pattern.

Yes that might be the case, but digitalRead should still be able to see some data. In my case im not getting any :frowning:

I have tried using the library example sketch, and it still reads all zero on any colored surface, or with a flashlight

i should have tested the Pololu board before de soldering if it still working last time i checked was month ago

Yes that might be the case, but digitalRead should still be able to see some data. In my case im not getting any

Why should digitalRead return anything else than 0?

I have tried using the library example sketch, and it still reads all zero on any colored surface, or with a flashlight

A flashlight makes no sense, the sensor is reflective. If I interpret the circuit correctly, it works only if your pulse the LEDs.

pylon:
Why should digitalRead return anything else than 0?

A flashlight makes no sense, the sensor is reflective. If I interpret the circuit correctly, it works only if your pulse the LEDs.

Im sorry i should been a lot clearer. I was expecting that when not using the library if i agitate the sensors with some flashlight or IRLED (dunno if this one really turned on because we cant see IR with our eyes).

I have tried the other example, it would seems that i got values that fluctuate not. Although the value got agitated at a range of around 10cm which is a lot farther than i remember last using it, which i can easly adjust the dimming levels.

I think you are right, i must really use the library inorder to get meaningfull data. Thanks Pylon i confirmed that the hardware is okay and will let the code handle the rest.

Im sorry i should been a lot clearer. I was expecting that when not using the library if i agitate the sensors with some flashlight or IRLED (dunno if this one really turned on because we cant see IR with our eyes).

That's a lottery if you don't know the exact frequencies used by the Pololu solution. Additionally you would have to match exactly the read out time with your lighting change to see a reaction using that circuit. You won't see a constant value on your input if you provide constant light! The "pull-up" is a capacitor!