# Motor encoder question

**URL:** <https://forums.maslowcnc.com/t/motor-encoder-question/12733>\
**Category:** Troubleshooting\
**Created:** [March 24, 2020, 12:15pm UTC](https://forums.maslowcnc.com/t/motor-encoder-question/12733 "2020-03-24T12:15:34Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![redshift](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/redshift/32/15928_2.png) [@redshift](https://forums.maslowcnc.com/u/redshift)\
**Post date:** [March 24, 2020, 12:15pm UTC](https://forums.maslowcnc.com/t/motor-encoder-question/12733/1 "2020-03-24T12:15:34Z")

</div>

I’ve installed a faster Z motor from Metalmaslow. I’m trying to get it to move the distance the gcode commands. My original pitch was -8. I assume this is the pitch of the lead screw driving the Z lift. One revolution of the shaft moves the lift 8mm? The faster motor moves the lift many times 8mm. I’m guessing the ratio of motor revolution versus output shaft revolutions is very different between the two motors. I’ve tried changing the pitch setting to 93 which is close. Is there a way to calculate the exact adjustment to make to the pitch?

---

<div class="post-metadata">

**Author:** ![madgrizzle](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/madgrizzle/32/1372_2.png) [@madgrizzle](https://forums.maslowcnc.com/u/madgrizzle)\
**Post date:** [March 24, 2020, 2:01pm UTC](https://forums.maslowcnc.com/t/motor-encoder-question/12733/2 "2020-03-24T14:01:37Z")

</div>

If you got the motor from @metalmaslow, I’d ask them the appropriate setting. But, basically you need to find the specs on the motor encoder and the gear ratio. If the motor has a 10 PPR and a gear ratio of 240, then the encoder count setting would be 10 x 240 x 4 = 9600 (the factor of 4 is needed because the encoder library produces 4 counts per pulse).

---

<div class="post-metadata">

**Author:** ![redshift](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/redshift/32/15928_2.png) [@redshift](https://forums.maslowcnc.com/u/redshift)\
**Post date:** [March 24, 2020, 3:47pm UTC](https://forums.maslowcnc.com/t/motor-encoder-question/12733/3 "2020-03-24T15:47:32Z")

</div>

Thanks, I’ve asked @metalmaslow. He may not understand my question.

---

<div class="post-metadata">

**Author:** ![madgrizzle](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/madgrizzle/32/1372_2.png) [@madgrizzle](https://forums.maslowcnc.com/u/madgrizzle)\
**Post date:** [March 24, 2020, 4:02pm UTC](https://forums.maslowcnc.com/t/motor-encoder-question/12733/4 "2020-03-24T16:02:21Z")

</div>

Just two values you need… “Maslow Settings-\>Z-Axis Pitch” and “Advanced Settings-\>Z-Axis Encoder Steps per Revolution”

---

<div class="post-metadata">

**Author:** ![redshift](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/redshift/32/15928_2.png) [@redshift](https://forums.maslowcnc.com/u/redshift)\
**Post date:** [March 25, 2020, 11:44am UTC](https://forums.maslowcnc.com/t/motor-encoder-question/12733/5 "2020-03-25T11:44:20Z")

</div>

I’ve found specs for the magnetic encoder. 3PPR or 7PPR. Does that in any way relate to steps per revolution?

---

<div class="post-metadata">

**Author:** ![redshift](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/redshift/32/15928_2.png) [@redshift](https://forums.maslowcnc.com/u/redshift)\
**Post date:** [March 25, 2020, 11:45am UTC](https://forums.maslowcnc.com/t/motor-encoder-question/12733/6 "2020-03-25T11:45:11Z")

</div>

I see the answer in your first response!! thanks

---

<div class="post-metadata">

**Author:** ![madgrizzle](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/madgrizzle/32/1372_2.png) [@madgrizzle](https://forums.maslowcnc.com/u/madgrizzle)\
**Post date:** [March 25, 2020, 12:03pm UTC](https://forums.maslowcnc.com/t/motor-encoder-question/12733/7 "2020-03-25T12:03:49Z")

</div>

I edited the formula in my post because I used \* instead of x… an \* is a special code in the forum for markup text.

```
10*240*4=9600

```

results in 10_240_4=9600 being shown on the screen.

---

<div class="post-metadata">

**Author:** ![redshift](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/redshift/32/15928_2.png) [@redshift](https://forums.maslowcnc.com/u/redshift)\
**Post date:** [March 25, 2020, 12:04pm UTC](https://forums.maslowcnc.com/t/motor-encoder-question/12733/8 "2020-03-25T12:04:54Z")

</div>

Now I need to find the gear ratio!

---

<div class="post-metadata">

**Author:** ![redshift](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/redshift/32/15928_2.png) [@redshift](https://forums.maslowcnc.com/u/redshift)\
**Post date:** [March 25, 2020, 12:07pm UTC](https://forums.maslowcnc.com/t/motor-encoder-question/12733/9 "2020-03-25T12:07:56Z")

</div>

This is the chart from the motor mfg. Clear as mud to me. I’m going to measure the gear box to narrow it down a little.

 ![image](https://canada1.discourse-cdn.com/flex031/uploads/maslowcnc/original/3X/1/b/1b08466f94eb9f6eb569330fb891e7e6bf8ee867.png)

---

<div class="post-metadata">

**Author:** ![madgrizzle](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/madgrizzle/32/1372_2.png) [@madgrizzle](https://forums.maslowcnc.com/u/madgrizzle)\
**Post date:** [March 25, 2020, 12:09pm UTC](https://forums.maslowcnc.com/t/motor-encoder-question/12733/10 "2020-03-25T12:09:14Z")

</div>

Just note that you can’t always trust what is in the spec sheets. When Maslow started out, the spec sheet of the main motors said the gear ration was 290:1 but in reality it was 289.776:1. People opened up the gear box, counted the teeth, and computed the ratio.

---

<div class="post-metadata">

**Author:** ![madgrizzle](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/madgrizzle/32/1372_2.png) [@madgrizzle](https://forums.maslowcnc.com/u/madgrizzle)\
**Post date:** [March 25, 2020, 12:10pm UTC](https://forums.maslowcnc.com/t/motor-encoder-question/12733/11 "2020-03-25T12:10:58Z")

</div>

I would assume the ratio is 810:1. perhaps @dlang can chime in. He’s good that this.

---

<div class="post-metadata">

**Author:** ![redshift](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/redshift/32/15928_2.png) [@redshift](https://forums.maslowcnc.com/u/redshift)\
**Post date:** [March 25, 2020, 12:20pm UTC](https://forums.maslowcnc.com/t/motor-encoder-question/12733/12 "2020-03-25T12:20:49Z")

</div>

I cheated and changed the pitch from 8 to 100. The results are within a mm. Is there a way to calculate that back to get the encoder setting?

---

<div class="post-metadata">

**Author:** ![madgrizzle](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/madgrizzle/32/1372_2.png) [@madgrizzle](https://forums.maslowcnc.com/u/madgrizzle)\
**Post date:** [March 25, 2020, 12:24pm UTC](https://forums.maslowcnc.com/t/motor-encoder-question/12733/13 "2020-03-25T12:24:07Z")

</div>

What are the current encoder steps?

---

<div class="post-metadata">

**Author:** ![redshift](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/redshift/32/15928_2.png) [@redshift](https://forums.maslowcnc.com/u/redshift)\
**Post date:** [March 25, 2020, 12:26pm UTC](https://forums.maslowcnc.com/t/motor-encoder-question/12733/14 "2020-03-25T12:26:49Z")

</div>

They list 3 or 7PPR for their encoders. I’ve emailed the company in Japan to see if they can be specific about the motor ET-SGM37D-24120

---

<div class="post-metadata">

**Author:** ![madgrizzle](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/madgrizzle/32/1372_2.png) [@madgrizzle](https://forums.maslowcnc.com/u/madgrizzle)\
**Post date:** [March 25, 2020, 12:28pm UTC](https://forums.maslowcnc.com/t/motor-encoder-question/12733/15 "2020-03-25T12:28:27Z")

</div>

What does it say in Advanced Settings-\>ZAxis Encoder Steps Per Rotation on your maslow?

---

<div class="post-metadata">

**Author:** ![redshift](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/redshift/32/15928_2.png) [@redshift](https://forums.maslowcnc.com/u/redshift)\
**Post date:** [March 25, 2020, 12:30pm UTC](https://forums.maslowcnc.com/t/motor-encoder-question/12733/16 "2020-03-25T12:30:27Z")

</div>

7560 is what it’s set for

---

<div class="post-metadata">

**Author:** ![madgrizzle](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/madgrizzle/32/1372_2.png) [@madgrizzle](https://forums.maslowcnc.com/u/madgrizzle)\
**Post date:** [March 25, 2020, 12:40pm UTC](https://forums.maslowcnc.com/t/motor-encoder-question/12733/17 "2020-03-25T12:40:03Z")

</div>

I was hoping it would come out to some nice number I’ve seen before (like 22 or 8). Can you measure the shaft and see how far it is between, say, five turns?

---

<div class="post-metadata">

**Author:** ![redshift](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/redshift/32/15928_2.png) [@redshift](https://forums.maslowcnc.com/u/redshift)\
**Post date:** [March 25, 2020, 12:47pm UTC](https://forums.maslowcnc.com/t/motor-encoder-question/12733/18 "2020-03-25T12:47:44Z")

</div>

Does this make any sense? If 7560 x 100 pitch gives results within a mm and 7560x100/8 =9450. Would 9450 be close to the desired steps? 3PPRx810GRx4=9720. All the other gear ratio times 3PPR are lower than 7560. 7PPR times gear ratio are much higher.

---

<div class="post-metadata">

**Author:** ![madgrizzle](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/madgrizzle/32/1372_2.png) [@madgrizzle](https://forums.maslowcnc.com/u/madgrizzle)\
**Post date:** [March 25, 2020, 12:50pm UTC](https://forums.maslowcnc.com/t/motor-encoder-question/12733/19 "2020-03-25T12:50:00Z")

</div>

> [@redshift](#):
>
> ET-SGM37D-24120

Figured it out. Pitch is 22 mm. Gear ratio is 90 (your motor is the ‘shorter’ version with only 4 stages, encoder ppr is 7, which gives a encoder steps of 90 \* 7 \* 4 = 2520.

Edit. hold on, let me check something

---

<div class="post-metadata">

**Author:** ![dlang](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/dlang/32/859_2.png) [@dlang](https://forums.maslowcnc.com/u/dlang)\
**Post date:** [March 25, 2020, 12:51pm UTC](https://forums.maslowcnc.com/t/motor-encoder-question/12733/20 "2020-03-25T12:51:04Z")

</div>

without opening the gearbox to count teeth, it’s not possible to know for sure

but what you can do is put something on the output that lets you know where it  
is, make your estimate of PPR, run it through 50-100 complete rotations, and see  
if it stops at exactly the same point. If so, you have it right. If it goes too  
far, you have the PPR too high, if it doesn’t go far enough, you have it too  
low.

you obviously need to do this without the motor connected to the machine.

I would say that the odds of the gear box being eactly 810:1 with 6 steps is  
rather low

David Lang

[Next page](https://forums.maslowcnc.com/t/motor-encoder-question/12733.md?page=2)
