First, X and Y axis works perfectly, I measured well. I have plugged all jumpers, and use a very standard ramps 1.4 setup with standard Nema 17 200rev 1.8 motors and A4988 drivers.
For Z axis, I have leadscrew with 8mm diameter and 2mm pitch.
I calculated it should be
1600 steps per mm. Problem is when I call
G1 Z5 it goes to 2 cm. So I lowered my setting to
400 steps per mm and problem solved.
I don't understand what I'm missing here. I have used this calculator to find
Where I'm wrong on the math then?
Your leadscrew probably is a 2 mm pitch, 4-start leadscrew. This means that there are actually 4 separate grooves on the leadscrew, each with a pitch of 8 mm. Confusingly, this makes the total pitch 2 mm, since the distance from one groove to the next is 8mm divided by 4 grooves. However, one revolution of the leadscrew will still move the nut by 8 mm. Thus, in the Prusa calculator, you should enter a pitch of 8 mm/revolution. Since you entered a pitch of 2 mm, you ended up with a figure that is 4 times too large.
The reason leadscrews are made like this is that if you just had a single groove with an 8 mm pitch, the nut would need to be made very long to enable it to make contact with a sufficiently long portion of thread. By increasing the number of grooves, you can get away with a shorter nut. With lower pitch (lead-)screws you don't need multiple starts, since the lower pitch means the same length of nut is in contact with more thread.
For the relative advantages and disadvantages of the various leads (8/4/2 mm), as opposed to pitches, see also Would using a leadscrew with 1 or 2 mm lead, en lieu of 8 mm, result in a better printer?