Email us

Este artículo está en inglés. Ver el sitio en español

Cet article est en anglais. Voir le site en français

Dieser Artikel ist auf Englisch. Website auf Deutsch ansehen

Este artigo está em inglês. Ver o site em português

本文为英文。 查看中文网站

Stuck keyboard keys when the spindle runs: noise paths and fixes

Keys that repeat only while a load runs are electrical noise on the keyboard cable, not a failing keyboard. Correlate the phantom keys with the spindle, vacuum and axis loads, reroute the cable with 90-degree crossings, clip a split-core ferrite with 3 turns at the PC end, and bond the chassis and transformer case to earth. Switch jogging to incremental 0.1 mm steps so one corrupted key cannot plunge the tool, and box the open control in a grounded metal enclosure.

NEMA4 Enclosure engineering team · Published November 24, 2026 · 7 min read

Short answer: the keyboard is not failing — its cable is picking up switching noise from the spindle drive, the vacuum and the 120 to 220 V transformer on your machine, and a corrupted key-up code reads as a key held down. Fix the path, in this order: correlate the phantom keys with each load, reroute the cable with 90-degree crossings, clip a split-core ferrite with 3 turns at the PC end, bond the transformer case and PC chassis to protective earth, then box the open control in a grounded metal enclosure. While the wiring work waits, switch jogging to incremental 0.1 mm steps so one corrupted key cannot plunge a tool into the work.

Read the symptom before rewiring

The pattern of the fault tells you which path to chase before you cut a single tie. Match what you see against this list:

  • Keys repeat only while a load runs and clear the instant it stops. Coupled noise on the keyboard line; this is the case the rest of the article fixes.
  • The stuck key or the character count changes with spindle speed. The drive and its output cable are the source, because speed moves the harmonic mix.
  • Phantom keys appear when the vacuum alone runs. Brush arcing from a universal motor is broadband and couples easily into a long flat cable.
  • A spare keyboard on a short cable laid away from the power runs is clean. The route is the fault, so rerouting outranks a keyboard swap.
  • Keys stick after hours of running with every load off. That is a failing membrane or a tired connector, not interference; replace the keyboard.
  • The fault flickers when you wiggle the cable near the transformer. The coupling path sits right there; mark the spot.

Correlate the phantom keys with each load

Run the correlation before buying anything, with no tool in the spindle and the Z axis raised well clear of the work, and a hand free for the hardware E-stop. Open a plain text editor on the control PC and switch one load on at a time: the spindle at each production speed, then the vacuum, then an axis jog. Count the phantom characters over a 5-minute window for each load and write the numbers down.

A fault that appears with the spindle and grows at higher speeds points at the drive output cable. A fault that ignores the spindle but starts with the vacuum points at the motor brushes. A fault that survives a spare keyboard on a short cable points at the route rather than the hardware. Ten minutes of this test replaces an afternoon of guessing, and the count gives you a before-and-after number for every fix below.

How the noise gets into a keyboard line

A spindle drive switches several amps into the motor through fast output edges. Take a 0.1 µs edge as the example: its significant harmonics reach roughly 0.35 / 0.1 µs = 3.5 MHz. Small drives set carrier frequencies anywhere from 2 to 16 kHz (drive datasheets list the range), so the edges, not the carrier, land where a keyboard cable listens.

Two mechanisms move that energy across. With capacitive coupling, a changing voltage on a power conductor drives current through stray capacitance into the signal lines. The coupling grows with every inch of parallel run and falls close to inversely with spacing. With inductive coupling, a changing current induces a voltage in the loop formed by the signal conductor and its return, so loop area is the enemy.

The interface is the soft target. Keyboard inputs run 5 V logic behind pull-up resistors, and a burst above the logic threshold reads as a valid transition. If the burst lands on the key-down code and swamps the key-up code, the PC sees a key held down. Map a held arrow key to continuous jog and the move continues until a clean key-up arrives — that is how a height-zeroing job mashed your bits.

An open wall-mounted PC completes the path. Its wiring harness, port pins and chassis all re-radiate, and a chassis floating above earth couples noise straight into the connectors, as the grounded versus floating enclosure comparison explains for low-noise signals.

Cut the coupling, cheapest change first

Work this list in order and re-run the character count after each step:

  1. Reroute and shorten. Cross every power cable at 90 degrees instead of running parallel. Where the keyboard tail now sits 25 mm from the bundle, pull it out to 75 mm; stray capacitance between round conductors falls close to inversely with spacing, so tripling the gap cuts the coupling about threefold. Coil no spare length near the transformer; shorten it or move the keyboard.
  2. Clip a split-core ferrite at the PC end. Wind the cable through 3 turns: choke impedance scales with the square of the turn count, so three turns give about 9 times the impedance of a single pass. Add a second core at the keyboard end when the tail is long enough to wind.
  3. Swap the tail. A keyboard with a short shielded cable beats a long flat one. Terminate the shield at the chassis in a short strap or a full 360-degree clamp, not a long pigtail.
  4. Quiet the source. Shielded spindle and motor cable, bonded at the drive end as the VFD control cable shield grounding article sets out, cuts the field at its origin and helps every other cable on the wall.

Bond the transformer case, the PC chassis and the frame

Every metal part in the path wants one short route to protective earth. Bond the transformer case, the PC chassis and the machine frame with conductors sized for the circuit's fault current; the grounding and bonding guide walks through conductor sizing and the fault path end to end.

For the box itself, the NEC is explicit in US installations: NEC 250.96(A) requires metal parts that serve as equipment grounding conductors, enclosures included, to be bonded together for the fault current likely imposed on them. NEC 250.12 adds that paint, lacquer and enamel come off the threads and contact surfaces at grounding connections.

A tingle when you touch the box means a bond is missing or a conductor is riding above earth; the shock from a metal enclosure checklist takes that fault apart in order. Bonding is a safety job first and a noise fix second, and both reasons point the same way.

Box the open wall-mounted control in metal

Your control is fully open on the wall above the machine, which makes it the antenna. A grounded metal enclosure over the PC, its wiring and the transformer secondary wiring cuts radiated pickup, keeps dust out, and gives every bond a home. Specify it like this:

We build these to order in 304 and 316L stainless to your size and cutouts, manufacturer rated NEMA 4X / IP66; not UL listed, and delivered in 10 business days from your approval of the drawing — the custom enclosure page and the 3D builder take the sizes. If the rebuild reaches the operator position, a panel PC in one of our stainless HMI housings removes the open keyboard tail altogether; the 15 in panel PC housing seals at the front once the display is fitted, manufacturer rated.

Cap the damage: incremental jog and a real E-stop

Noise fixes take a day; the jog setting takes two minutes and caps what one corrupted key can do. Here is the arithmetic for a machine zeroing height with continuous jog set to 1,000 mm/min:

  • The axis moves at 1,000 / 60 = 16.7 mm/s.
  • A noise burst that holds the key 2 s plunges 16.7 × 2 = 33 mm — past a tool tip clearance in one event.
  • Switch jogging to incremental steps of 0.1 mm and the same corrupted key-down moves at most 0.1 mm. The 33 mm crash becomes 33 / 0.1 = 330 small steps of margin — a 330-fold cut in worst-case travel.

Incremental jog caps the consequence; it does not cure the interference, and phantom keys will still type garbage into edits and MDI lines. In Mach3, keep the keyboard-jog hotkey toggle off while the spindle runs; the exact key combination lives in your installed version's jog settings. Zero Z with the spindle off whenever the job allows, so the noise source is absent for the precise move. And keep a hardwired E-stop that breaks power independent of the PC and keyboard — software cannot stop what it cannot see.

Prove the fix, then keep it proven

Change one thing at a time and repeat the same test: text editor open, no tool, every production speed in turn, then the vacuum, then combined. The number that matters is phantom characters per 5-minute window. The fix is proven when the count sits at zero across every speed and both loads together.

Finish with a controlled motion test: spindle running, no tool, hands off the keyboard, jog mode set the way production uses it. Watch the axes for a full 5-minute window; any uncommanded step sends you back to the list above.

Re-run the count whenever the wiring changes — a new vacuum, a moved transformer, a longer tail. Adding a second spindle or a bigger drive raises the noise at the source, so re-test after the upgrade too. If the fault survives rerouting, ferrites and a bonded chassis, the open control is the receiver and the enclosure is the fix that remains.

Enclosures in this article

EnclosureMaterialOutside H x W x D / displayRating
15" HMI enclosure304 stainless12.91 x 16.06 x 3.88 inIP65-type front seal with the display installed, manufacturer rated; not UL listed

Questions

Will a silicone or washdown keyboard stop the phantom keys?

No. Silicone overmolding seals out dust and coolant; it changes nothing on the electrical side. Swapping from a plain PS/2 keyboard to USB helps more: USB checks every packet and retries the corrupted ones within a millisecond, while PS/2 sends each byte with a single parity bit and no retry, so a burst reads as a different key. Keep the ferrite and the reroute as the real fix.

How many turns through the ferrite core?

Two or three. Choke impedance rises with the square of the turn count, so 1 turn is the base, 2 turns give about 4 times and 3 turns about 9 times the common-mode impedance of a single pass. Wind the turns at the PC end first, and only wind a keyboard-end core when the tail leaves enough length for 3 clean turns without strain.

Is switching to incremental jog enough on its own?

No, and the numbers show why. At 1,000 mm/min continuous, a 2 s held key plunges 33 mm; at 0.1 mm incremental steps, the same event caps at 0.1 mm. The cap protects the tool, but the noise still corrupts typed edits, MDI lines and file selections, and it will not stop until the cable is rerouted and filtered. Treat jog mode as damage control while you cut the coupling.

What should the metal enclosure be made of and how is it sealed?

Bonded metal, not plastic: 304 stainless covers most shops, and 316L near salt, brine or chlorides. Enter cables through a bottom gland plate, keep the keyboard entry opposite the drive entries, and clear the coating off the earth stud. Our custom boxes are manufacturer rated NEMA 4X / IP66, not UL listed, and are delivered in 10 business days from drawing approval.

Checklist before you order

Specify it once, built to your drawing

  • Environment and NEMA type: Type 1, Type 3R, Type 4, Type 4X, Type 6P, Type 12, Type 13 (manufacturer ratings, not UL listed)
  • Material: 304 stainless steel, 316L stainless steel, Powder-coated carbon steel, Aluminum, Polycarbonate, Fiberglass (FRP)
  • Size: inside or outside height, width and depth, with the depth your deepest component needs
  • Cutouts, glands and windows, dimensioned from one datum on each face
  • Mounting and access: wall, pole or stand, hinge side, mounting panel
  • Quantity: from one piece

Delivered in 10 business days, anywhere in the world. Counted from your order; for custom work, from your approval of the drawing.

Configure it in the builderRequest a custom quote

NEMA 4X enclosures: sizes for this job

Keep reading

Related engineering answers

All articles

Buying guides

The guides behind this answer

All guides