A Mainspring linear generator core in its white steel frame on a factory floor, with the cylinder bore facing the camera and a Mainspring enclosure behind it
All work

Linear Generator Alignment Platform

/coax_align

A Mainspring linear generator only runs well if its long core sits on one straight axis. Lining it up used to take a full workday. I built the platform that does it: servo axes that move the parts, sensors that measure them, and PLC code that keeps correcting until the axis is true. A full cycle now takes 2 hours instead of 8.

More photos, plots, and detail on the hardware are on the way.

Role
Senior Controls & Automation Engineer, Mainspring Energy
Cycle time
8 hours → 2 hours (75% shorter)
Alignment
5 µm at two positions, 50 µm across ten

Tools & skills

Controls
TwinCAT 3, IEC 61131-3 Structured Text, TwinCAT MC2, multi-axis servo motion, Beckhoff IPC
Operator HMI
Ignition Vision, OPC UA, database logging
Communications
EtherCAT, ADS, OPC UA, RS-422, TCP/IP
Math
Jacobian-based inverse kinematics, SVD 3D line fitting, cost-function minimization

Why alignment matters

Inside the frame, moving parts travel back and forth along the core, so every section they pass through has to share the same centerline. The tolerance is measured in microns, across a part longer than a person is tall.

Before this platform, aligning one unit took about eight hours.

Measure, correct, repeat

The platform runs the same loop a careful technician would, only faster and the same way every time. It calibrates its sensors, sweeps the part through a set of positions, reads where the axis really is, and moves the servos to close the gap. Then it measures again. The PLC program behind it is split into more than 14 blocks covering multi-axis motion, sensing, calibration, sweeps, and the correction math.

Two positionsto within 5 µm
Measure the axis at two stations, work out how each servo move shifts the reading, and step the part toward center until both stations agree.
Ten positionsto within 50 µm
Measure at ten stations along the full length, fit one straight line through all of them in 3D, and move the part to the position that leaves the smallest total error.

88 steps on one screen

The operator runs the whole job from an Ignition Vision screen. It walks them through 88 steps, shows only what matters at each one, and sends the unit down a pass or fail path depending on what the measurements say. Every step and every reading is logged to a database, so each generator ships with a record of how it was aligned.

Five protocols, one controller

Servo drives, sensors, the HMI, and outside instruments all speak different languages: EtherCAT, ADS, OPC UA, RS-422, and TCP/IP. A single Beckhoff industrial PC ties them together, so the measure-and-correct loop runs in real time on one controller.