cnc_mill — count_cycles (spindle-load)
Physics
Section titled “Physics”A CNC mill’s spindle motor draws a repeating current signature over a part program: load rises during each cutting pass and drops to near-idle during rapid traverse and tool change, with the heaviest, most consistent load spike occurring during the roughing pass that runs once per part cycle. A split-core CT clamped on the spindle motor’s main power lead senses this current non-invasively, and the detector looks for one dominant load peak (or a load-above-threshold dwell) per part program execution rather than every pass, since a single part may involve many internal tool passes but only one full program cycle. Part cycle times on a mill range from tens of seconds (simple face mill) to several minutes (multi-operation parts), so the fastest realistic part-to-part interval is on the order of 10-15 s; sampling the rectified current envelope at 200 Hz gives >1000x margin over Nyquist for that interval while still resolving the load peak’s rise/fall shape needed to distinguish a cutting pass from a rapid-traverse current dip.
Sensor
Section titled “Sensor”- Spec: split-core AC current transformer, clamp-on, 0-50 A range, 1 phase
- Signal: scalar (A), range n/a
Example parts
Section titled “Example parts”- CR Magnetics CR3110-3050 split-core CT (50 A, 0-5 VAC output)
- Magnelab SCT-0750-050 split-core CT (50 A, 0-333 mV output)
- YHDC SCT-013-050 split-core CT (50 A, 0-1 V output)
Mounting
Section titled “Mounting”Clamp the split-core CT around a single phase conductor feeding the spindle motor, inside the spindle drive cabinet or at the motor’s junction box, with the conductor centered in the core and the core fully latched. Keep CT leads clear of the spindle drive’s power cabling to avoid EMI pickup from the VFD.
Wiring
Section titled “Wiring”CT output (mV or V AC per the chosen part) goes to a 2-channel isolated analog input on the edge box’s DAQ module; use a shielded twisted pair and ground the shield at the DAQ end only, since the spindle VFD is a strong noise source.
Validation
Section titled “Validation”run 20 manually-counted part programs at normal production speed and compare the detector’s counter delta over the same window
Expected: counted parts within +/-1 of the manual count (spindle-load peaks need per-part threshold tuning since load varies with tool and material, but the dominant per-cycle peak is reliably distinguishable from tool-change current dips)
Safety notes
Section titled “Safety notes”- de-energize and lock out the spindle drive cabinet (LOTO) before opening it to install the clamp; the cabinet remains live even though the split-core CT itself is non-invasive
- verify the CT’s voltage and insulation rating match the spindle drive’s output voltage before installing, especially on VFD-driven spindles which can carry high-frequency switching transients
- never leave the CT’s secondary open-circuited while the spindle is running; keep the burden resistor/DAQ input connected at all times once the clamp is closed
40–150 USD, difficulty 3/5, ~30 min install downtime.