-
-
Notifications
You must be signed in to change notification settings - Fork 113
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
driver_cs has been added to tmc5160 #491
base: master
Are you sure you want to change the base?
Conversation
GS out of bounds warnings added to 5160. Target current won't be able to be achieved if GS is > 256. Default set GS to 256 if it was over. New code pushes a warning to the user about the CS value being too low and needing to be higher to achieve the proper current. TODO: better ihold handling.
What are those Also, the config_changes needs tweaking. CS doesn't necessarily have to be set based on current as calculated by TMC5160_calcs, it can be that value or higher (since globalscaler is still available to reduce the run current. |
PyCharm bloat. I'll remove them.
Correct, working on an error if it's lower to where the target current can't be reached. |
I also made an update to 2130
instead of the default behavior where 0.5 gets added to vref:
I'm not sure why 0.5 was being added other than rounding. It's not in the datasheets. |
In tmc.py can we change:
to:
or would that break things? |
Make sure to fix the "xlxs" typo in the GLOBALSCALER_ERROR (line 265 in tmc5160.py) |
related to Klipper3d/klipper#6644 |
Previously, CS (current scaler) has been automatically set to 31. The only time CS would only change was to adjust the holding_current. However, some users found certain motor, driver, and voltage combinations to produce less than ideal results on tmc5160 drivers. Noise, VFA's and overheating were a common occurrence, particularly on high amp drivers and high power motors.
According to the excel spreadsheet provided by Trinamic to tune the
5160tmc drivers, the CS value should be set so that Rsense on the spreadsheet matches the 'sense_resistor' value as defined in printer.cfg. By adjusting the CS value so that these two match, we can define much more adequate hysteresis values. This means that high power motors can now be run at high voltage (>48V) and their current may be run at RMS value without overheating.