Y axis and Z axis gear ratio

I am working in Mach4 and I am given this equation to count the units per inch. For Y axis I got 2540 units, z axis, I got 2400 units. I feel I am not getting the gear ratio right. I know it is not right because the machine does not move the right amount. The Y and X move over three inches when machine says one inch and Z moves less than an inch when program said it had moved an inch. Steps per revolution of motors is 200. I am not sure what I am missing.

Check out the stepper motor calculator in this thread: Stepper Motor Calibration Calculator

It uses the distance traveled, the distance it SHOULD have traveled, and the current stepper motor steps/mm. If you have those three numbers for it, it will tell you what steps/mm you should change to. To convert from steps/mm to steps/in, just multiply the steps/in by 25.4 before you plug it into the calculator, and divide the result it gives you by 25.4.

Hi Robert, that’s a very good point. I should have built it for both systems of measurement, and will look to update it with a radio button for mm/inch.

1 Like

What control system are you using? If you have stepper drivers that have DIP switches, you may need to check your microstep settings. For starters you probably want 1/8 microstepping on each axis. If you are using a Gecko G540, you are probably using 1/10 microstepping by default.

Also, Mach3 has a tool built in under the “Settings” tab, “Set Steps Per Inch” Or "Calbrate Axis. It would be a shame if Mach 4 did not also have this. It is essentially the same kind of calculator Robert references but it sets your steps automatically.

Sorry Robert, I’ve confused myself with the calculation. Would you be able to give me an example of current value, input and output values, and the correct stepper motor setting (in inches)?


Hi, I have a standard x-carve controller, using Vcarve and UGS. I’m new to CNC and not up to speed yet with much of the detail you mention, though eager to learn.

Oh. Sorry - Mach 4 threw me. I have no knowledge of UGS and the stock controller.

I believe I got the multiply/divide wrong up above, but I’ll swap that around if needed after this post.

My X and Y steppers are set at about 39.8 steps/mm, and my Z is set at about 200 steps/mm (I think).

Here’s how I would do the calculation using inches:
Start @ 0.005"
End @ 24.065"
Ideal travel=24"
Real travel=24.060"

Let’s say my X stepper ($100) is set at 39.815 steps/mm:
39.815*25.4=1001.301 steps/inch
(24"/24.060")*1001.301=998.804 steps/inch
998.804/25.4=39.323 steps/mm

I would set my $100 to 39.323 steps/mm.

I hope that helps!

Awesome, Thanks Robert. I will try that out.

When using micro stepping, does that increase the steps of the motor? according to the computer.

Yah so instead of the one step turning the motor 1.8 degrees, one step would only turn it .9 degrees if you were using 1/2 microstepping. It would only turn .45 degrees at 1/4 microstepping. So, theoretically, more steps per inch increases accuracy. But there are many factors and limits. I believe these machines by default were set to 1/8 using the stock configuration. My Gecko uses 1/10 with extra magic to smooth out motion and torque that I do not understand but fully appreciate.

Here is a good primer on microstepping: http://motion.schneider-electric.com/technology-blog/stepper-motor-basics-half-and-micro-stepping/

Hi Robert, I have updated the calculator, tested the calculation manually several times and I get the same result whether selecting millimeters or inches. I’m not great with mathematics but multiplication by 25.4 and division by 25.4 at the end net each other out, but it appears to work. If you could check once again I’d appreciate it.


1 Like

That looks good to me. They do indeed cancel each other out, it looks like I still managed to overcomplicate things. I think I need some sleep… :slight_smile: Probably still good to have it on there, that way people won’t ask you if it works only for metric though.

Ah, that would be my problem, I did not include the micro-stepping that was going on, I think that will help a lot, thanks!