I bought a GP1A57HRJ00F photo interrupter and now I want to connect it to my Arduino, but my problem is that I didn’t buy the breakout board (BOB-09322) which makes it hard for me to figure out how to connect this the right way to the arduino since I can’t read data sheets, and I kind of need to do it till Monday for a small project. So if one of you has one of these and maybe could show me a picture of how you connected it on a breadboard and to the Arduino, something very simple, I will be very thank full, as I am an amateur at this…
You can find a tutorial on how to read a datasheet in the Sparkfun tutorial section.
On page two you will see the internal schematic. One set of pins if for the LED and the other for the transistor used as a switch.
Pin 1 will go to 5V.
Pin 2 will go to a resistor.
The other end of that resistor goes to ground.
From the table on page 4, you will see the forward voltage is about 1.14V at 7ma. That means the resistor need to be (5-1.14)/(.007) or 551 ohms. But since the LED can go up to as much as 50ma a standard 330 ohm resistor should do just fine.
Now the transistor side is even simpler.
Pin 3 goes to 5V
Pin 5 goes to ground
Pin 4 goes to a digital input pin on the Arduino.
Edit: Deadline has come and gone and no reply from OP. Why does this continue to surprise me…?
Edit: Any news on this? I hate threads that just end without resolution…
Hey, just wanted to pop on and thank you fil-freak writing this post. Perhaps OP didn’t get anything out of it, but as someone new to reading datasheets, I found it useful.
Hey fll, so ive got a project that requires me to design a linear slide that can go to a position, wait for a few seconds and return to its original location. To make it simple, I decided to go with a belt driven IGUS linear slide using a stepper. I want to use the photo interrupter mentioned as a limit switch for the two locations I need to slide to go and from. I’ve got both the stepper and photo interrupter working independently using Arduino UNO but I am having difficulty coding the combination. Any coding tips…or atleast a starting point?