Stepper motor wiring EMI question. Is it better to twist each pair together, or to twist the whole bundle together?
Stepper wiring is paired signals so twisted pairs makes sense. Twisting them all would couple the A and B, which doesn’t buy anything good.
But how far down the EMI rabbit hole do you need to go? Individually shielded twisted pairs? What twist rate, because that matters. Do you have a scope to check for induced noise on other lines?
Is it fixing a noise problem or just best practices? If best practices I think I’d twist the pairs, if for nothing more than “it sounds right.”
Oh but full disclosure, on my printers I just use 4 conductor overall shielded cable. Works so I’m ok with it on my personal equipment.
But if it were going on machine I was designing professionally I’d try harder.
Twisting pairs together creates a balance which helps with EMI
Thanks, the makergear I have twists the whole bundle, not the pairs. That’s why I ask - I’m rewiring it.
Twist the pairs, and then lightly twist the bundles together for neatness, I say. But for emi purposes a shielded cable with proper grounding of the shield will perform better.
I twist each coil pair, to different pitches. That way they don’t crosstalk. Don’t know if the different pitch makes a difference but it’s trivial to do if you’re already twisting them. (I use a power drill.)
Then I shield the endstop cables, not the stepper cables. That‘s cheaper (2-3 conductor in any gauge you want versus 4 conductor ~24ga) and also helps with noise from heaters. LCD/SD ribbons do need to be kept away from motors and heaters though so there’s an argument for shielding all the PWM emitters across the board.
Shielding endstops? At 5v low speed is it necessary?
Noise on the temp probes is the biggest issue I’ve seen so far, wouldn’t it be easier to use the shield on that, and just twist everything else.
The lulzbot Taz6 has the best EMI suppression I’ve seen, chokes, twisted pairs, and grounded shields on the steppers. But I’m installing a cable chain, and I’m running out of room (don’t know if I can fit a fancy wire like that.)
Endstops are slow digital lines. If they are receiving enough noise to need shielding you have big problems. And they shouldn’t put out any meaningful noise.
You can take the approach of shielding all signals and motor lines, but it’s overkill. A good practice generally is twisted pairs on differential signals, shield analogs, shield motor power lines (catch their emi before it gets out), ground your frame, and try to physically separate signal types (run AC alone, keep motor lines far from analogs though that’s near impossible, etc.)
Also remember shields do nothing if you don’t ground the drain well.
And avoid ground loops, which often get made unknowingly through shield drains connected at both ends or by devices that have a ground. Ground loops and ungrounded shields can make issues where you think you put in the work to prevent issues.
@Stephanie_A @David_Simmons Tons of printers over the years have had EMI problems with endstops. You run a meter or so of untwisted/unshielded stepper cable (massive EMR emitters) parallel to your endstop wiring (high impedance input antenna) and YES you can very easily get enough voltage for spurious triggers. I’ve seen lots of initial printer builds on forums with weird spurious homing or Z probing results and we eventually trace the problem to noise in the endstop wiring.
There’s a reason modern controllers often recommend normally-closed endstops, filter the inputs in both hardware and software, and then go so far as to outright ignore endstop signals mid-print. It’s just a common enough issue that there are workarounds all up and down the printer design hierarchy.
The reason commercial printers like Lulzbots and Makerbots are chockablock full of EM suppression (ferrite chokes etc) is that PWM stepper driving is an idiotically noisy activity that junks up broad swathes of the EM spectrum. H-bridge switching timing errors cause massive inductive spikes with broad-spectrum energy radiation. There’s no way to pass FCC/CE EMI testing without cutting the noise down somehow. Custom printer builds don’t have that attention to EMR, and they can suffer for it.
Normally closed endstops aren’t just for noise. A normally closed switch when it fails will more often be seen as “open, triggered” than a normally open. But more than that if a wire/cable comes off a normally open endstop you’d never know and you can hit end of travel without knowing. But if it’s normally closed then when a wire is removed it looks like a constant end of travel and is easier to handle.
But still, shield your motor cables and you won’t get such absurd induced noise in endstops. That’s just a more bang for your buck answer. Otherwise you’re coupling that noise into frames that I know people aren’t grounding well, and that transmits to everything else. That’s literally the first step when dealing with CE emi testing, decrease noise creating items noise then address the noise at the source.
Btw ferrite chokes are black magic voodoo, and I’m confident most hobbyists wouldn’t know what they buy you. Most electrical engineers turn to them with noise issues and consider them a magical solution, when often they need to address other issues instead.
@David_Simmons Agreed with all that. But I would personally argue that normally-open endstops are MUCH better from a functional failure standpoint, because:
- The detached-endstop-wire failure case is 100% detectable and generally harmless at the start of the print. (The steppers just stall against a hard stop and then homing fails and the user knows the endstop failed.)
- Undetected mid-print loss of normally-open endstop has zero real impact. There’s no scenario where an endstop is necessary mid-print that doesn’t already involve print failure (unless you’re using an exotic power-loss-recovery routine, which isn’t an option for most Zmin homing printers anyway).
- Detected mid-print loss of normally-closed endstop will wreck the print if your firmware monitors endstops during the print.
In my view you would usually rather NOT detect endstop failure mid-print.
This is very different from e-stops (which MUST be wired normally-closed to prevent undetected failure-on-demand conditions) and heavy CNC mills capable of drivetrain self-destruction. There is also a good argument for Z probes to be wired normally-closed to avoid nozzle collisions damaging the print surface. Regular XY endstops or delta Zmax endstops that tend to be run parallel to motor wiring really don’t benefit from NC wiring.
@David_Simmons Shielding doesn’t block 100% of emissions, and most people building printers don’t have any idea how to properly connect shield drains. Plus a large portion of steppers come with integral wiring that is a PITA to replace with shielded cable. So that’s not a slam-dunk most of the time. Whereas twisting is pretty effective and super easy (just pop the crimps out of the existing plugs, twist, and reinsert). That’s why it’s my default recommendation versus shielded cable… yeah, shielding is better, but it’s a much worse reward:effort ratio most of the time.
You don’t need to replace the cable. You can shield a cable with aluminium tape. Did it once with hall feedback line on a moter installed in a transmission tower. Worked perfectly. But practicality depends on the application. Main downside is it makes your cable rigid, so don’t use this on cables that need to catch some movement. First thing to try is to avoid stepper motor wiring running alongside thermistor and end stop wiring.