Today I'm going to talk about the TMC2209 UART with sensorless homing on the BigTreeTech
Octopus version 1.1 now there's a couple of things I need to review real quick
first of all we have our X stepper our Y stepper our Z stepper our E0 stepper E1 stepper E2 stepper
E3 stepper and E4 stepper now these can vary depending upon the configuration
inside Marlin we also have our Diag pins over here so we're going to need to use one of
those but first we're going to have to figure out where things are for the enable pin now
obviously there's an enable pin right here in the upper left hand corner for each one of these and
what I'll do is I'll show you where the enable pin is on the TMC2208 or excuse me TMC2209
so as you can see in the bottom left-hand corner over here they mark the enable pin
that's going to be very important so that we can connect it to the right enable pin position
but on this stepper there's obviously other pins that we need to use so we're going to
go over to the desktop for a second and look at the manual so inside the manual as you can see
they show what we have for our UART pin that we need to jump all the other pins are empty
further down here they talk about where the UART diag pins are located for stall guard jumping this
will be integral for the need to use endstops that are sensorless so if we go back over to the
workbench we can actually see what we're working with here so if I pick this up you can see that
there's pins underneath so it's easy to align and they're done by color but first we got to
pop out some pins here for jumpers so I'm going to pop up these jumpers so that we can actually use
UART mode because right now it was configured for spy mode so now that we have our one jumper
here we're all set but for when we're using TMC steppers we need to remove the UART or excuse me
the jumper for the USB power so now that we have that removed we're good there now this
will only work on direct power when we connect this so i'm going to slide this in right here
and notice how I put a set of cooling fins on top now you also want to run a fan to keep these
cool so they run nice so I'll go into that in future tutorials but first we need to place a
jumper for our stall guard which is going to be over here for the x stepper now they're in the
same configuration as the stepper so it's the x-stepper the y-stepper the z-stepper and then
all the extruders or other types of steppers that you would use for different configurations
so now that we have that set up I already took out the SD card so we can program it inside
here I'm going to place that in there again and place it in the computer so you may hear a beep
and we're going to go over to VScode in a moment and see how to configure it
so inside vs code I've already downloaded the most current version of Marlin which is
2.0.9.1 so I'm going to open that up I'm going to go to my downloads folder my Marlin folder
my second Marlin folder and select the folder now it's going to take a moment to come up
they've changed it so that now you see platformio.ini initially and the default environment we
need to know what to set because this is set for the MEGA2560 which is a ramps configuration so
all these little I and ini(s) that you see here correspond to this folder where you have to
find your processor for your default environment so what I'm going to do right now is I'm actually
going to go over to Marlin then source then core inside core I'm going to go to boards.h and I'm
going to search on Octopus and as you can see they have the 1.1 version right here so I'm going to
copy that then I'm going to close out of here minimize core and source go to configuration.h
and I'm going to search on motherboard and as you can see there's the RAMPS right here
so we're going to highlight that and we're going to paste our version over it now we're gonna set
the serial port which has to be negative one so we can communicate with it later and the speed we're
gonna leave alone now there are other serial ports that I'll talk about in future tutorials
having to do with the TFT display but for now I'm going to skip that and I'll cover it later
so now that we have that set up we're going to search for our stepper driver and I'm going to
search on the A4988 that'll bring us to our steppers now they already have it enabled so
if you need to use other ones you have to remove the comments so now that we know what our stepper
is which is the TMC2209 we're gonna copy that and we're gonna paste it right here
then I'm gonna scroll down and I'm gonna check for our current steps now these are access steps
per unit which means that this is a default configuration that Marlin came up with for the
defaults it may vary in your case but for now I'll show you how to deal with it so if you go over to
configuration advanced and you search on 800 this will bring us to the area where we need to work
so down here we have our actual stepper if you need to increase your steps because there's micro
steps right here we can go to configuration.h and right now it's on a default so if we change it to
160 and we go over here that means we got to change the 16 to a 32 if we change it to 320
that means we need to change this to 64. and that's so on and so forth all the way up to
256 of a step now in order to set this up we also need to check
certain things so I'm going to use TMC underscore debug to make sure that we configured it correctly
so I'm going to remove the comment here and then I'm going to find the second one which is down
here and I'm going to remove the comment so we can use the g code M122 to check our configuration
now I'm going to go back up for a second and I'm going to search on sensorless
and in order to configure this we need to remove the comment for sensorless homing
so they've changed this round a little bit so it's going to take me a second to see what's going on
but sensorless homing should be someplace around here so let's see if I can find
the actual setting for this because it's slightly different than normal
so here it is so I'm going to remove the comment
and that'll allow us to sense the homing with our stepper driver so one of the things you need to
consider with this is the actual stallguard now let's set default for SPI configuration so if you
go up here you can see what the highest and lowest settings are the optimal one that I found is 125
for that setting so now that we have that all set up what we can do is do other settings but for
this I'm not going to cover them because you can figure those out on your own but keep in mind that
there may be some power requirements where you have to search on the actual voltage of your power
supply also there's another thing down here for invert which allows you to invert the direction of
your stepper I'm not going to talk too much about that because at the moment we don't need to worry
about that we're going to assume it's okay but you may want to change it by changing the false to a
true or the true to a false depending upon your configuration so let's go back to platformio.ini
and when we grab the actual source configuration under core and boards.h over here they say STM32F
and they're giving the processor so to actually configure this we minimize this we go over to the
INI folder and we find the file that says STM32F4 inside here we're going to search on Octopus
and the very first one that we come across is the one we're going to use so I'm going to copy this
and that's our default environment so in order to use this we have to go back over to platform
io.ini and paste it over the MEGA2560. now to set up the actual compile I have to show you this
real quick when it's first worked on by Marlin they build it with the default configuration
so we're going to clean that out with the clean button over here
next what we're going to do is we're actually going to click the build button which is the
check box now if you don't know how to install this or haven't used it before in one of my
first tutorials on this particular board I talk about a link to an install where you can set up
your vs code now if you have any issues with your actual build where it fails the first time click
the check box again and see if it builds okay because sometimes it fails on the first time
also if it fails a third time then go to the very first error that you encounter and correct that
now also I have to tell you that if you use example files you may have lots of issues and
it's best to use the default configuration for Marlin and build it up step by step
I'll be going over those steps in future tutorials on how to deal with it so now that it's built
what I'm going to do is I'm going to click on the dot pio folder the build folder
the BigTree Octopus version 1 folder then I'm going to find firmware.bin
I'm going to right click on it and I'm going to say reveal in file explorer now we have our other
build over here for firmware.cur which was the previous build which I've talked about before this
is not a cursor file this is a CUR file meaning they named it cur as in current if you need to
use that in the future such as on other boards where you want to load the same configuration
you can always send over or rename it to firmware.bin but I'm going to send to the drive
for the moment so you can see this and so it's now here if it loads correctly it will rename to this
so I'm going to now go back over to the workbench and we're going to set up the remainder of the
configuration and also install the firmware so I'm going to take out the drive I'm going to place it
in the SD card reader and I'm going to setup the power supply now there's two pieces you have to
set up there's the stepper motors and then there's the board logic so I've marked this one with red
in order to show you voltage but if you're unsure you can always check the data sheet or the pin out
diagram as well as you can check the underside of the board so I'm going to hook up the very
first one over here I'm just going to slide in the ground then I'm going to tighten it down
then I'm going to do the same for the voltage in mind you I'm using 12 volts power for this
if you do vary it you will have to possibly configure things in Marlin to reflect that and
that'll be on the advanced configuration and the easiest way to search for that is 12 volts or 12v
so now that I've got these almost all connected I just have to tighten down the last one here I'm
then going to snap this down for safety and then I'm going to take out the actual Dupont connector
and place it in here now if you have trouble with directions meaning the movement of this
you can always rotate this 180 degrees and place it back in and that will also flip the direction
so now that we have all that configured I'm going to connect the USB which will not power the board
right now because we've removed the jumper for the USB power and I'm going to plug in the actual
power supply so once you plug this in you don't want to touch the board the firmware will start
to load as soon as you plug it in and you'll see a blinking light now that that's complete
we'll go over to our computer for a moment inside Pronterface and see if we can configure it so
here's Pronterface as you can see it says COM port 1 by default what you can do to deal with that is
actually go over to device manager so you're going to type in device manager and then enter
and what will happen is Device Manager will open up for you and you can see right here that it
says COM port 9 is the com port we're using so I'm going to change this to 9 hopefully it's in
here which it is but you can always click on it and add the nine so I'm going to try to connect
it says now that connecting and printer is now online so I'm going to type
two M122 for our gcode diagnostic and as you can see it says the testing of it was
okay so what we're gonna do next is we're gonna try and move the stepper so I'll show you what
that looks like now so I'm going to move it 10 and it's moving perfectly fine now I'll do 10
the other way now I'm going to try and home it this is sensorless homing so it should sense it
so it sensed it quite well so if you like my tutorial
please press the like button and subscribe and thank you for your time