I have been searching around the internet for the last 3 days trying to figure this out, also posted in another forum but haven’t had any possible solutions yet :(. My Z axis motors for a pursa-i3 3d printer are not working correctly. I have marlin firmware and using repetier host. I send a command to move the z axis and I can get it to move, however if I send the same command again the motors will sometimes spin the other way. It feels like They almost randomly choose which direction they turn.

As I said I have been trouble shooting this for a while now. What I am suspecting is the firmware feedrates and acceleration or some setting in the firmware is not correct?

Here is my code:

//// MOVEMENT SETTINGS
#define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
#define HOMING_FEEDRATE {50*60, 50*60, 2*60, 0}  // set the homing speeds (mm/min)

#define DEFAULT_AXIS_STEPS_PER_UNIT   {80,80,4000,590}  
#define DEFAULT_MAX_FEEDRATE          {300, 300, 3, 45}    // (mm/sec)
#define DEFAULT_MAX_ACCELERATION      {1000,1000,50,500}    // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot.

#define DEFAULT_ACCELERATION          1000    // X, Y, Z and E max acceleration in mm/s^2 for printing moves
#define DEFAULT_RETRACT_ACCELERATION  1000   // X, Y, Z and E max acceleration in mm/s^2 for retracts

#define DEFAULT_XYJERK                10   // (mm/sec)
#define DEFAULT_ZJERK                 0.3     // (mm/sec)
#define DEFAULT_EJERK                 5.0    // (mm/sec)

I tried swapping the drivers around and the motors will work perfectly on another axis so I don’t suspect it to be a driver issue. I have been turning the pots ontop of the drivers to make them work but can’t make motors to go the same direction I want them to.

I’ve checked the wires and I almost sure they are wired up correctly. (could be wrong but have checked it over with a multimeter.)

I am new to this and it’s my first time building one of these would appreciate any help I can get and and maybe I have over looked something I have tested. Just really want the axis to move in the direction That I say it to move in.


More details about my setup is: A Robocraze 3D Printer Controller Board RAMPS 1.4 using A4988 stepper motors drivers and my motors are the nema 17 stepper motors. I currently have the two z axis motors wired in parallel but have tried before using series, however the problem of being unable to control the direction of the Z motors still arises (can easily switch back to series).

currently trying with no load just to get the motors turn in the correct direction when I send a G-code command. I am using Repetier host on ubuntu 14.04.5.

I have also check the endstops and they are working perfectly, so they ain’t a problem (I don’t think :p)

Thank you, Bobby

I have this EXACT same issue! It seems that when I send a z homing command through pronterface it always goes the same direction. But all other z move commands seem to randomly pick up or down regardless of direction specified by the command. Were you able to figure anything out?

It turned out that I had the z steppers plugged into the wrong pins.https://reprap.org/mediawiki/images/6/6d/Rampswire14.svg

This picture shows, there is two rows of pins near the z stepper pins, I had them plugged into the top pins, but they need to be plugged into the bottom ones.they work perfectly now!