Today we're going to talk about switch endstops on the BigTreeTech Octopus
version 1.1 now there's two different types of endstops that I want to talk about the first one is a
switch endstop with electronics on it so these electronics are either resistors or capacitors
and they're designed to smooth out the signal that you would get down your signal cable which
is the green cable here we also have a black cable right here which is ground
and then a red cable which is voltage so it goes signal ground voltage on this one we have just
a simple endstop so if it were to engage it would allow current to pass all the way through
so the wires are actually obviously black and red but in this case the black one and the red
one don't matter but the red one is going to be treated as signal it's not going to be on voltage
so I'll show you how to hook up both of these in our endstops but unfortunately we're gonna
have to look at the diagram because they're not labeled like they normally would be over here
and there's eight of them total that correspond to the actual steppers up here for judging the end
of filament or obviously the end of an access so let's go over to the computer for a second and on
the computer we have to pull up the repository for this so we're going to search on Octopus
and we're going to pick the Octopus down here then we're going to go to hardware and then pins
so as you can see these are the pins that we're looking for but let's zoom in
see if we can get a better image of this so as you can see down here we have diag 0 1 2 3 4 5 6
and 7 because you always start at zero so there's eight of them notice that it starts out voltage
ground and then the signal pin so these pins are going to be unique so voltage ground signal so on
the second servo or excuse me on the second endstop we're going to do ground and signal
on the other one we'll use all three but we have to verify that they're x and y
so I'll show you how to do that real quick so if we go over to bs code and we open up the
current version of Marlin which is going to be in my downloads folder and extracted we have
to go to the first Marlin folder then the second Marlin folder and select the folder
first thing we need to do is set up this so it actually builds with the correct configuration
so I'm going to go to the marlin folder then the source folder then the core folder then boards.h
I'm going to search on Octopus and that'll bring us to our board which is the 1.1 version
so we'll copy that and we'll also note the actual chipset which is STM32F4
that's going to be important when we set up the actual configuration for the platformio.ini
but for now we're going to go over to the marlin config dot h and search on motherboard and we're
going to paste our board right there then we're gonna change the serial port to negative one
hang on a second here apparently my backspace is not working so we'll do this a different way
interesting anywho let's try
doing this a different way apparently my computer is not
being helpful so let's try it this way there we go so apparently backspace all of a sudden
decided not to work but those are the two configurations for that let me show you
real quick how to set up the ini so we're going to find our board which is STM32F4
and we're going to search on Octopus
if I can spell it correctly
there we go and I'm going to copy
the configuration for the environment then I'm going to go over to platformio.ini
I'm going to highlight the MEGA2560 and paste over that then we'll go back over to configuration.h
and there's some special things that we need to check for endstop so we're going to search on
endstops or endstop and we have endstop settings so you can see that we're going to be using
x minimum y minimum and z minimum now we could use a pull-up resistor
in this case but we don't really need it you can see that it prevents a floating point state
usually they work pretty well so you don't have to worry about that but we will have to address
inverting because with the switch endstop it may give us the wrong answer being triggered and then
we trigger it with our finger it may go to open so I'm going to change the false to a true for the
x and stop for the x minimum and leave the other one alone because there's no circuitry on that
but let's confirm what's going on with the actual end stops to make sure we're connected or going
to be connected to the correct ones so what we're going to do is we're going to go over to
the Marlin folder then the source folder then we're going to go to the pins folder then we're
going to find our chipset which is STM32F and we're gonna find our board which is right here
whoop pardon me right here and it says go to the common folder which was the one I was just on
so as you can see down here they actually label
the diag pins that match our configuration so PG6 is the x endstop and PG9 is the y so if we go back
over to the browser you can see that it's PG6 and PG9 so it's x and y so what we're going to do is
we're going to go back over the board in a second but I'm going to kick off the actual compile
so let's verify that we have everything set real quick because the main thing is the environment
so over here we have that set so we're going to clean out the previous build and then we'll click
on the check box to build and just so you know if there's an issue with the build hit the check box
a second time if on the ending of the second time it fails like the first correct the very
first error that you encounter in this little uh scrolling right here it'll probably be in red so
let's go over the board for a moment because I'm pretty sure it's going to be successful this time
so on the board we're going to pick up our connection here and you remember how it's
voltage ground and then signal so we're going to connect this
with the red wire being on top then ground then signal so we'll connect it like so
then for this one we're only going to do ground and signal so we're going to connect it
there and the top pin should be empty because we're not using voltage in that case
so let's go back over to the computer after we pop this out and we put it in a USB
to actually load it so the SD card goes in here and this goes into the computer
now we'll go back over to the actual computer and we'll go to the dot pio folder we'll go to the
BigTreeTech Octopus folder and then down here it says firmware.bin so we'll right click on that
and we'll reveal in file explorer now here's our drive currently and it has a firmware.cur
and attempt.cur this is from a previous build so i'm just going to delete that for now and
I'm going to go back over here and right click and send this to the actual drive so that's now on the
drive if this is a successful load it will convert this to firmware dot cur in capital letters
if it's unsuccessful it'll still say firmware.bin so you'll know you did something incorrect
so let's go back over the workbench for a second I'm going to pop out the drive I'm then going to
place it inside of here and then I'm going to attach this and see what goes on with power
so at the moment the firmware is loading which means that I have USB control set with the jumper
normally you would take that off when you're using PSU power but we're only using 5 volts
to test this so what we're going to do next is we're actually going to go over to what's known as
Pronterface so that we can actually test this so in Pronterface as you can see right here we have
the option to connect and it says COM port 1. I know it's not COM port 1 so I'm going to show you
how to check it so inside of here what we'll do is we'll type device manager you may not see it
initially because sometimes it goes to the other screen so I'll bring it over and I'll click on
ports and you can see there's a COM port nine that's probably going to be our device because com
part one is a default for the computer so what I'm going to do is I'm going to backspace over the one
change it to a 9 and connect and so now it says connecting printer is now online to check
the actual endstop though you're going to type M119 and press enter and as you can see we have
two open and then one triggered this is the one that's not connected so what we'll do is we'll
test this now so we're going to go over to the actual y-axis click it with our finger and do
the same command of M119 and press enter and you can see it's triggered now I'll let my finger go
and press enter again and it says open so let's try the other one so now let's do that and you see
that it's triggered so let's let it go and press it again and it's now
open so I need to thank all of my Patrons and also the people on PayPal for helping make this
possible if it weren't for you guys I wouldn't be able to afford to do this with my time so everyone
if you liked the tutorial please press the like button and subscribe and thank you for your time
you