Vanilla Marlin Firmware configured for Ender 3 + BLTouch


Plase check the new article for Marlin 2 and BLTouch up to 3.x on Ender 3


This is the 1.1.9 + Bugfix version of vanilla Marlin Firmware pre-configured for Creality Ender 3 printers with the original or generic BL Touch sensors. The standard configuration file from Marlin distribution was carefully reviewed to include the latest Ender 3 specific settings from the official Creality firmware. This was not tested with BLTouch 3.x versions.


  • Official Marlin firmware with all hardware settings from Creality latest official firmware (Code 20181208 from December 2018).
  • BLTouch original/generic up to 2.x properly installed. This firmware should work with the 3.x BLTouch as well but it was not tested with it.
  • No need to remove any capacitors from the board.
  • Installs from the original Arduino IDE (smaller download and frequent updates from Arduino team).
  • Source code modified to prevent releasing the BLTouch sensor during "beep" events triggered by LCD menus (this can't be prevented only by configuration.h modifications).
  • Thermal runway protection enabled.
  • Does not reset the bed level settings after the G28 (Home) command.
  • Custom menu with maintenance mode, emergency mode and full auto bed leveling sequence (warmup, wait, home, level and then save settings).
  • Ultra-precise bilinerar bed leveling algorithm with 25 probing points and slow probing (takes around 5 minutes to complete, 10 including the bed heating).
  • Run and toggle the bed level and BLTouch tools from LCD menus.
  • Slim menus enabled.
  • Baby steps enabled and configured for the "Magic Numbers".
  • All changes from the original Marlin config file were marked with the comment tag "Customized DBP"


  • BLTouch installed on pin 27
  • Z stop switch removed (it can block the Z axis movement)
  • IMPORTANT! BLTouch tip height must be adjusted according to the official instruction manuals. There are different BLTouch sensors and the YouTube videos tips are most of the times wrong
  • Bootloader installed
  • Original Arduino IDE


    • Configure the Arduino IDE to download the Sanguino board. Add the following URL to the board manager (File->Preferences->Additional boards manager):
    • Install the following libraries/boards in the Arduino IDE:
      • U8Glib
      • Sanguino
    • With all requirements in place unpack this entire Marlin distribution to a folder and open the "Marlin.ino" file from the Arduino IDE.
    • Look for the configuration.h file and change X_PROBE_OFFSET_FROM_EXTRUDER, Y_PROBE_OFFSET_FROM_EXTRUDER Z_PROBE_OFFSET_FROM_EXTRUDER to the relative coordinates of your BLTouch mount to the Nozzle. The actual settings are for this mount.
    • Compile and upload the firmware:
      • Board configuration: ATMega 1284P 16Mhz
      • Programmer configuration: AVRISP MKII
      • COM Port: Depends of your computer. Usually only one is available for selection.
    • Manually pre-level the bed. This is important because the BLTouch has a limited max/min range and even if it can detect the differences, we want the Z motor to do the minimal amount of corrections to keep the print quality.
      1. Cool down the bed and the nozzle
      2. Disable stepper motors
      3. Place a credit card on one the bed, the thickness of the card will be used as a reference distance from the nozzle
      4. Turn the Z axis with your hand until the nozzle hits the credit card
      5. Move hot end to the right and left and the bed to the front and back. Adjust the bed level knobs until all corners and center are at the same or very close distance from the nozzle.
    • Heat the bed to the printing temperature and run the bed level command from the LCD (Prepare -> Bed Leveling -> Level bed)  or using the G29 gcode. I recommend using the Arduino IDE serial monitor to check for any errors during the BLTouch probing, they are usually caused by improper wiring or height outside of the tolerances (see important note in the requirements)
    • Save the settings using the LCD menu or the M500 gcode (if you used the Heat and Level custom command, they will be automatically saved). Note that the Heat and Level command waits 2 minutes after the bed is heated to allow the mounted surfaces to expand/contract as well.
    • Add the following gcode to the startup code of you slicer, right after the line of the G28 command: M420 S1 . This will enable and load the bed level settings from the memory before starting the print. If you prefer you can enable it from the LCD menus as well.
    • After enabling the bed level, print something to adjust the Z offset. The nozzle will always be far from the bed until you adjust the offset to a negative value (LCD -> Prepare -> Bed Leveling -> Z Offset). Don't forget to save the settings after the print to keep the offset in the memory.


    1.1.9 + Bugfix compiled in April 18th, 2019
    Arduino IDE
    File size
    4.7 MB
    SHA256: 4E3FB25F95412351B474F860D8FD24EC1CD0E7B910B27FFE3903B73CAB3E682A

    Post Categories


    Submitted by CF on Fri, 01/17/2020 Permalink



    Thanks for the detailed conf. Seems as a perfect starting point for a noob like me usinf marlin and bltouch.

    Could you give a short advice what to change for bltouch 3.1?




    Submitted by Anonymous on Tue, 12/17/2019 Permalink

    Here I have a small list of errors with this sketch.

    ultralcd.cpp:3869:156: error: unterminated argument list invoking macro "_UxGT"

                 MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_DIAM, &planner.filament_size[0], 1.5f, 3.25f, planner.calculate_volumetric_multipliers);

    In file included from sketch\ultralcd.cpp:98:0:


    sketch\ultralcd.cpp:3869:57: note: in expansion of macro 'MSG_FILAMENT_DIAM'

                 MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float43, MSG_FILAMENT_DIAM, &planner.filament_size[0], 1.5f, 3.25f, planner.calculate_volumetric_multipliers);

    exit status 1
    unterminated argument list invoking macro "_UxGT"

    Any Idea how to fix? Some of the "language" errors I can fix easely but all the rest? No idea. I'm thankful for any help on this.

    Submitted by Anonymous on Thu, 12/12/2019 Permalink


    in Make Magazin Germany they used your firmware (bugfix, configuration) for use with BL Touch ( Whats the background, why this firmware will not work with BLTouch 3.x ? In the article is nothing mentioned, regarding this issue?



    Submitted by Celso Rossi on Mon, 12/02/2019 Permalink

    Excellent job!

    I installed on ender 3 and it was perfect!


    Do you have these settings for Marlin 2.0 with bug fixes?

    Submitted by Tobias on Wed, 05/29/2019 Permalink

    hi! just want to say thankyou for this. helped me get bltouch working and functioning properly!

    Submitted by mattes on Mon, 04/29/2019 Permalink


    i get this error, when compiling your firmware for Ender3


    unterminated argument list invoking macro "_UxGT"

    what can i do ?


    Do you have more details about this error? Did you modified any file or translation?

    This error appears when the files are corrupted or some expression was left open.


    Downloaded the package, rebuilt and recompiled from zero. No problems found!

    Just to make sure, here are the library versions I used used:

    • Sanguino 1.0.3
    • U8Glib 1.19.1
    • Arduino IDE 1.8.9 on Windows 10

    And here is the compilation stats:

    Sketch uses 129176 bytes (99%) of program storage space. Maximum is 130048 bytes.
    Global variables use 6657 bytes (40%) of dynamic memory, leaving 9727 bytes for local variables. Maximum is 16384 bytes.