Notifications
Clear all

TMC2130 Driver Infos and Modifications  

Page 2 / 2
  RSS
reid.b
(@reid-b)
Reputable Member
Re: TMC2130 Driver Infos and Modifications

I agree... something doesn't seem right. I'm going to take another stab at the current settings (stepper amperage settings) later this week- I'm not convinced it is actually having any effect (this is done via a code change on the firmware.)

Posted : 23/04/2018 5:38 pm
raspeitia
(@raspeitia)
Eminent Member
Re: TMC2130 Driver Infos and Modifications

I noted this before on another thread, but not sure if anyone has been able to determine what trinamic mode is being used in the firmware.

The reason I mention this is because the trinamic driver has multiple modes that allow different control options and behavior for the steppers depending on the need of the user.

From the trinamic data sheet, their driver has this option called dcStep on section 1.8:

dcStep allows the motor to run near its load limit and at its velocity limit without losing a step. If the mechanical load on the motor increases to the stalling load, the motor automatically decreases velocity so that it can still drive the load.

If this mode is being used, it might account for some of the overheating issues on the extruder some folks have been seeing. It might also account for the extrusion issues, if lets say the extruder encounters filament out of spec or the bowden gears are binding and has a hard time keeping the max speed constant, then it would decrease the velocity thus the underextrusion.

Another example is the the coolStep option 1.7:

coolStep drives the motor at the optimum current. It uses the stallGuard2 load measurement
information to adjust the motor current to the minimum amount required in the actual load situation.
This saves energy and keeps the components cool.
Benefits are:
- Energy efficiency power consumption decreased up to 75%
- Motor generates less heat improved mechanical precision
- Less or no cooling improved reliability
- Use of smaller motor less torque reserve required → cheaper motor does the job

If this mode is not enabled, and the steppers are indeed cheaper motors, you may not be seeing any benefit to the changed parameters.

Last but not least is the SPI mode section 1.4.2:

SPI Direct Mode
The direct mode allows control of both motor coil currents and polarity via SPI. It mainly is intended for use with a dedicated external motion controller IC with integrated sequencer. The sequencer applies sine and cosine waves to the motor coils.

If the steppers are being controlled directly via a hard coded "untuned" curve, then it would explain why the settings have no effect on the extrusion and why we would need to effectively tune that curve correctly for the steppers in the MK3.

Just some thoughts, but not sure how applicable they are in the firmware as I don't have the expertise to reverse engineer what has been deployed by prusa.

Posted : 23/04/2018 7:07 pm
moggieuk
(@moggieuk)
Eminent Member
Re: TMC2130 Driver Infos and Modifications


I have exhausted all avenues changing the Microstepping table, disabling MicroPlyer, cranking current up and down, and various other changes (and I dare say my printer has pretty darn good quality all things being equal.) Nothing I have tried improves extrusion problems, nor does it appear to me that E-Correction does anything for moire problems. I'm fearing our issues may have to do with the Bondtech, or perhaps the stepper motors provided by Prusa.

I've got about 30 20mm perimeter cubes and other things- been at this all day long. Very frustrating...

Kudos to you for giving up a day to test! Did any of the tests make quality worse? Just wondering if the changes were actually taking effect or being overwritten by defaults...?

Posted : 24/04/2018 2:48 am
devilhunter
(@devilhunter)
Reputable Member
Topic starter answered:
Re: TMC2130 Driver Infos and Modifications

I stumbled over Lulzbot's implementation of the TMC2130 that they currently use on their Lulzbot mini 2, which uses the Einsy Retro (Einsy with Endstop switches and 12V fans)

Here are all TMC2130 mentions in their code:
https://code.alephobjects.com/search/query/e4Ud8hQeHutW/#R

It looks like they have quite a bit more code in their fork of Marlin for the TMC2130 than we have.

Posted : 25/04/2018 8:39 pm
jonathon.b
(@jonathon-b)
Estimable Member
Re: TMC2130 Driver Infos and Modifications

Do you know if they have the same probelms were seeing?

Posted : 27/04/2018 9:24 am
jonathon.b
(@jonathon-b)
Estimable Member
Re: TMC2130 Driver Infos and Modifications


Do you know if they have the same probelms were seeing?

I just seen it’s not out yet but the picture on the page it looks like a fine print, if it’s using the einsy retro could some of there firmware be forked and used on our printers?

Posted : 27/04/2018 9:31 am
JLTX
 JLTX
(@jltx)
Reputable Member
Re: TMC2130 Driver Infos and Modifications


I noted this before on another thread, but not sure if anyone has been able to determine what trinamic mode is being used in the firmware.

The reason I mention this is because the trinamic driver has multiple modes that allow different control options and behavior for the steppers depending on the need of the user.

From the trinamic data sheet, their driver has this option called dcStep on section 1.8:

dcStep allows the motor to run near its load limit and at its velocity limit without losing a step. If the mechanical load on the motor increases to the stalling load, the motor automatically decreases velocity so that it can still drive the load.

If this mode is being used, it might account for some of the overheating issues on the extruder some folks have been seeing. It might also account for the extrusion issues, if lets say the extruder encounters filament out of spec or the bowden gears are binding and has a hard time keeping the max speed constant, then it would decrease the velocity thus the underextrusion.

Another example is the the coolStep option 1.7:

coolStep drives the motor at the optimum current. It uses the stallGuard2 load measurement
information to adjust the motor current to the minimum amount required in the actual load situation.
This saves energy and keeps the components cool.
Benefits are:
- Energy efficiency power consumption decreased up to 75%
- Motor generates less heat improved mechanical precision
- Less or no cooling improved reliability
- Use of smaller motor less torque reserve required → cheaper motor does the job

If this mode is not enabled, and the steppers are indeed cheaper motors, you may not be seeing any benefit to the changed parameters.

Last but not least is the SPI mode section 1.4.2:

SPI Direct Mode
The direct mode allows control of both motor coil currents and polarity via SPI. It mainly is intended for use with a dedicated external motion controller IC with integrated sequencer. The sequencer applies sine and cosine waves to the motor coils.

If the steppers are being controlled directly via a hard coded "untuned" curve, then it would explain why the settings have no effect on the extrusion and why we would need to effectively tune that curve correctly for the steppers in the MK3.

Just some thoughts, but not sure how applicable they are in the firmware as I don't have the expertise to reverse engineer what has been deployed by prusa.

I had the exact same thoughts. I was planning to dig around in the fw to extract the settings. Next I would try, as best as possible, to turn off each one, one by one, to see what effect it had.

Posted : 27/04/2018 3:10 pm
tobias.k3
(@tobias-k3)
Trusted Member
Re: TMC2130 Driver Infos and Modifications

I wonder if the TMC2208 with stealthchop2 is the better option if you just want silent operation. Has anyone experiences with that?

Found an article on that: https://github.com/superjamie/lazyweb/wiki/3D-Printing-TMC22xx-Quick-Guide

----------------------------------------------
PRUSA MK2
- Noctua fan 40mm
- MK2/MK3 hybrid extruder

Posted : 11/05/2018 7:05 pm
reid.b
(@reid-b)
Reputable Member
Re: TMC2130 Driver Infos and Modifications

With the 22xx series driver, you don't get stallguard, so now you need to wire up limit switches again.

Posted : 12/05/2018 9:49 am
Sionree
(@sionree)
New Member
Re: TMC2130 Driver Infos and Modifications


Here is @metacollin's TMC2130 current calculation



Yeah, the Einsy works the same way in terms of setting the current, except that the current isn't given in mA anymore. In the Configuration_prusa.h file, near the bottom of the TMC2130 section, you'll find:

#define TMC2130_CURRENTS_H {16, 20, 28, 36} // default holding currents for all axes
#define TMC2130_CURRENTS_R {16, 20, 28, 36} // default running currents for all axes
#define TMC2130_UNLOAD_CURRENT_R 12 // lowe current for M600 to protect filament sensor

Those correspond to the X, Y, Z, and Extruder axes. Each number can be anywhere between 0 to 63. The actual current values can be calculated thusly:
CodeCogsEqn (2).gif


Excellent work, thanks. Unfortunately I did not understand how to assign the correct value (0-63) according to the desired current. Is there a formula?

Posted : 11/11/2018 10:22 am
SigTERM
(@sigterm)
New Member
Re: TMC2130 Driver Infos and Modifications

Hello, have someone managed to understand why Prusa's spreadCycle on extruder does not whine? When I use exactly same settings like he has in his firmware (TBL, TOff, hysteresis, ...), I cant get rid of awful whining. I am using multiple boards (GT2560, Rumba) on 24V with his stock motors. I think he added some filters on TMC2130 outputs.

Posted : 28/12/2018 12:22 am
Dreide
(@dreide)
Trusted Member
Re: TMC2130 Driver Infos and Modifications

I think he added some filters on TMC2130 outputs.

Be aware that the Einsy board has 0.22 ohm resistors for current sensing (which is good for better noise immunity, i.e. cleaner current control). If your board/driver happens to use 0.11 ohm resistors but you are using the same driver programming as in "his" firmware, you'll end up with double the motor current.

Posted : 28/12/2018 3:30 pm
Juuso V
(@juuso-v)
New Member
Re: TMC2130 Driver Infos and Modifications

I'm trying to configure my new mk3. Extruder is sometimes skipping steps and knocking very randomly. I would like to increase motor current a bit but those M910 etc M9xx commands won't work. Pronterface only said that unknown command. How can I adjust motor current?

Posted : 22/04/2019 10:27 am
Page 2 / 2
Share: