Maslow Home Maslow Community Garden Newsletter

Motor encoder question

My guess is that its a 50 gear ratio… 3 ppr * 50 * 4 = 600 counts per revolution. 8 mm pitch yields 75 counts per 1 mm in pitch. Using 7560 counts per revolution with a 100.8 mm pitch yields 75 counts per 1 mm of pitch.

Makes sense. I figure a 100mm pitch was 12.5 times 8mm. 7560/12.5 is 604. I used that as the count and returned to 8mm pitch to see what happened. The Z axis moved the correct distance but the motor wasn’t happy trying to provide enough torque to move the Z… Back to 7560 and 100mm. I’ll try 100.8mm. I’m measuring travel with digital calipers. The accuracy more than meets my needs and I’ve learned a lot.

I think I figured out that gear ratio table. If you assume the motor’s RPM is 6000, then dividing it by the gear ratio gives you and unloaded RPM. So 6000 / 50 = 120 RPM (or 96 RPM loaded). But that would suggest your motor has a 22.5 mm gearbox.

I had a similar problem with my Z motor upgrade, this post may be helpful if you can follow my nonsense on how I figured mine out.

I got a reply from the manufacturer! The gear ratio is 1:50 with a ppr of 7.

The 50 part is seems right, but mathematically, the 7 ppr doesn’t work. @metalmaslow’s order shows its 3ppr, which works out. So for your setup, pitch should be 8 (maybe -8 depending upon how the leadscrew is installed) and Z-Axis Encoder Steps Per Revolution should be 600 (50 * 3 * 4)…

The part number Metal shows is not the same as the one given in an earlier post. I don’t know which one is correct. I tried 600 at an 8 pitch yesterday. The movement is accurate but the motor is turning very slowly. I’ll try 1400 (5074)

Ok, so the issue here is that the controller limits the speed for z-axis move. It’s quasi-hardcoded in as 12.6 RPM. Though it is something that can be set in the firmware, there’s no setting in ground control to allow you to set it. But the controller doesn’t use RPM by itself, it actually sets the maximum z-axis feedrate equal to the max RPM x the Z-axis pitch. Therefore, if you double the Z-axis pitch you can effectively increase the max feed rate. However, you need to then also double the encoder steps to retain accuracy. So 600/8 (encoder steps / pitch) yields a feed rate of 12.6 * 8 = 100.8 mm per minute. Going to 1200/16 yields a feed rate of 12.6 * 16 = 201.6 mm per minute. With a motor rated for 96 RPM (loaded) and a hard-coded RPM of 12.6 in the firmware, you could increase the pitch and encoder steps by 7 and stay under the RPM limit. So 600/8 becomes 4200/56.

Or, if you send:

$18=96

as a manual command in ground control (you have to make it as a macro), that might fix it as well. This command tells the controller to set the setting with a key value of 18 (the z-axis max rpm) to 96. If you are daring, I’d love for you to try that to see if you get the same results as my previous post.

if the distance is accurate, but you are turning slowly, then try changing the
feed rate. changeing the encoder value will make the distance wrong.

David Lang

Will that work with webcontrol as well? Does the RPM change save in the inI file?

The rpm value gets saved on the controller’s eeprom. It should persist unless you do a clear eeprom function (which is rare for you to need to do once the machine is working)

Yes, but you don’t have to use a macro in webcontrol. Go to Gcode->Send Custom GCode and enter the command there and press Submit.

So just to confirm.
Encoder to be set to 600
Pitch to be set to 8
Send $18=96 command
This correct? I will test tonight.

Yes (this assumes you have the same setup as @redshift). If you would, just change the encoder steps and pitch first, do a z-axis move and confirm it runs slow. Then, send that manual command and do the same move and confirm it runs fast.

Yes, bought an upgraded Z-axis motor from @Metalmaslow as well. I found 101 pitched worked but I would rather have it set up with correct configurations. I will do some testing tonight and let you know.

Thanks for all your help.

1 Like

I have a question about the z-axis ratio. I would imagine it’s linear since the gear ratio remains the same. Why can’t you just measure the amount of travel you get and set it up as a ratio to the amount of travel you want and use that 8 As the numerator and one of the fractions? What am I missing?

It’s very hard to measure precisely. most of the time it doesn’t matter in
woodworking, but in theory the Z axis can be accurate to far less than a
thousanth of an inch (assuming suitable quality threaded rod)

David Lang

David,

FWIW, I put painters tape on the upright underneath the z-axis carrier, used a fine point pencil and a micrometer. I know it is not ideal but it worked out for me.

Not missing anything. Im and engineer and like to solve problems, hence the reason trying to figure this one out. I also intend to add the zaxis pitch to the quick configure routine in webcontrol, so I wanted to solve this problem.