Xiaoxian Industrial Vision Integration
Xiaoxian: Industrial Vision, Embedded Gateway, and PLC Validation
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
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

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.

| Trigger strategy | Failure mode | Why the encoder version was better |
|---|---|---|
| Pulse-timed capture | Assumed constant speed, so slip and vibration produced spatial drift. | Simple to implement, but weak when the physical motion was not ideal. |
| Encoder-displacement capture | Still needed robust signal handling and calibration. | Sampling followed actual part movement, improving repeatability and reducing point-cloud loss. |
Software / Firmware Architecture

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

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 area | What was checked | Public result |
|---|---|---|
| Line-scan trigger | Before/after tests on identical parts. | About +/-1 mm repeatability, about 30% less point-cloud loss, and about 10% precision improvement. |
| PLC + AI vision | PLC logic, vision timing, sensor inputs, actuator responses, alarms, and operator flow. | Validation completed before external delivery. |
| Laser-sweep fixture | MATLAB 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.
