Skip to content
Mustafa Tarhan

Real-Time Data Link for Machine Process Control

A C++ service on a Raspberry Pi compute module that exchanges data with a machine controller over SPI and feeds a model that adjusts process parameters.

Embedded systems · work project2026In progress
Role
Working-student project at Fraunhofer IPK.
Interface
SPI + GPIO handshake
Storage
Apache Arrow IPC
Stack
C++, Linux (spidev, libgpiod), POSIX threads, Apache Arrow, Python, scikit-learn, Raspberry Pi CM5

What it does

A real-time link between a Raspberry Pi compute module and an industrial machine. A C++ service watches GPIO handshake lines, reads measurement and recipe data over SPI, sends new control parameters back and writes the measurement stream to Apache Arrow files. A Python pipeline extracts features from the high-rate process signals, predicts a quality value with a regression model and derives the next parameter set, closing the control loop.

  1. Machine
    • Controller
  2. Link
    • SPI
    • GPIO
  3. C++
    • Real-time loop
    • Arrow writer
  4. Python
    • Features
    • Regression

The hard part

Keeping the acquisition loop deterministic on Linux: real-time scheduling, epoll-based GPIO monitoring and a separate writer thread with time-based file rotation, so the SPI loop never waits on the disk.