today we're gonna talk about the switch endstop or the BigTreeTech SKR
version 1.4 now I need to explain some things first of all we have endstops for
our X minimum our Y minimum and our Z minimum now these on stops now are used
for something else being power detection devices and other things so we're just
gonna be talking about the optical endstop for this tutorial okay this is the
underside of the optical endstop and as you can see there is a voltage signal
and ground for V, S and G those correspond to the pins over here just
keep in mind that no one's paying me to do this tutorial or sponsoring me but I
will be placing Amazon affiliate links in the description in order to help you
find it better here's the top of the optical endstop as
you can see there is a little line that runs down the center once that field is
broken it triggers the end stop to send a signal to our SKR version 1.4 so
I'm going to show you how to hook this up now
what we're going to do is we're going to release this
what we're gonna do to hook this up is we're gonna apply the notched cable
connection to the connector over here but I have to let you know I traced out
on the other end what the actual cable colors will be so we have blank which is
signal black which is ground in red which is voltage so we're gonna go back
to the other end of this we're gonna take the notched connector we're gonna
turn this around and we're gonna connect it like so
that are connected to the board we already know from the previous tutorial
that the top pin is voltage the middle pin is ground and the bottom pin is
signal so to connect this what we're going to do is we're going to use the
color cables and we're going to connect red
voltage black to ground
finally the blank colored one his signal
now to program it we need to connect the USB serial cable so I'm going to connect
the big side of the USB connector to the board over here and the small side of
the connector to the computer and you may hear a beep
okay first things first as you can see there's a firmware current file some
people also call it a cursor file because of the extension but for now
just note the date and time so I'm going to go over to VScode and currently I
have it open with the current download version of Marlin which is 2.0 X they've
now included the SKR version 1.4 in their build for the release so you can
go over to Marlin then go to source and you can check right here under pins or
the LPC1768 it now has pins underscore big tree underscore SKR underscore V1
underscore 4 dot h and inside here it has a definition of where our pins are
but we're gonna minimize this for a moment and we're gonna go over to our
core folder then our boards.h and we're gonna do a search on SKR and
we're gonna copy board underscore big tree underscore SKR underscore v1
underscore four we're then gonna close out of boards.h we're gonna minimize
core and source and then we're gonna go to configuration dot h what we're gonna
do is we're gonna do a search on motherboard
and we're gonna highlight board underscore RAMPS underscore one four
underscore EFB and we're going to paste what we just copied and then we're going
to change the serial port from zero to negative one
and then we're going to do a search on endstop
and as you can see currently we have defined only the minimum and stops for X
minimum Y minimum and Zed minimum and keep in mind in the pins file these are
defined as something else being other sensors for like power but further on
down here we have float state this has to do with the resistor on the endstop
it usually will even out you are setting so you can play with this as you would
like being uncommon it or not I choose not to use it but other people may and
then we also have another preventing endstop float state here for a pulldown
resistors so there's a pullup and a pulldown but then we have inverting and
in this case with the obstacle endstop we don't have to worry about inverting
but if you need to change the logic for let's say you're doing a detector for
filament runout with an optical end stop you may need to change this from
false to true but a little hint if you are using an optical endstop for
filament runout it may not work in certain situations where the filament is
clear this is based on personal experience but
for now we're gonna go over to platformIO.ini and we need to change our
default environment which is our chipset that we're using from the Megaatmega2560
to our chipset which is the LPC1768
and if you have any questions it's down in this file or you can verify that
it's that type of chipset by going to source hens and inside pins the LPC1768
we have our pins underscore BTT which is BigTreeTech underscore SKR
underscore v1 underscore 4 dot h and that is our chip set that we're working off of
right here so I'm going to minimize this and instead of removing the micro USB we
now are connected via USB so I'm going to do an upload with the upload button
instead of just a regular compile now the upload button has compiled features
within it and then it uploads to your device so
we're going to use that so I'm going to click that and that may take a few
moments
okay once again as you can see the compilation is finished it took about
almost three minutes now to verify that it actually finished compiling and was
successful it does say the LPC1768 compiled but to confirm it what we can
do was go over to our USB Drive as you can see it does have a firmware dot bin
now keep in mind the way that we actually need to do this now is to
remove our from the board and the way we're gonna do that is to remove the USB
so note the time for the firmware and capital letters and what we currently
have so I'm going to remove the power cord and you'll see what happens for the
USB
and as you can see it's updated to the time of the firmware dot bin what we
need to do next is we need to test the end stop so I'm gonna go from here to my
desktop where I have printrun open up Pronterface
connect to the SKR version 1.4 now I'm gonna check the current status of the
endstop which is M119 press ENTER right now it says open so what I'm going
to do next is place a piece of paper in the optical endstop now I'm going to do
M119 again and send it and as you can see it's triggered now when I remove the
paper
and do M119 again
it says open so if you liked my tutorial please press the like button and
subscribe and thank you for your time