The main purpose of this paper is to present a system to detect extrusion failures in fused deposition modelling (FDM) 3D printers by sensing that the filament is moving forward properly. After several years using these kind of machines, authors detected that there is not any system to detect the main problem in FDM machines. Authors thought in different sensors and used the weighted objectives method, one of the most common evaluation methods, for comparing design concepts based on an overall value per design concept. Taking into account the obtained scores of each specification, the best choice for this work is the optical encoder. Once the sensor is chosen, it is necessary to design de part where it will be installed without interfering with the normal function of the machine. To do it, photogrammetry scanning methodology was employed. The developed device perfectly detects the advance of the filament without affecting the normal operation of the machine. Also, it is achieved the primary objective of the system, avoiding loss of material, energy, and mechanical wear, keeping the premise of making a low-cost product that does not significantly increase the cost of the machine. This development has made it possible to use the printer with remains of coil filaments, which were not spent because they were not sufficient to complete an impression. Also, printing models in two colours with only one extruder has been enabled by this development.