-
Notifications
You must be signed in to change notification settings - Fork 28
Adjust configuration
- Ready wired BLTouch - see Wiki
- Basic knowledge of Marlin configuration
- Basic knowledge of compiling Marlin firmware
- Text Editor of your choice to edit the configuration
- Possibility to issue individual GCode commands (e.g. Octoprint or Pronterface)
- Endurance until the configuration works ;-)
If I write below that the compiled .hex file will be flashed, you take the generated file "Marlin.ino.mega.hex".
As already described in my readme, the BLTouch requires deeper configurations, so I won't provide any precompiled hex-files. The configuration in this Github-Repo is related to my Anycubic, which probably should work with most of the others (except for the stepper type and the direction of rotation of the steppers).
Before you start with the BLTouch settings, please check the following places in the Configuration.h file and adapt them to your setup:
- Line 559-569 -> Stepper Type (Stock Steppers are A4988)
- Line 857-868 -> Direction of rotation of all stepper motors
If you think that all settings are correct, then compile the firmware with these changes, flash the generated hex file and then check the behavior of your printer. To test the direction of rotation of all stepper motors, center the print head by hand and then carefully move each axis with minimal steps using GCodes or the printer display. If everything is correct, continue with the BLTouch-specific settings.
The following lines in the Configuration.h file are necessary for setting the BLTouch and must be adapted to your own requirements:
- Line 745 -> If you have BLTouch v3 (newest Version), uncomment this line.
- Line 785 -> Distance BLTouch to the nozzle on the X-axis (if you take the BLTouch holder from here, the value is already right)
- Line 786 -> Distance BLTouch to the nozzle on the Y-axis (if you take the BLTouch holder from here, the value is already right)
- Line 787 -> Distance BLTouch to the nozzle on the Z-axis (first set to 0; setting will be done afterwards)
- Line 982-986 -> Here you can select the BLTouch measurement method. I choose AUTO_BED_LEVELING_BILINEAR because it makes the most sense. Explanation for each mode can be found directly in the configuration file
- Line 1029 -> Number of measuring points (5 means a 5x5 grid)
- Line 1033-1036 -> Here you define the outer corners of the measuring grid. I have tried to approach or measure the outermost edges. If you don't have any problems here, leave this unchanged.
- Line 1964 -> If you have Trigorilla 1.1 installed set 1, otherwise 0.
!! The preset values of the measuring grid refer to a mounting of the BLTouch holder directly in front of the nozzle (see Installation guide in Wiki). If you have installed a different holder or print head, then the points of the grid must also be adapted!
For the first test you can change the above lines, compile a firmware and flash it.
Then perform the following steps:
M502 (Load setting from firmware)
M500 (save settings in EEPROM)
M280 P0 S10 (pin is extended)
M280 P0 S90 (pin is retracted)
G28 (homing should be done as usual)
G1 Z20 (Raise Z axis)
G1 X110 Y110 Z100 (center print head and position at height Z=100)
G29 (axis moves to the first measuring point (X10 Y10) , the pin is extended and the print head moves down)
When the print head is moving down for the first time, the servo pin of the BLTouch can be operated manually to test the function. If the print head then moves to the next measuring point, the BLTouch will be recognized correctly and everything is fine.
!! If nothing happens while pressing the pin, switch off the printer immediately before you drive into your mechanics or the Heatbed !!
If there have been no problems so far, you can execute the G29
command again and finish it completely.
Here the set grid should be moved and every single measuring point should be measured with the BLTouch.
Afterwards the measured values will be displayed. To activate it you can issue the following command:
M420 S1
For example, if you now move the print head on the X-axis slowly from the far left to the right, you should see from the Z-couplings that they rotate slightly (depending on the value determined).
Next we determine the value for the Z-Offset
To do this, execute the following command:
M211 S0
!! Attention! This deactivates the software end stop !! If you don't pay attention now, you may be able to drive into the mechanics or the heating bed !!
Perform the following steps:
- Preheat your Bed
G28 (Homing is started)
G1 Z5 (Lift print head)
G29 (Approach measuring points with BLTouch)
G1 X110 Y110 Z5 (Move print head back to center)
In slow steps, lower the print head until you have reached the correct height from the nozzle to the heating bed (place a piece of paper or receipt in between).
Read out the current position with M114 (the Z-position is your Z-offset which is necessary for the BLTouch)
Enter the M851 "Z value" (e.g. M851 Z-0.5).
M500 (store value in EEPROM)
Execute homing again (G28 and G29)
G1 X110 Y110 Z5 (Move print head back to center)
If you now slowly lower the print head again and move to Z=0, then the distance should fit as determined before. If the distance does not fit, repeat the above steps. Possibly set M851=0 again.
If you are satisfied with the result, you can integrate the M851 value directly into your firmware.
!! Attention! If you don't write the value into the firmware, don't forget to activate the software endstop again.
For this execute following command:
M211 S1
!! Attention! The determined value should be an "even" number (0.4, 0.5, 0.6, ...) If you can't find an even value at all, then possibly change the height at the BLTouch holder with a washer !!
- Line 787 -> Enter Z-Offset value determined above
Then recompile, flash and issue the following commands:
M502 (Load setting from firmware)
M500 (save settings in EEPROM)
After that the settings should all fit, and you can test the functions again.
- Look for the Z-homing (either just
G28
orG28 Z0
) command and insert these two right underneath it:
G29
- Perform a Automatic Bed Leveling via Special Menu as described in the Readme.
- Look for the Z-homing (either just
G28
orG28 Z0
) command and insert these two right underneath it:
M501
M420 S1
Have fun testing and using the BLTouch
Special thanks to DerDominik who made his tutorial available to me.