Process Control Optical Laser Sensor IMA

Experimental software for managing a binary data stream from an in-line optical sensor.

The Project

This experimental software was designed to manage a binary data stream through a proprietary high-speed TCP protocol from an in-line optical sensor, providing 3D inspection of the piece. The system analyzes and filters the data, manages alarm mechanisms, and streams data to a client responsible for displaying graphs and related information in real-time, ensuring an efficient and responsive user interface.

The laser sensor is positioned above material moving on a conveyor belt, performing distance measurements at multiple points. The sensor output is simplified into a list of n numerical values (samples) indicating the distance from the material.

The software is highly data-driven: all measurements, calculations, and analyses are tailored specifically to the type of data obtained from the sensor and the transiting material.

Laser 1
Laser graph
Laser 2
Laser results

Tech choice

Given the very high throughput and the concurrent, asynchronous nature of the software, we chose Go as the server language. All internal components communicate with each other through synchronized channels. The server performs a number of concurrent operations: * Data ingestion via TCP from direct connection to the Laser sensor * Sending and receiving commands for settings via TCP * REST API to communicate with the web dashboard * Parsing, analysis and processing of data and measurements * Websockets API to display pass-through data in semi-real time on web dashboard * User-settable alerting system on measurements taken

Requirements

  • Real-time measurements for each sample received from the sensor (high speed, ~10,000 samples/second)
  • Web dashboard for real-time graph visualization, sensor settings, and user management
  • Alert system activated when measurements exceed user-defined limits

Tech Stack

  • Go (backend and data analysis software)

  • MongoDB (sample storage and user settings)

  • Svelte (web frontend)

  • Prometheus and Grafana (telemetry and internal monitoring)