Coming up with a system for early detection of machine damages and failures is one of the important challenges in the industrial maintenance procedure to avoid additional costs and downtimes. To approach this goal, this paper uses the signal gathered by a sensing system which employed a spintropic sensor to measure the magnetic field around the machine which somehow shows the machine’s behaviour. Using this signal and focusing on analysing and processing the signal, this paper develops a data-driven method to recognize signal patterns and subsequently detects anomalies. A challenging task that we succeeded to overcome in this paper is recognizing relevant signal patterns without having any prior knowledge. An algorithm designed for this task is therefore completely unsupervised which makes it consistent and suitable to apply it for the signals gathered for other types of machines. Using both frequency and time domain information, the proposed algorithm, which utilizes signal processing and machine learning techniques, is able to efficiently identify relevant signal patterns. Clustering results on the real data gathered by the aforementioned sensor have shown the high accuracy of 99.38% in recognizing patterns. Furthermore, an anomaly score measure is used and according to its distribution, anomalies are detected appropriately.