I'm trying to get going with the RPI-1391 sensor but I'm obviously doing something wrong.
I'm connecting it to a Raspberry Pi, where:
- Pins 1 and 3 are connected to Pi's ground
- Pin 2 is connected to physical pin 2 on the raspberry (5V)
- Pin 5 is connected in series to a 270 ohm resistor which is connected to 5V on the raspberry as well
- Pin 4 is connected to a GPIO pin set up to listen for changes in voltage configured with an internal pull-down resistor.
I tested my GPIO pin by supplying 3v to it directly from physical pin 1 on the raspberry and my program is successfully reading changes in the state.
With this setup I insert a piece of plastic in the sensor's opening and nothing happens, where I expect to see a changed state on my GPIO pin.
Things to consider:
Previously I connected the sensor's pin 5 directly to 5V before I knew better which should have burned the IR LED, however I tried connecting a white LED in series to pin 3 and then to the raspberry's ground and it very slightly lights up which means current is passing through the IR LED on the sensor which I'm assuming means that it's not burned?
When I measure the voltage after my 270 ohm resistor to raspberry's ground I'm reading 4.5V where I was expecting something along the lines of ~1.5V, since that's kind of the nominal voltage of the IR LED.