Welcome! Log In Create A New Profile

Advanced

TMC 2208 modes

Posted by Shreks donkey 
TMC 2208 modes
February 26, 2019 03:00AM
I'm trying to get to the bottom of a layer shift issue and working through some pre-configured firmware (marlin bugfix 2.0) to try and make sense of it. The firmware came from a facebook users group and made no mention of being configured for OTP mode. I never seem to get any answers when I post there, so I thought I'd ask here.

I'm running TMC 2208's on the X,Y & Z and an LV 8729 on the extruder
The firmware has the TMC's set in TMC2208_STANDALONE mode

The machine was setup with the TMC drivers in legacy mode (one jumper removed) or what I'm assuming is legacy mode anyway. It was set up using this youtube vid from Rui Raptor.
[www.youtube.com]

So to run the TMC's in legacy mode should the firmware use the TMC2208 setting rather using than the TMC_STANDALONE mode or should they just be set as A 4988's ?

Could having that setting (TMC2208_STANDALONE) in the firmware be attempting to run them in spreadcycle mode and then not supplying enough current in times of demand?

From what I can make out running the TMC's in standalone mode needs them to be programmed but mine are unprogrammed and are still as they were when I got them .

I really just want to configure my own firmware but I'd like to understand why they would have set the firmware like that so I can get it right.

If I can't get them to function without skipping in legacy mode it's looking like I'll need to switch them over to mode 3 (UART) mode but I'll need to buy a few parts before I can take that route.

Edited 1 time(s). Last edit at 02/26/2019 03:40AM by Shreks donkey.
Re: TMC 2208 modes
February 26, 2019 06:43PM
No takers?

So to answer my own question, I configured new Marlin 2.0 firmware myself and set the drivers as A4988's and ran that and it works just the same as it did with the other firmware which had them set in TMC_STANDALONE mode, it still skips steps. No-one got back to me on the facebook group but it's starting to seem like some of the people posting firmware there are just tweaking other setups and they don't really know much about the TMC's and their setup, it even seems like some of them don't even know much about anything other than the part of the firmware that they tweak themselves.

I found an excellent instructable about setting up the TMC 2208's in UART mode by Sean Sadler. I learned more from that than I did from piecing info together from random other sources.
[www.instructables.com]

So my layer shifting still persists. It happens almost like clockwork when my test print (benchy) gets to 6.8mm high and then keeps skipping like a little girl with a rope. Maybe the TMC runs OK until it reaches its thermal cutout temp and then starts dropping in & out. I have a big heatsink on it and an extra fan blowing right on that particular driver but alas. it still skips steps. I don't have a digital thermometer so I'm guessing really but the heatsink doesn't seem any hotter than the other two TMC's. I tried switching the module for another new one and it still starts skipping at the same z height. I also tried dialing my acceleration and jerk settings way down in Cura and that helped a bit but it didn't solve the problem.

So I'll try raising the driver module up and running it with two heatsinks as Sean suggests he did when he was getting skipped steps and see how that goes. If that works I might assemble what I need to set it all up in UART mode.

Edited 1 time(s). Last edit at 02/26/2019 06:48PM by Shreks donkey.
Re: TMC 2208 modes
February 26, 2019 07:08PM
I have a similar setup - Marlin 2, 4 * TMC2208 and 1 * LV8729 running on 8-bit ATmega2560.

I've set the 4 TMC stepper drivers to TMC2208_STANDALONE and the jumpers on the PCB to 16 micro stepping.
The drivers need no programming at all and operate in StealthChop2 mode in standalone mode - unless you have previously (and irreversibly) programmed them in SpreadCycle mode.

What PSU voltage are your drivers running on ? .. 24V is far better than 12V .. 24V maintains torque.

Edited 1 time(s). Last edit at 02/26/2019 07:09PM by Pippy.
Re: TMC 2208 modes
February 26, 2019 07:59PM
I'm running mine on a 24v supply so from what I've seen they should be more reliable as you noted @Pippy.

So from reading the instructable I linked above my understanding was that TMC2208_STANDALONE mode is mode 2 and that only works for chips that have had the OTP bit set to change them to spreadcycle mode. My original firmware was setup with TMC2208_STANDALONE mode but I couldn't see the point if the chips were ruining in legacy mode.

I now have them set as A4988's and have stealthchop enabled in configuration.adv.h. I just had to invert their direction setting as Rui Raptor did in his vid (linked in my first post in this thread). When I was using the firmware from the facebook group it was setup like yours - TMC2208_STANDALONE but now they are set as a4988's it all runs exactly the same and skips steps at exactly the same z height. So is the TMC2208_STANDALONE mode even doing anything when the chips haven't been programmed ?
Re: TMC 2208 modes
February 27, 2019 02:34AM
We use TMC2224 drivers on the Duet Maestro, which are the same as TMC2208 except for the package and pinout. These drivers are normally run in one of three modes:

1. SpreadCycle mode. This is the most reliable mode. The main disadvantage with it is that when used with high inductance motors, the standstill noise can be significant.

2. StealthChop mode. This is only reliable at low speeds and constant loads. If you use it at high speeds, you are likely to get missed steps and spurious short-to-ground indications from the driver. Also if the head hits a blob or overhang, you will probably have missed steps.

3. StealthChop at low speeds and spreadCycle at higher speeds. The changeover speed can be programmed through the UART (and I think by OTP too, but we don't use OTP so I am not sure about that). At the changeover speed there is a bump. You don't want this bump to happen while printing a perimeter. So IMO the best choice for the changeover speed is a very low speed, so that spreadCycle mode is used while printing but stealthChop mode is used when the motor idle to reduce idle noise. Alternatively, you can choose the changeover speed to be above the perimeter printing speed and perhaps above the infill speed too, so that stealthchop is used when printing but spreadCycle is used for fast travel moves.

If you don't have UART control and your TMC2208s are running in stealthChop mode, your only option is to limit the top speed of your printer to avoid the problems of stealthChop at high speeds.

Another potential issue is that the TMC2208 has higher on-resistance than the drivers it typically replaces such as A4988, which means it generates more heat at the same current. This isn't much of a problem for boards like the Maestro where the drives are soldered directly to a large PCB acting as a heatsink, but it is a bigger issue for plug-in drivers because the area available for heat sinking is so small. So it's best to pair the TMC2208 (and even more so, the TMC2130) with 24V power and stepper motors that can operate well at around 1.2A or less peak current.

HTH David

Edited 2 time(s). Last edit at 02/27/2019 02:36AM by dc42.



Large delta printer [miscsolutions.wordpress.com], Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: TMC 2208 modes
February 27, 2019 02:39AM
Quote
Shreks donkey
So is the TMC2208_STANDALONE mode even doing anything when the chips haven't been programmed ?

Changing the stepper motor from "A4988" to "TMC2208_STANDALONE" constant does nothing but set the "MINIMUM_STEPPER_DIR_DELAY" constant to "20" elsewhere in the firmware.

So ..

#if HAS_TRINAMIC

  #define HOLD_MULTIPLIER    0.5  // Scales down the holding current from run current
  #define INTERPOLATE       true  // Interpolate X/Y/Z_MICROSTEPS to 256

  #if AXIS_IS_TMC(X)
    #define X_CURRENT     800  // (mA) RMS current. Multiply by 1.414 for peak current.
    #define X_MICROSTEPS   16  // 0..256
    #define X_RSENSE     0.11
  #endif


  ...


#endif

in Configuration_adv.h doesn't get compiled into the firmware for your board .. unless you set the stepper motor to "TMC2208" (and use the serial comms between the CPU and stepper driver chip).

So setting the stepper drivers to "XXXXXXXXX_STANDALONE" from the default "A4988" in Configuration.h currently has no real effect, in effect changes nothing, the CPU carries on as normal.
Maybe in time to come as the newer Marlin 2 firmware evolves it may make a difference, who knows.

Edited 2 time(s). Last edit at 02/27/2019 02:41AM by Pippy.
Re: TMC 2208 modes
February 27, 2019 05:18AM
Awesome guys, thanks for the feedback!

You have confirmed all the concepts I wanted to be clear on and enlightened me on a few things I knew nothing about. Now I feel more confident making firmware changes to suit these boards.

Muchas Gracias

Edit: @dc42 - Does the Duet Maestro run in UART mode as standard?

You seem to have a lot of hands on experience with the symptoms generated when the drivers change from stealthchop to spreadcycle mode which normally only happens in UART mode.

You sold me on a Duet board for my next printer that's on the drawing board, they seem like a really well engineered piece of equipment.

Edited 1 time(s). Last edit at 02/27/2019 05:37AM by Shreks donkey.
Re: TMC 2208 modes
February 27, 2019 08:51AM
Quote
Shreks donkey
Edit: @dc42 - Does the Duet Maestro run in UART mode as standard?

It only runs the 5 on-board drivers in UART mode. The 2 optional off-board drivers can be either TMC2208/2224 drivers run in UART mode, or other types of driver not in UART mode.

Quote

You seem to have a lot of hands on experience with the symptoms generated when the drivers change from stealthchop to spreadcycle mode which normally only happens in UART mode.

That comes from supporting users of the Maestro. When I was testing the prototype, I used spreadCycle for most of the time because it was silent on the printer I was using (an old Ormerod using 12V power and 1.34A motors). But some of our users with lower-current motors found the motors noisy using spreadCycle, switched to stealthChop, and started reporting problems. That led to a lot more tests, closer reading of the datasheet, conversations with Trinamic, and eventually changes to default settings and the addition of more firmware configuration parameters.

Edited 1 time(s). Last edit at 02/27/2019 08:53AM by dc42.



Large delta printer [miscsolutions.wordpress.com], Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: TMC 2208 modes
February 27, 2019 04:17PM
Thanks for the extra info!

The more I read about the Duet boards the more I want one.
Re: TMC 2208 modes
February 27, 2019 07:17PM
It looks like I've solved the skipped steps issue.

I installed a set of header extension pins below the driver module and put another heatsink underneath directly on the chip. I confounded things a bit and flashed some new firmware (the latest Marlin 2.0 bugfix from github) at the same time though. I configured the new firmware to use the new JUNCTION_DEVIATION jerk control & also enabled S_CURVE_ACCELERATION which could be making a difference as well. I really meant to test it with the old firmware and the additional heatsink/extension headers first but my impetuous nature kicked in & I got a bit ahead myself and did it all at once.
Sorry, only registered users may post in this forum.

Click here to login