Abstract-The paper mainly aimed at solving the problem of yarn color fault detection. Yarn with different color is hard to detect in yarn production, a special photoelectric sensor is designed in this paper. First, this paper analyzed the requirement of light source and photoelectric receiver in the photoelectric sensor, and designs the light path and driver circuit. Then this paper analyzed the amplifier circuit and noise in the photoelectric sensor, with an amplifier circuit of minimal noise proposed at last. Finally, this paper tested the yarn color fault detection system with virtual instrument, and the test results showed a great application prospect of the photoelectric sensor. Photoelectric yarn clearer was the first type of electronic yarn clearer, but due to the under development of the optical technology and measurement technology, the photoelectric yarn cleaner can't meet the requirements of textile production, gradually replaced by capacitive yarn cleaner. Though photoelectric yarn cleaner had a good visual conformity degree, it's still a unreplaceable method in colored yarn faults [1].