Vanilla Marlin Firmware configured for Ender 3 + BLTouch


MARLIN 2.x VERSION ALSO AVAILABLE!

Please check the new article for Marlin 2 and BLTouch up to 3.x on Ender 3 although be aware that the version I recommend for 8-bit boards is the 1.1.9.


 

This is the 1.1.9 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.

I made avaliable the 2.x versions of Marlin for the same board and printer but I recommend using the 1.1.9.x because it is much more stable and has more features. The 2.x versions of Marlin are too big for the board memory and several features had to be removed in order to fit the firmware.

There are three installation options available, the traditional with Arduino IDE, the new method using Visual Studio Code + PlatformIO and the third one that is uploading the compiled firmware directly to the board. I recommend the PlatformIO option for most of the users, once the software is downloaded, the firmware can be upgraded in less than 5 minutes.

Features

  • Official Marlin firmware + bugfix with all hardware settings from Creality latest official firmware (April 2020).
  • BLTouch original/generic up to 3.x. enabled by default.
  • 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 was modified to prevent releasing the BLTouch sensor during "beep" events triggered by LCD menus.
  • 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  "//Customized DBP"

Requirements

Note about the bed leveling strategy

There are two ways to perform the automatic bed leveling, the first is before every print and the second is only when necessary. Based on my experience with the Ender 3, it's better to do an extremely precise (slower) bed leveling when necessary than a simpler one before every print. This firmware configuration reflects this choice.

If you want to do quick/imprecise bed leveling before every print you will need to reconfigure the firmware.

Instructions using Arduino IDE (option 1)

  1. Install the Arduino IDE
  2. Quit any software that could try to access the printer from the USB port (Cura, Serial Monitor, OctoPrint, etc...).
  3. Run the Arduino IDE and configure to download the Sanguino board. Add the following URL to the board manager (File->Preferences->Additional boards manager):
    https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json

     

  4. Install the following libraries/boards in the Arduino IDE:
    • U8Glib
    • Sanguino
  5. With all requirements in place unpack this entire Marlin distribution to a folder and open the "Marlin.ino" file from the Arduino IDE.
  6. Look for the configuration.h file and change the following lines to the relative coordinates of your BLTouch mount to the Nozzle. The actual settings are for this mount. If you don't have the measurements now you can configure it later with the M851 GCode (see instructions below).
    #define X_PROBE_OFFSET_FROM_EXTRUDER -42
    #define Y_PROBE_OFFSET_FROM_EXTRUDER -5
    #define Z_PROBE_OFFSET_FROM_EXTRUDER 0 

     

  7. Compile and upload the firmware. Make sure you are using the following settings.
    • Board configuration: ATMega 1284P 16Mhz
    • Programmer configuration: AVRISP MKII
    • COM Port: Depends of your computer. Usually only one is available for selection.
  8. Follow the post-installation instructions below.

Instructions using Visual Studio Code + PlatformIO (option 2)

  1. Download and install Visual Studio Code.
  2. From Visual Studio Code extension menu, install the PlatformIO IDE extension.
  3. With all requirements running, unpack the entire Marlin source code downloaded from the link below to a folder.
  4. From Visual Studio Code select File->Open folder and select the folder where the platformio.ini file is located. Attention! Use the "open folder" command, not the"open file".
  5. Look for the configuration.h inside the "Marlin" sub-folder and edit the following configuration to the relative coordinates of your BLTouch mount to the Nozzle. This does not need to be too precise, the only purpose is avoiding the probe to test outside the bed. The default settings X = -42mm, Y= -5mm and Z=0 are for this mount:
    #define NOZZLE_TO_PROBE_OFFSET { -42, -5, 0 }

     

  6. Enable the endstop interrupts feature by removing the comment (//) of the following line in configuration.h. If you have memory size problems you can leave this feature disabled at the expense of more computation cycles during the print.
    #define ENDSTOP_INTERRUPTS_FEATURE
    

     

  7. Save the file and then select Terminal->Run Task->Build . It will take a few minutes for the system to download all dependencies and compile the code.
  8. If the code compiled properly you will see something like this in the terminal: "=== 1 succeeded in 00:00:30.050 ===".
  9. Connect your printer to the computer using the USB cable.
  10. Go to the Visual Code menu Terminal->Run Task->Upload .
  11. If everything goes well another message like this "=== 1 succeeded in 00:00:55.010 ===" will be printed.

Installing the pre-compiled HEX (option 3)

The pre-compiled firmware is also available here. You can simply burn the compiled HEX file directly to your Ender3 board without installing the Arduino IDE or Visual Studio Code.

To upload the pre-compiled firmware you will need the AVRDUDE 6.3 tool. For your convenience I included the Windows version of this tool in the zip file that contains the HEX firmware but the tool is also shipped with the Arduino IDE. The upload command in Windows PowerShell should look like this:

./avrdude -p atmega1284p -c arduino -P COM3 -b 115200 -v -U flash:w:firmware.hex:i 

The serial port is something between COM1 and COM8, depending on where the USB driver is pointing to, and firmware.hex is the file you are uploading. If you are using other operating system like Linux the port address will be somehting like this /dev/ttyUSB0.

After initializing the board with the new firmware don't forget to reconfigure the probe offsets running the following command from any serial terminal. Replace the default offset values in the command (-42, -5, 0) with the ones for your probe mount.

M851 X-42 Y-5 Z0
M500

Finally, follow the post-installation instructions below.

Post-installation configuration

  1. Manually pre-level the bed! This is important because the BLTouch has limited max/min detection ranges and the print quality can be affected if the Z-Axis moves too much.
     
    1. Cool down the bed and the nozzle. Heating should have little to no effect on this specific procedure.
    2. Disable stepper motors using the LCD menu command.
    3. Place a credit card on one the bed, the thickness of the card will be used as a reference distance.
    4. Turn the Z axis with your hand until the nozzle hits the credit card.
    5. Move hot end to several positions of the bed, starting from the 4 corners. For each position, adjust the bed level knobs to keep the nozzle at the credit card thickness distance from the nozzle. This is what you would do in manual calibration but instead of using a paper you will use the card for convenience. The card thickness does not matter because the BLTouch probe will redefine the Z reference.
       
  2. 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 or using the Heat and Level command from the custom menu (recommended). Note that the Heat and Level command waits 2 minutes after the bed is hot to allow the mounted surfaces to expand/contract properly.
  3. 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).
  4. Add the following gcode to the startup code of you slicer, right after the line of the G28 command to load the bed level configuration from the memory before every print:
    M420 S1

     
  5. After enabling the bed level, print something large and flat 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, you can use the LCD or the M500 GCode for this.

Troubleshooting tips

  • Error "..._PIN is not interrupt-capable..." in Arduino IDE: This is an Arduino IDE bug, disable the feature in the configuration.h file according to the example below to fix:
    //#define ENDSTOP_INTERRUPTS_FEATURE

     

  • Disable serial port clients before flashing: If the COM ports are used by any other app, the flashing process will fail. Shutdown Cura, OctoPrint, any other slicer and any other Serial Monitor program like the Arduino IDE before compiling/flahsing the new ROM.
  • Correct fuse settings: If you are using other software than AVRDUDE to upload the firmware make sure you are using the correct fuse settings. Apparently the Creality tutorial has the wrong settings and the board fails to boot afterwards.
  • Reset the EEPROM: Sometimes the EEPROM memory is not reset during the Marlin reflash and this can cause problems. To reset manually use the following G-Codes from any Serial Terminal: M502 followed by M500.
  • Blank screen after flashing: You did not flashed the firmware properly. Please use AVRDude according to the instructions above and if this does not work you might have to reflash the bootloader.
  • Serial Port Monitor for Windows: This small program allows you to send/receive GCode to the printer. If the characters look strange you are probably using the wrong baud rate (start with 115200bps).
  • avrdude: stk500_getsync() attempt 1 of 10: not in sync: Wrong baud rate for the serial port or serial port already in use (OctoPrint, Cura, etc..). Try configuring the upload rate to 115200bps. If you are using PlatformIO to upload, make sure you are using the correct baud rate for your environment in the platformio.ini file.
  • Reconfigure the BLTouch probe offsets: Use the following command replacing the -42, -5 and 0mm coordinates with the offsets of your actual mount:
    M851 X-42 Y-5 Z0
    M500

 

Files
Version
1.1.9.1+ Bugfix + BLTouch for Ender 3 (April 2020)
Platforms
Arduino IDE or PlatformIO
File size
2.2 MB
Checksum
File 1 SHA256: C8A8D66C1F316A46A9F94FE3F5B74A24CBAF649E750635EF752AF1EE248C0246
File 2 SHA256: 25DE80A02CBBACB7207876F815195DCA36BF09D36FAD3C8FE3907391EA944F0B
File 3 SHA256: 882D9D8FE2CCEFA61D2F48C649640B570B0D3D6AD5C4948630522FFB2B0B312A
Screenshots

Post Categories

Comments

Submitted by RT on Thu, 04/09/2020 Permalink

BEST 1.1.9 Firmware for Ender 3 Pro

Works perfectly with 1.1.4 Board and BLTouch 3.1 and Creality bracket. Flashed it with the stock USB Dongle that comes with the Creality BLTouch bundle.

I downloaded the (paid) firmware from some very popular Youtube guy but that FW was literally crap. Yours is way better and easy to use. Autolevel is so much better despite it takes a little longer. Wish I found your website earlier. You should add a donate button.

Submitted by Frank on Thu, 04/09/2020 Permalink

Just want to say a big THANKS for your work. 1.1.9.1 March 2020 update works great with my Ender 3 and BLTouch 3.1.

I only had to add the TMC2208 lines as posted in on of the other comments.

Submitted by Frank on Thu, 04/09/2020 Permalink In reply to by Frank

To enable TMC drivers edit configuration.h and replace the driver type from A4988 to TMC2208_STANDALONE as follows:

#define X_DRIVER_TYPE TMC2208_STANDALONE //Customized DBP
#define Y_DRIVER_TYPE TMC2208_STANDALONE //Customized DBP
#define Z_DRIVER_TYPE TMC2208_STANDALONE //Customized DBP
//#define X2_DRIVER_TYPE A4988
//#define Y2_DRIVER_TYPE A4988
//#define Z2_DRIVER_TYPE A4988
//#define Z3_DRIVER_TYPE A4988
//#define Z4_DRIVER_TYPE A4988
#define E0_DRIVER_TYPE TMC2208_STANDALONE //Customized DBP

 

Submitted by joerg on Mon, 04/06/2020 Permalink

Hallo, ich finde super was hier geleistet wird.

Ich besitze seit neuesten einen Ender 3 Pro.

Mit der Firmware 1.1.6.2 und Bl touch 3.1

Kann ich da ohne Probleme 1.1.9.1 mit bl touch von hier flashen als hex oder gibt es da Probleme was ich beachten muss.

Eine Frage habe ich noch das Board TMC 2208 läuft dann auch mit 1.1.91 oder besser mit der Marlin 2.0.

Flashen kann ich mit dem Arduino und dem VScode kenne ich mich nicht aus.

Viele Grüße

Jörg

 

 

 

Submitted by Bias on Thu, 04/02/2020 Permalink

Hi,

I flashed your version for my Ender 3 today but my BLTouch isn't working.

The Selftest and so on is working well, but if I start the autoleveling, the process starts but sometimes the BLTouch starts blinking red, while the Z-Axis is moving higher and higher.

I already tried another cable, another BLtouch and also another adapter for the display port on the mainboard.

Do you have any idea why it's not working for me?

 

 

I have the same issue. I've been playing with 4-5 different firmware versions if Marlin today trying to find a decent version that works with my Ender 3 Pro and Bltouch V3.1.

I used the hex file here as I didn't want to compile yet another version.

When I do the Heat bed and level, the Z axis just gets higher and higher. This only happens with the V1.1.9 version of the firmware and wasn't having this problem an hour ago.

I can't believe we have the same wiring or interference issue.

HI,

Thanks for the prompt response. The problem happened when doing "Heat Bed and Level"

I am using the 1.1.9.1 Hex file I downloaded from here. So far to day I have tried

1. Ender-3-BL-Touch-Installation-master

2. Marlin_1.1.9.1_HEX - Yours

3. marlin -1.1.x

4. Marlin 2.0.1-Hex - Yours

5. Marlin-2.0.5.1-Ultimate - Yours

6. Marlin-2.0.5.3

The MB is out of the Ender 3 Pro so I can attach the ISP programmer, it takes about 10 mins to compile and load from the Arduino.

The equipment I'm using is:

* Ender 3 Pro

* BLTouch V3.1

* Creality V1.1.4 Motherboard.

I also have an Octoprint but am trying not to complicate the issue by changing too many things.

Currently the board is flashed to Marlin 2.0.1 (Your Hex version).

I'm now comfortable compiling the codebase, just that I'm more used to an old school Unix toolchain.

More than happy to try new firmware as I'm now getting pretty good at compiling and building, however I am struggling to get Marlin-2.0.5.1-Ultimate compiled as the text size exceeds the space, but that's a different problem :)

.

I recompiled the 1.1.9.1 version, flashed to my printer and executed 5 times the Heat and Level command. No problems so far. I updated the exact same firmware to the website a few minutes ago.

When alternating between Marlin versions always reset the EEPROM after flashing: M502 followed by M500.

That's interesting. Are you running a BLTouch V3.1? Apart from that thats the only thing I can think of. The rest of the printer is stock.

I'm just got your 2.0.1 Hex file loaded and am testing it to see if it works OK. Its also 22:55 here so I'll leave this to run and try again in the morning.

I have to sday since trying to get the BLTouch installed, it is a complete nightmare :(

Thanks

Rob

The only thing I can see thats different is the BLTouch V3.1 vs V3.0.

I know that the 1.1.9 Marlin releases say they work, but I'm not sure it's true based on this. It could also be that I'm doing something fundamentally wrong and have not understood anything. This is possibly the most likely answer.

I'll download the source to your V1.1.9.1 release, compile and I'll set a video up to track what's going on. Before that I'll try to calibrate the Z probe offset for the 2.0.1 release. I'd like to get that working this morning and then I'll go back to the 1.1.9.1 release and track that carefully. I'm a lot more comfortable digging into the code than digging into the Ender 3 Pro :)

Thanks for your hard work. I'll get there :)

Rob

I've gone back to the source code for V1.1.9.1 and downloaded it.

Opened and made three changes to

#define X_PROBE_OFFSET_FROM_EXTRUDER -44  // X offset: -left  +right  [of the nozzle] Customized DBP
#define Y_PROBE_OFFSET_FROM_EXTRUDER -8  // Y offset: -front +behind [the nozzle] Customized DBP
#define Z_PROBE_OFFSET_FROM_EXTRUDER 0   // Z offset: -below +above  [the nozzle] Customized DBP

for the BLtouch bracket.

Compiled it and loaded it on the printer.

Octoprint is removed from system.

I then did:

1. I manually prelevelled the bed using your credit card instructions.

2. I then did an Autohome

2. Set the bed temperature to 60C as that's  my normal working temperature.

3. Waited until it hit 60C

4. Then went to Prepare -> Bed Leveling -> Level bed.

5. The first row across went correctly (AFAIK).

6. The second layer then just gets higher and higher until its almost at the rop of the Z axis frame.

I did try to create a video and accidently pressed the record button twice so it didn;t record.

Went back again to re-record the video and it now works. The bed levelling has gone across without constantly going up. This is very confusing.

So lets try a third attempt with video, which has now also not worked. my iPhone stops recording after 90 secs <grrrr>

This time it's failed again. It did the first rows and then the second row just keeps tracking up the Z axix and never getting lower. It's almost as if the Z value is negated after the first row of checking.

I'm going to look at the code but this makes no sense to me at all. It has worked once and failed twice.

 

Tried three more times and odd results. The Z Axis movement appears to be inverted after a certain number of rows, but not all the time.

I have issed the M commands to reset the code as well that were advised.

Interestingly I've just tried to do bed levelling from Octoprint and it has the same results, the Z Axis heads upwards not downwards.

Am going to give the "Ultimate Marlin 2 + BLTouch for Ender 3 with OctoPrint" a try. Otherwise the BLtouch V3.1 is coming off and is being sold :(

Hi. I think I found the problem. Apparently there is a bug in the 1.1.9.1 version related with the Z fade height and Automatic Bed Leveling.

There is a patch for this. I will fix the code and post an updated release within a few hours.

The workaround is set the Z fade height to zero during the bed leveling.

Dan,

Hope all is well with whatever country you're locked down in. Portugal?

Thanks, we were both probably searching the same github repository for the problem. You found it before me.

I have downloaded the source to "2.0.5.1 Ultimate with Octoprint" and got it to complile. I needed to take out some S-Curve stuff, add in #define EEPROM_AUTO_INIT to get rid of the EPROM error and get it all to fit, and have just downloaded it...

... sounds of printer running 2.0.5.1 doing level bed testing ...

... first row looks OK though BLtouch seems to be doing three probes per point and not two ...

.. second row OK ...

... third row OK ...

... all rows OK ...

Now I'll tryu and print something to calibrate it.

However if you let me know when the new version of 1.1.9.(2?) is ready, I'll download it and kick the tyres. My temptation is to have a minimal version of the firmware and use the Octoprint as the 'brains' of the printer. Not sure how to do it but...

Thanks

Rob

Updated the firmware for 1.1.9.1+Bugfix. This is the latest version and includes the patch for the Z fade conflict. I tested it only once but the calibration went fine without any issues.

As a bonus I also enabled the endstop interrupt feature to save several computing cycles.

I'm getting a compile error with the code1.1.9+Bug release

/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega1284p -DF_CPU=16000000L -DARDUINO=10812 -DARDUINO_AVR_SANGUINO -DARDUINO_ARCH_AVR -I/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino -I/Users/rwillett/Library/Arduino15/packages/Sanguino/hardware/avr/1.0.3/variants/sanguino -I/Users/rwillett/Documents/Arduino/libraries/U8glib/src /var/folders/6b/cdzfwv0j0mdgpg60zgl5k9n80000gn/T/arduino_build_238352/sketch/power_loss_recovery.cpp -o /var/folders/6b/cdzfwv0j0mdgpg60zgl5k9n80000gn/T/arduino_build_238352/sketch/power_loss_recovery.cpp.o
In file included from /var/folders/6b/cdzfwv0j0mdgpg60zgl5k9n80000gn/T/arduino_build_238352/sketch/endstops.cpp:35:0:
/var/folders/6b/cdzfwv0j0mdgpg60zgl5k9n80000gn/T/arduino_build_238352/sketch/endstop_interrupts.h: In function 'void setup_endstop_interrupts()':
endstop_interrupts.h:121:7: error: non-constant condition for static assertion
       static_assert(digitalPinToPCICR(X_MIN_PIN) != NULL, "X_MIN_PIN is not interrupt-capable");
       ^~~~~~~~~~~~~
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega1284p -DF_CPU=16000000L -DARDUINO=10812 -DARDUINO_AVR_SANGUINO -DARDUINO_ARCH_AVR -I/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino -I/Users/rwillett/Library/Arduino15/packages/Sanguino/hardware/avr/1.0.3/variants/sanguino -I/Users/rwillett/Documents/Arduino/libraries/U8glib/src /var/folders/6b/cdzfwv0j0mdgpg60zgl5k9n80000gn/T/arduino_build_238352/sketch/servo.cpp -o /var/folders/6b/cdzfwv0j0mdgpg60zgl5k9n80000gn/T/arduino_build_238352/sketch/servo.cpp.o
In file included from /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h:258:0,
                 from /var/folders/6b/cdzfwv0j0mdgpg60zgl5k9n80000gn/T/arduino_build_238352/sketch/HAL.h:36,
                 from /var/folders/6b/cdzfwv0j0mdgpg60zgl5k9n80000gn/T/arduino_build_238352/sketch/MarlinConfig.h:39,
                 from /var/folders/6b/cdzfwv0j0mdgpg60zgl5k9n80000gn/T/arduino_build_238352/sketch/Marlin.h:35,
                 from /var/folders/6b/cdzfwv0j0mdgpg60zgl5k9n80000gn/T/arduino_build_238352/sketch/endstops.cpp:27:
/Users/rwillett/Library/Arduino15/packages/Sanguino/hardware/avr/1.0.3/variants/sanguino/pins_arduino.h:112:70: error: reinterpret_cast from integer to pointer
 #define digitalPinToPCICR(p)        ( (((p) >= 0) && ((p) <= 31)) ? (&PCICR) : ((uint8_t *)0) )
                                                                     ~^~~~~~~
/var/folders/6b/cdzfwv0j0mdgpg60zgl5k9n80000gn/T/arduino_build_238352/sketch/endstop_interrupts.h:121:21: note: in expansion of macro 'digitalPinToPCICR'
       static_assert(digitalPinToPCICR(X_MIN_PIN) != NULL, "X_MIN_PIN is not interrupt-capable");
                     ^~~~~~~~~~~~~~~~~
In file included from /var/folders/6b/cdzfwv0j0mdgpg60zgl5k9n80000gn/T/arduino_build_238352/sketch/endstops.cpp:35:0:
endstop_interrupts.h:141:7: error: non-constant condition for static assertion
       static_assert(digitalPinToPCICR(Y_MIN_PIN) != NULL, "Y_MIN_PIN is not interrupt-capable");
       ^~~~~~~~~~~~~
In file included from /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h:258:0,
                 from /var/folders/6b/cdzfwv0j0mdgpg60zgl5k9n80000gn/T/arduino_build_238352/sketch/HAL.h:36,
                 from /var/folders/6b/cdzfwv0j0mdgpg60zgl5k9n80000gn/T/arduino_build_238352/sketch/MarlinConfig.h:39,
                 from /var/folders/6b/cdzfwv0j0mdgpg60zgl5k9n80000gn/T/arduino_build_238352/sketch/Marlin.h:35,
                 from /var/folders/6b/cdzfwv0j0mdgpg60zgl5k9n80000gn/T/arduino_build_238352/sketch/endstops.cpp:27:
/Users/rwillett/Library/Arduino15/packages/Sanguino/hardware/avr/1.0.3/variants/sanguino/pins_arduino.h:112:70: error: reinterpret_cast from integer to pointer
 #define digitalPinToPCICR(p)        ( (((p) >= 0) && ((p) <= 31)) ? (&PCICR) : ((uint8_t *)0) )
                                                                     ~^~~~~~~
/var/folders/6b/cdzfwv0j0mdgpg60zgl5k9n80000gn/T/arduino_build_238352/sketch/endstop_interrupts.h:141:21: note: in expansion of macro 'digitalPinToPCICR'
       static_assert(digitalPinToPCICR(Y_MIN_PIN) != NULL, "Y_MIN_PIN is not interrupt-capable");
                     ^~~~~~~~~~~~~~~~~
In file included from /var/folders/6b/cdzfwv0j0mdgpg60zgl5k9n80000gn/T/arduino_build_238352/sketch/endstops.cpp:35:0:
endstop_interrupts.h:161:7: error: non-constant condition for static assertion
       static_assert(digitalPinToPCICR(Z_MIN_PIN) != NULL, "Z_MIN_PIN is not interrupt-capable");
       ^~~~~~~~~~~~~
In file included from /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h:258:0,
                 from /var/folders/6b/cdzfwv0j0mdgpg60zgl5k9n80000gn/T/arduino_build_238352/sketch/HAL.h:36,
                 from /var/folders/6b/cdzfwv0j0mdgpg60zgl5k9n80000gn/T/arduino_build_238352/sketch/MarlinConfig.h:39,
                 from /var/folders/6b/cdzfwv0j0mdgpg60zgl5k9n80000gn/T/arduino_build_238352/sketch/Marlin.h:35,
                 from /var/folders/6b/cdzfwv0j0mdgpg60zgl5k9n80000gn/T/arduino_build_238352/sketch/endstops.cpp:27:
/Users/rwillett/Library/Arduino15/packages/Sanguino/hardware/avr/1.0.3/variants/sanguino/pins_arduino.h:112:70: error: reinterpret_cast from integer to pointer
 #define digitalPinToPCICR(p)        ( (((p) >= 0) && ((p) <= 31)) ? (&PCICR) : ((uint8_t *)0) )
                                                                     ~^~~~~~~
/var/folders/6b/cdzfwv0j0mdgpg60zgl5k9n80000gn/T/arduino_build_238352/sketch/endstop_interrupts.h:161:21: note: in expansion of macro 'digitalPinToPCICR'
       static_assert(digitalPinToPCICR(Z_MIN_PIN) != NULL, "Z_MIN_PIN is not interrupt-capable");

Do you want to setup a github repository and I can help debug and compile? Your call.

Also happy to take this offline to avoid polluting this board.

Rob

Thank you, for reporting! This is a bug from the Arduino IDE building tool, since I use PlatformIO I was not getting this error.
I updated the code to keep this feature disabled by default for Arduino users. The compiled HEX versions will have the feature enabled.

Oh no! Not another toolchain :)

I was just about to set up my Mac for Ardunino command line development, e.g. emacs, make etc.

How do you deploy to the board after this, using progisp.exe or can you do it via Mac or Raspberry Pi or whatever?

Thanks

Rob

 

Hi, I've downloaded the 1.1.9.1 Fix version and spent the afternoon trying it out. There is definetly something weird in the code. Simply printing a skirt around the object shows the Z-Axis getting higher and higher and higher rather than laying the layer down. It finishes 80-100mm up in the air.

I've auto-homed, manually levelled the bed, set the Z_PROBE_OFFSET time and time again, When I print a simple calibration print it (a large thing flat square, when the extruder goes to the back of the bed, it just goes higher and higher.

I think the base Marlin 1.1.9 code has a bug in it when used with the BLTouch V3.1 as I'm finding issues that other people don't have. I accept I might have a dodgy machine but this consistently odd. It does appear that most people don't seem have the BLTouch V3.1 and have earlier versions which might have something to do with it.

I'm going to comment out ENABLE_LEVELING_FADE_HEIGHT and see if that does anything to help.

Rob

Turning off ENABLE_LEVELING_FADE_HEIGHT makes the auto bed level break. I end up with the Z Axis on the back row getting higher and higher. Works for the first two rows on a 3 x 3 grid.

I think that 1.1.9 is fundamentally broken for BLtouch V3.1 and that I'm now going to focus on either V2.x or the crap that Creality issues with the 1.1.6 release. If that doesn't work, then the BLTouch is going in the bin.

I'll try V2.x from you and see if that is any better. Not keen on the V2 release as it's so, so tight on space. I have ordered a replacement 32bit motherboard to see if thats any better.

Thank you very for taking the time to help.

Rob

Hi Rob,

I sent the latest version of the firmware to a friend in Spain with BLTouch 3.1 + standard Creality board. We could not reproduce this error, everything worked as expected.

I also reviewed the Marlin bug report system and could not find anything similar. The last bug fixed was related with the Z fade compensation.

I will keep looking for possible causes of this issue.

Dan,

Thanks for the update. I wish you hadn't told me that your friend's identical setup works as this means I do have a problem :)

Mmmm...

1.Am going to strip the machine back to the standard configuration, download 1.1.61 from Creality, build and install that so I have a (hopefully) working stock system. Check that I have no issues there with the 'standard' firmware.

Then I'll reinstall the BLtouch (or rather I'll simply leave the BLTouch in place but plug it back into the MB), install the pile of crap that is the Creality software and see if that works. T

Dan,

Thanks for the update. I wish you hadn't told me that your friend's identical setup works as this means I do have a problem :)

Mmmm...

1. Am going to strip the machine back to the standard configuration

2. Download 1.1.61 (non BLTouch) from Creality, build and install that so I have a (hopefully) working stock system. Check that I have no issues  with the 'standard' firmware.

3. Then I'll reinstall the BLtouch (or rather I'll simply leave the BLTouch in place but plug it back into the MB), install the pile of crap that is the Creality software with BLTouch and see if that works.

4. If that works ok, I'll then try and move to your 1.1.9.1+Fix software.

5. If that doesn't work, I'll go back to the standard non BLTouch software in 2 and await the 32bit motherboard.

6. If that doesn't work, I'll introduce my Thor hammer to BLTouch V3.1 and then the Ender 3 Pro :)

What annoys me is that I was getting very good prints without the BLTouch last Saturday. I have spend 3-4 hours per day for the last six days trying to get this to work and I've failed miserably.

<Sound of man pulling toolkit out and dumping it on the table>

Rob

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

Hi!

 

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?

 

Thanks

Christian

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

Hello,

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

Greets,

Jens

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?

I am still figuring out what features from Marlin 2 I will port to this custom Ender 3 compilation. The problem is that due memory size restrictions, we get more features with 1.1.9 than with the 2.0.

EDIT: The Marlin 2.x version with BLTouch up to 3.1 is now available for download.

LATEST EDIT: The Marlin 1.1.9.1 now support the BLTouch 3.x.

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

Hi,

i get this error, when compiling your firmware for Ender3

 

unterminated argument list invoking macro "_UxGT"

what can i do ?

Hello,

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.

Regards,

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.