Optical encoders are made up of three basic parts: a light source, a light detector, and a code wheel. The source shines light through slits in the code wheel and the detector senses this light. The code wheel has evenly spaced slits which transmit and alternately block the light source. Internal circuitry enables and disables an output depending on whether or not the light is being detected or blocked.