Its the number of teeth (10) that is multiplied by the pitch (6.35) that is used for the _mmPerRotation. I think the radius only is involved in the wrapping of the sprocket.
not according to the discussion on github Change Encoder Steps to Float - Conflicts Fixed by krkeegan · Pull Request #344 · MaslowCNC/Firmware · GitHub
But in system.cpp, the following appears:
if (gearTeeth != -1 and chainPitch != -1){
float distPerRot = gearTeeth*chainPitch;
leftAxis.changePitch(distPerRot);
rightAxis.changePitch(distPerRot);
zAxis.changePitch(zDistPerRot);
}
in axis.cpp, that calls:
void Axis::changePitch(const float& newPitch){
…
_mmPerRotation = newPitch;
}
I don’t see any other assignments of _mmPerRotation in the firmware. I obsessed over this in my mind last week while trying to figure out why my distance between motor measurement was off.
could you please respond in that github thread? that way the other folks looking
at this issue can chime in on what they are seeing.
Sorry this thread is a bit of a mess, and it is always unclear to me when github or the forum is the best place to respond.
@bar What about adding a SettingsVersion value to the GC settings file? Since it doesn’t exist now, we can define it as version 1 and then issue the notice to users if they are on version 0/null and have the steps as 8148. Then if anyone in the future uses this value for steps the notification won’t pop up.
I suspect the SettingsVersion value may be useful to us in the future as well.
SettingsVersion sounds like a good idea
I feel a little bit weird about versioning something that can be changed independent of the version number…what would be the advantage to doing that over checking the value the way it is done in the PR now?
KrKeegan,
Someone has pulled apart the gearbox in another thread and there is some debate over the accuracy of the manufacturers claim of a gearbox ratio of 291:1
The thread to look at for this if you have not already is “What’s inside the gearbox/motor”
The thread was started by JDogHerman.
Regards Stuart
I was thinking that SettingsVersion would just be an arbitrary thing that we can use for instances like this.
Alternatively, I suppose you could write the current GC version to the settings file as well.
I was trying to design a flag, that could be checked when the user starts GC. That way, if someone in the future, or even someone right now wants to use 8148 the value won’t be constantly overwritten when they start GC.
Yup, that included me thank you. I have a couple of posts in there. This topic is a bit of a mess buried in at least two places.
Thanks KrKeegan
I agree there are bits and pieces everywhere. I am trying to capture key concepts in the function block wiki but it is a work in progress as we all sift through the discussion threads.
We really need a technical manual badly.
Do you know if anyone has raised the issue of the gearbox ratio with the supplier yet? If not I would be happy to follow up.
Regards Stuart
I see what you are saying. If someone actually wanted to use 291:1 their value would be over written. At least they would get a warning that it was going to happen
I feel like that is a small enough possibility that it probably won’t come up, the odds are that that anyone who thinks they have a 191:1 gearbox actually has something slightly different so the prompt to look into it further might even be a good thing
I did follow up with ETONM their response was:
“I understand your concerns. the gear ratio stated in catalog, not all of them are exact as the real, main for protecting gear motor technical information. Your caculation is correct, 289.77:1 is ET-WGM real gear ratio. and we always use this gear ratio for your order, never change. so don’t worry this.”
I’m not sure I believe the argument that it was to protect the technical information , but at least now we know that they know what is going on and they know not to change anything without telling us.
Bar thanks for that. You can disregard my request to the manufacturer then.
What we should publish is the calculation of how this is arrived at. It would be worth spot checking a couple of motors to confirm.
At least we know now.
Stuart
Back to my original goal starting this, I just redid the calibration using 0.99 but with 8114 as the value and Maslow measured at 2902.4 mm vs. 2905. I wonder if my wood shrank at all? It’s been fairly dry lately.
what if someone has a gearbox that actually has 8148 steps/rev? how would they
not get things changed.
There needs to be a guard config somewhere in there
config_version (or similar) lets us make automated changes to the config when
the program changes, but only once.
Another place this would be useful would be to disable custom PID settings when
we make major changes like we did in 0.99, but allow the user to set them back
if they want without them being undone again after the one transition.
Oh that is another good example.
@dlang and @krkeegan Thanks for sticking with the idea. I’m starting to understand the value of a config version number. It would let us force a one time change to the settings which the user could then override. I’m on board!
@madgrizzle I’m about to do a calibration also. Where were we we on your last calibration? Are we getting closer? 2.6mm seems like a pretty solid improvement over just a couple weeks ago when we were seeing 20+mm errors!
Any chance that’s from deflection under load. Wonder if it would change if the moisture content changed because of humidity?
Measuring with a tape during the auto-cal would tell the tale
I ran the test of 500 revoutions again tonight with the updates to GC and the Firmware with the step count at 8113.73 and it is as dead on as I can perceive. Considering our max error is a 10th of this, I am very happy. Thank you everyone.