wiring stepper motors - what is the best approach ?

I am building an Arduino (grbl) based router, and I have purchased 3 NEMA 23 6 wire stepper motors. They come with pretty short wires. If I hook the wires up directly to the controller everything works OK. However, when I finally construct the CNC router with stepper motors, they will have to be anywhere from 3 - 4 feet away from the controller. I need to buy or build longer wires.

I have tried 2X to construct a cable, one time using solid wires, another using braided wires with connections I cut from Arduino breadboarding wires and pins ( I am running the steppers at 24v).
Each time, when I connect them up as before, the motor stepper shakes and runs erratically when I send commands via a g-code interface.

I'm sure that for many robotics or CNC projects you have needed to extend these wires. What have you found that looks clean and works well?

Any suggestions would be appreciated.

George Clay

IMO, stranded wire is best for lengthening motor wires, get 9 strands or more.
Solder properly and heat shrink.
20 AWG or larger.

Screw terminal strips work well (tin wire ends), avoid quick release connectors unless they are high quality gold plated.

Nothing wrong with soldering the wires to the circuit board.

Larryd,

Thanks for your response. Is 20 AWG the same as 20 gage? I haven't checked yet, but I am guessing that the wire used in those Arduino breadboard kits is smaller than that. I would like to be able to plug and unplug the stepper motor. Any suggestions regarding plugs. That is high quality ones?

Does this mean that most hobbyists who use stepper motors, solder wires themselves to get the right length, rather than buy them?

again; Thank You for your response.

George Clay

"AWG" = "American Wire Gauge"

Breadboards use solid wire. Unless you have the type of wires that have molded "plugs" on the end with a single pin.

Look at the wire gauge used by the stepper. Don't use wire smaller than that. Larger is OK. Remember that in AWG, smaller numbers are physically bigger wire. 3-4 feet should absolutely not be a problem. The driver will detect the resistance of the additional wire and will compensate for it.

The little black plugs that you see in a lot of Arduino projects are often called "Dupont connectors". You can buy them with as many pins as you need. I use a slightly-fancier version called AMPMODU-MTE from TE Connectivity. They have retention latches so they don't fall out with vibration. I started out buying 10 each of every size from 2 pins to 10 pins. Plugs and PCB sockets (also called receptacles) and inline sockets. It was a few hundred bucks to start but now I always have exactly the right connector available at my workbench.

The MTE connectors and their "dupont" cousins can't take a lot of current on each pin. One or two Amps max. If you need more than that for your steppers, then you need to step up to a bigger connector. The Mini-Fit Jr series is pretty good although they don't have any 2pin versions, which I need a lot.

Really big amps goes on "Anderson" plugs. They are great because you don't need to keep different sockets - the plugs are complementary. The regular small Andersens will fit different pins for 15, 30 and 45 Amp circuits. Plus you can do stupid things like plug a 15A pin into a 45A pin. Anderson doesn't care. Then they have bigger ones that can carry hundreds of amps. I don't keep those on my workbench. You can solder Anderson terminals but it's much nicer if you invest in the proper crimper. The crimper isn't expensive and it covers all sizes from 15 to 45.

gclayjr:
Larryd,

Thanks for your response. Is 20 AWG the same as 20 gage? I haven't checked yet, but I am guessing that the wire used in those Arduino breadboard kits is smaller than that. I would like to be able to plug and unplug the stepper motor. Any suggestions regarding plugs. That is high quality ones?

Does this mean that most hobbyists who use stepper motors, solder wires themselves to get the right length, rather than buy them?

again; Thank You for your response.

George Clay

AWG means American Wire Gauge. If you are in USA, then 20 gauge = 20 AWG. But at one time each country had their own wire gauge standard.So if you are in Great Britain, your 20 gauge will be different. Most countries moved form wire gauge to Metric and size wire by mm.

Arduino kits use really small wire because they are dealing with signals or quite small currents.

For connectors, you need to determine how often they will be connected/disconnected. That is where wear comes into play.

Paul

I'd second the stranded wire requirement - for a CNC machine the wires are going to be vibrated and
flexed all the time, solid wire will fail eventually in such a use.

Probably the best approach is to get shielded 4-core high current cable, so that the wiring creates
much less capacitive and induced interference.

Second choice is twisted pair of twisted pairs. Each individual winding should have a twisted pair, and these
two pairs should be twisted (in the opposite sense) together. Twisted pair will reduce induced interference
to a minimum, and twist-on-twist is very flexible way to combine 4 wires. Alas the construction
will couple capacitively to nearby signal cables, so it pays to keep separate from them, or ensure
all signal cables are shielded. (Signal cables are things like limit switch wiring, encoders, etc).

Twisting is easy to do with a cordless drill and a bench vice, just keep enough tension to prevent
kinking, and reverse briefly to lose any torsion before releasing the wires.

You'll see in old/ancient telephone cables a 4-wire braiding, which is really two interlocking twisted pairs,
its a great way to do 4 wires, but is slow and laborious compared to twisted twists.

Thank you all for your help. I tried using screw terminals and shielded 16 gage stranded wire cable, and everything worked fine!

George