Fist off I am new to the 3d printing world and even newer to the Duet2 WiFi. I have spent the last week installing the Duet2 WiFi on the Cartesian printer I built and have turned into a Frankenstein. There is very little left that is original of the Folgertech I bought. Anyway I started the install of the BL Touch and found that this was one of the hardest things I have done to date. There were a lot of documents out there but none of them were really clear on all the steps that had to be done to get it working and some had information that was way different than others because of publication date.
The following is what I ended up doing to get the BL-Touch installed and working very well with my printer. This is all the steps in one place with some of my extra notes included. I am not taking credit for most of this work this is mostly from different web pages here in the Duet WIKI but I am just putting all the steps in one place that I had to go through to get things working. I will say now that the BL-Touch is installed and working it is great.
For the smart folks out there if you see things I have wrong in the following please let me know or if I did something that I did not need to do please post to why. Like I said I am really new at this and just learning and this was a real pain to get working and until I did everything below it did not work correctly.
I hope this helps someone get their BL-Touch installed and working.
Software setup (Duet 2 WiFi/Ethernet)
Important: In the M280 commands in the following, leave out the I1 parameter if the BLTouch is connected to a servo output on a DueX board.
-
In your software config.g file input the following G-Code commands to allow the setup to work:
M307 H3 A-1 C-1 D-1
M558 P9 H5 F100 T2000
G31 X0 Y0 Z0 P25 ; (I dropped the P25 because I think the P value is used for Non contact probes and the BL-Touch is a contact Probe)
• Important: mode 9 is supported in firmware 1.21 and later only. If you are using earlier firmware, replace P9 in the M558 command by P5.
• In the G31 command the X and Y are the offset of the sensor in relation to the nozzle (so input your own) the number for Z is the trigger height (read on for this). This is the height that is obtained from reading the height the nozzle is from the bed when the sensor pin contacts the bed and retracts, P is the signal threshold.
• Ensure in your config-override.g file (in the /sys folder of the SD card) does not contain an M307 H3 command that overrides the above configuration.
• In the M280 commands (see below), you must invert the servo signal using “I1” in the M280 commands if you connect the BLTouch servo input to the expansion header pins, but not if you connect the BLTouch servo input to a Duex. -
Create a deployprobe.g file (in the /sys folder of the SD card) it should contain the following single command:
M280 P3 S10 I1 -
Create a retractprobe.g file (in the /sys folder of the SD card) it should contain the following single command:
M280 P3 S90 I1
Checking the trigger height
The Z probe trigger height must not vary significantly with XY position. Measure the trigger height of your Z probe at various XY positions and make sure it is consistent. To measure the trigger height
MAKE SURE TO LEVEL YOUR BED BEFORE YOU DO THIS.
- Make sure there is no filament stuck to the nozzle (you may want to do this test with the nozzle hot)
- Cancel any existing bed compensation by sending M561
- Send M208 S1 Z-3 to temporarily allow Z moves down to Z=-3mm. This is to ensure that you can lower the nozzle all the way to the bed in step 5.
- Command the print head to the coordinates you want to probe. To probe the center, send G1 Z1.
- Command the print head down in small steps until the nozzle just touches the bed or just grips a sheet of paper. You may need to send M564 S0 to allow movement lower than where the firmware thinks Z=0 is. You may also wish to create a macro to lower the head by e.g. 0.02mm to get greater accuracy (G91 followed by G1 Z-0.02).
- Send G92 Z0 to define that height as Z=0
- Command the nozzle up 5mm (G1 Z5)
- Send G30 S-1 to probe the bed without resetting the Z=0 position
- Read off the Z height from the web interface. That is the trigger height.
- Repeat the previous two steps a couple of times to make sure you are getting a consistent result
- Repeat steps 4-10 for the other XY positions you want to check.
Once you are satisfied with your trigger height result (should be between 0 and 1mm, depending on your printer), open your config.g file (this can be found in your DuetWebControl), find the G31 command and enter your trigger height as a negative value in the Z parameter (ex. G31 X0 Y0 Z-.43).
(The value I came up with was .6 as the trigger height. After many test prints and not having good material adhesion to the bed I changed the value to .8)
Define the mesh size and spacing
Use the M557 command to define the spacing of the mesh that you want to set up, and either the X and Y limits or (for a delta printer) the probing radius.
This is changed in the config.g
M557 X10:190 Y10:190 S20 ; probe from X=10 to 190, Y=10 to 190mm with a mesh spacing of 20mm
For this I ended up using X30:190 Y15:180 S20 You will have to figure out the best settings based off of the location of your sensor in relation to your print head. Mine is 20mm to the left of the print head so I had to start X at 30 so that I am probing at just the edge of the bed and the 190 was the max it could go because I would run up to the endstop otherwise.
Probe the bed
Home the printer if you haven't already, then use the command G29 (or G29 S0) to run the probing sequence. All points in the mesh that are reachable by the probe will be probed. When probing is complete, a message will be returned indicating whether or not it was successful.
Examine the height map
If you sent the G29 command from Duet Web Control, it should display the height map automatically. Otherwise you can view the height map in Duet Web Control by right-clicking the arrow next to the Auto Bed Compensation or Auto Delta Calibration button and selecting "Show Mesh Grid Heightmap" from the drop-down menu.
The height map file is normally called /sys/heightmap.csv but you can specify a different filename in G29, M374 and M375 commands. You can view, edit or download it using the System Editor tab in Duet Web Control.
(If you have some really funky results from you heat map check into the version of your firmware. Version 2.0 had some issue and could produce some funky heatmaps.)
Using mesh bed compensation before printing
• Running G32 to auto calibrate a delta printer will clear the local height map info (but not the copy in heightmap.csv). Therefore, if you wish to use both auto calibration and mesh bed compensation, you must run G32 before you run G29, not after. You can include a G29 command at the end of your bed.g file if you wish.
• If you don't want to probe the bed every time, you can use command G29 S1 to load the height map from the last time you used G29 to probe the bed.
• You can use the M376 command to taper off bed compensation over a specified height