Testing with naked eye contact on large-sized printed circuit boards (PCBs) mass produced is exhausting and time consuming. Since the eyes will get tired during the long-term test phase, there is a possibility of erroneous measurement. In addition, for a quality PCB inspection, identifying the defective location on the PCBs and classifying the types of these defects is an important step in the production process. In this study, we propose a new hybrid optical sensor (HOS) based on deep learning (DL) to sense the micro-size defects on PCBs. In this context, the combination of the lateral shearing digital holographic microscopy (LSDHM) and the microscopic fringe projection profilometry (MFPP) is proposed. Another aim of ours is to classify the PCBs defects by using deep learning classifier based on Convolution Neural Network (CCN) algorithm. Contrast to the complex systems used in the literature for sensing the PCB defects, an optical microscopic sensor with minimum components has been proposed to use for the first time. Thanks to proposed HOS based on DL, we reveal the successful results obtained with high accuracy (99%) that the defects on PCBs can be detected and classified in very short time with non-contact and real-time imaging. Hence, the problem of time consuming has been overcome. It is thought that the proposed hybrid sensor will lead to future studies in terms of the early detection of the micro-size defects on PCBs with high performance before mass production process.