Installing Marlin 1.1.6 (and now 1.1.7) on your CR-10S with mesh bed leveling

Important note about customer support of CR-10S Marlin update blog posts.  These posts were written by David Randolph as a free community contribution.  He's happy to have provided this contribution when Creality would not.  Unfortunately, we do not have unlimited time and cannot provide support if you have any issues with this process.  Please read the instructions carefully and consider your skill level.  If you run into any issues, we suggest posting comments on this blog post as many users hang out regularly and will offer help.  Checking into the various Facebook CR-10 Communities is also an option.  



UPDATE! We have added notes for the new version of Marlin 1.1.7 as well as a new download of the source and hex files. Enjoy


Before we start: This is for the CR-10S and not the CR-10. Don’t use this firmware or follow these instructions for the CR-10. It is a different board and uses different settings.The older CR-10 uses a MELZI board which has less memory so in order to get it to work you will have to remove a lot of options to get everything to fit.

The firmware for the CR-10S is based on Marlin which is an open source project and as such means you can modify the source code as you want. While this article will be long and involved, I will get right to the point and just give you the .hex file and you can go ahead and just install it and close out this page. This version has mesh bed leveling, baby stepping and EEPROM storage enabled.

Inside the zip is a file called instructions.pdf on how to flash your firmware.

 CR-10S 1.1.6 Firmware Source Code and Hex Files

 CR-10S 1.1.7 Firmware Source Code and Hex Files

However, if you’re still reading this then we will go ahead and get moving. Let’s install and configure the software and give you a quick lesson on what we will be doing.

  1. You will need to download and install the Arduino IDE.
  2. Next you will need to download and install the U8glib library. and then from inside Arduino go to sketch>include library>add zip library and select the zip file. This is a library used to run the LCD display.
  3. A preference we should setup inside of Arduino is to show line numbers. This will help us guide our way through the code and I will be referring to line numbers and the variable names for version 1.1.6. If you are reading this and using a different firmware version then line numbers may have changed but most likely the variable names will be the same. Now in the Arduino software go to File>Preferences and put a check mark in the box next to Display Line Number.
  4. Finally you need to download the 1.1.6 firmware and unzip the folder. Don’t rename the folder or move the files around inside it. You can put it anywhere you like to work on it. Go into the folders till you find Marlin.ino and open that file from inside Arduino IDE. It will open the full project and put all the files into separate tabs along the top.

Now we are ready to get to work modifying things. Most of the work we will be doing will be in Configuration.h but we will be touching a few other ones. I will call those out later on. In Arduino if a line is “commented” this means that the instructions on that line are ignored. Marlin is well written and most of what we be doing is uncommenting an option or changing a value of something. To uncomment a line you just remove the two forward slashes // at the beginning of the line. To comment out a line you will just and // at the start of the line.


Line 114: #define BAUDRATE 115200

This is the speed that it communicates over USB. It could be one of the faster speeds but honestly this is enough.


There are many boards that support Marlin and this is one of them. It is based off the very popular board RAMPS.

Line 127: #define CUSTOM_MACHINE_NAME "CR-10S"

When your machine starts up this is the name that is displayed in the bottom left of the screen. It can be anything you want between the quotes, even Printer McPrintface if you like.

Line 286: (Line 289 in Marlin 1.1.7) #define TEMP_SENSOR_0 1

This sets the type of sensor used for measuring the hotend temperature. For the stock hotend you will use “1” and for an E3Dv6 hotend you will use “5” 

Line 291:  (Line 294 in Marlin 1.1.7) #define TEMP_SENSOR_BED 5

This sets the bed sensor for the stock bed.

Line 325: (Line 328 in Marlin 1.1.7) #define HEATER_0_MAXTEMP 250

This is the limit for how hot your hotend will go. For the stock hotend you should set it for 250 and for an E3Dv6 hotend you can set it to 300.

Line 330: (Line 333 in Marlin 1.1.7) #define BED_MAXTEMP 120

This is the limit for how hot your bed will go. In this case we can set it to 120 but honestly you will be lucky to ever go above 80c.

Line 442: (Line 446 in Marlin 1.1.7) #define THERMAL_PROTECTION_HOTENDS

Line 443: (Line 447 in Marlin 1.1.7) #define THERMAL_PROTECTION_BED

These two lines are what protects your machine from thermal runaway. While they are already uncommented I wanted to still point them out so you know to pay attention to them.

Line 528: (Line 532 in Marlin 1.1.7) #define DEFAULT_AXIS_STEPS_PER_UNIT   { 80, 80, 400, 95 }

This is the amount of steps your printer has to use to move a specific distance. Things like drivers, motors, gearing, screws can change these numbers but the ones above are good for a stock CR-10S. These can be tuned later from the control screen thanks to the EEPROM settings we will be enabling later.

Line 535: (Line 539 in Marlin 1.1.7) #define DEFAULT_MAX_FEEDRATE          { 2500, 2500, 100, 25 }

This is the fastest the machine will move in all directions.

Line 553:  (Line 557 in Marlin 1.1.7) #define DEFAULT_ACCELERATION          575

Acceleration is the rate of change of speed.  It is defined in mm/s^2.  Your printer slows down when changing direction and then speeds back up again in straight lines.  This line is the acceleration the printer will make during printing moves.  575 is fairly slow, but for a printer like the CR10S with a big moving bed, it will help prevent ringing.  

Line 554: (Line 558 in Marlin 1.1.7) #define DEFAULT_RETRACT_ACCELERATION  1000

This is the acceleration applied to your extruder retraction.  You want this as high as it can go before the filament starts stripping out to help prevent strining.

Line 555: (Line 559 in Marlin 1.1.7) #define DEFAULT_TRAVEL_ACCELERATION   1000

This is the acceleration of your printer when it is not printing.  Since it is not printing at the time, it can be a little higher since you won't be able to see the ringing.  If it is too high, you could see skipped steps and layer shifts.

Line 745: (Line 751 in Marlin 1.1.7) #define INVERT_X_DIR false

Line 746: (Line 752 in Marlin 1.1.7) #define INVERT_Y_DIR false

Line 747: (Line 753 in Marlin 1.1.7) #define INVERT_Z_DIR true

These 3 line define the direction of each axis. If your machine moves in the opposite direction of what you expect then change it to true or false.

Line 777: (Line 783 in Marlin 1.1.7) #define X_BED_SIZE 300

Line 778: (Line 784 in Marlin 1.1.7) #define Y_BED_SIZE 300

Line 786: (Line 792 in Marlin 1.1.7)  #define Z_MAX_POS 400

This is where we set the actual bed size of your printer and the Z height.

Line 801: (Line 827 in Marlin 1.1.7) Uncomment #define FILAMENT_RUNOUT_SENSOR

This will enable the filament sensor.

Line 803: (Line 829 in Marlin 1.1.7) #define FIL_RUNOUT_INVERTING true

Here we are changing the way the switch on the filament sensor works.

Line 855: (Line 876 in Marlin 1.1.7) Uncomment #define MESH_BED_LEVELING

This is the fun part. No probe, no hardware. This allows you to level the bed at multiple points manually and it will create a 3D mesh of the surface to allow you to print on an uneven bed.  It will use the manual bed leveling as defined here

Line 874:  (Line 986 in Marlin 1.1.7) #define GRID_MAX_POINTS_X 3

We are setting this to 3 which means it will have you level 3 times along the X axis and 3 times along the Y axis for a total of 9 points. If you set this to 5 then it would mean you have to adjust level 25 times on the bed. 3 is a really good number for this.

Line 956: (Line 997 in Marlin 1.1.7) Uncomment #define LCD_BED_LEVELING

This adds the option to run mesh bed leveling to the LCD screen.

Line 964:  (Line 1005 in Marlin 1.1.7) Uncomment #define LEVEL_BED_CORNERS

This adds the option to level the corners of your bed before running mesh leveling.

Line 1018: (Line 1116 in Marlin 1.1.7)  Uncomment #define EEPROM_SETTINGS

This allows you to adjust things like offsets and steps and store them.

Line 1019: (Line 1117 in Marlin 1.1.7) Uncomment #define DISABLE_M503

This is a command that shows the settings as they were set in the firmware and not the ones you changed in the EEPROM. We are disabling this to save some memory.

Line 1050 (Line 1148 in Marlin 1.1.7): #define PREHEAT_1_TEMP_HOTEND 205

Line 1051 (Line 1149 in Marlin 1.1.7): #define PREHEAT_1_TEMP_BED     60

Line 1052 (Line 1150 in Marlin 1.1.7): #define PREHEAT_1_FAN_SPEED     0

Line 1054 (Line 1152 in Marlin 1.1.7): #define PREHEAT_2_TEMP_HOTEND 250

Line 1055 (Line 1153 in Marlin 1.1.7): #define PREHEAT_2_TEMP_BED     80

Line 1056 (Line 1154 in Marlin 1.1.7): #define PREHEAT_2_FAN_SPEED     0

The lines 1050-1056 set the temps and fan speeds for the menu items to preheat for PLA and ABS.

Line 1232: (Line 1330 in Marlin 1.1.7): Uncomment #define SDSUPPORT

This enables the SD card slot so you can print from SD.

Line 1257: (Line 1355 in Marlin 1.1.7): Uncomment #define ENCODER_PULSES_PER_STEP 1

Leave this at 1 for the CR-10S

Line 1263 (Line 1361 in Marlin 1.1.7): Uncomment #define ENCODER_STEPS_PER_MENU_ITEM 5

This is how far the knob needs to turn to move between menu items. Make this number lower if it is too sensitive and higher if it is not.

Line 1303: (Line 1401 in Marlin 1.1.7): Uncomment #define SPEAKER

This will let the machine beep and make sounds.

Line 1384 (Line 1482 in Marlin 1.1.7): Uncomment #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER

This enables the LCD screen. When we first installed U8Glib library, it was for this option.

Line 1684 (Line 140 in Marlin 1.1.7): #define DEFAULT_NOMINAL_FILAMENT_DIA 1.75  

Here we set what size filament will be used in the machine.



Line 602 (Line 658 in Marlin 1.1.7): Uncomment #define BABYSTEPPING

Baby stepping allows you to adjust the Z axis while printing to help get the perfect 1st layer.

Line 606 (Line 662 in Marlin 1.1.7):  #define BABYSTEP_MULTIPLICATOR 5

This is how much your Z axis will move per rotation on the knob. I find 5 is a good number but if you want finer control then lower this number. IF you want it to move more per click then increase this number.

Line 608 (Line 664 in Marlin 1.1.7): Uncomment #define DOUBLECLICK_FOR_Z_BABYSTEPPING

This makes it so if you want to adjust baby stepping then you can press the control knob two times quickly and you will enter baby step mode.

Line 683 (Line 733 in Marlin 1.1.7): Comment out // #define ARC_SUPPORT

Not really used since most slicers don’t do this function by default. If we disable it then we save even more memory.

Line 819 (Line 878 in Marlin 1.1.7): Uncomment #define ADVANCED_PAUSE_FEATURE

This is for the filament runout sensor. It will home the hotend and unload the filament from the nozzle. Then once you load more filament it will wait till it’s extruding before beginning the print.


Line 206 (Line 255 in Marlin 1.1.7): #define FIL_RUNOUT_PIN      2

We are changing this one value from 4 to 2 so we are using the right pin for the filament sensor.


All done! Save your work.

Wow, you really have been sticking with me this whole time and you have modified everything and you are ready to build your firmware and install it. Kudos for sticking with me this whole time.

  1. Select Tools>Board>Arduino/Genuino Mega or Mega 2560 and then Tools>Processor>ATMega2560 (Mega 2560) and then select the COM port for your printer. Did I mention that you should have already plugged your printer into your computer?
  2. Now we want to verify and compile the code. You can do this by clicking on the checkmark icon in the tool bar or by going to Sketch>Verify/Compile
  3. If you got no errors then congratulations and now you are ready to upload the firmware. Go to Sketch>Upload or click on the icon in the toolbar that is an arrow pointing to the right.
  4. Now you are all set and good to go, enjoy your new firmware. Let us know what you think and if you think we should do anything more.


While you're here...

Did you know carries upgrades and materials that work great on the CR-10 series of printers?  Check out our line of authentic E3D parts here.  You can find Capricorn tubing in the same area.  Our economy line of filaments including colorFabb Economy may also be of interest to you and can be found here.

Back to blog