ultimate guide to marlins config.H (marlin2.0.x

AlexPasseno Store Associate
5 Likes Micro Center Store Associate First Answer Name Dropper

compiling your own firmware sounds much scarier than it actually is and can be an easy way to give your old printer a new leash on life! in this guide i will go over the dauntingly large config.h file and explain what each section does and how to approach different settings (do note the program i will use here and the one you want to use to compile is vscode with the platformio extension which are both basically necessary for compiling marlin 2.0)

generally you dont need to change any of these but if change the author to your name for a lil vanity! (line 105 and subsequently line 118 can help with usb connection issues though port 0 and 250000 are solid starting points)

see above for line 118, line 126-135 are for boards with multiple usb ports and 138 isnt the standard but there are a few niche printers with bluetooth functionality line 142 is VERY important however as you need to declare what motherbaord you have, you can find the list of all supported boards (and the syntax for how to type it in here) under ->marlin->src->pins-> yourcpu 156 is how many extruders you have 159 is filament diameter (almost always 1.75) and 162 is for prusa mmu style printers.

these settings are more multiextruder setups, 184 of course being for a prusa mmu, 187 is for mirror mode style printing 197 is for the taz pro style dual extruders and 208/218 are for idex style (independent dual extruder) printers where each head moves independently of each other.

more multi extruder stuff but this is for tool changing printers much like the e3d tool changer

these settings are all for mixing style extruders like the e3d chimera

not a very common setting but alot of high end meanwells (and most atx style power supplies) will let you control their power state through a pin

this is the temperature section, it looks alot larger and more daunting than it actually is, you have to declare what type of thermistor (what reads the temperature of X) and declare a few safety shutoff things, the setting you want to change (save for multi extruder prints) will almost always be the first one (0), on 99% of hobbyist printers its going to use the thermistor 1, however using different thermistors can cause this to change, check with the manufacturer to find out. 438/439 are used for testing the board handy if youre building a printer from scratch and dont have a hotend installed yet 441-445 are for thermocouples (think of them like high temp high accuracy thermistors) 449-462 are for multi extruder/bed/enclosure printers (dont ask it gets wonky) 466-475 are thermal cutoffs, if it ever goes below 5c in the area you have your printer in A) im so sorry for you and B) change that to 0, usually when a thermistor breaks itll give a reading of -17 (when the thermistor breaks the hotend doesnt know to not keep pumping heat into it causing some of the classic printer fires) 480-489 are to stop you from running your printer too hot, change these if you KNOW you have the hardware to handle it. 497-499 are safety things, leave these as is unless you want a destroyed hotend.

507-510 i generally leave as is makes running a pid tuning a lot easier once the printers up and running

see above and same for the pid chamber z

634/635 can be annoying but honestly its to stop you from beeing too impatient, if youre trying to print REALLY low temperature materials (wax/pp) you can disable this but otherwise its to stop you from breaking your stuff 641/642 is to stop you from putting in an "extrude 3000mm!" command on accident wasting plastic 661-664 DO. NOT. TURN. THESE. OFF. if they annoy you then theres another issue with your printer these are for YOUR safety.

647-680 is what kinematics your machine uses unless you know you have a weird corexy i wouldnt mess with it 690/696 usually correspond to what port you plug in the endstop onto on the board (some boards have max as well as min endstop plugs)

725-731 are usually the first culprits to check when you upload a new firmware and suddenly your printer wont home (basically changing the firmware to expect an always on endstop to an always off)

751-766 is where you declare your motor driver, check with manufacturer on which motor driver you have

770 isnt too common but handy if you have it on your board, 784 is really there if you get false positives or false negatives on your endstops, and 787 i almost always leave on just in case.

807 is weird and isnt really used anymore,814 is where you declare your steps per mm check with the printer manufacturer on what should be used (can be changed through ui if needbe once the printer starts with an x y z or e step calibration), 821 is the safe option, i usually add a 0 onto the end of all these and just run a lower acceleration in slice.

834 usually fine as is, you can jack this up if you have a corexy or Aframe printer, 849-851 leave as is, 861 is usually handled a different way now but i usually enable classic jerk anyways as it gives me a bit more control in slicer.

898 unless you're running a very old 8bit board with very limited space on it enable this.

this is where we start prepping for a bltouch or other autoleveling probe uncomment 917 if you plan on using a bltouch

948 is very handy when you dont have an auto-leveler you can do it manually, 954 isnt used often but its essentially when you strap an endstop to your hotend to use as a probe 960 are for lulzbot style probes, 965 is very similar to 954 except instead of just strapping it to the hotend you strap it to a servo arm that lowers it when need be ( a bit like a bl touch) and 971 is of course the bl touch, activate it if you have a bltouch

this next section is all weird leveling styles, a bit fun to read and look up when you want to learn more about the awkward teenage phase of printer development

1017 dont do this if you have leadscrews for a z axis, and will only work with stepper drivers that have stallguard (ie tmc2209)

this is one of the trickier parts of setting up a bltouch especially if the mount designer doesnt give you this information 1063 is how far from the tip of the nozzle to the probe point the probe is, 1067 is how far from the edge of the bed the probe should stay away from (to avoid binder clips), and 1070 you can speed this up to get a quicker level but it can be less accurate

treat 1076 like 1070and you shouldnt have to mess with anything else on here though if you find one probing isnt accurate enough you can have it run through multiple probes with 1114/1115

this section seems to be what confuses alot of people when they first set up a bl touch, 1131 is where the nozzle will rest after leveling the bed and while changing the z offset, i usually change this to 0 as it makes it considerably less annoying to change the z offset

this section declares how the motors will act while probing, shouldnt be much you have to change but if you get innacurate probes delete the // from 1158 and 1160 (beds will expand when heated up)

this section is on motion, 1198-1200 does what it says on the tin, change this if you get everything set up and you notice your prints are mirrored 1205-1212 may need to be changed if you change from a bowden to a direct drive extruder or when you change from extruders with different gearing ratios i typically activate 1216/1217 as it idiot proofs my machine from myself

declare your bed size with 1240/1241 and 1249 should be the max z height of the printer

this section is for the filament runout sensor delete the // on 1293 to activate and the // from 1345 if its a smart filament runout sensor like sku 249417 from bigtreetech that we recently started carrying

this section also has to be declared for auto bed leveling most times youll want to uncomment 1395 though 1396 gives you a lot more information at the cost of chip space and should be used on most modern boards that have more space than they know what to do with.

you can activate 1404 or 1405 to not need to level before every print but just know that if the z axis turns off and raises or lowers at all it will likely also mess up the level so leveling before every print (add a g29 to your start gcode script) is alot more reliable. more data more better! activate 1421 if you have alot of extra memory space on your chip.

1578 is mostly used in delta printers or printers with circular beds but it changes 0,0 from being in the front left corner to being in the center of the buildplate, 1595 ENABLE THIS IF YOU'RE USING AUTO BED LEVELING

if you notice your prints are coming out with a weird skew this can fix it

now we get to some of the fun stuff, enable 1680 for your own sanity, 1694-1696 provide alot of the terminal flack you can see if you open a terminal from a usb connection, annoying but having it enabled fixes some weird stuff 1701, just learn metric cmon.

1706 see 1701, 1713-1723 i generally change these to what i run pla and petg at (changing 1719 to "PETG" from "ABS"), i generally enable 1736 as it can fix some things with bed leveling

this is a fun one i havent seen used often but it can be helpful in multi extruder setups or setups where you have spare space on the side of the bed you can strap on a nozzle cleaning thing onto.

enable 1853 because nothing beats the prestige of running 1000hrs of print time

ive never seen this used but would be really useful with a printer in a public space

1905 is language select and 1929 is character select (DO NOTE THIS IS A MANUFACTURER THING a display made in china typically uses japanese characters despite whatever language is used)

1936 declares which style you want (i prefer prusa style but thats just me) 1944 enables the sd card, 1951 is sd debugging, 1959/1960 are purely there to save chip space, 1968 and 1974 dont really ever need changed unless for whatever reason you're using a super high quality encoder

enable 2014 it doesnt hurt anything and can be helpful, and 2022 is the bane of my existence and is incredibly annoying but can be nice at times

speaker settings

this entire section is purely for what lcd you have, check with manufacturer.

if you have a color touch screen this is where you can declare what style you want (personally im a big fan of the classic ui) but the color ui is nice too

2618 most boards only have 1 user controlled fan check with the board manufacturer, 2621 dont enable if you dont have cooling on your motherboard, 2626 annoying but only on a debug level 2644/2653/2656 are all for LEDs

enables rgb led lighting

2740/2745/2748/2751 are all about servo settings (very rarely used but there if you need it!)

there are still other settings in the adv config file like sensorless homing on the x/y axis using stallguard, and stepper motor current but that is CONSIDERABLY longer and more difficult to explain if i made any mistakes let me know please.

We love seeing what our customers build

Submit photos and a description of your PC to our build showcase

Submit Now
Looking for a little inspiration?

See other custom PC builds and get some ideas for what can be done

View Build Showcase


If You Can Dream it, We Can Build it.

Services starting at $149.99