Photo interrupters explained

img_0147 (Custom)

[Eric] sent in this very informative writup on how to use Photo interrupters. These things can be used for many things, he lists pellet dispensing and limit switches. He found one in his junk box and realized he knew very little about it. After some exploring and research, he’s here to educate the rest of us. There’s a good breakdown of the circuit itself which is pretty simple as well as a test circuit and some sample code.

20 thoughts on “Photo interrupters explained

  1. Good place to find stuff like this is from old photocopier machines. You can even find several hall effect sensors if you’re lucky. Having said that, it is trivial to build an opto-coupler/interrupter yourself (if pre-built ones are hard for source).

  2. I have a box full of 1000X of a part like these but are both pointing out.I can’t figure out how to use them though.
    The photo transistor has 3 pins on it???
    I have already toasted 8 of them trying to figure it out.

    any ideas?

  3. moogle: Phototransistors are still transistors — they still have a base, collector, and emitter. It’s just that incoming photons act as virtual base current. If you want an light blocked -> high output, you’ll want to hook up the phototransistor as Vcc – Resistor – Collector ; Emitter – Gnd

  4. @24601: You can find the emitters and detectors in old ball mice, but unless it’s a *really* old mouse, they will be soldered directly to the PCB and not in a nice little enclosure like the one pictured. I’m not saying the individual components aren’t useful, but you have to do more mechanical work yourself to actually mount the separate emitter and detector, etc.

    Better sources are devices like printers and scanners where they’re used as limit stops; you’re more likely to find them as nice, easily reusable packages.

  5. There are more kinds of photo interrupters than what was listed in the article. You’ll also find them as “optical switches.”

    The type covered under the article is a very simple and inexpensive type of photo interrupter. The thing to watch out on these types is that they are more analog than digital. Hook this type to a Schmitt trigger (74HC14 will work) if you are having trouble getting clean output.

    Some photo interrupters include conditioning and other features. I just picked up some OPB460s (http://www.farnell.com/datasheets/89728.pdf). These include an on-board Schmitt trigger and open collector output with integrated 10k pull-up (OPB461 omits this pull-up).

  6. Fantastic, I just found a few of these in my bits box today and was thinking of testing them out. Printers are full of them.

  7. @moogle, there is a very secret thing on the internet called “google” if you go there and type in the super-dooper secret numbers on the side of the device you can get the “Templars secret decoder” that is called a “data-sheet” to give you the holy pinout and example circuit if you are lucky and holy enough.

    Or you can learn electronics and how to use a multimeter and pin out a Phototransisitor, or transistor..

    It’s a secret site, I got from the super secret google… SHH Dont SPEAK IT”S NAME!

    http://www.electronics-radio.com/articles/test-methods/meters/multimeter-diode-transistor-test.php

    very few people know abut this, so dont tell anyone!

  8. @Tachikoma you’re joking right? I can buy them all day long.

    Digikey, Jameco, most of the surplus places have them. They are ultra easy to source.

  9. “I have a box full of 1000X of a part like these but are both pointing out.I can’t figure out how to use them though.”

    Yours are intended to see a reflective surface.
    a bit of shiny silver tape and you’ll be watching the world go by.

  10. @farthead… not all photointerrupters have part numbers stamped on them.

    @moogle… a good place to start would be to learn how led’s and transistors work. led’s have a forward voltage drop of approx. 1.7 volts. the other side would be the transistor side.

  11. Gnuz, reverse engineered the DJ Focus OPtical Fader for Skratch DJ mixers, which is baysically just 2 photo interrupters on either side. When the fader is all the way to either side, the sound from that channel is cut off.

    [img]http://img379.imageshack.us/img379/7991/diyopticalfaderpcb5qg.png[/img]

    This is compatible with all mixers accepting a 50K ohm fader.

    More Details here;

    http://www.diyaudio.com/forums/showthread.php?s=&threadid=63585

  12. Googling “photo interrupter” produces 20,000+ hits, many leading to data sheets that are far more informative, e.g.;

    http://www.jaycar.com.au/products_uploaded/ZD1901.pdf

    and 20+ devices at;

    http://parts.digikey.com/1/parts-kws/photo-interrupter

    @36chambers – oh the complexity! How about replacing the whole lot with a couple of light dependent resistors (LDR’s) a.k.a cadmium sulfide (CdS) cells, as *direct* light controlled cross-faders? These are as cheap as dirt but can also be found in appliances such as auto-dimming alarm clocks and night lights.

    http://www.doctronics.co.uk/ldr_sensors.htm

  13. With a few of them, and a bit of printed acetate, you can make a rotary encoder that’ll tell you the absolute position of a shaft… might be a cheaper way of getting some positional feedback on all manner of projects if you’ve got the photo-interrupters already lying around?

    http://en.wikipedia.org/wiki/Rotary_encoder#Optical_Absolute_Encoders

    offers a few clues for anybody who’s not done it before – one challenge might be to figure out allowing for the physical offsets between the interrupters as it may not be possible to stack them in a straight line.

  14. wow, im so glad i found this, i’va had a couple of these laying around only to frustrate me

    but after reading this and a few minuttes trying i got it working

    thanks

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s