MARLIN - Essential Guide To Start Editing Your Own FIRMWARE

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi guys so you want to start editing your marlin firmware but don't know how you want to learn more about marlin in this video we will cover the code in the config files and everything you need to compile your firmware you want to know more then stay tuned hi guys welcome back my name is rui and this is the rewraptery youtube channel if you want to help us out you can by giving this video a like and subscribe the channel you can also help by joining our patreon page or by clicking on any of the affiliate links posted below in the video description so as you know there are several different firmware types but marlin is probably the one that is used on most of the 3d printers on the market at some point maybe to add some feature or to add some hardware upgrade you will need to edit your printer's firmware one example is adding a leveling sensor this is one kind of upgrade that will make you change your printers firmware the firmware can be obtained from two ways one way is to get the firmware exactly like you need it to be and already compiled or the other way is to get the raw firmware add it as you want it and compile it yourself some guys and especially the new guys have some concerns when it comes to firmware updates well in this video we will try to just cover the basics of the model and structure and give you some pointers to help you edit your own firmware but before we start we will need to download a few things first is visual studio code and then platform io we will need these to edit and compile the firmware next we need marlin firmware for that we need to go to marlin's website and download the latest version here they also provide example config files for several printers so we download these as well the next step is to extract the contents of both zip files and once done we can delete the zip files inside the configuration files folder we can look for the ones we need first select the printer and then the printer model in some cases there are even configuration files for different boards for the same printer let's imagine we just installed an skr mini 3v 2.0 on r and or 3 so these are the config files we need select all of them and then go back and copy them into the marlin folder you will be asked to skip or replace because there are already other config files there so choose replace they will compile and work as is and will be very close to the stock ones in some cases there might be already some improvements implemented we always recommend using the exampleconfig files and modify them as we want instead of starting from scratch ok now open visual studio code and load the firmware file by selecting the folder where you have the firmware once loaded you will see many files and folders here at the left the main ones and that we will cover today are the platform platformio.ini configuration.h and configurationadv.h marlin is very user friendly so you don't need to master coding to edit the firmware and everything is well explained throughout the code most of the changes you will be making is simply by enabling or disabling a defined line so for enabling a line you remove the two slashes from the beginning and to disable just add the two slashes you can see that visual studio editor changes the colors according to them being enabled or disabled everything that is inside these ifs and ifs will only work if the specified defined line is enabled other changes you can do is modify certain values or change the logic with true or false every line is explained so it will help a lot to start okay let's start with configuration.h as you can see there is already lots of useful information right here with these lines and with a compatible display you can add or remove some of the graphics that come up on the display during the boot sequence they are the boot screen and the custom boot screen since the ender 3 stock display is compatible the boot screen file is included the image is made from all these zeros and ones if you look closely here to the top right corner you can have an idea of what it is you can also make your custom boot screen we actually have a video explaining how to make your own so don't forget to check the link in the video description as for the custom status screen image are the small images that appear on the display the serial port value is related with the board and which port it will use to communicate with external devices such as computers raspberry pi's etc normally you don't need to mess with this so leave as is the battery value is the communication speed that will be used for example if you connect your computer to the board with pronterface you need to select this value to establish connection then we have the board definition this mismatch the board you have custom machine name is what will be displayed on the main screen and you can change this to whatever you want depending on your printer there will be lots and lots of lines that will be disabled because those specific features are not compatible this next section covers the hotend thermistor for the guys that like to upgrade hotends there's a list of thermistors that can be used the stock one is defined here but if you decide to use a different one you need to check the list and change the number accordingly there are lines that you need to be careful when editing because they will affect the printer safety these lines for example will tell the machine that if the temperature reading is below this value something is wrong and it will not let the nozzle heat up and therefore will not start to print the following ones set the max temperature the printer will be allowed to work here you have up to seven heaters but if your printer only has one heater you only need to change the first one there's also a value for the heat bed down here next we have the pid values for the hotend and bad you can enter your values if you already calibrated or calibrate it again with this version and edit them for future use we have seen in some forums some guys wondering why the extruder cannot turn unless the hotend has reached a specific temperature well that's a safety feature to prevent the extruder pushing the filament with a cold nozzle that temperature value can be defined here the max allowed extruding length is also defined here next are the thermal protection lines as you can see we have all of them enabled from stock and we recommend to keep them enabled there's also a small section for the kinematics if your printer is one of these you need to enable the correct one from the list next are the end stops definitions most printers on the market only use one end stop for each axis so only the minimum ones are defined and since most end stops are simply switches pull-ups or pull-downs are defined to prevent a floating state causing a false result as we mentioned in beginning the example configs will work as is so most of these lines you don't need to mess with them next are the lines to change the logic of the end stops if you replace your end stop and the printer sees it as always being triggered you can try to invert the logic here in this case you simply change from false to true or vice versa next are the stepper drivers definitions again you don't need to modify this unless you have a board with replaceable drivers and you decide to upgrade them in that case you can choose the driver definition from the list next we enter the movement settings and here you can edit the steps per millimeter which include the extruder steps the first one is always the x-axis then the y-axis then the z and finally the extruder you also have the feed rate max values max acceleration and so on depending on the printer and display you have these values might be available on the screen and you can change them there next are jerk and s-curve acceleration since this video will only cover the basics we will not go into much detail here but we just want to leave a note that you can enable the old jerk method here by enabling the classic jerk you will be disabling the new junction deviation feature for the s-curve acceleration you can enable or disable it here if you want to learn more about these features marlin included some links here that explains them now we enter the probe section from here if you want to install a leveling sensor you need to define a few lines one of the most important is this first one this will tell the printer to use the trigger signal of the sensor connected to the z-end stop connector or to a different pin if you want to connect the trigger pin of the sensor to the z-end stop switch connector you need to enable this line you also need to enable this line so that the printer uses the probe to home the z the next line is for the guys that don't have a leveling sensor but want to enable the manual probing the printer will move to several points on the bed and you manually move the z up and down to create the leveling mesh if your leveling sensor is fixed and does not have any moving parts you need to enable this one for a bl touch with a moving pen for example this line needs to be disabled some printers use the nozzle to detect the bed so if this is your case you need to enable this line back in the past many guys used an end stop switch secured to a rotating arm as a leveling probe for those these lines would need to be defined and then we have the bl touch sensor line enabling this line will tell the printer that you have a sensor with an extending pin for every probing sensor you need to define the distance between the sensor and the nozzle that distance is the probe offset there's also possibility to define a margin between the edge of the bed and the probing points the next line will define the several moving speeds while probing if you want to install a bl touch in your printer we have a couple of videos where we explain which lines you need to enable to get it to work don't forget to check the video description for the links one other line that might be interesting to use is this one this will enable the m48 repeatability test and will give you the results of your probe accuracy the next lines that are interesting to know are these ones these will define the stepper motor direction if one of your stepper motors is turning the wrong way just change the logic here from false to true or vice versa one example is if you upgrade the extruder and the new one turns the wrong way just go here and change the logic next are some basic definitions such as the direction to where the homing of each axis will move and the print bed size for the height you will find it down here next is the filament runout sensor settings if you have one this line must be enabled next we go back to the bed leveling a few minutes ago we talked about which lines you have for the leveling sensor and here you have the lines for the bed leveling for most of the times auto bed leveling bilinear is the way to go for the cases where you don't have a leveling sensor but want to enable the manual mesh you need to enable this one we have a video that shows the manual mesh leveling and how it works so check the link below as described by marlin the g28 command which is the home command leaves leveling disabled on completion we always enable one of these lines to restore the leveling state or to always enable leveling immediately after the g28 command you also have some interesting menus to add if you have a compatible display one is the define lcd bed leveling which will add a leveling submenu for auto or manual bed leveling next you have the level bed corners this one will move the nozzle to the corners to help with the manual bed leveling one important line you need to enable when having a bad leveling sensor is the defined z safe homing this line will make the leveling sensor to be at the center of the bed when homing if you don't define this the homing will be done at the corner and the probe might not sense the bed if you scroll down a little bit you will find the preheat settings we often change these on our printers the nozzle part feature defines the coordinates to where the printhead moves when a pause command is issued next we have a few extra features that might not work because it depends on the display you have on your printer such as the print counter password setting and language selection if you prefer to have your printer menus in a different language just look for the code of your country and change here you can also change the screen style from classic to prusa type the following lines will define which display you have there are so many options on the market so you have a bunch of options here last but not least are the rgb options if you plan on adding rgb lights on your printer you can set them up here and this covers the configuration h file for the configuration adv.h file there are lots and lots of lines that you will never need to change with the exception of the following ones power loss recovery this feature will write on the sd card the z height while printing and in case of power failure it will resume the print from that height baby stepping this is a very useful feature that will help to make very small adjustments when printing the first layer linear advance if you want to enable or disable the linear advanced feature you do it here for g2 and g3 arc support feature you enable it here if you want to enable the m600 command that is often used for filament change and dual color printing you can enable it here for this to work you will need the park feature enabled that we have shown in the configuration.h file if you have compatible drivers for sensorless homing and want to enable this feature you can enable it here and configure its sensibility here to add custom submenus and commands you can enable and set them up here and last but not least if you want to add games you can enable them here believe it or not you can play games on your printer just enable the ones you want or all of them and have fun we have a video just about this if you want to check it out okay now that we have all the settings the way we want we can try to compile the firmware but before we can do it we need to confirm if we have the correct environment in the platform io.ini file to do that you first check which board you have in the configuration configuration.h file next go to the folder src then pins then open pins.h file make a search for the board you have and at the right you will get the correct environment copy the environment and insert it in the platform io.ini file in the environment line ok we are ready to proceed to do that just click on the small check down here it might take some time to complete and if everything works okay you will see the green success words the compiled firmware can be found here just place the mouse pointer over the dot pio here at the left right click then select reveal in file explorer then open the build folder and so on until you find the firmware file if you have a 32-bit board the file extension is probably a bin file if you have an 8-bit board then the file extension is probably an h-e-x file you can always check the log and see this information if you don't want to mess with pins boards and environments there's another way to do this and it's by using the auto build marlin add-on to install it click on extensions and at the top right modeling the add-on should appear on the list then click on install the installation should start right away when done you should see a new icon at the left of visual studio code click on it and then at the top there is a hammer like button so click on that too and now you have some of the main settings and the environment included here we have the one we selected before and down here are the options the one we selected is one from the list so it's okay we can proceed and start to compile the firmware using the environment we have typed in when done you should see the compilation results at the bottom if the compiling process failed for some reason expand the log window and try to find the errors some will explain what to do when editing a firmware we always recommend to change the minimum amount of lines each time so it will be easier to troubleshoot what went wrong and that's it you guys we hope you liked the video and if yes please give it a like don't forget to subscribe and activate the little bell to be notified every time we publish a new video we will see you guys next time bye
Info
Channel: ruiraptor
Views: 95,352
Rating: undefined out of 5
Keywords: how to edit marlin firmware, marlin firmware, como editar o firmware duma impressora 3d, firmware update, 3d printing, 3d print, impressao 3d, impressora 3d, editar firmware
Id: ire4ZcAUsjA
Channel Id: undefined
Length: 23min 7sec (1387 seconds)
Published: Thu Sep 30 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.