Predictive maintenance involves the early detection of potential machine failures and subsequent maintenance to prevent such failures. Machine learning is a pertinent statistical method for predictive maintenance, enabling the early detection of machine failures and the implementation of preventive measures through a model. The development of the machine learning model commences with data collection from the machine, encompassing vibration, acceleration, machine temperature, and machine sound, facilitated by a microcontroller equipped with sensors. Subsequently, the data undergoes cleaning, including removing outliers or missing values and standardization. Data is partitioned into 70% allocated for training and 30% for testing. After determining hyperparameters and their values through hyperparameter tuning, the training data is utilized to train machine learning models, such as K-nearest neighbor, decision tree, and random forest models. Post-training, the models are evaluated using the remaining test data, employing performance metrics such as accuracy, precision, recall, and F1-score. The random forest model excels due to its utilization of a substantial number of trees for predictions and the full exploitation of the variables which F1-score is 91.22%. The best-performing model is subsequently deployed into a monitoring system, providing real-time machine condition predictions. The deployment results validate the accurate prediction of machine failures.