Hi,
Thanks for the answer,
Yes I know, the second picture with the Arduino is not matching color but I rechecked and everything is fine.
I finally open the encoder and sent IR light in the optical sensor with a remote control and I got signal as I expected. So now I think that it is pretty much a problem with the IR emitter on my encoder that doesnt work well or misaligned with the sensor. What you think?
Yes it’s a brand new encoder and when I said I got the signal expected with the remote control it was with an oscilloscope. I think I’ll buy another one now. I just wanted to make sure it was a defect an that a brand new one should in theory work.
An open collector output requires a pull up resistor to generate the output signal. A resistor from the collector to power in this case, given the specification on your schematic, the pull up resistor should be connected to to 30vdc or less a sized to limit current to 30mA or less. A 1kohm resistor would do.