Today we're going to learn how to install the TMC2208 by BigTreeTech for steppers on the mks sgen l
version 1.0 now I need to point out a couple of things so i'm going to point
out that we have our x stepper over here our y stepper our
z stepper our E0 stepper and our E1 stepper
and as you can see there's lots of pins in here to configure
but the ones that we're concerned with are the uart which i'll explain a little
bit more in depth and we also need to know that the enable
pin is located here here here
here and here that's a very important pin
in order to align your stepper drivers correctly
but I'll point that out in a moment so for now what I'm going to show you
how to do is actually connect the UART jumper because we need to place
a jumper to enable it so I'm going to place it right here
and then I'm going to push it down and that's how you
connect the jumper for your x stepper and then for your y
stepper you're going to do the same and then you're going to push it down
okay this is the underside of the TMC2208
and as you can see there is a red row of pins
on the top part of the screen that's going to match up to the green side
on your mks SGen L stepper port and the black side
obviously will line up with the black side
but at the very top where it says j2 there is a tiny resistor pad
and there's a resistor located right here at the end of the hook on this
that you can see right here if that's missing
you may have issues with stepping
and this only applies to the BigTreeTech
that makes the TMC2208 a lot of people have seen it so I just
wanted to make you aware of it here is the top side of the BigTree Tech TMC2208
and it's the version 3.0 now I need to point out a couple of
things we have a trim pot over here that we're probably
never going to use but I wanted to make sure you're aware of it
we have our enable pin that's located down here
and then we have our ground pin
and our direction pin right here these are important for lining up
how you're going to insert your stepper we also have a what looks like a gold or
copper plane here and that's going to be used for wicking
away heat to our heat bins that will place on top when
printing now I also need to point out that these
steppers can run hot you're gonna have to run a fan
keep them cool and I'll show you in later tutorials how to hook that up
but for this tutorial I'm going to leave it out
so I wanted to show you the manual for the MKS
Sgen L version 1.0 and I wanted to show you the UART setup
now UART stands for universal asynchronous
receiver transmitter that's another way of saying that it's
asynchronous communication via serial so that's how it communicates
with the stepper so i'm going to go back over
here and we're going to look up how to
connect the viewer so as you can see those pins that I
spoke about for you are are located down here those are where we're going to
place our jumpers and then I'll explain how to actually
set up the stepper driver and verify that it's good
so to install the stepper we need to locate the enable pin
but in this case because it has a red row we already know how it's going to be
oriented because the black row will match
to the black row on the actual stepper we're going to place it here knowing
that the enable pin is located right here
and then apply a little bit of pressure to put that in place
now we're going to do the same for the other stepper
and we're going to place this down as well
now I would normally place
cooling fins on top but because this is just an example and I'm not going to be
running these heavily I'm not going to do that for this
example but I need to remind you and I might remind you several times
that in order to use these steppers you may need to have a cooling fan on it
that they don't overheat and also no one is paying me or sponsoring me to
do this tutorial but I will be placing amazon affiliate
links in the description for your convenience so to set this up
to load what we need to do is attach the
big side of the USB serial cable to the board right here
and then we need to attach the small side to the computer
and you may hear a beep so now that the
MKS Sgen L is connected we get a removable drive that becomes
visible this is because we have an sd card
inserted in our drive and as you can see it says
FIRMWARE.CUR in capital letters
that means that that was a recently loaded firmware so it's been capitalized
I'll show you what happens in just a moment with what it looks like
before we load i'm going to go over to VScode
and I've already downloaded an extracted the marlin 2.0 firmware
so I'm going to go to my file explorer over here
I'm going to click on open folder and I'm going to go to the Marlin unzip
folder and there's one below it that we need to go to
then i'm going to say select folder
inside here it's going to load all the parts that we need to actually build
and it will download the other parts that we need depending upon what we
enabled so we're going to go over to the marlin
folder then the source folder and the core folder and then
we're going to click on boards.h and we're going to search
on MKS underscore Sgen and we have our board right here so I'm going to highlight that
I'm going to copy it
then what I'm going to do is I'm going to
minimize the core folder the source folder and go to configuration.h
I'm going to do a search on motherboard and i'm going to highlight the RAMPS
board that's right here at the moment and paste ours
over it then I'm gonna scroll up and I'm gonna
change the serial port to negative one and then I'm going to go
down to the actual steppers to see what's going on
so I have to do a search on A4988 that'll bring us to the
neighborhood of where we need to be and we're going to be working with the
TMC2208 so we need to enable this by
removing the comments that are in front of the
line for the x and the y stepper and for good
practice we'll do the zed zipper and we'll also do E0
and E1 and that's only part of what we have to do to
configure it the next thing we have to do is
copy the TMC2208 paste it in for the steppers that we are
using being these two for x and y
now if we scroll down here there's a little bit
more to configuring now in this case it's set for the A4988
is the default stepping but in previous tutorials which I
highly suggest you watch for steppers being the A4988
and the DRV8825 you'll understand why I changed these numbers but for now
I'm going to change them to 400 just because and
that is for 1/32nd of a step on the
DRV8825 but because we're doing more than that in the future if you want to
do this on the tmc88 excuse me on the TMC2208
what you're going to need to do is if you want 1/64th of a step
you would have to change the 400 to an 800
but this is based on the example in my previous tutorial on steppers
but for now we're going to leave it at 1/32nd of a step
and then we're going to go over the configuration underscore
advanced dot h and in here we're going to search on
let's see 800 and this may be a couple of searches
this brings us to our steppers for trinamic
now what we need to do in order to configure these are
normally the current is 800 so we're going to leave that alone
but because we're doing 1/32nd of a step we need to change the 16
to a 32. if you were to use a greater degree of step being 1/64
then it would be 64. but considering we're only doing
1/32nd of a step I'm going to do 32 for both the
x and the y current now I'm also going to turn on
debug here so we're gonna do a search on tmc
debug so i may have to scroll down for a second to find it
what this is is it allows us to have debugging
that we can use to actually do analysis if
something happens now there are other functionality that I'm not talking about
in this and there's like stealth chop this is
already defined if you want to disable it you put
comments in front of it and it would turn into red cycle mode
and then there is a hybrid mode of that which I'm not going to go into as well
but you would need to remove the comment down here
to enable it and I'll let you experiment with that
on your own but for now what we're going to do is go back to trying to find
our debug so I'm going to do a search on
debug and I found tmc debugging so i'm going to remove the
comment for that next there's another debug that I need
to find in here and let's see if I can find that it
might be nearby it usually causes me a few moments to
search for it but I think it's down here
and what this is doing is allowing us to use the command for debugging
so unfortunately I'm not finding it right away
so let's uh see if we can uh get away with just using this
it's tmc debug that you're interested now there's another one that i may need
to find unfortunately going around in circles
here so I don't want to spend too much time here it is it's
monitor driver status so we're going to remove the comment to
enable that these two things are required
just to show you what's going on you'll understand
later on why these are important but you normally
don't need to enable this
and this when everything is running fine this is a way to actually see if there's
any so next we need to go over to platformio.ini
and we need to find out the
correct default environment that we're using
because this is set up for the MEGA2560 which is the RAMPS combination
and what it actually is for the chipset is
LPC1768 so I know that off the top of my head
because I've worked with this board before so what we're going to do is
we're going to do a build it's also known as compile but what
we're going to do in this case is we're going to use
upload because we're directly connected to it give the serial port
so I'm going to click on this in a few moments we'll take another look and see
what has occurred okay now that you can see the compile has
completed successfully or succeeded and double check the actual
chipset and that looks like it succeeded as well so let's go back over to the
drive for the sd card that were connected to
a USB serial and as you can see it says firmware.bin
that means that it's copied over so what we're going to do now is we're
actually going to disconnect the USB so that when we power it back up it
automatically loads it
so I had to reinserted the USB I'm gonna take a second to load the
firmware and then we should get a pop-up for
a browser window but we may not so let's see if we can find it here
so over here looks like it just loaded notice that time has
changed so off camera I connected the power
for 12 volts I also uh have everything unplugged at the moment
so I can show you this i also connected a NEMA 17 stepper
for both the x and the y and let's see everything is disconnected
for the USB serial so I'm going to reconnect the USB
serial here and then what I'm going to do is I'm
going to connect the actual power and this will energize the system
now keep in mind that once everything is energized you
don't want to touch the board because you don't want to damage your equipment
or yourself would be worse okay now we're going to
test this in Pronterface I'm going to open it up I'm going to
connect to the board as you can see right now it says printer
is online so
we're gonna check to make sure the steppers are okay by doing
M122 pressing enter as you can see it says
that both the x and the y are okay now all of this has to do with turned on
tmc debug and the monitor
we can comment this out in Marlin later on to turn it off
but this was just so we could see that it's okay
let's try moving 10 steps with the x stepper
so it appears to move fine so let's try the y
stepper and that appears to be fine now this might not move in the direction
that you choose inside Marlin there is a way to invert
the direction I didn't show you that for brevity
obviously but I want to take a moment to thank you
for taking the time to watch my tutorial and please like and subscribe