Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5149

Automation, sensing and robotics • Re: Wiring multiple photoelectric sensors to RPI 4

$
0
0
Hi! I managed to figure it out using a voltage divider circuit that I found here: https://forum.arduino.cc/t/voltage-divi ... sor/848058

I am getting the outputs to read 3.36V with a multimeter when the sensor detects an object (hit) and 0V when it does not detect an object (no hit). For R1 I am using a 560R resistor (I think the internal resistor of the sensor is 731 ohms, so when the resistor is engaged I add those values together?). For R2, I am using a 1.5k ohm resistor. The resistors themselves are 1/4 watt, so I don't think I'm exceeding the power rating. Upon applying to the GPIO pins, I am getting good readings and the program works!

Also, I apologize - in my other post, I forgot to mention that I was leaving the GPIO unplugged from the system so the pins would not be damaged. I think I caused you undue worry! I do appreciate your (and everyone else's) help with this! I definitely learned so much.

Statistics: Posted by dij0nmustard — Fri Mar 15, 2024 8:15 pm



Viewing all articles
Browse latest Browse all 5149

Trending Articles