Rapid Prototyping Services, Professional manufacturer of CNC Prototyping and 3D Prototyping in China. 

UART This! Serial Control of Stepper Motors With the TMC2208, Ramps 1.4 and Marlin

by:Tuowei     2019-09-09
Most people who are involved in DIY 3D printers, or just enjoy fiddling with manufacturers --
I have heard of the stepping motor driver chip of the Trinamic series.
These small chips have made waves in the market for 3D printers for consumers and consumers, because they can keep 3D printers almost silent.
The German manufacturer Watterott also uses the TMC2208 in their silentstep stick step motor drive product range.
However, there is little information written in layman/manufacturer terms on how to connect a stepping motor drive plate to a traditional ramp 1. 4 to 1.
6 Style Arduino shield, in order to use the function of serial communication through the serial port to control the stepping motor.
In this note I will mitigate this by taking you through a stepby-
How to use the step setting of TMC2208-based silentstep stick in the asynchronous configuration on the 3D printer. EDIT-
August 2018: When I first wrote this structure, the default Pin assignment inside Marin was different from what it is now.
The picture above is my Y-
In the current version of Marin, the cable is in a different position than it is now.
For more information on how to find these current pin assignments, see step 10.
With these TMC2208-
Based on silentstep sticks, the only option that the web really discusses anywhere is the direct pluginand-
Play the driver to replace the Pololu A4988 (
This does not give you the benefit of using serial communication in the process of controlling the stepping motor)
However, the TMC2208 driver can actually have three different operating modes in controlling the stepping motor of the 3D printer: Mode 1 (Legacy Mode)
: This has been discussed at the beginning of this manual, basically welding on the head pin and sticking to the radiator, so it looks like a Pololu A4988 board, and put it on the ramp. Mode 2 (Independent mode)
: YouTube creator Keith Young explains this mode very well in which he shows you how to weld the head pin to the silentstep stick board and then set/program the OTP (one-
Time Programmable)
Mode of bit-changing chip spreadCycle stealthop2 mode.
Note that these OTP bits are real-
Time programmable.
Once you \"set\" these bits, you will make a permanent change to the silicon of the chip, which cannot be reversed.
So I would suggest running these chips in the default stealthop2 mode for a while to see if you have steps to skip and then consider changing themMode 3 (
Active STEP/DIR driver)
: The whole content of this structure is this mode.
YouTube creator Alex Kenis posted a great video on this option where he explored the Best Micro
Step settings in firmware and drive voltage levels (12V vs 24V)
, Get maximum torque from your motor. (
Edit: Alex Kenis posted an updated video about the process and gave more details)
The purpose of this note is to expand his work (
In terms of interpretation)
Make it easier for manufacturers with lower technical content to approach.
In short, Mode 3 allows TMC2208-
Based on silentstep stick, active/dynamic control through serial port (
Serial communication)by firmware (
Marin in this case).
You don\'t have to fiddle with jumpers to set up your micro
Step, just change it in the firmware, you can dynamically change the electrical flow of each step motor (
No longer adjust the Small potentiometer on the drive Board)
Just send the GCode command (M906).
Benefits of Mode 3. . .
Before I discuss this in detail, give a few more helpful explanations.
For those of you who haven\'t realized this yet, there are two companies involved here: So let\'s get started. . .
Here are the basic tools and supplies needed to complete this description.
These items are needed in most cases to make Y-
The cable required for serial communication between Silentstep stick and the ramp plate.
Note: The following links are shortened URLs and they are not affiliate links.
By default, the asynchronous pin on the Trinamic TMC2208 chip is not connected to the header pin (s)
A player from the waterot siltfoot baseball team.
In order to physically connect from the chip to the pin, we need to weld the jumper between the jumper pads at the bottom of the silentstep stick board.
You can see these pads in the Fritzing and photos above.
There are several versions of the Watterott TMC2208 board, some with only two jumper pads.
In my iteration (
And what is shown in the photo in this description)
There are three pads together.
The center pad is a direct connection back to the TMC2208 chip.
The two pads on both sides are directly connected to their closest head pins.
The screen printing side of the board has these two header pins, collectively referred to as PDN asynchronous.
They can all be used as pdn_usb lines as the Arduino Mega does not use any pins in the Pololu A4988 driver.
As a result, Watterott decided to designate these two header pins as pins that can be used for welding connections with the TMC2208 pdn_ustpin of the chip.
We only need one of these two plugs for our serial connection, so you can weld the center pads to the left or right pads, or to both.
If you only Weld one side, then you have to remember to weld the pin up on that side so that you can later connect your asynchronous jumper to it.
If you want to eliminate any chance of error, weld the three pads together.
In this way, it doesn\'t matter which head nails you weld point to the top because they all work.
Now that the jumper pad has been welded, we can weld the solder pin in place (
If your motherboard has not come with the title pins yet).
According to the data of Trinamic TMC2208 (page 5)
, The benefits of using a chip configured as Option 3 (UART)
All the control lines (
Set VREF for EN, DIAG, INDEX, MS1, MS2 and analog current)
Replaced by a usb line, so configured via firmware and controlled by firmware.
So technically, the only header pin actually needed on this side of the silentstep stickerboard is Dir (direction)
, Step, and pdn_asynchronous pins.
Pdn_uartpin needs to be welded up so you can connect jumperwire to the ramp;
In fact, however, the en pin must also be welded down.
I would like to thank the member for instructures crzcrz for pointing this out to me.
If the EN head pin is not welded, the TMC2208 chip will not send the enable signal and the motor will not be turned on.
I\'m not sure if this is a problem with the current version of Marin (1. 1.
8 as of the time of writing this manual)
Or use the latest version of the Watterott 2208 motherboard.
I will update this once I find more.
Anyway, just remember to also weld on the EN head pin.
The picture above is correct.
If you want to use it completely safely, then just solder it on all the head pins, the PDN asynchronous pins point up and the others point down.
These TMC2208 chips are hot (
Same as any stepping driver chip close to an amplifier or more current).
These chips are built in.
Thermal protection, but this means that your stepping motor will lose steps if these chips are too hot (
And heat protection open)
And ruined your print.
So, do yourself a favor by putting enough radiator surface area on these chips.
In the video previously cited by Alex Kenis, he used two radiators and also put a fan on the ramp.
I used my chip with only one Pololu type radiator and a fan on it and after about 2 hours I still lost the print step (
The motor current of Marin is set to 800ma).
So I use two radiators now (See above)
Mine, with a fan, everything works fine.
The top radiator is 9mm x 12mm, and the bottom radiator is the typical Pololu A4988 radiator, which is measured approximately.
9mm x 5mm.
In order to allow space for the bottom radiator, you need to put the silentstep stick on the Watterott V2 protection board or a series of mother riser pins to lift it up enough to clear the pins on the ramp below.
Watterott has manufactured a dedicated \"V2 protector\" riser board that uses a Schottky diode to ensure that the drive chip is on VIO (logic level 3. 3V/5V)and VM (12v/24vsupply)voltages.
I didn\'t have these diode protection plates while writing this instruction, so I just used some female riser and it had no problem.
I have purchased some V2 protection boards since then and use them now just because they are cheap insurance for burning the TMC2208 step.
Please note that without these V2 protection plates, the back potential generated inside the stepping motor can be large if you move your shaft quickly and manually, and can be fed back into the stepping motor, and destroy the logic circuit in the TMC2208 chip.
Therefore, if you decide not to obtain a V2 protection plate, simply move the axis slowly to minimize the back potential generated.
Both the female riser and the V2 guard are very tightly mounted on the ramp board, so as you can see in the photo, install them first and then insert your pedal into the riser.
From the picture above Watterott, we can see that in order for silentstep stick to communicate with the ramp board via usb, the usb pin on silentstep stick needs a single-wire connection.
Then the wire is divided into two lines (Rx and Tx)
Connect the ramp board with Tx (transmit)
Connection by 1 k ohm resistor.
I chose to make my Y-
The cable puts the crack on one wire into two wires, close to the AUX2 head pin on the ramp board.
For those experienced manufacturers, there is no problem making this cable.
I will explain to the new manufacturerby-
How did I do it? cables.
The single line is connected to silentstep stick and the double line end is connected to the ramp plate.
The 1 k ohm resistor covers the Blue Heat Shrink tube. ALTERNATIVELY (use two cables)
: If you TMC2208 silentstep stick has the bottom of the circuit board on three pads, all three jumpers that can be welded are padded together with two-wire pd_uart silentstep stick pins, you can point both head pins above.
Since the two head pins are actually tied together, you don\'t have to make the \"Y\" cable.
Just weld 1 KOhm resistor with one of the cables (For Tx line)
, Insert the Tx wire into one of the two available connector pins on silentstep stick and use the second normal wire from the Rx pin on the ramp board to the second header pin on silentstep stick.
Just make sure you keep track of the Tx and Rx pins on the ramp board and make sure both cables point to the same silentstep stick.
Cutting the wires to connect the DuPont connectors vertically, and for those newly welded connectors, I like to apply a little liquid solder on the connection using a soldering agent pen.
It makes the process faster and cleaner.
In addition to the fuse core solder wire, I also use this method because liquid solder does pull the solder between individual wires.
The final step is to wire the single into length, peel off the wire, curl on the DuPont connector, and connect one end to the silentstep stick, but in the production of \"hard\", Y-
Cable complete.
Inside the Marlins.
The H file identifies which pins on the ramp board will become the receiving and sending pins of the serial software connection.
These pins are in AUX-by default-
2 titles on the ramp board.
In the image above, you can see these header pins and the default motor/shaft they are assigned in Marlin 1. 1. 8.
Find this part in the pin.
H file, just open the file in a decent text editor like Notepad or Atom and search for \"have _ tmc2208 \".
If you want to change the PIN number for each axis, the pin number.
The H file is where you make the changes.
The picture above on the ramp board shows the default pin allocation within the pin.
H file in Marin 1. 1. 8. Plug each Y-
The cable from the corresponding set of header pins in the AUX2 header to the corresponding silentstep stick pdn_uart pins.
Make sure you put the Resistance side of Y-
Cable on Tx (Transmit)pin.
Since writing this note, I have added a fifth silentstep driver to the ramp (for a second Z-Axis motor)
, And has chosen to use pins 57 and 58 in the AUX1 header for this serial connection (
See above).
If you decide not to adjust the pin.
H file, just use the default pin assignment in the AUX2 header, then the only file you need to modify is configur _ adv. h file.
In this file, you need to open/activate the section of the TMC2208 so that Marlin will start communicating with silentstep stick via an asynchronous serial interface.
You can open configur _ adv.
In the Arduino IDE or use the h file in a text editor such as Notepad or Atom.
After opening, activate the TMC2208 function according to the following steps: Part 1: activate the TMC2208 function Part 2: tell Marin which axes have several lines of stepping ksa, you will find individual lines for each axis of the machine in the next area (
Step drive settings)
Is where we can specify how the stepping driver controls the motor.
Part 3A: step drive settings (
Maintain current and step interpolation)
Part 3B: step drive settings (
Motor operating current and physical Microsteps)
In Alex Kenis\'s video, he tested the torque value of the motor in different configurations and found that when TMC2208 silentstep sticks run in the following configuration, the maximum torque generated by the motor is 5: enable hybrid mode (
Switch dynamic mode between stealthChop and spreadcycle)Part 6 (not pictured)
: Add the TMC2208 library to the Arduino IDE so that Marlin can use the library at compile time. Re-
Finally, if you change your micro
From the steps you used before, you need to re-
Calibration printer (all motors)
By opening the configuration.
H file in Marin, go to the section \"@ section motion\" and change the step/mm number in this line: # define default _ axis _ steps _ per _ unit {
40, 200, 48. 2 }
Note: these are my values for my printer, you need to build your own values based on your printer and what micro printer
The step values you are using because the firmware will use these values to send a certain number of steps/mm for each axis move.
However, if your stepping driver drives the stepping motor with a different number of steps/mm count (
Because of your micro
Step settings are different now)
, The resolution of the printer will be inaccurate.
This is an update to this structure to illustrate the changes that Marlin has made in version 1. 1.
In particular, the developer changed the default pin assignment for the silentstep tick axis.
For default 1, see the drawing above. 1.
9 pin assignments for each axis.
Since writing this note, I have added a fifth silentstep driver to the ramp (for a second Z-Axis motor)
, And has chosen to use pins 57 and 58 in the AUX1 header for this serial connection (
See above). In Marlin 1. 1.
The developer moved the step drive selection section from configur _ adv.
H file in configuration. h file.
They also extended how to identify the pattern type that operates silentstep trick by typing: configuration.
In the configuration.
H File, search for \"step drive \".
This should take you to the right part of the file.
By default, all potential stepping motors are identified as using the Pololu A4988 driver.
For each shaft and extruder you plan to use TMC2208 silentstep stick on, change the A4988 to TMC2208 or tmc2208_standalone.
I operate five silentstep sticks.
You can see how I set up the configuration. h file above.
This is the only change you need to make in your configuration.
H file in order to use TMC2208 silentstep sticks.
Now go to the next step of setting configuration _ adv. h file.
In configur _ adv.
H file you will set everything, as in step 11 of this manual, except to specify which axes and extruder to use the TMC2208 driver when moving to configuration. h file (see Step 13).
There are no other changes in this configuration _ adv. h file--
Related to the TMC2208 driver.
To find this section, just search for the \"tmc_smart section \". Whew!
You finally succeeded.
Now insert the ramp board, flash the firmware and try it.
For those of you who noticed that I had pieces of the pockboard and the TMC2208 silentstep stick board, they wanted to know where I got it.
I have to make them for this Instructure.
At the time of writing this manual, The Fritzing website \"signed-
The Up \"page is broken and I can\'t create an account in order to upload my Fritzing file, so for those who want to import them into your Fritzing project, I attach them to this structure.
Custom message
Chat Online
Chat Online
Chat Online inputting...