Problem with TMC2130s


Chris Vaughan
 

Maybe this problem is because I bought cheapo ebay TM2130s, but I can't source the proper ones in Australia. I've got the miniPCB built, running the current alpha version via bluetooth, with polulo1209 steppers. It all worked well with TMC2100s with CFG1-GND, CFG2/3 open for 16microstep, using
DRIVER_MODEL TMC2100
AXISn_MICROSTEPS 16
AXIS1_MICROSTEPS_GOTO_OFF

But problems occur with the TMC2130. 
This works:
DRIVER_MODEL TMC2130_VQUIET(and with _LOWPWR)
AXISn_MICROSTEPS 64
AXIS1_MICROSTEPS_GOTO_OFF

But this fails when slewing:
DRIVER_MODEL TMC2130_QUIET
AXISn_MICROSTEPS 64
AXIS1_MICROSTEPS_GOTO_OFF
It starts to slew then when reaches a certain speed it stalls, and starts again when it slows down at the end of the slew. Tracking is OK

And this fails during tracking and slewing:
DRIVER_MODEL TMC2130_QUIET
AXISn_MICROSTEPS 64
AXIS1_MICROSTEPS_GOTO_OFF
Same problem when slewing. And during tracking its does large single steps every second or so.

So its seems to be a problem with the spreadCycle?
It does this whether I run at 12V or 24V. And when I set Vref to 0.5, 1 or 1.5V.
It does it no matter what I use for MaxRate (16 - 128). Might note that it works fine even with MaxRate=16 with TMC2130_VQUIET.
It also happened when I used the beta version of onstep.
NB: my TMC2130s came with the bridge soldered. I removed this. Sure I did this properly as (i) I inspected it with a magnifying glass, (ii) I measured the resistance across the pads (very large), (iii) it didn't work properly at all until I removed the bridge.

Any ideas where I have stuffed up? I'd just stick with stealthMode, but would prefer spreadCycle as it supposedly delivers more power/reliability?


Howard Dutton
 
Edited

The eBay knockoff SSS TMC2130 is an unknown.

AXISn_MICROSTEPS 64
AXIS1_MICROSTEPS_GOTO_OFF

Confirm you're not using "AXISn_MICROSTEPS 64" but rather "AXIS1_MICROSTEPS 64" and "AXIS2_MICROSTEPS 64".
Confirm you were not trying to use the configuration you just described in the beta OnStep since it wouldn't work.
The last two configurations you gave are identical though you say they behaved differently?

For the record, in my testing of the alpha "on the bench":

TMC2130:
  I hear spreadCycle's pwm "singing" noise during tracking and slews.  Slews reach high rpms.
TMC2130_QUIET:
  I hear nothing during tracking.  The pwm "singing" noise is present during slews (starts immediately as slew starts.)  Slews reach high rpms.
TMC2130_VQUIET:
  I hear nothing during tracking and only slight resonance noise during slews.  Slews reach medium rpms then stall (and starts once the slew speed slows to where the stepper motor can operate again.)

The few micro-step modes I tried worked as expected but I didn't test each.

The slewing performance of the TMC2130 for my stepper motors (G11) is about equal to the DRV8825 they replaced (in spreadCycle mode.)


Khalid Baheyeldin
 

I added the additional TMC2130 modes to the online configuration generator.

Configure your Alpha OnStep in minutes here: http://o.baheyeldin.com:1111/


Chris Vaughan
 

Khalid

I used the configuration generator. It came up with
DRIVER_MODEL TMC2130_VQUIET
AXIS1_MICROSTEPS 64
AXIS1_MICROSTEPS_GOTO 1

This came up with an error saying I had to have same u Steps or use _OFF for GOTO.

Chris


Chris Vaughan
 

On Wed, Jan 31, 2018 at 05:47 am, Chris Vaughan 
 Howard

I'm using alpha version.
And correct stepper numbers 1 and 2 for the two motors - it was a typo in the post. 

I'm now using the configuration generator. I'm hearing the motors sing when in spreadcycle with tmc2130 and tmc2130_quiet. But there's something else weird happening so will investigate it on the weekend.

Thanks for all your help. Chris


Howard Dutton
 
Edited

In the basic stepper driver setup I make that a constraint.  There is no code in this mode of operation that synchronizes the micro-step tables in the stepper drivers.  That can result in a loss of pointing accuracy and trouble with PEC (if no index sensor is present.)

Doing micro-step mode switching with the TMC2130 is supported in the advanced stepper driver setup method where I assume the user is aware of this limitation.  Feel free to use that if you wish.  The good news is that the TMC2130 is smart about picking the nearest valid micro-step table position and so if you don't switch modes too far, say 64 to 16, the loss in pointing accuracy should be unnoticeably small and if you don't use PEC (or have an index sensor) this can still work well.


Chris Vaughan
 

Howard

For my testing of the alpha "on the bench" . Used alpha version, with miniPCB

VQUIET
#define AXIS1_DRIVER_MODEL TMC2130_VQUIET
#define AXIS1_MICROSTEPS 32
#define AXIS1_MICROSTEPS_GOTO_OFF
ditto for AXIS2
Tracking: quiet and normal.
Slew: quiet and reaches high rpm

With AXIS1_DRIVER_MODEL TMC2130
Tracking: quiet and normal. 
Slew: steppers singing. Reaches intermediate rpm, then stalls, and then restarts during slowing down phase.
After slew tracking is normal, but if I do a slow movement, it then starts this slow pulsing (I assume non-microstepping). If I do a slew, then tracking normal again

With AXIS1_DRIVER_MODEL TMC2130
Tracking: slow pulsing non-microstepping tracking as above.
Slewing: same as QUIET above.

Attached is my full config file for TMC_VQUIET. Given what you said about your bench test, I should be happy with what I have?

Thanks, Chris


Howard Dutton
 

What you describe isn't normal behavior, are you sure the stepper drivers are in SPI mode?

Take note of the rate of motion during tracking. 

Instead of 32x mode set:
#define AXIS1_MICROSTEPS 256

Is tracking now much slower?


Howard Dutton
 

Also... what stepper motors and their specs to be sure Vref is correct,


Khalid Baheyeldin
 

Chris,

The config generator has been modified to keep up with the changes Howard did.

So, for micro steps goto, it is now 'same as tracking' or 'off'.

Also added the variations for the TMC2130 (quiet, very quiet, low power).

In my opinion and from a software development and user interface point of view, it should not have been done that way, since it is overloading an existing variable. Stepper Model should just be that: the model of the stepper. And any config variable should mean one thing, and not be polymorphic. An additional variable (e.g. TMC2130_OP_MODE) should have the extra meanings, and can be totally omitted for those using other stepper models.

But in any case, it is now in sync with what is in Alpha. Please try the config gen.


Chris Vaughan
 

If I change to 256 (and don't change StepsPerDegreeAxis etc) both tracking and slewing are much slower.
And change to 8, both are much faster.


On Thu, Feb 1, 2018 at 02:01 am, Howard Dutton wrote:
What you describe isn't normal behavior, are you sure the stepper drivers are in SPI mode?

Take note of the rate of motion during tracking. 

Instead of 32x mode set:
#define AXIS1_MICROSTEPS 256

Is tracking now much slower?


Chris Vaughan
 

That's starting with the following, which seems to work well in tracking & slewing
#define StepsPerDegreeAxis1 6400.0
#define StepsPerWormRotationAxis1 16000.0
#define AXIS1_DRIVER_MODEL TMC2130_VQUIET
#define AXIS1_MICROSTEPS 32
#define AXIS1_MICROSTEPS_GOTO_OFF
ditto for axis

But I haven't used the following made by the config generator
#define MODE_SWITCH_BEFORE_SLEW_ON
If I include this it doesn't work at all


Chris Vaughan
 
Edited

I have Polulo 1209s. 200 step, 2.7V 1A.
Have tried with Vref = 0.7 and 1V. Using a 12V supply.


Howard Dutton
 

On Fri, Feb 2, 2018 at 10:08 pm, Chris Vaughan wrote:
If I change to 256 (and don't change StepsPerDegreeAxis etc) both tracking and slewing are much slower.
And change to 8, both are much faster.
Absolutely confirms that SPI is working.


Howard Dutton
 

On Sat, Feb 3, 2018 at 12:48 am, Chris Vaughan wrote:
Have tried with Vref = 0.7 and 1V. Using a 12V supply.
1V would be the correct setting AFAIK.  Just out of curiosity I tested at 1V Vref (1A which is 0.707A RMS) setting here.  For the stepper motor I have attached the driver was only warm running at 12V.  At 24V it gets pretty darn hot (might think about a fan in that case.)


Howard Dutton
 

On Fri, Feb 2, 2018 at 11:31 pm, Chris Vaughan wrote:
That's starting with the following, which seems to work well in tracking & slewing
#define StepsPerDegreeAxis1 6400.0
#define StepsPerWormRotationAxis1 16000.0
#define AXIS1_DRIVER_MODEL TMC2130_VQUIET
#define AXIS1_MICROSTEPS 32
#define AXIS1_MICROSTEPS_GOTO_OFF
ditto for axis

But I haven't used the following made by the config generator
#define MODE_SWITCH_BEFORE_SLEW_ON
If I include this it doesn't work at all
Ok then use this mode.  Why spreadCycle doesn't want to work I really don't know!

MODE_SWITCH_BEFORE_SLEW_XXX should NOT be present in Config.xxx.h if "Basic stepper driver mode setup" is used (as it is in this case.)
That setting would be incorrect in any case and this is the reason it stops the drivers from working.  It disables SPI mode.


Chris Vaughan
 

Howard 

Thanks for checking all of that. So, amazingly I haven't completely lost the plot and it appears I've done it correctly. Must be something weird about my ebay tmc2130s.

I'll try and source some 2130s from elsewhere. In the meanwhile I'll stick with stealth chop and get on with mounting the steppers.

Chris 


Howard Dutton
 

I don't assume it's your tmc2130's, it might be.  I don't see any signs of what you describe in my testing/use of OnStep to indicate that OnStep is not setting up the driver's correctly.

There are less likely possibilities too...
Is your power supply a nice sturdy one (plenty of amps)?  Are the leads to the stepper motor 24 gauge or lower (heavier?)  Did any of this change vs. TMC2100?


 

A bit late perhaps but I found the same TMC2130 issue.  The highest I can go is 64x with goto and tracking working.  With 128 or 256 the goto is super slow.  I use VQUIET, if that matters.