TMCStepper icon indicating copy to clipboard operation
TMCStepper copied to clipboard

Resonance in StealthChope mode with weird behaviour

Open kasugastudio opened this issue 2 years ago • 2 comments

Hi there, I am using the TMC5160 with a custom setup for driving actuators, I used them quite for a while with different setups and length and everything always worked out well. For a new project i am using rails with a length of 110cm and there a unusual behaviour appears: Using with microsteps(8) and VMAX(18000) in stealthChop mode, the motor starts to vibrate, but only over 0.5 of maxspeed and only after the half length of the rail (short video here). Between 0 and half length (ca. 55cm) everything is fine through all speeds. I checked all the hardware and cal exclude that this comes from the rail or wheels itself. The behaviour also doesn´t exist anymore when i use the TPWMTHRS and switch after 0.5 maxspeed into spreadCycle mode, so i think it has to do with stealthChop mode. Interestingly enough above the maxspeed in my setup much higher speeds can be done with stealthChop over the full length, so it seems to be only in a certain range of rpm. Does anyone know this behaviour or has an idea where to look?

Here´s the code (here without switch to spreadcycle):

  driver.begin(); //  SPI: Init CS pins and possible SW SPI pins
  driver.toff(5); // Enables driver in software
  driver.rms_current(1530); // Set motor RMS current
  driver.microsteps(8); // Set Microsteps
  driver.en_pwm_mode(true); // Toggle stealthChop on
  driver.pwm_autoscale(true); // Needed for stealthChop
  driver.RAMPMODE(0);
  driver.XACTUAL(0);
  driver.VSTART(20);
  driver.V1(0); // 0 disables A1 and A1
  driver.A1(10); // disabled
  driver.D1(10); // disabled
  driver.AMAX(1000);
  driver.DMAX(1000);
  driver.VSTOP(10);
  driver.TZEROWAIT(0);

Thanks for any suggestions or help, Andreas

kasugastudio avatar Feb 26 '22 18:02 kasugastudio

Hi. In my experience it probably is from the extrusion. The reason that you can see the effect in SpreadCycle but not StealthChop is probably due to different PWM operating frequencies. I guess the floppiness of your carriage on you rail on that spot has the same frequency or a harmonic of the SpreadCycle PWM frequency (toff has an important effect on this value). There are some mid-band resonances in stepper motors which TMC drivers try to mitigate and it causes some funkiness. In conclusion frequencies get complicated. If you have the knowledge and experience you might be able to tune your driver-stepper combination to avoid the frequencies that cause the issue but you could also inspect your hardware and If it's the extrusion that's causing the main issue, try fixing that. Try loosening and tightening the carriage's eccentric nut and see if It's behavior changes. If it does, It's probably your extrusion. Also try to recreate the same issue on other parts of your extrusion. It might be a combination of factors that's causing the rattling. And besides extrusions are not meant to be precision movement guides. Not saying you shouldn't use them but you should know your system's limitations.

SobhanAbedi avatar Feb 26 '22 21:02 SobhanAbedi

Hey Sobhan, thanks for your great and comprehensive answer. Yes you´re right, i think so too that its most likely a combination of these two factors. I saw examples of other uses which faced the same problem and got rid of it by switching over to spreadCycle after a certain speed, that´s what Trinamic also suggests to do on their website. But I think I am gonna try to tune the combination with the TMCL IDE, there´s a kind of automatic tuning process, maybe this will bring some help. Thanks also for the suggestions with loosening / strengthening the nuts, indeed it doesnt vibrate anymore when they´r e more loose but then the system is not usable anymore since the plate is not very fixed. And yes, I´m aware that the use of extrusions might not be the best solution esp. for higher speeds, but for this projects there is no other way to go. If i find out how to solve it only by adjusting values only i´ll post it here. Best

kasugastudio avatar Feb 27 '22 12:02 kasugastudio