I broke up my electronics and now the output for X is not working. The stepper is OK.

There is any simple solution to remap the output pins? I want the E1 output to act as the X output.

  • 1
    $\begingroup$ If the answer below fixed your problem could you please accept it, using the "Tick icon" next to it, in order to remove it from the unanswered questions list? $\endgroup$
    – Greenonline
    May 10, 2017 at 17:21

2 Answers 2


When using Marlin firmware you could easily change the pin layout of the extra extruder (E1) with the broken X stepper pins by changing the pins_RAMPS.h file.

Download the firmware and open the firmware project in Arduino IDE. Navigate to the "Steppers" section of the pins_RAMPS.h file and replace:

#define X_STEP_PIN         54
#define X_DIR_PIN          55
#define X_ENABLE_PIN       38
#define X_CS_PIN           53


#define X_STEP_PIN         36
#define X_DIR_PIN          34
#define X_ENABLE_PIN       30
#define X_CS_PIN           44

and also change:

#define E1_STEP_PIN        36
#define E1_DIR_PIN         34
#define E1_ENABLE_PIN      30
#define E1_CS_PIN          44


#define E1_STEP_PIN        54
#define E1_DIR_PIN         55
#define E1_ENABLE_PIN      38
#define E1_CS_PIN          53

When the file is changed an saved, build and upload code to your board and plug the connector of the X stepper into the E1 header.

  • $\begingroup$ Yes! I'm having exactly this problem. Thanks for this. $\endgroup$
    – Lutorm
    Nov 26, 2021 at 20:59

you can find pin.h in marlin directory and in pin.h file change # define pinout of z motor and extruder motor

  • $\begingroup$ Exactly! I found thease in pinsRAMPS.h thx for help! $\endgroup$
    – BuzzKill
    Apr 27, 2017 at 6:21
  • 3
    $\begingroup$ This answer is very terse, and might not include enough details for some users. Perhaps you could improve it by including a bit more detail on what needs to be changed exactly? $\endgroup$ Apr 28, 2017 at 9:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .