Sorry! I have no prior experience with circuits or electrical engineering so it was difficult for me to understand. I appreciate the link.Are you reading completely what we send to you??
My post on Wed Mar 06, 2024 10:26 am was obvious!
First Never put more than 5V on any GPIO!
Now my second question. Does it works with the internal pull up activated?
I'm using a similar photo detector on my 8mm projector to MP4 converter. and like yours it's a open collector which I added a small pull-up resistor to make it work!
And for your question the resistor is between the GPIO input and the 3.3V. Your open collector output from your sensor needs to be connected to this input. The reason like I said at least four times now is that open collector only set signal to ground and you need something that will put the signal to 3.3V when the output is not ON. This is the reason that you need pull-up.
You should read how open collector transistor behave ! It like you shorting to ground when it's ON and it is open when it's OFF.
the NPN transistor short to GROUND. A PNP transistor will short to VCC.
https://learn.adafruit.com/transistors- ... -collector
To the best of my ability, I tried to replicate your drawing schematic for the NPN hook up. However, with the 4k7 resistor in place, the RPI doesn't get any signals from the sensor. Did I incorrectly wire the resistor?
Statistics: Posted by dij0nmustard — Tue Mar 12, 2024 5:05 pm