A photo interrupter, also known as an optical switch or slotted sensor, functions by emitting a beam of light from an LED through a gap to a phototransistor or photodiode. When an object interrupts this beam, the phototransistor ceases conducting, or changes its conduction state. Interfacing this component with a digital input involves conditioning the phototransistor’s output signal to be compatible with the voltage levels recognized by a microcontroller or digital logic gate. A common implementation involves using a pull-up resistor and reading the voltage at the collector of the phototransistor. An unobstructed beam typically results in a low voltage (logic LOW), while an interrupted beam produces a high voltage (logic HIGH), or vice versa, depending on the circuit configuration.
The application of these sensors offers several advantages, including non-contact sensing, high reliability, and relatively fast response times. They are employed in a wide range of applications, from detecting the position of a rotating shaft in encoders to sensing the presence of paper in printers or detecting the passage of objects on an assembly line. Their robustness and ability to operate in various environments contribute to their widespread adoption. Historically, these devices represent a significant advancement over mechanical switches, particularly in applications requiring high accuracy and minimal wear.