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

TMC2130 parameters to variants and add 0.9 degree stepper variant #15

Closed
wants to merge 44 commits into from
Closed

Conversation

SigmaRelief
Copy link

This change moves all essential TMC2130 parameters to the variants file to allow fine tuning of stepper drivers and use of 0.9 degree stepper motors. A new MK3S variant supports 0.9 degree steppers on X and Y uses all settings identified by GuyKuo https://github.com/guykuo/Prusa-Firmware/tree/0.9-Degree-Stepper-Support to resolve issues with sensorless homing and maximize linearity. It is still recommended to evaluate manually enabling linearity correction (1.130 -1.140) via the menu following the instructions provided by GuyKuo to further improve linearity on the recommended 0.9 degree steppers.

Due to hard coded values in the initial boot after flashing, using the 0.9 degree variant will result in a calibration failure, but manually running the calibration procedure works properly. These changes were intentionally not made to minimize changes to source Prusa code.

5 BMG variants that were included in the source repository, but not listed in create_variants.sh were removed to ensure all variants are created via the same process from the base variants.

Development was done on Windows using WSL / Debian and dos2unix was needed to get create_variants.sh to run, but this may have been a quirk of the source file or my development environment. The uploaded copy retains the windows style carriage returns as they were present in the source.

Only the 0.9 variant was tested by myself and another individual due to limited hardware access. Some testing will be needed using the existing variants.

metacollin and others added 30 commits August 24, 2020 20:26
ADD ADDITIONAL CONFIGS

ADD .drone.yml

Update .gitignore
Update MK3 Mesh Definitions

Fixes #1
MK3 BMG Z_MAX_POS 210
* Only MK3S FW needs to have 205/204 as MK3 Printer type is set to MK3 for BMG MK3, so the default 210 should work fine.

USE GOLD BUILD
…ild.sh builds instead (Travis job will still run the other builds)
Skelestruder Build is for 16 Microsteps

Add Bear Gearbox 16MS Variant

Changes for Gearbox 16 MS

Rename to match convention

Update Display Name for Gearbox Variant

Update Gearbox Configs
Thanks for the wonderful work and making all the variants explicit, this was really helpful!
I had a concern with respect to Bondtech BMG and MK3S firmware, and the way Prusa fixed it and how for a bondtech it reduces Z_MAX_POS.

Basically, instead of increasing Z_MAX_POS for the MK3S by 6, Prusa decided to leave it as is,
and... to extend the travel down when calibrating XYZ by 7.
As a result, Prusa's "S" firmware does not work for a taller extruder, like the Bondtech for the "S" variant.

What Prusa _should_ have done is INCREASE Z_MAX_POS in their variant by 6 for the "S" extruder and
leave the "travel down mechanism"for XYZ calibration as it was.
Then we could have kept the Z_MAX_POS to 210 for BMG variants and all would be fine.

Now, we have a smaller Z_MAX_POS as necessary, if we want to use the "S" firmware.

I implemented it - in my opinion - correctly in the branch, by introducing a new variable to work exactly "where it hurts":
during Z calibration: see the pull request.

In particular, look at Marlin_main.cpp at line 2121 and the "S" variants, that now set the offset correctly (basically to 9 for "S" extruders and 2 elsewhere..)
There is also an unclear thing in the Prusa file, in that they test for "MK3", (the alternative being MK3S), but the should have tested on MK3S and MK2.5S and then have all the others as alternative.
My variant puts that test "out of order" and sets the desired XYZ calibration travel to the correct value for each extruder.

I issued a pull request to Prusa, but have little hope that they would do it correctly, or even better: set Z_MAX_POS for their "S" variants to 217 and leave the algorithm in Marlin_main.cpp like how it was before, then Prusa owners would "enjoy" higher Z....

To summarize: the change is easy: only one file (marlin_main.cpp) and a new constant in each variant. I just went through the many variant files to set it.

I hope it is clear (and I believe it to be cleaner).
Added #define for Z_MAX_POS_XYZ_CALIBRATION_CORRECTION in order to configure XYZ calibration for a Bondtech and Bear extruder for the MK3S.
Gearbox: Use Z_MAX_POS_XYZ_CALIBRATION_CORRECTION
MMU2S More Load Patch
Add 32 and 8 Microstepping Skelestruder Builds

Rename MK25S-BMG Variants

Remove all geared 1/32 micostep options / Add 1/8 microstep for BMG

Add Watchdog Support
* Creates unique FW file names

Remove git reset to retain epoch build number for skele
* Microstepping can now be set via M350 for EINSY
* Update fsensor.cpp

M600 Z_MAX_POS

* Update Marlin_main.cpp

M600 Z_MAX_POS
Creates scripts based on base script so that updates from Prusa can be more easily merged into variant configs.
* Remove Gearbox
* Remove load more patch
* Rename BMG to Bondtech (Bondtech Prusa Extruder)
* Add 320Z Variants
* Add MK25 Variants
Update create_variant.sh script
* Create Slice Thermistor Variants

Add Bondtech Slice Thermistor Variants

Rename Slice Thermistor Variants

Fix MK2S SliceHT
vertigo235 and others added 14 commits August 24, 2020 20:26
Enable Cutter
Update Variants 


Update Variants


Update Variants
* ADD Silver PSU for Bondtech-16-SliceHT
* Source Zaribo FW Fork (3d-gussner)
* Enable OLED in all Variants
* Bondtech Updates
Move hardcoded TMC2130 parameters to Variants for MK3 and MK3S and split X and Y to independant microstep settings
Add MK3S variant for 0.9 deg steppers motors on X and Y using TMC2130 settings from GuyKuo.

Run create_variants.sh to propogate TMC2130 parameters to all variants files.

Removed BMG related configurations not specifically generated by create_variants.sh
@gchedzhemov
Copy link

@vertigo235, I, and many others, use 0.9 degree steppers on X and Y to reduce/eliminate VFA (vertical fine artifacts), so this update would be incredibly valuable to all of us who were previously on GuyKuo's 3.8.1 firmware.

Would very much appreciate it if you would consider this commit.

@SigmaRelief
Copy link
Author

As a clarification to to the failure in calibration after initial boot, this only occurs when migrating from GuyKuo's branch of 3.8.0/3.8.1 FW supporting 0.9 degree steppers as his changes to EEPROM require a factory reset on new FW. If migrating from a more mainline FW branch, a factory reset and the resulting initial calibration failure do not occur.

I looked at the continuous-integration/drone/pr error details, but could not interpret the failure. The main build script succesfully builds all variants on my machine so the error must be a deeper issue.

@Hotpocketdeath
Copy link

I want to throw my vote in for seeing this feature. If @vertigo235 had a .9deg stepper version, I would put some .9deg steppers on order straight from Moons.

@vertigo235
Copy link
Owner

Still looking for time to integrate this, I have no way to test it though, which is a little concerning.

@SigmaRelief
Copy link
Author

I completely understand the testing conundrum, I can't test the "regular" versions myself. My proposal would be to confirm that the 1.8 degree variants behave themselves and then mark the 0.9 variant as a Beta for the first release. Gchedzhemov and I have been using this for a month with no issues and we could serve as testers for your version.

@gchedzhemov
Copy link

Happy to test with my 0.9 degree Moons X/Y setup. Technically I'm already testing it: I pulled vertigo:MK3_HEAD, applied SigmaRelief's proposed commits, and have been running it since late August

@DanielLaberge
Copy link

Has anyone tried this with the 3.10 firmware? I would appreciate your feedback.
Also, is there something specific blocking this from being merged, other than more testing required?

I am interested in trying out the 0.9 Stepper motor swap in order to fix VFAs, but would like to be able to run the latest firmware.

Any reliable information would be appreciated; It's hard to piece together a definitive guide since the information on this upgrade is scattered all over; the Prusa Forums Thread, various Github repos readmes, reddit threads...

@totalitarian
Copy link

How would one compile this?

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants