What you need to know about TMC2130
These are controllers for stepper motors designed by Trinamic (from Germany) especially for 3D printing.
They are very advanced drivers that include first class technologies at a very affordable price. They can also easily replace the DRV8825 and A4988.
They include the following technologies:
- Microstep table
- Passive braking
- Short detection
- SpreadCycle™ (normal mode with greater strength)
- Stall detection
- StealthChop™ (normal mode with less strength)
They have two modes of operation:
This mode of operation is "classic" mode for 3D printer drivers, the printer sends two commands: step and direction, and the controller executes this movement. We recommend removing all the jumpers from the bottom so that it will work as Step/Dir, at a resolution of 1/16, interpolating to 1/256 and in silent mode.
The current is calibrated the same as the DRV8825 in this configuration.
The advantages of this installation are:
- It does not require hardware modifications, you do not have to weld anything or modify the printer.
- Usually in the case of replacing the A4988 you do not have to adjust the steps per mm, if you replace the DRV8825 you can adjust the steps without modifying the firmware with the following command:
Example: M92 X80 Y80; Adjustment of X and Y axis steps at 80 steps per mm each.
This type of installation is very simple and can economically update the X and Y axes of a 3D printer.
It is the advanced mode of these controllers, it requires a different pin configuration since the information that is transmitted by SPI (Serial Peripheral Interface) is much higher. In this way we can take advantage of the following functions:
- Adjust the current intensity of the controller as needed using M906 instruction, so that there is no need to turn small potentiometers, and we can make modifications as needed:
Example: M906 X600 Y600 Z800 E800; adjusts the intensities of the X, Y, Z, Extruder axes to 0.6 0.6 0.8 0.8 A respectively.
- Switch between the silent mode and the normal mode of each controller. In this way we can print much more quietly, the stepper motors barely make noise.
The Gcode to alternate both modes is this:
- Use the hybrid mode, which alternates between silent and normal mode intelligently, so that movements below a certain speed are made silently and from that speed in the normal mode. For example, so that displacements that are usually faster than printing are made in this mode, increasing the strength of the motors and decreasing the probability of skipping steps even at high speeds.
Example: M913 X120 Y120 Z2 E30; adjust the hybrid mode, so that all movement greater than 120, 120, 2, 30 mm/s are done in the SpreadCycle mode.
- Sensorless homing, uses the DIAG1 pin, which gives us information about the force that opposes the movement of the axle to be used as a limit switch, eliminating the need for these on the X and Y axis. This is a central pin of the controller, so you may need external wiring.
The sensitivity can also be adjusted with the following instruction:
Example: M914 X6 Y6; Adjust the sensitivity of the X and Y axes to 6, the range is between -64 and 63, if it hits too hard you can lower it.
Configurate Marlin, to work with it:
- It is necessary to install the library for TMC2130:
- If you use Marlin 1.1.9 or superior: https://github.com/teemuatlut/TMCStepper
- If you use Marlin 1.1.8 or lower: https://github.com/teemuatlut/TMC2130Stepper
Arduino IDE in its latest versions includes a library manager, so you can install the library directly from the program: program/include library/manage libraries and there you look for the indicated libraries.
- Define the pins SCK, MOSI, MISO and CS, that will depend on the board on which we instal it.
Learn to recognize the TMC2130 driver types and their configuration:
- TMC2130 configured as STEP / DIR,you can see how it includes the resistance to disable the SPI does not include weldings for CFG 4 y 5.
- TMC2130 Configuraed for SPI, it does not include the resistance to disable SPI and has the welding in CFG 4 and 5.
This version includes pins on the top and bottom to be installed in an electronic prepared for SPI as the Ramps 1,6+, as well as in other versions wiring externally (not recommended).
Other factors to consider:
In order too be able to adjust the intensity, and switch between SpreadCycle ™ StealthChop ™ modes and modify the values of acceleration firmware there are more than one way to configure the firmware to achieve good results:
- You can set a high intensity and use the silent mode with moderate accelerations.
- To make the printer more efficient you can use a low intensity with the SpreadCycle mode. Despite being a noisier print will also be more efficient.
- To maximize performance and accelerations you can use SpreadCycle mode with a high intensity. This will make the printer very strong on the axes and can print very fast.
- If you want the noise to be very low, the StealthChop mode together with low accelerations is the best solution.