1

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.

0scar
  • 37,708
  • 12
  • 68
  • 156

1 Answers1

1

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.
0scar
  • 37,708
  • 12
  • 68
  • 156