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 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.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. 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.6 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 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.

 

Configuration_adv.h

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.

Pins_RAMPS.h

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 PrintedSolid.com 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.




David Randolph
David Randolph

Author

I have a background in film and television engineering and IT with over 9 years with 3D printing and laser cutting. I've fought robots and even have a Guinness world record for worlds largest video game controller. My nerd cred is strong.



35 Responses

lucas whitfield
lucas whitfield

January 27, 2018

i just installed the 1.1.7 on my cr-10s and i printed an apple watch stand that ive done on the factory firmware as well and the printer skipped steps ive never had this happen before so whats the problem?

Gerd Schelbert
Gerd Schelbert

January 20, 2018

Nice tutorial.
I used the descriptions to install a marlin 1.1.8 to a cr-10s-upgrade kit (board named creality v2).

Many thanks

Gerd

stagbeetle
stagbeetle

January 18, 2018

Thanks for all the hardwork and explanations – it made it very easy to tweak (keeping stock temp sensor for now) and upload.

Jari Ivanoff
Jari Ivanoff

January 16, 2018

I followed the instructions for 1.1.7 with 1.1.8 and with some minor changes ( after some part the lines shifted down 2 steps ) I have a verified 1.1.8 laying on my computer waiting to be installed on my CR10S, after the ongoing print is finished. :-)

Morel
Morel

January 14, 2018

I got the following error:
SanityCheck.h:418: error: #error “ADVANCED_PAUSE_FEATURE requires NOZZLE_PARK_FEATURE”

#error “ADVANCED_PAUSE_FEATURE requires NOZZLE_PARK_FEATURE”

in addition, I have added a additional extruder head with 2 hot ends (2 in 2 out),
what other changes should I make?
Thank you in advance

J.GOODWIN
J.GOODWIN

January 12, 2018

Hi E.Chapman, I’m upgrading my CR10 board to the new CR10S V2.0 board which has EXP 1 and EXP 2. Does your method regarding rotating EXP 1 plastic shroud 180 degrees work on this version of the board with the original CR10 LCD (single ribbon cable?).

Thanks Justin

Samuele
Samuele

January 10, 2018

Hi, I have a cr10-s I would like to know how to mount and how to configure the BLTouch sensor. Can you help me?

PHIL
PHIL

January 07, 2018

I have a stock cr-10s 4 with the filament run out sensor and the power resume feature. I flashed your 1.1.7 firmware to my board and it works basically but now the power resume feature is gone and the filament run out sensor stopped working. what do I need to do to get those features back.

Davide Bonaldo
Davide Bonaldo

January 04, 2018

Hi! thanks for the tutorial! Do you think to adapt it for a CR-10s S5, the biggest one, it’s enough to change these parameters?

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

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

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

RiderPSV
RiderPSV

January 04, 2018

Hello. Can’t firmware update to my CR-10s.
Whem loading 1.1.6 or 1.1.7 firmware have netx issue:
avrdude: verification error, first mismatch at byte 0×0000
0×14 != 0×0c
avrdude: verification error; content mismatch
avrdude: verification error; content mismatch
The CR-10S-Factory.hex is loading OK. What i should do? Thanks for help.

Greg
Greg

January 01, 2018

I am getting this compiling error… any help on this one?

SanityCheck.h:418: error: #error “ADVANCED_PAUSE_FEATURE requires NOZZLE_PARK_FEATURE”

thanks,
Greg

Curt
Curt

December 20, 2017

Great job! Spot on! Thank you!

The only thing I had to change was #define FIL_RUNOUT_INVERTING to false – Was immediately and continuously out of filament… LOL

I didn’t make any other mods except running a PID and I can see the improvement in the print.

I know you stressed this is for the 10S only but would this be a good starting point for an S5? I’m looking into finding out what MB it has and I realize some parameters would need changing.

Fahad
Fahad

December 20, 2017

Need help with Z-axis shall the motor and endstop direction be same or how to fix the hanging Z-axis

Mike
Mike

December 18, 2017

I’ve heard that the CR-10 is based on the CR-10S and was wondering if these firmware mods would work on a Mini. I have the mini and would like to have the option of adding auto levelling.

Anyone able to help?

Sindre Langberg
Sindre Langberg

December 18, 2017

Hi! I got a problem here, it doesnt seem like STORE function is possible. I did a step calibration but storing wasnt possible without reflashing with correct specs in the firmware again.

Looks like its the same with the mesh bed leveling. Pushing “save settings” only gives off a BIP and nothing really happends

Scott Lahteine
Scott Lahteine

December 17, 2017

A heads up that today’s Marlin 1.1.7 package at Github has patched a glitch in the previous 1.1.7 package. We may release the patched source with a new version number if any previous package issues crop up. As always with new versions, proceed with caution, reset the EEPROM if behavior is weird, and feel free to kick our butts in the issue queue if Marlin throws your printer off the table.

- Scott

Darin
Darin

November 30, 2017

Excellent guide, thank you very much.

One note: on my CR-10S (new as of 2 weeks ago) the part fan and case fan were swapped. I’m not sure if this is firmware or just plugged into the wrong ports by Creality, but mine is fixed now.

It’s pretty funny to think that the case fan was adjusting speed during prints.

Christian
Christian

November 21, 2017

Hello everyone,

I need your help please, as I honestly said I am not so long occupied with this topic and am a layman.

Where do I have to insert the plug for the filament runout sensor on the CR-10S mainboard and is there possibly a picture with the connection diagram?

What do I have to change Slicer script (Simplify3D), so that the sensor works properly or do I have to change anything?

I’m grateful for any help from you.

Thank you in advance.

Best regards,
Christian

Jov
Jov

November 18, 2017

I tried the HEX files on my cr10s but the nozzle temp only goes up to 235c. so i went back to factory hex file. why is that?

Christian
Christian

November 18, 2017

Hello everyone,

can someone please help me here, as I’m not sure where and how to connect the filament runout sensor on the CR10S motherboard.

A picture with the connection diagram would also be very helpful.

Is it necessary to change the script in the slicer by using the filament runout sensor?

If yes, where???

Unfortunately I am a layman and grateful for any help here.

Thanks for your help in advance.

Best regards,
Christian

Derrick Smith
Derrick Smith

November 17, 2017

Yall saved me some time today. Thanks!!

Joris
Joris

November 14, 2017

I had to change the z step value for the leveling, as now it was going up and down in 0.1 increments which was way too much (e.g. paper stuck at 0.2 and completely loose at 0.3)

E.Chapman
E.Chapman

November 06, 2017

For any one upgrading the CR-10 motherboard to the CR-10S mother and keeping the original CR-10 display (single cable).

1. Comment out 1384 “#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER”
2. Uncomment line 1525 “#define CR10_STOCKDISPLAY”.

3. Then you need to carefully ,using pliers, remove plastic shroud from port exp1 and rotate it 180 degrees. The slot alignment slot should face inwards instead of outward. Simply pull gently on both sides and it will come off easily. Be careful not to grab the pins in the process.

4. Reconnect the display cable.

5. Flash your firmware
Congrats…you should now have a working CR-10S Motherboard with a working CR-10 original display. Enjoy!

Chris67
Chris67

November 06, 2017

Hello, very nice work !!!!
It’s possible to put a touche screen MKS TFT 3.2 ?K

Thierry
Thierry

November 04, 2017

@Thomas, the one with no bootloader works well.

Thierry
Thierry

November 04, 2017

If you want to use the SD card normally, edit “ultralcd.cpp” lines 977 and 985, it should be: #if PIN_EXISTS(SD_DETECT)
instead of #if !PIN_EXISTS(SD_DETECT).

Thierry
Thierry

October 31, 2017

Nice tutorial but why does the printer restart with the motherboard fan off when switching the power off and why is the initialize SD card is gone in your ready to upload firmware?

Parenthetical
Parenthetical

October 30, 2017

discussion of my difficulties swapping a CR10S mainboard into a regular CR10 are here: https://www.thingiverse.com/groups/creality-cr-10/forums/general/topic:22283 any insights much appreciated!

Parenthetical
Parenthetical

October 27, 2017

Thanks David, I have now changed the firmware to use //#define CR10_STOCKDISPLAY instead of //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER and I’m sure that would be the right screen, but it still doesn’t work. Presumably that sets the pins correctly, so any idea if there could be something else I need to change?

Where are the fans plugged in on the CR10S? On the CR10 the always on fans are connected directly to the 12v input, but the new board has 3 headers labeled Fan1 Fan2 Fan 3 so I used those. I assumed they would be always on since there is a separate header for the controlled prat cooling fan. Do you know if there’s a firmware setting that controls those 3 fan headers? Obviously I can keep the fans on by connecting directly to the 12v as on the Melzi, but those headers must be intended for something!

David Randolph
David Randolph

October 26, 2017

Marcos Diez: The power loss feature is not in this firmware. I have not gotten my hands on the new board that supports it to figure out if it’s firmware or hardware doing it. Usually it’s a combination of both so I am waiting on new units to arrive to test.

Parenthetical: The always on fans should be just that, always on. Most likely you just got them plugged into the wrong spot when you swapped boards? As for your screen, it most likely has a different pin set than the ones now included with the “S” model. So you can mess around with the pins on the LCD_full graphics controller to try and get them to move over (I don’t have the original CR10 so I don’t have the original screen to mess with pins for testing)

Parenthetical
Parenthetical

October 26, 2017

I have ended up trying to install a new CR10S board in a slightly older CR10 – the flashing process as above compiles and uploads without errors and I have disabled the features I don’t have such as filament sensor. Connecting to the printer with S3D it reports correct upgraded firmware – but the printer screen doesn’t work.

The screen I have uses just a single ribbon cbale, and the old melzi board has only one screen cbale connector, but I notice that the new board has two connectors – are both connectors required to be connected? If so I will have to buy a new screen with two connectors to be compatible.

Also the fan connectors for the always on fans – I plugged them into the fan connectors next to the XYZ end stop plugs – but they don’t work either. (but the controlled speed part cooler fan does work) How are the always-on fans supposed to be plugged in on a CR10S?

Marcos Diez
Marcos Diez

October 25, 2017

Nice tutorial! Thanks! I want to install it, however it isn’t clear to me what will happen with the power loss resume feature that comes with the stock firmware… and whether the stock firmware provided in the ZIP file is the same I have in my CR-10 S3.

Reading around, some people claim Marlin doesn’t have this feature (IDK if it does in the 1.1.6 version) and it’s a manufacturer’s addition to the stock firmware, hence my question.

Thank you very much!

Thinkyhead
Thinkyhead

October 24, 2017

It may be easier to start with the files in Marlin/example_configurations/Creality/CR-10 which already has most of these settings applied. If it would help to have a CR-10S config in there as well, I would be happy to add it!

David Randolph
David Randolph

October 24, 2017

Yes you can. The one without the bootloader is the one you want.

Thomas
Thomas

October 24, 2017

Great Tutorial!!!

Can I export the file and upload it over the Repetier-Server?
If yes, which of the exported HEX-files is the is the right one – with or without bootloader??

Many thanks
Thomas

Leave a comment

Comments will be approved before showing up.