Installing Marlin 1.1.8 on your CR-10S with mesh bed leveling, thermal protection and better menu layout

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.  

This is an update to our previous article about making your own version or Marlin 1.1.6 and 1.1.7. You will also find in the zip file below Creality’s original firmware but I have gone ahead and enable the very important setting of thermal protection. So if you want to keep their power resume feature but still run the older Marlin firmware then you can go right ahead.

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 http://marlinfw.org 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.8 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. https://www.arduino.cc/en/Main/Software
  2. Next you will need to download and install the U8glib library. https://bintray.com/olikraus/u8glib/download_file?file_path=u8glib_arduino_v1.18.1.zip 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.8 firmware http://marlinfw.org/meta/download/ 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.

Configurations.h

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.

Line 122: #define MOTHERBOARD BOARD_RAMPS_14_EFB

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 140: #define DEFAULT_NOMINAL_FILAMENT_DIA 1.75  

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

Line 289: #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 294: #define TEMP_SENSOR_BED 5

This sets the bed sensor for the stock bed.

Line 328: #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 333: #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 446: #define THERMAL_PROTECTION_HOTENDS

Line 447: #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 532: #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 539: #define DEFAULT_MAX_FEEDRATE          { 2500, 2500, 100, 25 }

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

Line 557:  #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 559: #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 559: #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 751: #define INVERT_X_DIR false

Line 752: #define INVERT_Y_DIR false

Line 753: #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 783: #define X_BED_SIZE 300

Line 784: #define Y_BED_SIZE 300

Line 792: #define Z_MAX_POS 400

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

Line 827: Uncomment #define FILAMENT_RUNOUT_SENSOR

This will enable the filament sensor.

Line 829: #define FIL_RUNOUT_INVERTING true

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

Line 876: 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 986: #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 997: Uncomment #define LCD_BED_LEVELING

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

Line 1005:  Uncomment #define LEVEL_BED_CORNERS

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

Line 1116: Uncomment #define EEPROM_SETTINGS

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

Line 1117: 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 1148#define PREHEAT_1_TEMP_HOTEND 205

Line 1149: #define PREHEAT_1_TEMP_BED     60

Line 1150: #define PREHEAT_1_FAN_SPEED     0

Line 1152: #define PREHEAT_2_TEMP_HOTEND 250

Line 1153: #define PREHEAT_2_TEMP_BED     80

Line 1154: #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 1167: Uncomment #define NOZZLE_PARK_FEATURE

This is required for the pause feature and is used to establish where to park the nozzle

Line 1332: Uncomment #define SDSUPPORT

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

Line 1357: Uncomment #define ENCODER_PULSES_PER_STEP 1

Leave this at 1 for the CR-10S

Line 1363: 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 1403: Uncomment #define SPEAKER

This will let the machine beep and make sounds.

Line 1484: Uncomment #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER

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

 

Configuration_adv.h

Line 658: Uncomment #define BABYSTEPPING

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

Line 662: #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 664: 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 733: 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 879: 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.

Pins_RAMPS.h

Line 255: #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.

 

Back to blog