today we're gonna talk about how to deal with pins and figure out how they work
so we're gonna learn how to do pin debugging so I'm gonna concentrate today
on auxilary three pins over here and I'm gonna review for you real quick what
these pins are according to the pin out diagram that we have access to by
googling it online the first pin here is digital pin 49 the next is digital pin
51 the next step to that is digital pin 53 and then this one says NC which
probably means no change this one is 5 volts this one is digital pin 50 and
this is digital pin 52 and then the very last one is ground so in order to check
the pins to make sure that they're working what we're gonna do is we're
gonna attach to digital pin 49 a little lead with a jumper so it's female on one
end and male on the other and then we're gonna use a multimeter over here to see
what the voltage is so in a moment I'm gonna connect the USB serial cable to
the MKS gen L and you're gonna hear a beep to the connection cuz the other
ends in the computer so the beep just happened and in a second I'll show you
how to modify the Marlin firmware so we can troubleshoot the pin ok what we're
gonna do first is we're gonna open up the Marlin-bugfix-1.1.9_bugFix
we're gonna go to be Marlin subfolder we're gonna hit B on
the keyboard to get us to boards.h and we're gonna open this up in board
stage we're going to search on MKS for our board type and as you can see
down here we have a bunch of MKS boards to choose from the one that we're gonna
be working with is BOARD_MKS_GEN_L so we're
gonna make a copy of that we're gonna close out of here we're then gonna press
M on the keyboard and open up the Marlin.Ino folder first give me file ok now
that we're inside the Arduino IDE from marlin dot io no we're gonna go to the
configuration h tab and we're gonna do a search on motherboard and we're gonna
replace BOARD_RAMPS_14_EFB with
what we copied from the board's dot H file and paste it here and so now it's
BOARD_MKS_GEN_L next thing we want to do
is want to go to the configuration_adv.h which stands for
configuration advanced.h and we're gonna do a search on
pins_debug and we're in hit enter and as you can see we have define pins_debugging
and it's commented out so we need to remove the comments and the next
thing we do is we want to load the board so what we need to do is make sure we
have the right chipset which is the MEGA 2560 chipset for the board and that we
have a port selected which is COM port 11 so what we're gonna do is we're
gonna hit the compile and upload button with the upload button and in a moment
I'll show you in Pronterface and with a multimeter how to test the pin
okay we're gonna open up the Pronterface.exe we're gonna connect to the MKS Gen L
board and as you can see we have a good connection now the next thing we need to
do is we need to check the pin that we currently have in its state that's
unchanged so I'm gonna use a multimeter so in a moment I'll take the multimeter
and check okay the first thing we want to do is turn on the multimeter so we
need to turn it to direct current and the pin that we have picked is digital
pin 49 over here so we're gonna take the jumper and we're gonna measure with our
red lead over here and the other lead is gonna come around and touch the top of
the USB port and as you can see the direct current says 0.882 and what that
means is it's basically zero so the next thing we're gonna do is go back to
Pronterface and we're gonna give the pin five volts of charge so here we go
okay in pronterface we're gonna type m42 space P and the pin is 49 so P is for
pin in this case space s and this is gonna be amount of charge that we're
gonna give it so we're gonna say 2 5 5 which equates to 5 volts of power and
we're gonna press ENTER now we're gonna go back over to the multimeter and
measure it
okay so we're gonna place the red bleed on the extension for pin 49 and we're
gonna put the black lead being the ground on the outside of the USB port
and as you can see it's four point seven six volts which is essentially five
volts so that's how you check that now let's make sure that we can bring it
back to a zero State or near zero state so in Pronterface we're gonna go back
and we're gonna take the m42 space P forty-nine for the pin and s 255 and
we're gonna change the 255 to zero and press Enter
now we're gonna go back to the multimeter and check it so we're gonna
put the voltage lead on the extension for digital pin 49 and the ground lead
on the outside of the USB and as you can see it says zero so if you liked my
video please press the like button and subscribe and thank you for your time