faulty z axis

recently bought a 3 d printer with arduino mega 2560 . but have been having trouble with the z axis .
when i manually jog z axis it seems to stutter . and does not always travel in direction i choose . i have swapped over wiring from x axis to rule out faulty motor but it works fine . .was wondering if any body could help with this

thank you

When you swap the Z and X motors, does the stutter move to the X motor?

Can you swap the stepper motor drivers to see if the problem moves with the driver? If so, the driver is faulty. If not it is probably the software or the wiring from the ATmega to the stepper motor driver.


when i swapped over x and z motors . z axis worked fine . but x axis began to stutter . also if it helps . when i jog z axis plus . it is hit and miss as to the actual direction it will travel in .