IR sensor-CNY70 - not sure its working

Hi all,
I'm kind of new to the "Arduino" concept.
I'm using a teensy 4.0 and I'm trying to build myself a small piece that resemble the effect of blowing into a wind instrument.

I'm trying to do exactly what this video shows:

for some reason this person shows the below scheme for the sensor, which shows that both Ground pins are diagonal to one-another, which for me didn't work. I continuously receive LOW readings.

A different connection setup (2nd image) from a different Youtube video shows that the Ground pins are not diagonal to one-another has worked for me and this way I am getting readings from the sensor that makes sense.

1st image

2nd image:
image

My issue is that in the video, he puts the sensor inside a dark, cylindric cardboard container and the sensor seems to be able to work and signal varying values to the processor.

However, while I'm randomly testing my sensor against dark and light objects in my room - the readings make sense. But when I insert it into the same type of cardboard case ( which blocks all surrounding light) it only sends readings of absolute 0 - as if it doesn't detect any IR signals.

Important note - I use the 3.3V output of the Teensy 4.0 and not 5V.

I suspect that the LED doesn't work and thus I get readings when there is other light sources around.
How can I make sure?

Thanks in advance!

This is CNY70 datasheet.

See this comment:
Which one are you using?

Thanks @ruilviana

I ended up figuring I was looking at the sensor the wrong way, hence connecting it wrong.
BTW the scheme from the 1st image worked for me and I'm using the aftermarket part, not the original Vishay one.

BTW on the led circle I put a 220 Ohms resistor.
On the receiver circle I put a 100K Ohms resistor.

Thanks, hope it helps future builders!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.