CHIPBY KINETIC CARVING
CNC · Hobbyist · Information · Platform
Return to Kinetic Carving
Machine · Shop systemsintermediate~15 min read

Electrical noise and EMI on a CNC: what it does and how to fix it

Short answer

Electrical noise makes a controller stop knowing where it is: a disconnect, a freeze, a reset, a false limit trigger, a blank screen. It does not usually make a machine quietly carve in the wrong place, which is almost always mechanical. The highest value fix is free: get the spindle cable away from the signal wiring and put them on separate circuits.

What it does, and what it does not

This is the part almost everyone has backwards, and getting it right saves entire weekends.

Electrical noise does this
Stops the controller knowing where it is. A disconnect, a freeze, a reset, a blank or rotated screen, a false limit or probe trigger.
It rarely does this
Let the machine carry on carving, quietly and without complaint, in the wrong place. On a board with integrated drivers that is nearly always mechanical; the exceptions are described below.

Sienci Labs put it about as bluntly as a manufacturer can in their own documentation: "EMI does not cause the LongMill to lose position or move erratically. It is a very common misconception that grounding your machine will help prevent missed steps, stalling, or positioning issues." Carbide 3D's own troubleshooting for missed steps starts with pulley grub screws, V-wheels, rail lubrication, belt tension, wiring connectors and feeds and speeds, and treats disconnects as a separate problem with a separate cause.

The one question that splits the diagnosis
Did the controller say anything? A machine that alarmed, disconnected, reset or froze has an electrical problem and belongs on this page. A machine that kept cutting without complaining believed it was in the right place the whole time, which puts the fault between the motor and the cutter. Start at machine lost position instead.

The honest nuance, because Sienci's rule is architecture specific. On a machine where the step pulses are generated on the controller board and travel a few centimetres to integrated drivers, the only realistic way in is the USB link, and losing that halts the job rather than corrupting it. On a machine with external drivers and step and direction wiring running any real distance, a corrupted pulse is possible and nothing downstream can detect it. Noise can also take your position indirectly on any machine, by falsely triggering a limit switch or by resetting the controller, either of which throws away the work coordinate system. Onefinity's own EMI guidance is titled, in part, "Randomly Loosing Zeros". Both vendors are describing their own hardware accurately.

Where it comes from

SourceWhat it actually doesHow much it matters
VFD spindleSwitches hundreds of volts thousands of times a second. The drive makes the energy; the motor cable delivers it into your shop, as radiation and as current dumped into the earth system.The dominant source by a wide margin
Dust collectionNot electrical noise at all. Fine dust moving fast through a plastic hose builds a static charge that eventually discharges into something. Different mechanism, different fix.The most common cause on hobby machines
Brushed trim routerThe commutator makes and breaks an inductive winding thousands of times a second, and every break is a small arc. Mostly conducted out of the power cord.Real, and worse as the brushes wear
Stepper driversChop the supply to each winding. Their cables are the longest, most flexed and most gantry adjacent on the machine, so they are both a source and a victim.Moderate, and self inflicted through routing
Relays and contactorsArc on every open. A relay switching a dust collector or a router is a repeated broadband impulse.Occasional, easily fixed
Other shop loadsCompressors, fridges, welders. Mostly a shared mains problem rather than a radiated one.Occasional
Static from dust collection is not EMI, and the fixes do not overlap
This is the single most common reason people buy the wrong thing. Electrostatic discharge from a plastic dust hose is a charge problem, fixed by bonding the hose wire and the machine frame to one ground point, by anti-static hose, or by humidity. Shielding a cable does nothing for it. Carbide 3D name static from dust collection as the most common cause of the disconnects they see. Test for it by running the job with the dust collector switched off and nothing else changed.

Why the VFD is the worst offender

Two reasons, and neither is the one people assume.

  1. It is the rate of change that hurts you, not the voltage. Both the ways noise couples between cables scale with frequency, not with volts. A mains extension lead and a VFD output lead carry the same voltage; only the VFD slams it on and off thousands of times a second. That is why a spindle cable upsets a limit switch running alongside it and a power cord in the same tray does not.
  2. The motor cable is the radiator. The drive generates the energy, but the cable is the part that is long, energised and out in the open. Everything else about VFD noise control follows from that.
Turning the carrier frequency up to quiet the spindle makes this worse
It is a tempting trade and it is the wrong way round. Hitachi say it in their own manual: the audible sound decreases at higher carrier frequencies, but RFI noise and leakage current may increase. Their stated condition for the strictest EMC category is a carrier of 2 kHz, the bottom of the range, with shielded motor cable of 20 m or less. If your machine faults when the spindle runs, drop the carrier before you buy anything.

Why a CNC is unusually easy to upset

A table saw has no logic in it. A CNC has dozens of signals running at 3.3 or 5 volts, on long flexed cables, sharing a drag chain with the noisiest cable on the machine.

  • There is a volt or two of margin. Rule of thumb The gap between a guaranteed low and a guaranteed high on a 3.3 V or 5 V logic input is on the order of a volt or two, depending on the logic family. A noise spike that size is nothing on a mains circuit and is enough to flip the input. Where a controller lets you run limit switches at 24 V instead, the same spike becomes harmless.
  • Limit switch inputs are the most fragile thing on the machine. They are long, unshielded, and on GRBL boards pulled up through the microcontroller's internal resistor of roughly 47 kilohms, which is a very high impedance and therefore the worst possible case for picking up noise. Grbl's own wiki says the pins "are very vulnerable to any noise".
  • The geometry is adversarial. Stepper cables, limit leads, probe leads and often the spindle cable all run the same drag chain, parallel, for the full travel of the machine. That maximises both ways noise couples at once.
How far apart to keep power and signal cable0 mm100200300ABB: 300 mmHitachi: 250 mmRockwell, in a tray: 152 mmRockwell, conduit: 76 mmInside a drag chain: 10 to 30 mm
Every drive manufacturer publishes a minimum distance between power and signal wiring. A drag chain gives you 10 to 30 mm, parallel, for the whole length of the machine. This is the single biggest thing wrong with how a hobby CNC is wired, and it is free to improve.

Spec The published figures: Rockwell specify 76 mm between separate steel conduits and 152 mm in a cable tray; Danfoss specify 200 mm; Hitachi specify 250 mm; ABB specify 300 mm. All four also say that where power and signal cable must cross, they should cross at 90 degrees.

The drag chain is the exception, and it needs a different control
No manufacturer document addresses drag chains, because in industry you simply do not run them together. You cannot achieve 200 mm of separation inside one. So the drag chain is the place where you substitute a different control for distance: a properly braided spindle cable, terminated all the way round at both ends, ideally in its own chain or at least on the opposite side of a divided one from the limit and step wiring. That is a substitution, not a free pass.

Fix it in this order

Ordered by return per dollar, and the first tier is free. Change one thing at a time or you will never know which one worked.

Free, and fixes most hobby cases

  1. Re-route. Get the spindle or router power cable out of the bundle that carries limit, probe, step and USB wiring. Cross at 90 degrees where they must cross.
  2. Separate the circuits. Spindle and dust collector on one branch circuit, controller and computer on another.
  3. Move the controller away from the VFD, and never stack them.
  4. Drop the VFD carrier frequency toward the bottom of its range.
  5. Bond everything to one point. Machine frame, spindle body, VFD earth, controller enclosure and dust collection all to a single ground point that is connected to the building safety ground. One point, not a chain.
  6. Scrape the paint. Anodising and paint are insulators. A bonding screw into an anodised rail is bonded to nothing.
  7. Turn off sleep and USB selective suspend on the computer if you stream over USB. Sienci, Inventables and OpenBuilds all document this as a cause of long job disconnects, and a Windows update can reset it.

A few dollars, and the best value on the list

  1. Kill every shield pigtail. See below. This is the largest measured improvement available for the money.
  2. Stiffen the limit switch inputs. Grbl's wiki specifies 1 k to 4.7 k pull-up resistors to 5 V plus 100 nF capacitors to ground, mounted as close to the board as possible, and normally closed switches rather than normally open. A switch fails open, so normally closed turns a failure into an error instead of a crash.
  3. Snub inductive loads. An RC snubber across any relay contact switching a motor or coil, and a flyback diode across DC coils. Worth knowing that Rockwell are honest that these reduce arcing rather than eliminate it.

Real money, only if the above did not clear it

  1. Proper spindle cable: braided tinned copper at 85 percent coverage, with a separate earth conductor, terminated all the way round at both ends.
  2. Ferrites, done properly. See below, because most of them are fitted in a way that cannot work.
  3. USB isolator, or move off USB entirely. Carbide 3D have shipped isolators to affected customers. Sienci's advice for persistent disconnects is to switch from USB to Ethernet.
  4. An EMI filter on the VFD input, mounted directly against bare panel metal with its input fed straight from the mains. Never fit one on an ungrounded supply.
Never put a filter on the VFD output
An input filter and an output filter are different things and the difference will cost you a drive. AutomationDirect state it plainly for their range: do not use a capacitor, an L-C filter or an R-C filter on the drive output. If a machine genuinely needs output side help it wants a load reactor or a dV/dt filter, and on a hobby router it almost certainly does not: those are specified above roughly 20 m of motor cable, and a hobby spindle run is a few metres.
The best documented case on the internet was not fixed by the thing everyone buys
In a Onefinity controller failure that was chased to a confirmed root cause, ferrite cores were tried first on vendor advice and did nothing at all. The machine sat on a steel table on rubber vibration feet, so the table was never grounded, and the owner was getting a shock off the front rail roughly every thirty seconds. Grounding the table fixed it. Ferrites are the reflex purchase and they were the wrong answer. The thread is on the Onefinity forum and is worth reading in full.

The shield question, which almost everyone gets wrong

"Ground the shield at one end only" is the most repeated rule in CNC forums and it is not a rule. It is half of one.

CableTerminate the shieldWhy
VFD to spindle power cableBoth ends, all the way roundThis is a high frequency common mode problem. The shield is the controlled return path for that current, and it needs one at each end. Rockwell: shields of motor and input cables must be bonded at both ends. Hitachi: always at both ends.
Low level control cable between separate boxesOne endHere the problem is a ground loop at mains frequency, and a second connection creates one. Rockwell: connect the shields of control cables only at one end, cut back and insulate the other.

The variable underneath is frequency. One end is the low frequency answer to a ground loop on a signal cable. Both ends is the high frequency answer to common mode current on a power cable. A spindle cable is entirely the second case, so grounding its shield at one end is simply the wrong answer to the wrong question.

Vendors do disagree at the margins, and CHIP would rather show you that than pretend otherwise. MASSO say one end, to earth and never to controller ground, on the reasoning that noise wants to reach earth and terminating to controller ground dumps it into the controller. Buildbotics say ground the RS485 shield at both ends. Both are talking about their own hardware.

A pigtail throws away most of what you paid for
Twisting the braid into a tail and running it to a screw is how nearly every hobby machine is wired and it is close to pointless. NASA Langley measured five termination methods and found the pigtail about 30 dB worse than every 360 degree method under one test and about 40 dB worse under another. The same study found little difference between the good methods, so you do not need anything exotic: Rockwell specifically suggest plain copper saddle clamps sold for plumbing as effective, cheap and available in a range of sizes, and the NASA study found copper foil tape wrapped right around performed within a fraction of a decibel of a proper aerospace backshell. A couple of dollars of plumbing hardware recovers most of a shield you have already bought.

Ferrites, and why most of them do nothing

A ferrite core is a common mode choke: it works by enclosing every conductor of a cable so that the signal current, which goes out on one and back on another, cancels, while the common mode current that is all flowing the same way sees an impedance. Three things follow, and most fitted ferrites break at least one.

  • It must enclose the whole cable. A core around one conductor of a pair encloses no common mode path and does nothing.
  • Standard cores work above about 10 MHz. Rockwell put drive common mode noise at 250 kHz to 6 MHz, which is below where an ordinary clamp-on core does much. That mismatch is why so many people report no improvement. A low frequency material is a different part.
  • Turns matter enormously. Passing the cable through once gives a fraction of the impedance that three to five turns gives on the same core. Beyond about five turns the winding capacitance starts to undo the high frequency performance.

What changes with your controller

Running the file from the machine removes exactly one exposure: the continuous data link to a computer. It removes nothing else. Every field wire is as exposed as it was.

ArchitectureHow it tends to fail
Streamed over USB from a PC (most GRBL machines)Fails by stopping. The link drops, the sender loses the port, the machine idles. Position is often retained, and senders increasingly offer a resume from line. The USB link is the exposed part, not usually the G-code itself.
Run from the controller (Masso, Buildbotics, Redline)Can fail by acting on a corrupted input. A false limit trigger, a spurious probe trigger, a screen reset, a lost zero. It tends to keep going rather than stop, which is not automatically safer.
PC over Ethernet (Centroid Acorn, LinuxCNC with an Ethernet card)Sits between the two. The link is far harder to upset than USB, but a PC is still in the loop and a sleeping or crashing PC still ends the job.

Neither is immune, and no vendor's own documentation claims otherwise. The quality of published guidance varies far more than price does: Centroid and LinuxCNC document this most thoroughly, OpenBuilds and Sienci are strong for hobby machines, Onefinity's guidance exists as a forum post rather than in any manual, Buildbotics cover shield termination for their own RS485 wiring and little else, and Genmitsu publish essentially nothing.

Closed loop steppers do not protect you from this

This is worth being precise about, because it is sold as reassurance and it only covers half of what people think.

A closed loop drive counts the step pulses it receives and compares that to an encoder on the motor shaft. So it catches the motor failing to reach the position it was told to reach: a stall, a jam, too much acceleration, not enough current. It cannot catch a wrong instruction. If noise adds or removes a pulse on the step line, the drive counts it as commanded, moves there, and the encoder confirms it arrived. Nothing anywhere raises an error. The machine is simply in the wrong place and everything downstream agrees it is not.

It is also worth knowing these are semi closed loop: the encoder is on the motor, not on the axis. A slipping pulley, a skipped belt tooth, a loose coupler and backlash are all invisible to it, because the motor did turn exactly as asked.

What it does buy you
It converts a class of silent failures into loud ones, as long as the alarm output is actually wired to a controller input. A stall that used to ruin a part quietly now stops the machine and names the axis. That is genuinely valuable. It is just not protection against electrical noise.

Repeated, and wrong

You will read thisWhat is actually true
"Ground the shield at one end, always"Right for low level control cable, wrong for the spindle cable, where both ends is mandatory.
"Lift the ground to break the loop"Dangerous and illegal. If a fault occurs, the fault current returns through your signal cable. Isolation belongs in the signal path, never in the safety path.
"Drive the CNC its own ground rod"A separate electrode that is not bonded back to the building's system is a code violation and makes the machine a collector for soil currents.
"Turn the carrier up, it runs quieter"It does, and it increases RF emission and earth leakage at the same time.
"Clip a ferrite on it"Only if it encloses every conductor, in a material suited to the frequency, with several turns. Most fitted ferrites meet none of those.
"Twisted pair always helps"It cancels magnetic pickup by collapsing the loop area, which is real. It does nothing for common mode noise, and it only works properly when the two wires carry the signal and its return; a switch wire twisted with a ground wire is better than untwisted, not the fix the phrase implies.
"Grounding will stop my lost steps"Named by Sienci as a very common misconception. Lost position is nearly always mechanical.
"Just take it off the GFCI"It removes protection to hide a real leakage current, and in a garage or basement that protection is usually required by code. Do not defeat it. The legitimate routes when a VFD trips a GFCI are a lower carrier frequency, a properly terminated and shorter motor cable, an input filter, or a dedicated circuit run by an electrician.

Sources

The figures on this page come from these, plus the vendor pages and forum threads named inline. Where they disagree, the page says so.