Topics

TMC SPI Software current limiting issue


vankarem77@...
 

Hi there, i know that i posted a similar message some time ago but cannot find it to continue the reply, so i post it again more clear.
This occurs to me in same way for TMC2130 (at Vref 2.5V) and TMC5160 in SPI mode setting, for example; IHOLD 400 IRUN 800 IGOTO 1200
I take the example for TMC5160 in RA axis with the above settings:
I set manual speed at 20x by pressing app button: when 20x speed or more is reached the driver enters in IGOTO current limit setting, this is normal, and effectively the current limiting work as expected but when i release the app button and the system try to recover IRUN current the current  is not limited, it goes to its maximum (defined by voltage input and motor resistance) for about  40s-1minute,  during that time IRUN current limit is recovered gradually. DEC axis does not have that issue, but still goes to its maximum current overflowing IGOTO setting, this time for less than 1 second.
Exactly the same occurs with TMC2130 RA and DEC axis.
During the time RA current is overflowed, if many movements at 20x or more are done s.driver or motor may burn.
Im using a custom pinmap MaxESP3 based wich has pin #19 assigned to Axis1dir instead of pin #0 like the original MaxESP3 pinmap, thats the only difference for the main axis.
To solve it i use TMC2130 s.drivers in "mixed mode" (Vref current limiting + SPI current limiting, as i think this last must be set at x-times desired higher value resulting of the difference between TMV2130 max Vref - Vref setting)
For example if i want to limit IGOTO to 1200mA i set Vref at 1,2V and IGOTO setting to (2,5/1,2)x1200 = 2500.
But cannot do this for TMC5160


Howard Dutton
 

We had another user with a similar complaint, I tried to replicate it and failed (worked properly.)  I wondered at the time if stealthChop just plain looses regulation when changing IRUN to IGOTO... in which case I will remove the feature.

OnStep version?

Post the Config.h file.


Howard Dutton
 

On Thu, Sep 10, 2020 at 12:02 PM, <vankarem77@...> wrote:
Hi there, i know that i posted a similar message some time ago but cannot find it to continue the reply
Skipped this part, so we have one case of this happening and I can't replicate it.


Howard Dutton
 

Set IGOTO to OFF and see if the problem goes away.


vankarem77@...
 

A set of stranger things happend by testing TMC5160 and TMC2130 with IHOLD IRUN IGOTO settings depending if set is _VQUIET or _QUIET
TMC5160 work very well only using _QUIET, if using _VQUIET current overflow.
TMC2130-->Current overflow if using _VQUIET, current ok if using _QUIET but with a heavy noise for 20x speed and more, like the stepper where working at 1 microstepping with no 256 interpolation, and cannot get 240x speed, its stahl when reachs it.
I use ESP32 v1.0.1, same things happen with  v1.0.4
I have a 4,7K resistor installed from EN pin to a pair of led -,  and led+ to 3.3V, for enable feature visual check.
Also installed 10K resistors from both axis Step pin to a pair of led+ for axis movement visual check.
May be that involved for the issue?


Howard Dutton
 

On Fri, Sep 11, 2020 at 01:42 AM, <vankarem77@...> wrote:
TMC5160 work very well only using _QUIET, if using _VQUIET current overflow.
Not a surprise I suspected this had to do with stealthChop.

TMC2130-->Current overflow if using _VQUIET, current ok if using _QUIET but with a heavy noise for 20x speed and more, like the stepper where working at 1 microstepping with no 256 interpolation, and cannot get 240x speed, its stahl when reachs it.
This is a surprise, something I've never heard before.  Understand that VERY FEW people use _VQUIET since you can't reach high RPMs.  Most use _QUIET and have very good results (myself included.)  Some use neither (just spreadCycle mode.)

I use ESP32 v1.0.1, same things happen with  v1.0.4
I have a 4,7K resistor installed from EN pin to a pair of led -,  and led+ to 3.3V, for enable feature visual check.
Also installed 10K resistors from both axis Step pin to a pair of led+ for axis movement visual check.
It's difficult to imagine a ~20pF capacitance working against the pin signal through a 10K resistor causing trouble.
On the other hand something strange is going on.


vankarem77@...
 

Thanks Howard.
A last question, you mention to upload ESP8266 firmware with spiffs activated, what is used for spiffs system?, i always used no spiffs with no aparent issues, may affect to the ESP8266 perfomance if spiffs activated but not used?


Howard Dutton
 

On Fri, Sep 11, 2020 at 06:12 AM, <vankarem77@...> wrote:
A last question, you mention to upload ESP8266 firmware with spiffs activated, what is used for spiffs system?, i always used no spiffs with no aparent issues, may affect to the ESP8266 perfomance if spiffs activated but not used?
I was just echoing what the IDE was set to at the time, spiff makes no difference we don't use it and there's more than enough memory either way.  BTW that's the built in flash file system.  One can upload files to it then access those files as is done for a web-server for instance.  I don't use that technique mainly because it would be a big hassle for users to setup.


Gildo Bosi
 

 
Hello,
in my setup i have a similar problem.
I use the TMC2209 FYSETC V3.0 driver with the option
#define AXIS1_DRIVER_MODEL TMC2209_QUIET
Vref is set to 1.00V which from the datasheet should provide 0.71A RMS to the motor
The problem is that the RA motor in sideral tracking gets very hot (55 ° C-60 ° C)
I checked with the oscilloscope (0,1ohm shunt on the cable), the RMS current is about 1.25A instead of 0.71A RMS. This current value is present in both STEALTHCHOP and SPREADCYCLE.
The problem is that it looks like the parameter regulator in STEALTHCHOP
pwm_ofs and pwm_grad don't work well, it tends to saturate.
 
I tried to set the TMC2209 via UART with the parameters:
 
driverRA.pwm_autoscale (false);
driverRA.pwm_ofs (60);
driverRA.pwm_grad (14);
 
In this way, the RA motor run at a temperature of about 40 ° C with an RMS current of about 0.65A.

test 1a TMC2209_4 auto 20x Vref 1V.jpg: Acquisition in STEALTHCHOP (low speed) and SPREADCYCLE
(20x move) with auto parameters (Y 100mV / div 0.1ohm shunt)ent in both STEALTHCHOP and SPREADCYCLE

test 2 TMC2209_3 20x Vref 1V.jpg: Acquisition in STEALTHCHOP (low speed) and SPREADCYCLE
(20x move) with  parameters 
driverRA.pwm_autoscale(false);
driverRA.pwm_ofs (60);
driverRA.pwm_grad (14);
STEALTHCHOP Current  Irms 0,65A;  SPREADCYCLE Current (20x speed) Irms 1,25A
(Y 100mV / div 0.1ohm shunt)

test 3 lv8729 20x.jpg : for comparison I also attach Acquisition with LV8729, Irms = 0.9A. The current is as per setting Vref 1V Irms 0,9A; (Y 100mV / div 0,1ohm shunt)


Howard Dutton
 

Since this happens in spreadCycle mode it makes me think it's a h/w issue with the drivers.
Fixed by lowering the current using stealthChop parameters to regulate down a notch during tracking.


Gildo Bosi
 

Actually it seems to be a current regulation stability problem, perhaps due to the hw setup. I will try to increase the filter capacitors on the power supply. The current regulation algorithm of the TMC modules is a kind of self-learning performed on the first movements after the reset. I wonder if the way you start moving the mount affects the self-learning result.
I ordered two TMC2225 v1.1 modules (similar to TMC2208) from fysetc which should have the same pinout with TMC2209 v3.0. Have you ever tried these modules?


Howard Dutton
 

On Sat, Sep 12, 2020 at 11:13 AM, Gildo Bosi wrote:
I wonder if the way you start moving the mount affects the self-learning result.
It's my understanding that only applies to stealthChop, not spreadCycle.

If this over current occurs in spreadCycle, as you said it does, I wonder if something else is going on.


vankarem77@...
 

I tested the Fysetc TMC2130 V1.0 in a new board with the MaxESP3 pinout and result are sightly different; in _QUIET mode there is the same problem, motor noisy and stalh before reach 240x.
In _VQUIET mode seems there is no problem for manual slewing up to 48X, no current overflow, but current overflow at 1/2 max rates and goto (always when the system try to come back to IRUN current setting)