Some questions about Coolstep

Note - this topic strays far from the Yellow Brick Road! I’ll preface the discussion by stating that my interest in this topic is highly theoretical, and is not meant in any way to distract new users from following the correct and proper path when building their own machine (in other words, Follow the Yellow Brick Road, until you know the landscape well enough to go off-roading).

So I ran into a comment in another thread about using Coolstep on the Trinamic drivers, specifically on the TMC2209 drivers used by many users here.

From what I can gather by reading/searching this forum and other Internet sources (please correct me where I am wrong on this):

  • Coolstep can allow for having much higher available stepper currents (and therefore much higher available torque) under heavy load, but will dramatically reduce the stepper currents when lightly loaded.
  • This can allow for increased current/torgue while reducing/eliminating the associated heat issues normally found when increasing stepper current beyond the “safe” default settings
  • Implementing Coolstep is complex, and probably needs to involve extensive tuning of configuration settings an a “per machine” basis (not likely to have a “one size fits all”, or even “one size fits several” approach)
  • Implementing Coolstep also involves enabling Stallguard, and settings for the two features interact with each other, further complicating the tuning process
  • Marlin doesn’t seem to currently support Coolstep at all (it appears that an earlier implementation was quickly removed, due to the challenges of tuning the settings)
  • Coolstep appears to be partially supported in GRBL/FluidNC, but doesn’t seem to be widely implemented

It seems that implementing Coolstep could have some very interesting benefits for those “power users” who are wanting to increase the available torque of their machines by increasing the maximum available stepper current, without running the risk of melting the stepper mounts into a liquid puddle of PLA. It might also reduce/eliminate the requirement for different filament types for certain heat sensitive components.

My questions are:

  • How far away is FluidNC and specifically the Jackpot board from being able to implement Coolstep?
  • Is the complexity of tuning Coolstep and Stallguard settings on individual machines just too great to make it worthwhile to pursue?
  • Is it likely that Marlin will ever implement Coolstep as a feature, or is that something that isn’t on the radar at all, given the earlier failed attempt?

,

2 Likes

FYI, I found the following documentation for implementing both Stallguard and Coolstep:

I think the theory behind coolstep is neat, but I think the benefits are not necessarily likely to actually appear in the real world. I would go so far as to say that it is unlikely to be of any use whatsoever and will be significantly detrimental to performance.

The fundamental thing is that the coolstep technology is relying on being able to measure the load on the steppers by measuring the back-EMF of the motor. The back-EMF of the motor cannot be measured directly so it gets characterized by looking at how the applied voltage follows the resulting current ramp. Once you’ve got that back-EMF measurement, you can compare it to the applied current and that should give you a measurement of the relative displacement between the magnetic field created by the current in the coils and the magnetic field created by the magnets in the rotor. With no load, the magnetic fields are in phase and the back-EMF is minimal. With a load that’s slightly below the stalling point, the phase will be 90 degrees. Any more than 90 degrees and that’s when a step is skipped.

The problem with that measurement is that the magnitude of that back-EMF is velocity dependent. At low RPM there’s nothing to measure and at high RPM the majority of your measurement is purely the coil inductance. The measurement absolutely 100% does not work at 0 rpm, for instance, and that’s a situation with a lot of cuts where there’s still a pretty significant amount of the total cutting forces. Take a full-width slotting cut, for instance, where there’s a significant sideways vector to the cutting force which is being handled by the axis that isn’t moving at all.

This is somewhat born out in the example given in the datasheet where CoolStep is only enabled above 60rpm, which for us would be 32mm/s which is already a pretty solid cutting speed. Plenty of people seem to be running speeds significantly slower than that. Speeds higher than that are unlikely to be combined with significantly high loads (engraving/laser rastering etc.).

As I said in the other thread, I’m also not convinced that anything that adds variability to the stepper/driver temperature is a good thing. The thermal time constant of those parts is low enough that a lot of jobs could result in the parts reaching the peak temperatures, especially in the drivers, which would mean that no ‘extra’ power could be exerted by the steppers in reality. It would instead be something potentially useful for lowering current/temperatures below the steady state operating point which again I think has the potential to lull people into a false sense of security about their operating temperatures.

As an example, if you had this set up such that under normal conditions the stepper current was halved from the defaults and it could go up to double the defaults under heavy load. If you’re doing small low-force jobs like engraving, plotting, light cuts etc. then you’ll see your steppers stay nice and cold. Then as you start pushing the machine more and more you’ll start seeing the stepper temperatures increasing as load increases. Eventually you have a situation where you’re running a long full-depth slotting cut in 3/4" to make yourself a fancy torsion box table at 10mm/s and you’re spending 4 minutes doing a single straight line slot or whatever, only to turn around and do another 4 minutes back the other way. Under that circumstance the axis that’s doing the motion for that long cut sees steadily increasing temperatures until it eventually softens the motor mounts and things deform losing belt tension and leaving the axis no longer properly driven, ruining the workpiece and meaning the machine needs rebuilding with new parts.

2 Likes

Wow, thanks for the thoughtful response!

If I understand what you are saying correctly (and that is far from a certainty),

  • Coolstep won’t actually be enabled on a typical LR3/LR4 build unless the feedrate on a particular axis is > 1920 mm/min (high for some materials, but not out of the realm of possible for things like a 2 flute 1/4" shank bit)
  • Coolstep would really only be beneficial when the load is quite variable
  • In an extended high load scenario (typical of long slotting operation) the increased current settings would be applied for an extended period of time, resulting in overheating and the Coolstep feature would not reduce the current during that time at all.

To specifically answer your questions:

The config is just registers in the chip and there are other registers already being written… It should be trivial to have FluidNC set them to whatever you want.

It looks to me like it would always require individual machine tuning anyway. I think tuning it will be a horrible experience but mostly because there’s going to be very little feedback available without just running a ton of jobs.

If Marlin is setting registers to control the TMC2209s it should also be trivial for that to set the CoolStep registers.

Overall, I think the more important question is what does CoolStep actually get us in this circumstance and are we using the machiens in a manner that allows CoolStep to behave in a way that will actually get us any of those benefits.

My opinion is that we already have a good method for getting to ‘high enough’ machine performance where the steppers are no longer the limiting factor. That approach is thermal stickers on the steppers or monitoring them with a thermometer to see what temperature they reach and adjusting currents to keep them close to the hottest temperatures we’re comfortable running with the materials the motor mounts are printed from.

The next questions in my mind are then:

Do we benefit from higher stepper torque?
I believe Ryan is very thoroughly of the opinion that the steppers are in no way close to a limiting factor and that any situation that requires enough cutting force that more stepper torque is needed is likely to lead to unacceptable deflection and other machine related issues instead. The one thing I think is a variable here is the potential for more people to make short-gantry ‘stubby’ machines. Assuming there’s not another major source of deflection like the core itself, these may have enough stiffness to benefit from extra stepper torque.

How does this actually get us better stepper torque?
It gets us higher torque by allowing us to use more current in the steppers which heats the steppers more. Given that we have a specific maximum temperature then the only way we can do this is by relying on the thermal mass of the stepper to let us run higher torques for a bit of time.

Do our loads actually need short term torque increases?
I suspect not, I think a lot of jobs will require steady-state operation in the realm where if we were benefiting from extra torque then we’d be using them for long periods, long enough to see the steppers overheat anyway. I don’t think there will be any appreciable loads where the overload in torque is extremely short term. I’m also not convinced that the detection and current ramp will operate fast enough under those conditions because it’s ramping the current up when load increases, not a step increase in current.

Are there better ways to do this other than CoolStep?
I think so, I would much sooner go to forced cooling on the stepper motors, add heat-sinks or use higher temperature materials for the motor mounts before I would consider something that allows the motors to just run hotter than would be acceptable steady-state under arbitrary conditions.

2 Likes

I’ve not looked at the build docs, or built one yet, but the stepper pulleys look to be closer to a 32mm circumference in the pictures, rather than the 180mm circumference you’d need for 180mm/s at 1 rev per second.

1 Like

Yeah, tripped over my units. I was splitting between mm/min, mm/s and rpm. Will edit.
Edit: Tripped over my units AND dropped a zero. In my defense, I am moderately hungover… :smiley:

1 Like

No worries, and it’s worth noting that I’m going off the descriptions in the datasheet and trying to figure out how it ‘should’ work based on my memory of motor theory and the synchronous motor equations, which is similar to how a stepper motor works but not exactly 1:1 identical.

The speed at which CoolStep is activated is one of the tuning settings mentioned above. The example given in the datasheet is 60rpm which, as Daryl pointed out below, is 32mm/s or 1920mm/min, not the 180mm/s that I somehow came up with before so maybe ignore those numbers. That’s not to say that the example means anything, it may be that in our application we could halve that and enable it at 30rpm. It may be that our application is really springy and we don’t get good measurements until 120rpm, meaning it’s well outside our useful range.

Yeah, I believe so. Variable enough that the average power dissipation in the steppers is the same as at the current stock setting, so something like 1/4 time at double torque, 3/4 time at half torque. Loss is proportional to the current squared, so doubling the current quadruples the loss, etc. The load would also need to be high for a short enough timeframe that the stepper doesn’t overheat in that time, so maybe 30 seconds max, something like that? It would also only get us anything if we actually needed the extra torque, so a situation where running the stock current settings would have skipped steps.

Yeah, that would be my concern. I don’t know for sure that that’s exactly what will happen, but it’s what I’d be particularly worried about.

1 Like

You know a lot more about this stuff hungover than I do sober…

1 Like

Honestly not sure if it’s a blessing or a curse, sometimes… :joy:

Either way, I think before I went down the CoolStep route, I’d probably try to make changes to the printer such that it could operate at higher coil currents long term. That’s assuming I was running into a situation where I was seeing skipped steps even after switching to good, sharp tools and optimizing machine setup/cut strategy etc.

Not planning to go there in the foreseeable future. As mentioned, it was more of a theoretical exercise, hoping to learn a few things. Thanks for the education!

1 Like