When there’s no space for a photoelectric sensor, there is only one solution: user fiber optics!
If there are no particular demands for toughness an ambient temperature or chemical resistance, then plastic fiber optics are the right choice.
Photoelectric Sensors for Special Applications (BFB/BOS fiber optic base units, BFO fiber optic) PDF
Let us know how to get back to you.
Feel free to ask a question or simply leave a comment.