MKS GEN 1.4 Board

Hello everyone,

I am using MKS GEN 1.4 Board (Arduino Mega) along with DRV 8825 & NEMA17 Stepper motor for one of my project.

I need to Control 4 steppers with limit switch with simple stepper code or CNC Shield code, have selected this board as its has multiple feature on single board.

Issue: need to use this board without marline firmware and for the same i need PIN mapping, i have already done the google for and found some useful but still i am not getting for what i am looking for.

code sample.

define d_xDir 54
#define d_xStep 55

#define enable 38

//Total Steps to move
int stepDelay_swing = 60; //Delay between each pause

void setup() {
 pinMode(d_xDir, OUTPUT);
 digitalWrite(enable, LOW);

void step_swing(boolean dir, byte dirPin, byte stepperPin, int steps)
  digitalWrite(dirPin, dir);
  for(int i = 0; i < steps; i++){
    digitalWrite(stepperPin, HIGH);
    digitalWrite(stepperPin, LOW);

void loop() {


pin_Ramps.h its showing 54, 55, 38, 53 for Stepper X, however when i tried to use the same PIN with this code i am not able to move, its just stall, by swapping pins its run but not with enough torque.

its seems like i am missing enable pin, need help please.

It looks like you have the right pins. The RAMPS 1.4 X-axis stepper uses pins:
A0 (=54) for Step
A1(=55) for Direction
38 for Enable

Does the motor not even hum?

Have you tried a slower step rate? At 60 microseconds per half cycle you are trying to go from 0 to 8333 steps per second instantly. If a MUCH slower rate (like 100,000 microseconds per half cycle: 5 steps per second) works then you should consider adding gradual acceleration to your step rate.

1 Like

thanks for your time, yeh its humming but not rotating, tried to slow rpm i.e. working 20rpm and 1800 steps but not producing sufficient torque.

same code when i tried with CNC shield, its work like charm but not with this board.

tried with all steps combination of jumper.

will try again with your suggestion, will post the results here.

once again thank @johnwasser

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.