Electronics #?: wiring a stepper motor

This is part #? in a list of postings on the electronics of my CEVO. The full list can be found here. The topic of this post is how to wire the stepper motor to the RAMPS. I am pretty sure most newer motors are the same, and yet I had difficulties to find a simple guide on how to do the wiring.

The most referenced guide is https://reprap.org/wiki/Stepper_wiring, and that was indeed the generic guide I used as reference. I am however quite sure you can just follow my guide below.

Most DIY 3D printer uses Nema17 stepper motors like the one on the right. The one in the picture uses a 6-pin connector, a JST 2.0 PH 6-pin male connector, and that seems to be pretty much standard. This connector is generally not that common, but you can order it for example at Aliexpress.

Even though it has 6 pins, it is actually a bipolar motor with only 4 connectors, as shown in the diagram on the right. To wire the motor we need to know the wires for the A coil and for the B coil. If in doubt you can identify the pins for the coils like described in the RepRap guide referenced above. It does however seem to be pretty much standard that:
    pin 1 and 4 is one coil and pin 3 and 6 is the other

It does not matter how you use the two wires for a coil. And it does not matter which coil is A and which is B as you can just switch direction in the software if needed.

The RAMPS board has four pins for each stepper driver and it is standard Dupont 2.54mm male connectors. On my board the pins are marked 1A, 1B, 2A and 2B, but you don't really need the markings, as you just need to know that the two pins on the left is for one coil and the two on the right are for the other coil.

You can buy standard cables for the wiring, but they are quite easy to make your self if you have a crimp tool (any cheep one from Aliexpress is good enough). You will need cable with four wires at 24AWG or similar, some JST 2.0 PH 6-pin female connectors and some Dupont female connectors.
    Wire pin 1 and 4 to the leftmost 2 pins on the RAMPS and pin 3 and 6 to the rightmost 2 pins.
On the right is my home-made cable, where you should be able to see the color coding of the 4 cores.

Comments

Popular posts from this blog

Electronics #3: Setting up the first RAMPS with Klipper

Electronics #2: Setting up Raspberry Pi with OctoPrint