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

[FR] add/document timing profile for budget hybrid stepper drivers (e.g. BigTreetech S42B and MKS Servo42) (simple copy of TB6600 timing fits already) #19391

Closed
Quas7 opened this issue Sep 14, 2020 · 10 comments
Labels
T: Feature Request Features requested by users.

Comments

@Quas7
Copy link
Contributor

Quas7 commented Sep 14, 2020

Description

Low-budget closed loop hybrid stepper drivers are nice toys to play around with and might also add some benefits in some situations. For instance, in my case the main benefit is much cooler running nema17 pancakes for direct extruders while still having a high current reserve in case of higher loads without missing any steps (although high load/speed affects the extrusion timing, if PID parameters are not tuned).

Some chinese copycat versions are

As a microcontroller is doing the motor control in these budget versions, the communication timing should be relaxed as documented by the suppliers. See for instance FAQ Question 5 (p20): https://github.com/bigtreetech/BIGTREETECH-S42B-V1.0/blob/master/42%20Stepper%20Motor%20Closed%20Loop%20Driver%20Control%20Board%20Manual.pdf
Otherwise, you risk missing some steps.

Unfortunatelly, the solution provided in the documentation above affects the timing of all connected stepper drivers and could reduce the performance of high resolution steppers (e.g. high-µsteps on TMC220x, LV8729,...).

A better solution is to use the TB6600 driver timings for the respective hybrid axis, as the TB6600 timing is closely matching the targeted values. See also discussion on S42B issue bigtreetech/BIGTREETECH-S42B-V1.0#14.

Therefore, copying the TB6600 settings to a "hybrid steppers profile" might be worthwhile for an easier setup.

Feature Workflow

#define X_DRIVER_TYPE TMC2209
#define Y_DRIVER_TYPE TMC2209
#define Z_DRIVER_TYPE TMC2209
#define E0_DRIVER_TYPE TB6600 // add here HYBRID as selectable profile instead

@sjasonsmith
Copy link
Contributor

The title of this request does not seem to represent your request at all.

@Quas7
Copy link
Contributor Author

Quas7 commented Sep 21, 2020

adapted slightly the wordking but @sjasonsmith please make a better proposal than just stating "does not seem to represent at all"

@Quas7 Quas7 changed the title [FR] S42B and Servo42 closed loop stepper driver timing profile (copy of TB6600) [FR] add/document timing profile for budget hybrid stepper drivers (e.g. BigTreetech S42B and MKS Servo42) (simple copy of TB6600 timing fits already) Sep 21, 2020
@sjasonsmith
Copy link
Contributor

The title is all about the timing profile, but the real request seems to be that you want hybrid timing that doesn’t force all drivers to use the same timing?

@Quas7
Copy link
Contributor Author

Quas7 commented Sep 22, 2020

Oh, ok. That is a misunderstanding.
The independent timing profiles are already there as you can chose stepper drivers for every axis seperately in Configuration.h today. Also the correct timing profile is available as the TB6600 driver timing is fitting perfectly.

We would just need to add an alias that links "HYBRID" to the TB6600 profile in the background.

@sjasonsmith
Copy link
Contributor

The independent timing profiles are already there as you can chose stepper drivers for every axis seperately in Configuration.h today.

Yeah, that's not how those work. All steppers will use the timing of your slowest driver.

@Quas7
Copy link
Contributor Author

Quas7 commented Sep 22, 2020

wow, ok - that suprises me a bit.
I ran some tests up to 300mm/s and only my extruder has a hybrid driver. Running it on TB6600 made the movement "sound" very differently configuring compared to setting timings it globally in Configuration_adv.h.

@sjasonsmith
Copy link
Contributor

If you specify timings in Configuration_adv.h they will override any timings defined for your declared stepper drivers, even if it violates your driver's specifications.

If you do not specify timings, it selects timings automatically in Conditionals_adv.h. You can see from this code that it will end up selecting the slowest timing of your selected drivers.

#ifndef MINIMUM_STEPPER_PULSE

@sjasonsmith
Copy link
Contributor

This is done because all stepping happens in one function. The pulse for all steppers starts at the same time, and a single delay is used for that pulse duration. Making this use flexible timing adds complexity to that routine, which would hurt performance for some users.

@Quas7
Copy link
Contributor Author

Quas7 commented Sep 22, 2020

This makes absolutely sense - thanks for providing the details!
I just might have messed up my little audio experiment by using the hybrid spreadCycle stuff in parallel.

I will now optimize the global settings accordingly just for fun although it does really not look like as there is much real performance impact with those us and ns timings. ;)

@Quas7 Quas7 closed this as completed Sep 22, 2020
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Nov 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T: Feature Request Features requested by users.
Projects
None yet
Development

No branches or pull requests

2 participants