Overlock Machine
Automation System
Retrofitting a conventional industrial overlock sewing machine with an embedded control system — semi/fully automated operation using ESP32, FSM firmware, and mechatronic integration to improve throughput and reduce operator dependency.
Project Overview
The project involved retrofitting a conventional industrial overlock sewing machine with a fully embedded control system. The primary goal was to convert a manually operated machine into a semi/fully automated platform — improving production efficiency, ensuring stitching repeatability, and reducing operator fatigue in high-volume garment manufacturing environments.
The system was architected as a three-layer mechatronic integration: a sensing layer for fabric and state detection, a control layer built around an ESP32 microcontroller running a finite state machine, and an actuation layer driving motors and solenoids to replicate and extend human operator inputs.
System Architecture
Three decoupled layers communicate vertically — sensor signals flow up to the controller, control signals flow down to actuators.
Finite State Machine
The ESP32 firmware runs a five-state FSM. Each state has defined entry conditions, actions, and exit triggers — ensuring deterministic, safe operation.
Idle
System powered, waiting for operator input or sensor trigger. All actuators inactive. Periodic sensor polling active.
Fabric Detection
IR sensor confirms fabric insertion. Debounced reading prevents false triggers. Fault path returns to Idle if no fabric.
Stitch Initiation
Motor ramps up via PWM. Actuator mimics pedal press. Timing-critical routine synchronises with machine speed.
Continuous Operation
Steady-state sewing. Motor held at target speed. System monitors for end-of-fabric or fault conditions in real time.
Stop / Reset
Motor decelerates, solenoid resets presser foot. System returns all outputs to safe state and transitions back to Idle.
Control Sequence Flowchart
Event-driven sequence from fabric insertion to stitch completion and system reset.
Technical Deep Dive
Embedded Control
- ESP32 running Arduino framework
- 5-state FSM in C/C++ with interrupt-based sensor handling
- PWM speed control for precise motor actuation
- Timing-critical routines synced to machine cycle speed
- Software debouncing to suppress vibration-induced noise
Mechanical Integration
- Custom brackets and linkages designed in SolidWorks
- Servo/linear actuator replaces manual pedal input
- Minimal machine modification — fully reversible
- Vibration, load distribution, and backlash analysis
- CNC-cut and 3D-printed custom mounting parts
Sensing & Feedback
- IR sensors for fabric presence and end-of-seam detection
- Limit switches for position and safety interlock
- Fault detection prevents actuation without fabric
- Adjustable sensor thresholds for different fabric types
Power & Electronics
- Low-voltage control circuit isolated from mains
- Motor drivers and relay modules for inductive loads
- Flyback diodes on all inductive outputs
- Regulated 5V/3.3V supply rails for MCU and sensors
- Grounding strategy to reject industrial electrical noise
Results & Impact
Consistent and repeatable stitching cycles across varied fabric types
Reduced manual operator effort and fatigue in repetitive sewing tasks
Increased throughput by eliminating cycle-time variance between operators
Demonstrated scalable low-cost retrofitting approach for existing industrial machines
Non-invasive mechanical coupling preserved original machine reliability and serviceability