How a sensor knows a machine is running
A sensor tells running from stopped by comparing vibration or sound with two calibrated levels and ignoring brief swings. See how, and when to use the control.
Vibration and sound tell running from stopped because a working machine shakes its frame and makes noise well above the level it reaches when it is powered on and idle. A sensor on the outside measures that level every second, compares it with two calibrated thresholds and ignores brief swings, so the state changes only when the change lasts. Nothing connects to the control.
This guide is for engineers setting up machine monitoring without PLC access. It covers what each signal looks like, why one threshold flickers, where the stopped line goes, how to keep a neighbor's press out of the record and when the control is the better source.
Key takeaways
- A working machine vibrates and sounds well above its powered-idle level, and a sensor on the frame measures that gap.
- Two thresholds with a gap between them, plus smoothing, keep the state steady when the signal hovers near one line.
- Flicker barely changes total running time but multiplies the number of stops, which breaks downtime records and alerts.
- Calibrate against the machine powered on and idle, not switched off, and confirm that cutting and idle read differently.
- Connect the control only for what it alone knows, such as alarm codes, program names and process values.
What does a running machine look like?#
A running machine looks like a higher level: the size of its vibration or sound, averaged over a second or so, sits well above where it sits while the machine waits. The sensor doesn't need to know what the machine is making. It needs a level for working and a lower one for waiting.
Definition
Machine state is whether a machine is running or stopped at a given moment, decided from a signal such as vibration, sound, motor current or a controller status, and recorded as a timeline from which uptime and downtime are calculated.
That timeline is the input to uptime: running time divided by running plus stopped time. Every number built on it is only as good as the moments where the state flips.
Off, powered idle and working#
A machine has three levels, not two. Off is near zero. Powered idle is the machine switched on and not working, with its fans, pumps and drives still turning. Working sits above both.
Powered idle is never silent. On the automotive machining line in a 2006 MIT study, the actual machining took at most 14.8% of the line's energy; the rest went to starting up and holding the equipment in a “ready” position.[2] That ready-state equipment hums and vibrates too, so the stopped line sits above powered idle, never at zero.
| Machine | Working signal | Powered-idle floor |
|---|---|---|
| CNC mill or lathe | Spindle under cutting load | Coolant pump, chip conveyor, fans |
| Stamping press | A sharp peak on each stroke | Flywheel turning between strokes |
| Injection molder | Clamp, inject and eject in sequence | Hydraulic pump running |
| Surface grinder | Wheel in contact with the part | Wheel spinning, not in contact |
| Case packer | Rhythmic indexing | Drives powered, infeed empty |
Vibration or sound#
Vibration travels through the frame, so a sensor magnet-mounted on the machine reads that machine. Sound travels through the air, so a microphone hears the room as well. Factory floors are loud: about 38% of manufacturing workers were exposed to hazardous noise in the last year, by NIOSH's count.[3]
A 2024 study of a legacy pipe bender names the problem directly: sound monitoring on a real shop floor suffers mainly from noise from neighboring machines.[1] Default to vibration. Add sound when the work is audible but barely moves the housing, such as light trimming on a heavy cast base, and calibrate it as its own channel with its own thresholds.
How does a threshold set the state?#
A threshold splits the signal: above the running threshold the machine reads running, and below the stopping threshold it reads stopped. With one line doing both jobs, any signal that hovers near it flips state again and again.
Why one threshold flickers#
A light cut is the usual culprit. On a CNC lathe, a finishing pass loads the spindle far less than roughing, so its vibration can sit right on a line set for the whole cycle. Every dip below the line logs a stop, and every rise logs a restart.
The figure shows 12 minutes on a hypothetical lathe. One threshold logs 11 stops, from a 6-second tool change, the finishing pass and a 3-second bump from a press next door. Two thresholds with smoothing log the 2 stops that happened: the part load and the end of the job.
Two thresholds and smoothing#
Definition
Hysteresis is the gap between two thresholds: a signal must rise above the upper one to switch a state on and fall below the lower one to switch it off, so a signal wandering between the two lines keeps its current state.
Hysteresis handles a signal that wanders. Smoothing handles one that spikes: the sensor averages the last few seconds before it compares the level with either line. A related method, a hold time, requires the new state to persist for a set number of seconds before it counts.
Both cost a delay. A stop is recorded a few seconds after it starts, and a stop shorter than the delay never appears. Set the delay shorter than the shortest stop you want to see, and let short-stop handling decide what happens to the stops that do appear.
Flicker hides in time totals and shows in counts. In the pipe-bender study, a sound model without smoothing counted 215 machining events in one hour against 112 that happened. A buffer that took the majority of the last 5 readings brought the count to 120, while total machining time stayed within 0.2% of the true value either way.[1]
Worked example
One shift on a CNC lathe with a light finishing pass
- Planned production time: 450 minutes. The lathe runs 60 cycles and stops 25 times, for 50 minutes in all, so it runs 400 minutes.
- With one threshold, the finishing pass dips below the line twice per cycle for 2 seconds: 60 × 2 = 120 false stops, worth 120 × 2 = 240 seconds, or 4 minutes.
- One threshold: running 396 minutes, uptime 396 ÷ 450 = 88.0%, with 25 + 120 = 145 stops.
- Two thresholds and a 5-second hold: running 400 minutes, uptime 400 ÷ 450 = 88.9%, with 25 stops.
Those 120 false stops do the damage. Each one asks an operator for a reason, inflates stops per hour and can trip a stop alert. Any count taken from the falls in the trace triples too, which is why part counting methods start from a clean state.
Is the machine idle or cutting?#
Idle and cutting are separate states to the sensor only if their levels don't overlap at the mount. So decide what “running” means for this machine first, then check that a gap exists where you need it.
On this hypothetical lathe, the stopping threshold sits at 0.04 g, above the highest stopped reading of 0.034 g. The running threshold sits at 0.05 g, below the lightest cut at 0.055 g. Leave a buffer on both sides rather than placing either line on a measured edge.
The spindle turning with no cut overlaps powered idle here, so it reads as stopped. That is the right answer for most plants, since a spindle turning in air makes nothing. If your plant counts a warm-up cycle or air cutting as running, you need a mount where those levels clear idle, or that time stays in downtime.
What about vibration from the machine next door?#
A neighbor's vibration reaches the sensor through the floor and the frame, and its sound through the air, so you keep it out with the mount, the channel and a minimum run length. Each one stops a different kind of intrusion.
- The mount. On a casting tied to this machine's drive, the neighbor's vibration has crossed a floor and a machine base before it arrives, while this machine's own reaches the sensor directly.
- The channel. Vibration stays tied to the machine it's mounted on; sound picks up every press and compressor in the bay.
- Smoothing. A 3-second bump from a forklift or a press stroke next door averages out below the running threshold, as the figure above shows.
- A minimum run length. Drop any run shorter than a few seconds, such as 10 seconds on a machine whose real cycles last minutes, so a sliver that gets through never counts as production.
Set the minimum run length last. Applied first, it hides the slivers that tell you a threshold or the mount is wrong.
Test the neighbor on purpose. Leave this machine powered and idle, run the machine next to it through a few cycles and watch the trace. If the trace crosses the running threshold, move the sensor before you touch the thresholds.
Where should the sensor go?#
Mount the sensor on flat steel mechanically tied to the parts that move, as close to the spindle or main motor as you can reach. Placement decides which states the sensor can see at all.
The pipe-bender study tested four sensor positions on one machine. A sensor on the hydraulic pump showed distinct signals when cutting occurred but could not capture the machine's other operating states.[1] The same machine read differently from each spot.
| Mount | What the trace shows |
|---|---|
| Spindle housing or headstock | The cut, clearly separated from idle |
| Main motor casting | Running, with some idle hum |
| Hydraulic unit | Pump load, which can miss motion |
| Guard door or sheet-metal cover | The panel ringing; cutting looks idle |
| Base near the floor | Neighbors as much as this machine |
The mounting guide covers the surfaces a magnet holds on but that fail anyway. For mount points on four common old machines, see how to monitor an old machine with no network port.
What does calibration check?#
Calibration checks that this sensor, on this mount, reads this machine's working and powered-idle levels differently, and places the thresholds in the gap between them.
Capture the machine working
Run several full cycles, including the lightest cut the machine makes, such as a finishing pass. Note the lowest point the trace reaches while working.
Capture powered idle
Stop the machine but leave it switched on. Note the highest point the trace reaches while it waits.
Place the thresholds in the gap
Put the stopping threshold just above the idle high and the running threshold just below the working low. If the two captures overlap, move the sensor before you go on.
Set the smoothing
Add smoothing if the state flickers on a machine that is plainly running. Reduce it if short bursts, such as single press strokes, go missing.
Compare one hour with what you watched
Stand at the machine for an hour, note each stop and its length, and compare your notes with the timeline.
Watch 24 to 48 hours
Look for a pattern of wrong readings, not one bad minute, then change one setting at a time and check again.
The SenseAi calibration guide maps each step to the controls on the device.
Detect machine state with IoTFlows#
A SenseAi magnet-mounts on the machine, reads vibration and sound from the outside and decides running or stopped every second on the device, with no PLC connection. It compares the trace with a running and a stopping threshold, and its momentum setting smooths the trace so brief swings don't flip the state. The settings live on the device, so the state is decided at the machine rather than in the cloud, as the data path explains. SenseAi Embedded, sealed for coolant and washdown, reads vibration and temperature and decides state from vibration. See SenseAi.
Storm Power Components runs SenseAi on its CNC machines, lasers and presses, deciding running or stopped from vibration and sound.

SenseAi gave us eyes we never had before. Our team leaders can instantly see which machines are running, which are down, and identify issues immediately instead of discovering them hours later. That visibility transformed our ability to manage production.
When do you need controller data instead?#
You need controller data when the question is why or what, not whether: alarm codes, program names, spindle load and process values live only in the control. A sensor answers whether the machine ran, when it stopped and for how long.
| Sensor on the outside | Controller connection | |
|---|---|---|
| Running or stopped | Yes | Yes |
| When each stop began and ended | Yes | Yes |
| Alarm code behind a stop | No | Yes |
| Program or part running | No | Yes |
| Spindle load and feed override | No | Yes |
| Works with no network port | Yes | No |
| Touches the control | No | Yes, IT usually reviews it first |
Use this guide to pick the source for each machine:
- Use a sensor alone when your questions are uptime, downtime and stop lengths, on any brand or age of machine. This covers most of what a plant manager asks.
- Add controller data when a recurring question needs an alarm code, a program name or a process value, on the machines whose control can share it. A connection to the control is a security concern for many plants, so plan an IT review into the project.
- Use a different signal when the work doesn't move the frame. A curing oven, a heat-treat furnace or a chemical bath runs on time and temperature, so a beam counter at the load point or the process controller is the better source.
- Change the mount, then the method, when calibration shows working and idle overlapping. If no reachable mount separates them, that machine needs a different signal.
The sensor-based versus PLC comparison sets out what each approach reads, with its sources.
Questions#
Can a sensor tell idle from cutting?#
Yes, when the two read differently at the mount. Cutting loads the spindle and the frame, so it sits well above powered idle. A spindle turning with no cut can sit close to idle, so decide first whether that time counts as running, then check that a threshold separates it. If the captures overlap, move the sensor closer to the spindle.
Will a forklift or the press next door make my machine read as running?#
Not when the sensor is set up well. A bump lasts a second or two, so smoothing keeps it below the running threshold, and a minimum run length removes any sliver that gets through. A neighbor that shakes the frame for minutes is a mounting problem: move the sensor onto a casting tied to this machine's drive.
How fast does a sensor detect a stop?#
Within seconds. The sensor checks the level every second and waits a few seconds before it changes state, so a brief dip doesn't count. The same delay hides any stop shorter than it, so keep the delay shorter than the shortest stop you want in the record.
Do I need to recalibrate when the job changes?#
Not for every job. Recalibrate after you install or move the sensor, after major maintenance on the machine, and when the record stops matching what the floor saw. A new job matters only when it changes the lightest cut or the idle level, such as a finishing pass much lighter than anything the machine ran during calibration.
Does sound work better than vibration?#
Not on most floors. A microphone hears the room as well as the machine, and noise from neighboring machines is a known problem for sound-based monitoring. Vibration travels through the frame, so it stays tied to one machine. Add sound when the work is audible but barely moves the housing, and calibrate it as its own channel.
Written by
Applications Engineering Team, IoTFlows
Sources#
- Operation and Productivity Monitoring from Sound Signal of Legacy Pipe Bending Machine via Convolutional Neural Network (CNN), International Journal of Precision Engineering and Manufacturing, Kim et al., 2024, via NSF Public Access Repository. Accessed Oct 27, 2026
par.nsf.gov/servlets/purl/10528445 - Electrical Energy Requirements for Manufacturing Processes, 13th CIRP International Conference on Life Cycle Engineering, Gutowski, Dahmus and Thiriez (MIT), 2006. Accessed Oct 27, 2026
web.mit.edu/2.813/www/readings/Gutowski-CIRP.pdf - Manufacturing Statistics: Noise and Hearing Loss, National Institute for Occupational Safety and Health (CDC). Accessed Oct 27, 2026
cdc.gov/niosh/noise/surveillance/manufacturing.html
