Skip to main content

AI-Based Real-Time Tool Condition Monitoring System for CNC Lathe

Page 1


International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 13 Issue: 04 | Apr 2026 www.irjet.net p-ISSN: 2395-0072

AI-Based Real-Time Tool Condition Monitoring System for CNC Lathe

Tharun A1 , Lokesh N2 , Ramnath V A3 , Vishva R 4

1 2 3 4 UG Student, Department of Mechanical Engineering

S.A. Engineering College, Tiruvallur, Tamil Nadu, India

Abstract - This paper presents an AI-based real-time tool condition monitoring system for CNC lathe operations. Tool wear and unexpected failures significantly affect machining accuracy, productivity, and maintenance cost. To address this issue, a multi-sensor monitoring system is developed using a temperature sensor (K-type thermocouple), vibration sensor (MPU6050), and acoustic emission sensor (INMP441). These sensors are interfaced with an ESP32 microcontroller to acquire real-time data duringmachining. The collected data is transmittedto a web-based monitoring interface for visualization and storage. A Random Forest machine learning algorithm is implemented to classify tool conditions into three categories: Good, Warning, and Replace. The dataset is generatedusingreal-time machining data collected under different cutting conditions. The proposed model achieves an accuracy of approximately 95–96% in classifying tool conditions. The system enables early detection of tool wear, supporting predictive maintenance and reducing unexpected downtime. Experimental results demonstrate that the proposed system is effective and suitable for real-time industrialapplications.

Key Words: CNC Lathe, Tool Condition Monitoring, Machine Learning, ESP32, Random Forest, Sensor Data.

1. INTRODUCTION

Computer Numerical Control (CNC) machines are widely usedinmodernmanufacturingindustriesduetotheirhigh precision, automation, and productivity. They enable accurate and repeatable machining operations, making them essential in sectors such as automotive, aerospace, and tool manufacturing. However, tool wear and unexpected tool failure remain significant challenges that adversely affect machining accuracy, surface quality, and overallproductivity.

Tool wear is an inevitable phenomenon in CNC machining processes due to continuous contact between the cutting tooland the workpiece. Factors suchashigh temperature, friction, and mechanical stress contribute to gradual tool degradation during machining. Excessive tool wear can lead to poor surface finish, dimensional inaccuracies, increasedmachiningtime,and,inseverecases,suddentool failure.Theseissuesresultinincreasedmaintenancecosts and unplanned machine downtime. Therefore, continuous monitoring of tool condition is essential to ensure consistentmachiningperformanceandproductquality.

Conventional tool condition monitoring methods, such as manual inspection and scheduled maintenance, are often time-consuming, subjective, and incapable of detecting early-stagetool wear.Thesetraditionalapproachesdonot provide real-time information about tool health, making them unsuitable for modern automated manufacturing environments. With advancements in sensor technology and artificial intelligence, it is now possible to develop intelligent monitoring systems that continuously analyze machining conditions. By integrating sensors such as temperature, vibration, and acoustic emission with machine learning algorithms, tool wear can be predicted effectively.

Despite the advancements in tool condition monitoring, many existing systems are limited by the use of singlesensor data, lack of real-time implementation, and dependence on offline analysis. These limitations reduce their effectiveness in practical industrial environments where continuous monitoring is essential. Additionally, existingmethodsoftenfailtointegratelow-costembedded systems with intelligent decision-making algorithms for real-timeapplications.

Toovercometheselimitations,thisworkproposesamultisensor, AI-based real-time tool condition monitoring systemusingatemperaturesensor(K-typethermocouple), vibrationsensor(MPU6050),andacousticemissionsensor (INMP441), integrated with an ESP32 microcontroller. A RandomForestmachinelearningalgorithmisemployedto classify tool conditions into Good, Warning, and Replace categories. The system provides real-time monitoring throughaweb-basedinterfaceandenablesearlydetection of tool wear, thereby improving machining efficiency, reducing downtime, and supporting predictive maintenanceinindustrialapplications.

1.1 TOOL WEAR IN CNC MACHINING

Tool wear is an inevitable phenomenon in CNC machining processes due to continuous contact between the cutting tool and the workpiece. During machining, factors such as high temperature, friction, and mechanical stresscontributetogradualdegradationofthecuttingtool. Asthetoolundergoeswear,itscuttingefficiencydecreases, leading to poor surface finish, dimensional inaccuracies, andincreasedmachiningtime.Excessivetoolwearcanalso result in sudden tool failure, causing unplanned machine downtime and increased production costs. The wear process is influenced by various machining parameters

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 13 Issue: 04 | Apr 2026 www.irjet.net p-ISSN: 2395-0072

such as cutting speed, feed rate, material properties, and environmental conditions. Therefore, continuous monitoring of tool condition is essential to maintain machining quality, improve productivity, and reduce maintenancecostsinmodernmanufacturingsystems.

1.2 Need for AI-Based Tool Condition Monitoring

Conventional tool condition monitoring methods, such asvisualinspectionandscheduledmaintenance,areoften inaccurateandfail toprovidereal-timeinformationabout tool health. With advancements in sensor technology and artificial intelligence, it is possible to develop intelligent monitoring systems that continuously analyze machining conditions. By integrating sensors such as temperature, vibration, and acoustic emission with machine learning algorithms, tool wear can be predicted effectively. An AIbased monitoring system enables early detection of abnormal conditions, reduces unexpected failures, and improvesoverallmachiningefficiencyandreliability.

2. LITERATURE REVIEW

Recent research in tool condition monitoring has focused on the use of sensor-based techniques and machine learning approaches to improve machining performance and reliability. Various sensing methods such as vibration analysis, acoustic emission monitoring, and temperature measurement have been widely used to detect tool wear duringmachiningprocesses.Vibration-basedmonitoringis commonly used due to its high sensitivity to changes in cutting conditions. Studies have shown that vibration signals vary significantly with tool wear and can be effectively used for tool condition classification [1]. Acoustic emission (AE) techniques are also widely employed to detect high-frequency signals generated during machining, which are closely associated with tool wear and tool fracture [2]. Similarly, temperature-based monitoring methods have been explored, as cutting temperature increases with tool wear progression and directlyaffectstoollifeandmachiningquality[3]. Withthe advancement of artificial intelligence, machine learning techniques such as Support Vector Machines (SVM), ArtificialNeuralNetworks(ANN),andDecisionTreeshave been applied for tool wear prediction and classification [4][5]. Among these, the Random Forest algorithm has gained attention due to its high accuracy, robustness, and ability to handle complex and nonlinear datasets [6]. However, most existing systems are limited by the use of single-sensor data, lack of real-time implementation, and reliance on offline data analysis [7]. These limitations reduce their effectiveness in practical industrial environments where continuous and real-time monitoring isrequired.

Table-1: ComparisonofExistingToolCondition MonitoringMethods

Method Technique Limitation

Vibration-based methods Signalanalysis Sensitivetonoise

Acoustic emission methods Highfrequency monitoring Requires complex processing

Temperaturebasedmethods Thermal analysis Slow response to suddenwear

Machine learning models (SVM, ANN)

Data-driven prediction Requires large data

Table 1 presents a comparison of existing tool condition monitoringapproachesandtheirlimitations. Basedonthe aboveanalysis,itisevidentthatthereisa needforarealtime, multi-sensor monitoring system integrated with machine learning algorithms. The proposed system addresses these limitations by combining temperature, vibration, and acoustic emission sensors with an ESP32 microcontroller and a Random Forest model to enable real-timetoolconditionprediction.

3. METHODOLOGY

The proposed system is an AI-integrated real-time tool condition monitoring system designed to monitor tool health during CNC lathe operations. The methodology involves multi-sensor data acquisition, real-time monitoring,andmachinelearning-basedclassification.

3.1 System Architecture

The system consists of temperature, vibration, and acoustic emission sensors connected to an ESP32 microcontroller. The sensors collect real-time machining data near the cutting zone. The ESP32 processes the data andtransmitsitthroughWi-Fitoaweb-basedmonitoring interfaceforvisualizationandstorage.Theprocesseddata is used for tool condition prediction using a machine learning model. The overall system operates in a sequential manner involving data acquisition, processing, and prediction. Initially, sensor data is collected from the machining zone. The acquired signals are then processed and transmitted to a web-based interface. The processed data is further used as input for the machine learning model,whichpredictsthetoolconditioninrealtime.This

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 13 Issue: 04 | Apr 2026 www.irjet.net p-ISSN: 2395-0072

integrated approach ensures continuous monitoring and timelydetectionoftoolwear.

Figure 1:Blockdiagramoftheproposedsystem

Figure1showstheoverallblockdiagramoftheproposed toolconditionmonitoringsystem.

3.2 Sensor Setup

A K-type thermocouple is used to measure temperature near the tool tip. An MPU6050 sensor is used to monitor vibration,andanINMP441microphoneisusedtocapture acoustic signals generated during machining. The sensors are placed close to the cutting zone to ensure accurate data acquisition. The vibration sensor is mounted inside the tool holder slot using epoxy adhesive for rigid attachmentandstablesignalmeasurement.

Table -2:SensorSpecifications

3.3 System Working Procedure

Theworkingoftheproposedsystemiscarriedoutinthe followingsteps:

1. Sensorsareplacednearthecuttingzoneto capturetemperature,vibration,andacoustic signals.

2. TheESP32microcontrollercollectsreal-time sensordataduringmachiningoperations.

3. Thecollecteddataisprocessedandtransmitted throughWi-Fitoaweb-basedinterface.

4. Thedataisstoredandusedfordataset generation.

5. Themachinelearningmodelanalyzestheinput featuresandpredictsthetoolcondition.

6. Thepredictedresultisdisplayedinrealtimeon theweb-based monitoringinterface.

3.4 Data Acquisition and Transmission

ThesensordataiscollectedandprocessedbytheESP32 microcontrollerinrealtime.Theacquireddataincludes temperature(°C),vibration(g),andacousticemission(dB). TheESP32hostsawebserverthatdisplaysreal-time valuesandallowsdatalogging.Thecollecteddataisstored andusedforfurtheranalysisanddatasetgeneration.

3.4 Machine Learning Model

A Random Forest algorithm is used for tool condition classification. Random Forest is an ensemble learning technique that constructs multiple decision trees and combines their outputs using majority voting to improve prediction accuracy and reduce overfitting. The input featuresforthemodel includetemperature,vibration,and acoustic emission signals collected during machining. The datasetisdividedintotrainingandtestingsetsinan80:20 ratio. The model is trainedusinglabelled data categorized into Good, Warning, and Replace conditions. The trained modeliscapableofpredictingtoolconditionbasedonrealtime sensor inputs, enabling early detection of tool wear andsupportingpredictivemaintenance.

Figure-2: Machinelearningmodelworkflowfortool conditionprediction

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 13 Issue: 04 | Apr 2026 www.irjet.net p-ISSN: 2395-0072

Figure2illustratestheworkflowoftheRandomForest modelusedfortoolconditionprediction.

Figure-3: Architectureoftheproposedsystem

Figure 3 represents the system architecture integrating sensors,ESP32,andwebinterface

3.5 Dataset Collection and Preparation

The dataset used for tool condition prediction was generated using real-time sensor data collected during CNC machining operations. The system was tested under different cutting conditions using various workpiece materials such as aluminium, mild steel, and stainless steel. During machining, temperature, vibration, and acoustic emission signals were continuously measured using the respective sensors. The data was collected over multiple machining cycles to ensure variability in operating conditions. The sensor readings were recorded at regular intervals and transmitted through the ESP32 microcontroller to a web-based monitoring system, where they were displayed and stored as a structured dataset.

An initial calibration process was performed to establish baseline sensor values under normal cutting conditions. Based on variations in sensor readings, the dataset was labelled into three categories: Good, Warning, and Replace. The collected dataset was pre-processed to remove noise and ensure consistency. The dataset was then divided into training and testing sets in an approximate ratio of 80:20 for model development and validation. This process ensured reliable training of the machine learning model and improved prediction accuracy.

Figure4showsthewebinterfaceusedfordataset generation andmonitoring.

4.SYSTEM IMPLEMENTATION

The proposed system is implemented using an integrated hardware and software approach for real-time tool condition monitoring. The system combines sensor data acquisition, embedded processing, and wireless communication to enable continuous monitoring during machining operations. The ESP32 microcontroller collects andprocessessensordataandtransmitsittoaweb-based interface through Wi-Fi. The system enables real-time visualization,datalogging,andsupportsmachinelearningbasedpredictionfortoolconditionmonitoring.

4.1 System Setup

The hardware setup consists of multiple sensors mounted near the cutting zone to capture machining parameters accurately. The ESP32 microcontroller is housed in a compact enclosure along with supporting componentstoensurestableoperationduringmachining. The system is designed to withstand machining conditions while enabling efficient data acquisition and communication.

Figure5showsthehardwaresetupmountednearthe toolholder.

4.2 Machine Learning and Web-Based Monitoring

The collected sensor data is used for tool condition prediction using a Random Forest algorithm. The input features include temperature, vibration, and acoustic signals obtained during machining. The dataset is labelled into Good, Warning, and Replace categories based on sensor variations. The ESP32 transmits real-time sensor data through Wi-Fi to a web-based interface. The interface

Figure 4:Webinterfacefordata-setgeneration
Figure-5: Hardwaresetup

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 13 Issue: 04 | Apr 2026 www.irjet.net p-ISSN: 2395-0072

displays sensor values along with the predicted tool conditionandsupportsdatalogging. Thisintegrationenables real-time monitoring and early detection of tool wear for improvedmachiningperformance

Figure-6: Predictionresultwebinterface

Figure6displaysthepredictionresultthroughtheweb interface.

5. RESULTS AND DISCUSSION

The performance of the proposed tool condition monitoring system was evaluated using real-time sensor data collected during CNC machining operations. The system successfully acquired temperature, vibration, and acoustic emission signals and processed them using the ESP32 microcontroller. The collected dataset was used to trainandtesttheRandomForestmachinelearningmodel for tool condition classification. The model demonstrated high classification performance, achieving an overall accuracy of approximately 99%. The confusion matrix, as shown in Figure X, indicates that the majority of predictionsareconcentratedalongthediagonal elements, representing correct classifications. The model correctly classified 476 instances of Good condition, 105 instances of Replace condition, and 513 instances of Warning condition. Only a single misclassification was observed, highlightingtherobustnessandreliabilityoftheproposed system. Further analysis was carried out using feature importance evaluation, as illustrated in Figure Y. The resultsshowthatacousticemission(sound)andvibration signals have the highest contribution to tool condition prediction, indicating their strong correlation with tool wear. Temperature provides moderate influence in identifying gradual wear progression, while acceleration components(Ax,Ay,Az)haveminimalcontributiontothe prediction process. The integration of multiple sensor inputs significantly enhances the accuracy of the prediction model compared to single-sensor approaches. The real-time monitoring system successfully displays sensor values and predicted tool conditions through a web-basedinterface,enablingearlydetectionofabnormal

tool behavior. This capability helps prevent unexpected tool failure and supports predictive maintenance in CNC machining applications. Overall, the results confirm that the proposed multi-sensor AI-based monitoring system is effective, reliable, and suitable for real-time industrial implementation.

Figure-7: Real-timemonitoringviawebinterface

Figure 7 shows real-time monitoring of tool condition usingthewebinterface.

Figure-8: ConfusionmatrixofRandomForestmodelfor toolconditionclassification

Figure 8 illustrates the classification performance of the Random Forest model, where the majority of predictions are concentrated along the diagonal elements, indicating highaccuracyandminimalmisclassification.

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Figure 9: Featureimportanceofsensorparametersfor toolconditionprediction

Figure-9 Feature importance analysis shows that acoustic emission (sound) and vibration signals have the highest contribution to tool condition prediction, indicating their strong correlation with tool wear. Temperature provides moderate influence, while acceleration components (Ax, Ay, Az) contribute minimally. This demonstrates that vibration and acoustic signals are the most reliable indicatorsfordetectingtoolconditionchanges.

ACKNOWLEDGEMENT

The authors sincerely thank their project guide, Mr. C. Dhanesh,M.E.,(Ph.D.),AssociateProfessor,Departmentof Mechanical Engineering, for his guidance and support throughouttheproject.TheauthorsalsothankSriVaibhav Engineers, SIDCO, Thirumullaivoyal, for providing CNC machine facilities for testing and experimental work. The authors express their gratitude to the Almighty, their parents, and all the teaching and non-teaching staff for theirsupport.

REFERENCES

[1] T. Pfeifer and L. Wiegers, “Reliable tool wear monitoring by optimized image and signal processing,” CIRPAnnals,vol.49,no.1,pp.275–280,2000.

[2] Inasaki, “Application of acoustic emission sensor for monitoring machining processes,” Ultrasonics, vol. 36, no. 1–5,pp.273–281,1998.

[3] S. Y. Liang and D. A. Dornfeld, “Tool wear detection using force and temperature signals,” ASME Journal of Manufacturing Science and Engineering,vol.111,no.3,pp. 452–457,1989.

[4] K. Jemielniak, “Commercial tool condition monitoring systems,” International Journal of Advanced Manufacturing Technology,vol.15,no.10,pp.711–721,1999.

[5] G. Rehorn, J. Jiang, and P. E. Orban, “State-of-the-art methods and results in tool condition monitoring,” International Journal of Advanced Manufacturing Technology,vol.26,pp.693–710,2005.

[6] L. Breiman, “Random Forests,” Machine Learning, vol. 45,no.1,pp.5–32,2001.

[7] S. Dimla, “Sensor signals for tool wear monitoring in metalcuttingoperations,” International Journal of Machine Tools and Manufacture, vol. 40, no. 8, pp. 1073–1098, 2000.

[8] S. Smith and J. Tlusty, “Monitoring tool wear using acoustic emission signals,” Journal of Manufacturing Science and Engineering, vol. 120, no. 2, pp. 345–350, 1998.

[9] J. Brown, “Real-time monitoring of machining processes using IoT,” IEEE Transactions on Industrial Electronics,vol.66,no.5,pp.4002–4010,2020.

[10]A.GuptaandR.Kumar,“Machinelearningtechniques fortool wearprediction,” Procedia Manufacturing,vol.20, pp.231–236,2019.

[11] M. Patel et al., “Application of Random Forest in predictive maintenance,” International Journal of EngineeringResearch,vol.9,no.4,pp.112–118,2021.

[12] Y. Altintas, Manufacturing Automation: Metal Cutting Mechanics, Machine Tool Vibrations, and CNC Design, CambridgeUniversityPress,2012.

[13] S. Teti, K. Jemielniak, G. O’Donnell, and D. Dornfeld, “Advanced monitoring of machining operations,” CIRP Annals,vol.59,no.2,pp.717–739,2010.

[14] J. Zhou, C. Li, and Y. Wang, “Tool wear monitoring using multi-sensor data fusion and machine learning,” Sensors,vol.20,no.5,2020.

[15]H.Shao,H.Jiang,H.Zhao,andF.Wang,“Anoveldeep learning approach for tool wear monitoring,” IEEE Access, vol.6,pp.2123–2131,2018

Volume: 13 Issue: 04 | Apr 2026 www.irjet.net p-ISSN: 2395-0072 © 2026, IRJET | Impact Factor value: 8.315 | ISO 9001:2008 Certified Journal | Page214

Turn static files into dynamic content formats.

Create a flipbook
AI-Based Real-Time Tool Condition Monitoring System for CNC Lathe by IRJET Journal - Issuu