-
Notifications
You must be signed in to change notification settings - Fork 32
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
How to set current limit? #47
Comments
Yes this is a good point. I have been wanting to add this feature for a while. The Rsense value may be the only piece of information that the user needs to provide to the library to make the library work with a specific hardware configuration, but I want to make sure that is true for every driver setting before adding this feature. Open loop control, for example, just does PWM of the source voltage, so the current through the motor windings is a function of the source voltage value, the percent on time, the resistance of the motor windings, and the rotational speed of the motor. Closed loop control uses the Rsense resistors to set the output, but the current through the motor windings might only work properly if the calibration sequence has been performed properly. Just adding a simple function to convert percent to current based on the Rsense value may be misleading if it does not set the current properly, leading to burned out motors as well. |
My stepper has very little torque on a 100% current setting. What should I do to increase that? |
Your documentation is pretty good. Lot's of details with schematics, lot's of example-codes. So far your library provides only this percentage value. TMC2209 is set to "what do I know mode" then Well if this is the case your library is almost useless. Almost any modern application uses higher voltages and current-limiting through R_sense resistors. This is 50% of the features these stepper-drivers offer compared to simple H-bridges |
The TMC2209 uses the sense resistors in some modes and ignores them in other modes. The run current setting meaning changes slightly depending on the mode. You are free to use whatever modes you want. Calculating the actual motor current depends on multiple settings and the user's exact setup. Read the datasheet. |
Any update on this implementation? I wonder if we can issue explicit current definition for motors by using sense resistor value. |
Yes I plan on adding this. It may take a few weeks, though. I am thinking of doing a major reorganization of all of the code in this library and add requested features such as these. |
This has been mentioned in several other issues but as far as I can tell no solution has been found. Other stepper libraries allow passing in an absolute current limit in milliamps given an Rsense value. The board I'm using has a 110mOhm Rsense value but the README current setting functions all take percentages resulting in a scaled value that scales - what? How do I know what current the driver is limiting to? I don't want to accidentally fry my stepper motor.
Otherwise, how would I know what the driver is setting the current limit to without guessing and checking to see if my motor is heating up? I don't want to undertune it as I'd like to take advantage of my motor's full capacity but also don't want to risk damaging it as I wait to see if the current scaled setting makes the motor reach a certain heating point.
The text was updated successfully, but these errors were encountered: