Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MMU_CALIBRATE_ENCODER and MMU_CALIBRATE_GATES return different results on the same gate #289

Closed
iamnotahippy opened this issue May 9, 2024 · 2 comments
Labels
not a bug This doesn't seem right. Maybe misunderstanding

Comments

@iamnotahippy
Copy link

Steps to reproduce:

  1. Home ERCF
  2. Run MMU_CALIBRATE_ENCODER on gate 0. Result is ~400 steps
  3. Run MMU_CALIBRATE_GATES GATE=5. Result is ~415 steps
  4. Run MMU_CALIBRATE_ENCODER. HH runs encoder calibration on gate 5. Result is ~400 steps.
  5. Zeroed calibration values in variables.cfg. Repeat procedure. Same result.

See attached mmu.log

mmu.log.txt

@moggieuk
Copy link
Owner

moggieuk commented May 15, 2024

Hmmm

22:51:02     TRACE: Setting gear motor rotation distance: 23.427965 (ratio: 1.036667)
22:51:02     TRACE: Running macro: _MMU_ACTION_CHANGED ACTION='Idle' OLD_ACTION='Selecting'
22:51:02   DEBUG: Setting servo to up (filament released) position at angle: 19
22:51:03 Tool T5 enabled
22:51:03     TRACE: Setting gear motor rotation distance: 22.599316 (ratio: 1.000000)

This is entirely expected!.... think about it:

  1. You calibrate encoder of gate 0 (the gate you calibrated the gear motor movement on). This establishes the relationship of gear movement to encoder movement.
  2. You calibrate gate 5 which finds that it has a very slightly larger BMG gear and sets the gear ratio (relative to gate 0) to 1.036667.
  3. You move to gate 5 and ask to calibrate the encoder again. This resets the gear ratio to 1.0 and then correctly determines that there is more encoder movement. This step is invalid though. You must calibrate the encoder once on the same gate (gate 0) that you calibrated the gear.

I.e gate 0 is the designated reference gate.

If instead on step 3 you ran something like MMU_TEST_MOVE MOVE=400 and looked at the encoder reading you would see it, within margin for error, the same 415 counts..

@moggieuk moggieuk added the not a bug This doesn't seem right. Maybe misunderstanding label May 16, 2024
@iamnotahippy
Copy link
Author

So the fact that I get the exact same 415 counts on every gate means that my BMG gears are uniform and that the gear ratio is uniformly off by 3.6%. OK, I can wrap my head around that. Thanks for the clarification!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not a bug This doesn't seem right. Maybe misunderstanding
Projects
None yet
Development

No branches or pull requests

2 participants