Today, we’re going to be working on Dolly again, my Prusa i3 MK2 “clone”.
And I hear you, I know I should be fixing the wobbly Z-axis or installing the MK42 heated
bed, but first, we’re going to turn it from this: [sound sample A4988] into this: [sound
sample TMC2130].
So today, we’re actually going to take one of the best features from the original Prusa
MK3 and port it back to my half-assed MK2.
And if you looked at this video’s title at all, you’ll know what I’m talking about:
The Trinamic TMC2130 intelligent stepper motor drivers.
This is a great little upgrade that you can do on your own 3D printer as well.
So get your nerd on and follow along, I’m going to show you why you even want these,
how to wire up the hardware, how to configure everything and how to make best use out of
your 3D printer’s new super powers.
Thank you to Trinamic for sponsoring this video!
Not are they the makers of the TMC2130 we’re going to be using today, but they also have
a huge range of motion control products for almost every application, such as their cDriver
family of drivers, which are ideal for simpler linear motion jobs.
You tell it where to go and it literally does everything else from handling acceleration
all the way to step control.
So check out their full family of products in the link below.
This is Dolly.
It’s my attempt of building an i3 for bottom dollar, and you can definitely tell by all
the corners that have been cut.
Or just cut square, because that’s less work.
I love these cheap DIY printers that are based on the most widely available parts, because
they are great platforms for experimenting and learning about what makes these things
tick.
Most importantly for what we’re going to do today, Dolly uses a bog-standard import
Ramps 1.4 and an Arduino Mega 2560 clone, which is pretty much the worst hardware combination
you could use, but it is what almost all other 8-bit boards are based on, so this guide is
also going to work for all of those printers that use a vaguely similar 8-bit board.
But before we get into the nitty-gritty tech details, let’s actually go through why we’re
even doing this.
You might have seen my older videos on the Trinamic TMC2100 drivers on Watterott’s
SilentStepStick.
If all you’ve been using is Allegro A4988 or Texas Instruments 8255 drivers, then these
will positively blow your mind.
Whatever magic Trinamic has put into the control algorithms of this chip is just so much better
than everything else, it makes your 3D printer’s motors run smoother, cooler, quieter, more
reliable, and I find that the Trinamic drivers actually produce more torque than the beefy
Texas Instruments drivers even though they are rated for a way lower current.
And this isn’t stuff that Trinamic wants me to say, I am just genuinely in love with
these things.
So that is the TMC2100, but what we’ll use today and what the Prusa MK3 is using is the
TMC2130.
It’s the same basic chip and you’re getting all of the advantages of that, but on top
of the TMC2100, the 2130 adds a communication interface that hooks up to your controller.
This allows the stepper driver to report things like whether it thinks the motor its driving
is about to lose a step and it lets the controller set motor current and many details about how
it drives the motor.
And this means a few things: Your printer’s firmware can auto-tune how
much current your motors need to run as cool and quietly as possible without losing steps,
so no more fiddling with those tiny potentiometers.
It means you don’t need endstops for the X and Y axes as you can just ram an axis into
the end and the driver will sense that resistance once it touches the end, and that totally
works.
You can have the drivers reduce their current when they’re idle, so when an axis isn’t
moving, it’s using as little power and making as little noise as possible.
You can even switch between the silent “StealthChop” drive mode and the more powerful, but noisier
“SpreadCycle”, mode on the fly - or - have your drivers automatically switch to the more
powerful SpreadCycle when going faster.
Unfortunately, the coolest feature, automatic rehoming when an axis loses a step during
a print, isn’t there yet in the official Marlin versions, but I’m sure we’ll get
that very, very soon with an update, so keep your eye out for that, but for the time being,
the smoother stepper motor control should already make your printer a good bit more
reliable.
But there are some other advantages of going with the TMC2130 over the simpler TMC2100
that aren’t apparent on first sight.
You don’t have to set the motor current with that tiny, fiddly potentiometer anymore,
instead you can just enter and tune the exact value you want instead of relying on half
guesswork and half reference voltage to current conversion formulas that are different for
every driver.
With the TMC2100 I noted that the silent StealthChop mode wasn’t reliable enough for day-to-day
use, with the TMC2130 and being able to control it so much more precisely, StealthChop is
a whole different story, all the sudden it worked flawlessly for me out of the box.
So enough of that.
At this point you probably know you want some of these, and if you’re looking to upgrade
your 3D printer, this is definitely one of the best things you can do to it.
To follow along, you will need the following things:
A 3D printer that can run Marlin, obviously TMC2130 SilentStepSticks - you can get these
directly from Watterott in Germany or from Filastruder in the US.
These are made-in-Germany boards, a full set of four drivers will run you about 45€ or
$55, but the thing is, you don’t have to swap out all four drivers, if you want to
save some cash and still get, like 90% of the benefits, you can also just swap out the
X and Y-axis drivers, which are the ones that are typically working the hardest.
And you’ll also need some breadboard, I love these mini ones, and some male to f…
uhm, plug to socket jumper wires.
Don’t assume genders, kids.
I’ve linked these in the description below, this stuff literally costs pennies.
For tools, you’ll need a soldering iron and solder, and some side cutters, that’s
it.
Okay, let’s get started!
First things first, we’re going to solder up the driver boards: The SilentStepSticks
are all laid out with the driver chips on the bottom side so that you have this nice
big surface for heatsinking that has an all-metal connection to the actual silicone inside the
chip instead of having to go through the chip’s plastic casing, which is basically just a
thermal insulator if anything.
So keep that in mind, as this driver board gets plugged into your printer’s mainboard,
the components are going to face away from you.
Now, typically, you’d just solder the two sets of 8-pin headers to the driver and you’d
be done, but with the TMC2130, you’ve got the communication pins that we don’t want
plugged into the board, but instead facing upwards so that we can hook them up with jumper
wires.
So on the side with the motor output, we’re going to solder in the full 8 header pins
facing down, but on the other side, I’ve snipped the pin strip into sections of 4 and
2 pins and two single pins.
Facing down, you’ve got the direction and step pins and the enable pin on the other
end, and facing up, you’ve got the four communication pins and the diagnostics 1 pin,
which is the one down here.
Don’t worry, this one with the Open Hardware icon isn’t used for anything, so that one
is not getting a pin.
Cool, done!
Rinse and repeat for all of your TMC2130 SilentStepSticks.
Next up, we’re going to wire these up.
Replace your stock driver board with the SilentStepSticks, making sure you’ve got the stepper motor
outputs on the board facing the motor connector or the labels on your mainboard.
Now we can hook up the communication ports.
The SPI bus we’re using here is a master-sla… subscriber bus - which means you have one
device acting as a bus master, and all others as subscribers.
In our case, the master is the AtMega chip that’s on the Arduino, and all our TMC2130
chips are subscribers.
So we have a few pins here: Serial clock, serial data out and serial data in.
Each of these signals gets wired in parallel from all of your drivers, so grab your jumper
wires and your breadboard and hook them all up.
The fourth pin is the chip select pin, which the master uses to tell each subscriber which
one of them it’s talking to at any time, and each of these is routed to its own pin
on your printer’s motherboard, just like the diagnostics pin, which the drivers use
to signal step loss back to the controller.
Ok, so let’s do that!
Figuring out exactly which pins on your motherboard to connect to is a bit involved, so I’m
not going to go into the full detail here.
But on the RAMPs and on many other boards that have evolved from the RAMPs, the pinout
is identical.
What we’ll need to use is the AUX-2 and AUX-3 connector and yes, one of those is already
used up if you’re using an LCD, but you can also configure it so that you can use
other pins.
I’m going to show you how in another video.
Connect the shared bus signals and the individual chip select and diagnostics pins like this:
[graphic] Ok, that’s the last time you’re going
to need to touch the hardware.
Again, the potentiometer on these drivers is not going to be used; from here on out,
everything’s going to be software.
So how about that?
On the firmware side of things, you’ll need a fairly recent version of Marlin, since the
features that we need for controlling the TMC2130 have only been added relatively recently.
I’m using 1.1.6, which, as of December 2017, which is when this video came out, is the
most current version.
You can always check for updates at marlinfw.org.
Don’t forget, whenever you download a fresh firmware you’ll need to transfer your existing
printer configuration to the new firmware or completely configure it from scratch.
I think the video on how to do that will also need to be one that I’ll need to reshoot
sometime soon for the new Marlin versions.
Opening the Marlin.ino file in Arduino, you’ll find all the settings for the TMC2130 in “Configuration_adv.h”.
If we search for 2130, that’s going to take us right to the part we need, so let’s just
walk through what we need to do here.
“Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper drivers.”
- that’s a mouthful!
So let’s do this.
You enable any line in the code by removing the double-forwardslash at the beginning of
the line, or disable the entire line it by adding it back.
Technically, this turns the line into a comment, which is not part of the actual program code
anymore.
So, enable “#define HAVE_TMC2130”, because we do definitely have TMC2130.
Next up, quote, “You'll also need the TMC2130Stepper Arduino library”, and you can get that,
obviously, at the link right there and do the manual installation and all, but the much
easier way is, in the Arduino IDE, to just go to Sketch -> Include Library -> Manage
Libraries, then search for 2130 and hit install on the most recent version.
This is 100% foolproof and it will even remind you to keep your libraries up to date when
new versions come out.
Alright, next!
We already connected the hardware, so we can keep moving forward in the firmware configuration.
In this next section, you’ll need to enable each motor that you’re running with a TMC2130.
In my case, I’m doing X, Y, Z and the first and only extruder, but of course you can use
a many or as few as you like.
If you’re also using a TMC2130 for your extruder, you’ll need to enable that in
this next section, right here.
Let’s start from the top: The sense resistor value is preconfigured for the genuine SilentStepStick
from Watterott, so that’s fine, next up, the “HOLD_MULTIPLIER” allows the stepper
driver to reduce its current while it’s not moving, and typically this a feature to
reduce the heat output on the driver and the motor, but what I really like it for is that
it allows you to get rid of any idle whining that some combinations of supply voltage and
some specific motors produce, you can play around with these values if the defaults don’t
work for you, but keep in mind that this applies to all axes on your printer that use the TMC2130.
You can probably go as low as 0.2 without any issues, on the other hand, if you want
to turn off this current reduction feature, just set this multiplier to “1”.
Next up, “INTERPOLATE”, this tells the driver to create 256 fine microsteps from
the coarser steps your controller sends them, definitely leave this on, there are no real
downsides on a 3D printer, and it’s going to make motion smooth, quiet and really silky.
Then you can configure current for every axis individually.
Now, as I’ve noted in my review of the simpler TMC2100, current on the Trinamic drivers isn’t
really comparable to the current settings on the Allegro or TI drivers, the Trinamic
drivers manage to run quite a bit more reliably at the same “nominal” current in my experience,
so you shouldn’t try and get to the same current that your previous drivers needed
to work smoothly.
The default is 1A RMS, so 1.4A peak, you can set them to up to 2A RMS, which gives you
about 2.5A peak, and that is a lot of current for these tiny drivers and definitely a challenge
to keep cool.
Watterott recommend 1.2A as a safe RMS current limit with the tiny Pololu-size boards they
come on, if you add a bit of cooling you might be able to push them a bit past that, but
usually, 1A or 1.2A are totally fine for a 3D printer, even if it doesn’t sound like
a ton of current at first.
Ok, MICROSTEPS, we’ll just leave those, next, “#define STEALTHCHOP”.
This is probably one of the most fundamental choices you have with Trinamic drivers.
They basically give you two completely different drive modes, first, StealthChop, that is going
to be incredibly smooth and almost completely silent.
It’s fascinating to for once hear the linear rails making noise if you don’t have any
fans spinning on your printer.
However, it also makes your motors a bit weaker and isn’t great for high-performance use.
So for that they have Spreadcycle, which drives your motors harder, it’s also louder, but
ultimately you can also go faster with it, and this mode is more in line with how other
stepper drivers work.
Depending on your exact setup - that is supply voltage, the exact type of stepper motor you
use and even things like the wires you use for the motors - can influence how well StealthChop
works.
I’d suggest trying it out StealthChop first and if it doesn't work for you, you can always
fall back to SpreadCycle.
Or if you want a compromise between the noise level and driving motor performance, you can
either run Spreadcycle with a relatively low current or check out this feature down here,
which can put the drivers into a hybrid mode, running in the silent StealthChop for slow
speeds and the more powerful SpreadCycle once it passes a certain speed threshold.
By default, it’s enabled, so even if you chose StealthChop above, it’s still going
to dynamically give your motors a bit more juice when they need it.
I personally prefer a more consistent noise level even over one that might be quieter
on average, but keeps changing in volume, so I’d set the drivers to run in either
mode all the time, but if you like the switching behavior, you can play around with the thresholds
and find one that works for you.
Before we can upload the firmware, there two more things we need to enable and those are
the automatic current tuning and the sensorless homing.
Again, those two are turned on by removing the double-forwardslash here and here.
For sensorless homing, the default sensitivity setting should be ok for most printers, but
of course you can play with it if it is too sensitive or not sensitive enough.
It’s also a good idea to add these two lines [home bump] right after the sensitivity settings
to keep the printer from bumping into the axis ends too often.
And now we can upload your freshly configured firmware to your 3D printer!
Give it a quick test and check if the movement is working smoothly.
You can adjust the motor current for each axis by sending, for example M906 Y800 which,
in this case, setw the Y axis to 800mA RMS or have the firmware autotune your drivers
by sending M906 S1.
When you find your perfect current settings, don’t forget to copy them into your firmware
configuration and reupload the entire thing to make it permanent.
And there you go, your 3D printer with silent motors and a bunch of new, cool features for
its linear motion.
Again, I fully expect the MK3’s auto-rehoming feature to become available in standard Marlin
soon, and that’s going to be just one firmware upgrade away.
So I hope this guide was helpful for you - I know it was as long one, but it should have
covered all the important bits.
If you did like it, give it a thumbs up, get subscribed if you want to see more like it
and if you love what I’m doing here in general, you can support the channel on Patreon with
just a dollar per month or more if you feel like it.
So thanks for watching and I’ll see you in the next one!