-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
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
Option to use raw digipot values #17536
Option to use raw digipot values #17536
Conversation
Allow the MCP4018 to be set with raw wiper values as an alternative to the hard-coded A4988 actual current values
This change seems to break building for MKS Sbase (LPC1768) if mcp4451 is uncommented. Sanity check complains about missing pins definitions which wasn't the case before. |
Patched! Apparently MKS SBASE is special and provides its own interface. Others will still need these pins. |
I'm having the same issue building for Smoothieboard (LPC1769) if mcp4451 on Marlin 2.06 |
Comment out the |
For machines with the MCP4018 digipot controller (i.e. Mightyboard)
The existing driver hard-codes the current calculations for the A4988 stepper driver. This is fine on stock machines, but users must fudge the numbers if they use a different type of stepper driver on one or more axes.
Usage:
Defining the new
MCP4018_USE_RAW_VALUES
config option will enable use of theDIGIPOT_MOTOR_CURRENT
config option values rather thanDIGIPOT_I2C_MOTOR_CURRENTS
, and M907 will accept raw wiper values (0-127) on all channels.Testing:
This code is now running on both of my FFCP machines with TMC2100s on X and Y and the original steppers on Z, A, and B. The TMC2100 driver modules in use are designed specifically for drop-in compatibility on the Mightyboard, including use of the digipot for setting Vref.