SparkFun Electronics will be closed on November 26, 2020 and November 27, 2020 for the Thanksgiving holiday. We will begin normal operations at 9:00 AM Mountain Time on November 30, 2020.
Photo interrupter, photogate, photodiode, phototransistor, whatever you want to call it, this sensor is composed of an infrared emitter on one upright and a shielded infrared detector on the other. By emitting a beam of infrared light from one upright to the other, the sensor can detect when an object passes between the uprights, breaking the beam. Used for many applications including optical limit switches, pellet dispensing, general object detection, etc. Gap width = 10mm
A breakout board is available.
Check out the GitHub repository for the example code:
If it requires power, you need to know how much, what all the pins do, and how to hook it up. You may need to reference datasheets, schematics, and know the ins and outs of electronics.
Skill Level: Rookie - You may be required to know a bit more about the component, such as orientation, or how to hook it up, in addition to power requirements. You will need to understand polarized components.
See all skill levels
Based on 4 ratings:
3 of 3 found this helpful:
Works absolutely fine. I am using it on a "persistence of vision" wheel to time the start of the display. The interruption lasts a fraction of a millisecond but triggers every time. I highly recommend buying the related circuit board. It makes mounting and use easier. I would also recommend that Sparkfun add mounting holes to the board. Current version has no screw holes.
1 of 1 found this helpful:
A photo-interrupter is so versatile, I'm keeping a couple in my kit of basics such as leds, 200ohm resistors, and buttons. Your list of uses could include detecting the initial position of stepper motors, detecting the position of DC motors, detecting doors opening, closing, or sliding open and closed, detecting a coin dropping through a slot, and on and on!
I soldered this part up to the suggested (almost required) Photo Interrupter Breakout Board - GP1A57HRJ00F, and it worked great with my Arduino Mega project.
My one wish is for better application circuit documentation. As things are, most people without EE degrees will have to buy the breakout board to use the part. I couldn't decipher the datasheet to work out a recommended wiring for Arduino.. A quick schematic sketch would be great.
So, I love this part when bought with the corresponding Breakout Board - it worked nearly the first time, and works over and over, and works for so many things. ...and thanks for making the Breakout Board; it's a lifesaver.
They are very easy to use and work very will.
I tried driving a green LED directly off of the output and it lit but was really dim. There is an internal voltage regulator which also seems to limit the output current as well. I tried supplying 6V and 7.5V to the receiver end within the specified range. In either case, it output about 4.5 volts. And changing the series resistor with the LED from 220 ohm to 100 ohm to 0 ohm didn't change the brightness at all. Same thing with red (green LEDs need higher voltage difference than red). Measuring the resistance between VCC and VO gave about 13.5 kohms, which is less than the 15 kohms internal resistance specified in the data sheet. But that shouldn't make any significant difference in driving the LED. Finally I added a 2N2222A NPN transistor to the output by connecting the base to VO. Used a 220 ohm resistor in series with the green LED between emitter and ground. Put the power supply to 6 V and used a 1N4004 diode to safeguard the electrical power supply (reducing VCC to about 5.4 V) and used that to power both the photointerrupter and the 2N2222A transistor powering the LED. Bright as I wanted it to be. So my conclusion is that the output is mostly regulating the voltage and is somehow current limited. But it's internal to the device, so you cannot change it.