Optical encoders use an LED and photo-sensor to measure the rotation of the encoder shaft. The beam emitting from the LED passes thru two permanently fixed masks, one near the LED and the other near the photo-sensor. Between these two masks is a code disk that is attached to the shaft of the encoder. There are slits on the code disk. When the shaft rotates, light from the LED will pass thru the disk when the slots are lined up with the LED beam. When the slits are not lined up with the LED, the beam will not reach the photo-sensor. As the shaft spins, the interruption of the LED beam enables the encoder to measure the speed of the shaft and send a signal to the unit the encoder is being used in.