<p>Just define an additional <code>X2</code> axis by using the <code>E1</code> in the pins (<code>pins_RAMPS.h</code>) configuration.</p>
<p>Change:</p>
<pre><code>#ifndef E1_STEP_PIN
  #define E1_STEP_PIN                         36
#endif
#ifndef E1_DIR_PIN
  #define E1_DIR_PIN                          34
#endif
#ifndef E1_ENABLE_PIN
  #define E1_ENABLE_PIN                       30
#endif
#ifndef E1_CS_PIN
  #define E1_CS_PIN                      AUX2_07
#endif
</code></pre>
<p>to</p>
<pre><code>#ifndef X2_STEP_PIN
  #define X2_STEP_PIN                         36
#endif
#ifndef X2_DIR_PIN
  #define X2_DIR_PIN                          34
#endif
#ifndef X2_ENABLE_PIN
  #define X2_ENABLE_PIN                       30
#endif
#ifndef X2_CS_PIN
  #define X2_CS_PIN                      AUX2_07
#endif
</code></pre>
<p>Furthermore enable <code>#define X2_DRIVER_TYPE A4988</code> in your <code>Configuration.h</code> file. Note that this enables a duplicate X stepper, see hints in <code>Configuration_adv.h</code>:</p>
<blockquote>
<p>// @section multi stepper</p>
<p>/**</p>
<ul>
<li>Multi-Stepper / Multi-Endstop</li>
<li></li>
<li>When X2_DRIVER_TYPE is defined, this indicates that the X and X2 motors work in tandem.</li>
<li>The following explanations for X also apply to Y and Z multi-stepper &gt;setups.</li>
<li>Endstop offsets may be changed by 'M666 X Y Z' and &gt;stored to EEPROM.</li>
</ul>
</blockquote>

CC BY-SA 4.0
2024-11-24T12:03:04.770Z
This works great  ,Once again ,Thank you!!!
John Francis
CC BY-SA 4.0
2024-11-22T10:31:49.280Z
2024-11-22T12:43:26.367Z
2024-11-22T12:43:26.367Z
0scar
<p>Cloning an X-axis on an Arduino Mega and RAMPS 1.4 shield</p>
<p>To those that know; On the Arduino CNC shield used with the Arduino Uno there is an X-, Y-, Z- and an A-axis. The A-axis can be used as a clone for X,Y or Z to run two stepper motors at the same time. The clone setup is done easily with jumper pins.</p>
<p>Is there any way to do this with the Arduino Mega/RAMPS 1.4 combination? Perhaps using the <code>EO</code> or <code>E1</code> Axis? I know the Z-axis has a second set of pins for a second stepper motor, but in that case, the two motors are being driven by only one driver. I would like to have two drivers.</p>

CC BY-SA 4.0
2024-11-22T10:05:14.210Z
`Asked today Modified today Viewed 15 times -1`? What has that to do with the question?
0scar
CC BY-SA 4.0
2024-11-22T10:32:22.467Z
Note that your question is in the basis answered in https://3dprinting.stackexchange.com/a/23192/
0scar
CC BY-SA 4.0
2024-11-22T11:19:12.010Z
@0scar If I had to guess, this question was asked before (probably on another SE site). It was downvoted on that site (probably b/c it was off-topic), so OP copy-pasted that question to this SE. This is the result when you're not careful while copying the title: https://i.sstatic.net/UmRlz9dE.png
Velvet
<ramps-1.4><stepper-driver><stepper><arduino-mega-2650>
Cloning an X axis on an Arduino Mega and RAMPS 1.4 shield
John Francis
# Cloning an X axis on an Arduino Mega and RAMPS 1.4 shield

(Asked by: username_0 on 2024-11-22)

Cloning an X-axis on an Arduino Mega and RAMPS 1.4 shield

To those that know; On the Arduino CNC shield used with the Arduino Uno there is an X-, Y-, Z- and an A-axis. The A-axis can be used as a clone for X,Y or Z to run two stepper motors at the same time. The clone setup is done easily with jumper pins.

Is there any way to do this with the Arduino Mega/RAMPS 1.4 combination? Perhaps using the `EO` or `E1` Axis? I know the Z-axis has a second set of pins for a second stepper motor, but in that case, the two motors are being driven by only one driver. I would like to have two drivers.

**Tags:** ramps-1.4, stepper-driver, stepper, arduino-mega-2650
> **Comments:**
> **username_1**: `Asked today Modified today Viewed 15 times -1`? What has that to do with the question?  
> **username_1**: Note that your question is in the basis answered in https://3dprinting.stackexchange.com/a/23192/  
> **username_2**: @0scar If I had to guess, this question was asked before (probably on another SE site). It was downvoted on that site (probably b/c it was off-topic), so OP copy-pasted that question to this SE. This is the result when you're not careful while copying the title: https://i.sstatic.net/UmRlz9dE.png  

---

## 1 answers

### Answer by username_1 on 2024-11-22. Score: 1 | Accepted answer

Just define an additional X2 axis by using the E1 in the pins (pins_RAMPS.h) configuration.
Change:
#ifndef E1_STEP_PIN
  #define E1_STEP_PIN                         36
#endif
#ifndef E1_DIR_PIN
  #define E1_DIR_PIN                          34
#endif
#ifndef E1_ENABLE_PIN
  #define E1_ENABLE_PIN                       30
#endif
#ifndef E1_CS_PIN
  #define E1_CS_PIN                      AUX2_07
#endif

to
#ifndef X2_STEP_PIN
  #define X2_STEP_PIN                         36
#endif
#ifndef X2_DIR_PIN
  #define X2_DIR_PIN                          34
#endif
#ifndef X2_ENABLE_PIN
  #define X2_ENABLE_PIN                       30
#endif
#ifndef X2_CS_PIN
  #define X2_CS_PIN                      AUX2_07
#endif

Furthermore enable #define X2_DRIVER_TYPE A4988 in your Configuration.h file. Note that this enables a duplicate X stepper, see hints in Configuration_adv.h:

// @section multi stepper
/**

Multi-Stepper / Multi-Endstop

When X2_DRIVER_TYPE is defined, this indicates that the X and X2 motors work in tandem.
The following explanations for X also apply to Y and Z multi-stepper >setups.
Endstop offsets may be changed by 'M666 X Y Z' and >stored to EEPROM.

> **Comments:**
> **username_0**: This works great  ,Once again ,Thank you!!!  

---

