The objective of this study is to develop an visual detection system, With non-contact inspection method, which can detect whether the needle angle of the switch is skewed or damaged, whether it is coplanar; whether the push button position is correct, whether the product is reversed, poorly fitted, or mixed. The inspection machine system includes a set of self-designed inspection modules with human-machine interface and a machine with automatic feeding and discharging functions. Due to the difference in the height of the upper and lower planes of the inspection object, the focal length of the inspection object is different, so two sets of CCD cameras and light source modules are used respectively. Capture and inspect the upper and lower planes. This system can be used as a fast and low error rate high-efficiency tool for testing DIP switches and other products on mass production lines.