Currently, the industrial sector is experiencing high growth. One of the reasons is the government's role in creating a conducive investment climate, so that many foreign investors invest in the country. Industrialization increases people's income which drives changes in the economic structure in many countries. In running production operations at the factory, the main components must be able to run well, be it production machines, raw materials, or other production factors. When there are components that are not running as they should, it will hamper the production process and can cause losses. For example, what happened at the Baltimore manufacturing plant. The factory made Johnson & Johnson's COVID-19 vaccine because of an error in mixing vaccine raw materials. The factory damaged 15 million doses of Johnsn & Johnson's COVID-19 vaccine Based on the problems contained in the article, a system is needed that can prevent errors from mixing raw materials. A spare component is needed that checks before mixing the raw materials. In this case, a method is needed to become a selection system by entering into certain categories so that it can determine which spare components need to be operated. Grounded on the problems that have been described preliminarily and also assignments learned from affiliated exploration, the authors choose the KNearest Neighbor (KNN) system for opting the applicable category. Here the author uses the Arduino Uno microcontroller as a processor, ldr sensor and also a 5v dc pump. The result is the I2C communication protocol can be implemented on systems with wired library owned by Arduino IDE. System accuracy for rgb detector is 100%. Operational changing from main pump to a backup pump can be executed with the parameters of the main pump operational failure. The implementation of the knn algorithm use the arduino_knn library contained in the arduino IDE.