<p>There are very many combinations that will work. A bipolar stepper has 2 coils. Swapping the coils, or reversing the polarity of a coil, will simply cause the stepper to rotate in the opposite direction.</p>

<p>On RAMPS, one coil should connect to 1A and 1B, whereas the other coil should connect to 2A and 2B.</p>

<p>On the stepper, one coil is A+ and A-, the other coil is B+ and B-.</p>

<p>A possible wiring is A+ to 1A, A- to 1B and B+ to 2A and B- to 2B, but there are 15 other possibilities. The only "wrong" way is one that connects a coil of the stepper to two different coil outputs on the RAMPS (so connecting, for instance, A+ to 1A and A- to 2A wouldn't work).</p>

CC BY-SA 3.0
2018-03-17T21:55:30.303Z
Wow, thank you for your feedback. If i have A+ to 2B, A- to 2A and B+ to 1A, B- to 1B is also correct?
OrElse
CC BY-SA 3.0
2018-03-17T22:30:53.817Z
Yes, that also works.
Tom van der Zanden
CC BY-SA 3.0
2018-03-17T21:37:32.103Z
2018-03-17T21:37:32.103Z
Tom van der Zanden
<p>I have an <code>NEMA 17</code> stepper motor <code>17HS4401</code> and a RAMPS 1.4 driver unit.</p>

<p>The motor pinouts are:</p>

<pre><code>RED   A+
BLUE  A-
GREEN B+
BLACK B-
</code></pre>

<p>while the RAMPS board has the following:</p>

<pre><code>2B 2A 1A 1B
</code></pre>

<p>Could someone point me in the right direction? How can I connect the driver to the motor? I have a feeling I already messed things up.</p>

<ramps-1.4><stepper><wiring><nema-17>
How to connect a NEMA 17 stepper to RAMPS 1.4?
OrElse
# How to connect a NEMA 17 stepper to RAMPS 1.4?

(Asked by: username_0 on 2018-03-17)

I have an `NEMA 17` stepper motor `17HS4401` and a RAMPS 1.4 driver unit.

The motor pinouts are:

```
RED   A+
BLUE  A-
GREEN B+
BLACK B-

```

while the RAMPS board has the following:

```
2B 2A 1A 1B

```

Could someone point me in the right direction? How can I connect the driver to the motor? I have a feeling I already messed things up.

**Tags:** ramps-1.4, stepper, wiring, nema-17


---

## 1 answers

### Answer by username_1 on 2018-03-17. Score: 6 | Accepted answer

There are very many combinations that will work. A bipolar stepper has 2 coils. Swapping the coils, or reversing the polarity of a coil, will simply cause the stepper to rotate in the opposite direction.

On RAMPS, one coil should connect to 1A and 1B, whereas the other coil should connect to 2A and 2B.

On the stepper, one coil is A+ and A-, the other coil is B+ and B-.

A possible wiring is A+ to 1A, A- to 1B and B+ to 2A and B- to 2B, but there are 15 other possibilities. The only "wrong" way is one that connects a coil of the stepper to two different coil outputs on the RAMPS (so connecting, for instance, A+ to 1A and A- to 2A wouldn't work).

> **Comments:**
> **username_0**: Wow, thank you for your feedback. If i have A+ to 2B, A- to 2A and B+ to 1A, B- to 1B is also correct?  
> **username_1**: Yes, that also works.  

---

