Xiaoxian Industrial Vision Integration

Xiaoxian: Industrial Vision, Embedded Gateway, and PLC Validation

Xiaoxian internship | 2023-2024 | China

Mechatronics Engineer Intern

Encoder-triggered imaging achieved about +/-1 mm repeatability, about 30% less point-cloud loss, and about 10% precision improvement.

  • STM32F103
  • Modbus RTU
  • Embedded C
  • MATLAB
  • Siemens PLC
Case Type Industrial automation integration
Technical Center Encoder-triggered imaging, STM32 Modbus gateway, PLC/AI-vision validation
Outcome Encoder-triggered imaging achieved about +/-1 mm repeatability, about 30% less point-cloud loss, and about 10% precision improvement.
Ownership Intern-level solo ownership with mentor sign-off on trigger redesign, gateway firmware, vibration analysis, and validation workflow.

Hardest engineering problem: The inspection system was sampling a moving surface, so camera timing had to follow physical displacement instead of a time-domain proxy.

Overview

My Xiaoxian internship work focused on industrial inspection reliability: line-scan image timing, embedded protocol bridging, fixture vibration, and end-to-end validation of a PLC plus AI-vision workflow. This public version avoids customer-identifying details and keeps the focus on engineering scope.

Ownership boundary: I had intern-level solo ownership with mentor sign-off on the trigger redesign, STM32 gateway firmware, vibration analysis, and delivery validation workflow.

My Role

I had intern-level solo ownership with mentor sign-off on four areas: encoder-displacement trigger redesign, STM32F103 Modbus RTU gateway firmware, MATLAB vibration analysis for a laser-sweep fixture, and validation of a Siemens S7-1200 plus AI-vision inspection workflow.

Key Results

  • Redesigned line-scan triggering around actual encoder displacement instead of pulse timing.
  • Reached about +/-1 mm scan repeatability, about 30% point-cloud loss reduction, and about 10% precision improvement in before/after tests on identical parts.
  • Built STM32F103 firmware that translated PC-side data into register-based Modbus RTU and preprocessed local safety, IR, and pressure signals.
  • Validated the PLC, vision timing, sensor inputs, actuator responses, alarms, and operator flow before external delivery.

System Architecture

Industrial inspection dataflow from encoder and line-scan camera through STM32 and PLC validation
The inspection stack became more reliable when timing moved closer to the physical machine: encoder displacement triggered imaging, and the STM32 gateway absorbed protocol and local-sensor complexity.

Physical Trigger

Line-scan capture was tied to encoder displacement so images followed the moving surface instead of a fixed time interval.

Embedded Gateway

STM32F103 firmware translated PC-side data into Modbus RTU registers and preprocessed local safety, IR, and pressure signals.

Delivery Validation

PLC logic, vision timing, sensors, actuators, alarms, and operator flow were checked before external delivery.

Control / Timing Methodology

The key design decision was to trigger the camera based on the thing actually being measured: physical displacement. The old pulse-timed approach drifted under conveyor slip, vibration, and speed variation, which produced noisy alignment and gaps in the reconstructed point cloud.

Xiaoxian encoder-displacement trigger method compared with pulse-timed line-scan capture
The timing method is the core control idea: tying camera capture to encoder displacement made the inspection frame follow real part motion instead of an idealized clock.
Trigger strategyFailure modeWhy the encoder version was better
Pulse-timed captureAssumed constant speed, so slip and vibration produced spatial drift.Simple to implement, but weak when the physical motion was not ideal.
Encoder-displacement captureStill needed robust signal handling and calibration.Sampling followed actual part movement, improving repeatability and reducing point-cloud loss.

Software / Firmware Architecture

STM32F103 Modbus RTU gateway dataflow
The gateway was active, not a passive USB-to-RS485 adapter: it normalized timing, registers, retries, and local sensor signals before the PLC and PC layers saw them.

The STM32F103 gateway was also deliberately active rather than a USB-to-RS485 passthrough. It parsed and aggregated Modbus RTU packets, enforced timing and retry behavior, translated higher-level PC data structures into registers, and exposed local sensor signals in a cleaner form.

Validation & Debugging

Xiaoxian PLC and AI-vision validation loop from checklist run through operator flow, issue logging, correction, retest, and delivery gate
The validation loop shows the internship contribution as integration evidence: Felix checked PLC logic, vision timing, sensors, actuators, alarms, and HMI flow, then documented issues for correction and retest before delivery. It does not claim ownership of the customer AI model or third-party PLC code.

For the laser-sweep fixture, MATLAB vibration analysis identified resonant-mode concerns, leading to a damping recommendation that was later adopted in production. The post-install result was qualitatively consistent with the simulation, though no formal pre/post vibration-amplitude measurement was captured.

Validation evidence: the strongest quantified result is the line-scan before/after test; the damping result stays qualitative because no formal vibration-amplitude measurement was captured.

Validation areaWhat was checkedPublic result
Line-scan triggerBefore/after tests on identical parts.About +/-1 mm repeatability, about 30% less point-cloud loss, and about 10% precision improvement.
PLC + AI visionPLC logic, vision timing, sensor inputs, actuator responses, alarms, and operator flow.Validation completed before external delivery.
Laser-sweep fixtureMATLAB vibration analysis and damping recommendation.Production adoption with qualitative post-install improvement; no formal amplitude metric captured.

What I Learned

The work reinforced a practical controls lesson: if a sensor is sampling a moving surface, the trigger should be tied to physical position rather than a time-domain proxy. It also clarified why embedded gateways are valuable at PC-machine boundaries: they absorb timing, protocol, and local-sensor complexity before it leaks into higher-level software.