I wrote a new blog post about the basics of photointerrupters. It is about the basic function, different types and how to connect them. In future posts I will continue with details on how to choose the right components around the photointerrupter and practical use in a rotary encoder.
You can find the post here: photointerrupter basics - heliosoph
Hope this information is useful to you.