A vibration sensor on the spindle of a machining centre, read out over OPC UA with Python. Getting the raw signal out of the hardware was the difficult part. A passive subscription delivered nothing, so I built a stateful command-and-retrieve acquisition routine.
Machine
Spinner VC850 vertical machining centre, Heidenhain TNC 640 control (university laboratory)
Sensor chain
IFM VSA004 piezo accelerometer → IFM VSE100 → IFM VOS050 OPC UA server (+ VOD001 device licence)
Software
Python 3.9, NumPy, Pandas, SciPy, Matplotlib, Streamlit; a Python OPC UA client; UaExpert
Period
2025 (submitted September 2025)
Type
Independent Master's thesis
Domain C · Condition MonitoringRev 1.0 · 2026-10-03
Scope
Independent Master's thesis on one machine, in healthy condition only.
Real machine faults were not tested, and no fault detection is claimed.
Observed
Observed
In a healthy-machine test, an artificial impact applied to the sensor produced a kurtosis excursion from about −0.1 to above 230, and the alert logic responded.
Not demonstrated
Not demonstrated
Detection of a real machine fault.
Accuracy of the diagnostic rules.
Load-independent monitoring.
Limitations
What this work does not cover
Healthy machine only.
No real-fault dataset.
Diagnostic-rule accuracy not quantitatively verified.
No prognostics: no remaining-useful-life estimate.
Single sensor.
Discrete spindle speeds.
Interactive signal path
From the spindle to an alert, in seven stages
The chain at the top stays fixed. The drawing below it changes with each stage. All drawings are original schematics, not measured data.
Scroll the drawing sideways. The text below says the same.
Stage 1 / 7
Stage 1 / 7
A spindle, one sensor, one IFM chain
The subject is a Spinner VC850 vertical machining centre with a Heidenhain TNC 640 control, in a university laboratory.
An IFM VSA004 piezo accelerometer is stud-mounted on the spindle housing. It feeds an IFM VSE100 module, which an IFM VOS050 OPC UA server (with a VOD001 device licence) makes available to a Python client. IFM provided the licences.
Photo · wide viewSpindle housing with the vibration sensor mounted.
Stage 2 / 7
The acquisition problem
The first approach was a passive OPC UA subscription to the sensor's data. The subscription did not deliver raw data.
Without raw data there was nothing to process, so this became the hard part of the project.
Stage 3 / 7
A stateful command-and-retrieve routine
I used UaExpert, a third-party OPC UA client, to browse the server and inspect its methods (StartRecording, Open, Read and Close) and their arguments. From that I built a stateful command-and-retrieve routine in Python: command a recording, wait until it is finished, open it, read it, close it, then decode the data and queue it. The routine matched the manufacturer's manual.
Acquisition runs in a producer thread. A FIFO queue passes each buffer to the consumer, which does the analysis and drives the dashboard. The result is a near-real-time acquisition cycle.
SchematicTiming not stated
Stage 4 / 7
Signal processing
Each buffer is detrended, band-pass filtered with a 4th-order Butterworth filter, and Z-score normalised. Z-score normalisation rescales a signal by its own mean and standard deviation.
Stage 5 / 7
Feature extraction
From the processed signal the system computes RMS, Peak, Crest Factor and Kurtosis in the time domain, and an FFT in the frequency domain.
Stage 6 / 7
Baseline and alert logic
Baselines were recorded on the healthy machine, thermally stabilised and running free without a tool, at discrete spindle speeds.
Alert and alarm thresholds were defined in the thesis from baseline statistics using μ+2σ and μ+3σ. Rule-based diagnostic logic is applied to the features. Features are appended to persistent CSV files for trending.
Illustrative bandsNo threshold values shown
Stage 7 / 7
What the tests showed, and what they did not
Recorded result
Impact test. In a healthy-machine test, an artificial impact applied to the sensor produced a kurtosis excursion from about −0.1 to above 230, and the alert logic responded.
Not demonstrated
Detection of a real machine fault.
Accuracy of the diagnostic rules.
Load comparison. One machine, one light facing cut in aluminium 6061, one spindle speed (2000 RPM).
Condition
Raw RMS
Normalised kurtosis
No load
0.03 g
26.29
Light cut (facing, aluminium 6061)
0.03 g
26.13
Kurtosis values were similar between the two states and are not interpreted here; one machine, one light cut, one spindle speed. This is not a validation of load-independent monitoring.
Limitations
Healthy machine only.
No real-fault dataset.
Diagnostic-rule accuracy not quantitatively verified.
No prognostics: no remaining-useful-life estimate.
Single sensor.
Discrete spindle speeds.
Scope panel
What I did, and what I did not do
One place to check exactly what this thesis is, and is not.
My contribution
Independent Master's thesis. I built the acquisition routine, the signal processing, the baselines, the rule-based alert logic and a Streamlit dashboard in Python, on the laboratory's machine and the IFM sensor chain.
Performed
Baseline recordings and tests on a healthy machine, including an artificial impact applied to the sensor and a load comparison.
Not performed
No real faults, no fault dataset, no prognostics, no second sensor, no other machine.
Measured
Vibration at the spindle housing with one sensor, on a healthy machine, at discrete spindle speeds.
Not validated
Accuracy of the diagnostic rules, detection of real faults and load-independent monitoring. No accuracy figure, false-positive rate or business effect is stated.
Earlier prototype snapshot · August 2025
Prototype repository
A public snapshot of the code from August 2025. It contains the Streamlit dashboard, command-and-retrieve acquisition, signal processing, baselines and diagnostics, and trending. It predates the thesis submission and differs from the thesis implementation in some details. It is not the final thesis implementation.