SOLVED Duet Wifi BLTouch setup (for BigBox)

Discussion in 'Calibration, Help, and Troubleshooting' started by Proto_BB, Mar 15, 2017.

  1. Proto_BB

    Proto_BB Well-Known Member

    Joined:
    Jul 13, 2016
    Messages:
    73
    Likes Received:
    9
    I have got the Duet Wifi up and running and have been able to successfully print. Not wanting to rest on my laurels I decided to install the BLTouch. Unfortunately I have run into an issue where whenever I do a Z bed leveling the BLTouch errors (flashing red LED) and the Duet Wifi web console reads "1000" for the Z.

    My config.g sets:
    M307 H3 A-1 C-1 D-1 ; BLTouch - on heater 3 pin
    M558 P5 X0 Y0 Z1 H3 F200 T5000 ; Homing Z axis, P5 for BLTouch
    G31 X-22.00 Y7.0 Z1.5 P5 ; Set the probe height - reduced P25 down to P5 - no difference

    My bed.g is:
    G28 ; home all
    G91 ; relative mode
    G1 Z4 F200 ; move Z 4mm for clearance
    G90 ;absolute mode
    M401 ; In lieu of macro - call GCode for deploy probe
    G29 ; run auto bed mesh level
    M402 ; In lieu of macro - call GCode to retract probe
    G1 X10 Y10 F5000

    When trying to run "Home Z" from the web interface the BLTouch extends its probe then goes into error mode when it's triggered. It either triggers immediately because the bed is not low enough, or if I have the bed manually lowered to begin with, it errors when the sensor triggers. When errored the Z on the web interface shows "1000".

    I should mention that my BLTouch is the version where the trace can be scratched to make it 3.3v. That said I had heck of a time scratching it (it's so small it's almost invisible). I have no idea if I was successful. It would be nice to know how to test that it's 3.3v?

    Secondary issue is that if I deploy the probe and manually trigger it with my finger, I get a reading (not 1,000) in the Duet Wifi Web Interface.
     
  2. Proto_BB

    Proto_BB Well-Known Member

    Joined:
    Jul 13, 2016
    Messages:
    73
    Likes Received:
    9
    I have figured out the missing link. My homez.g did not have a command to the BLTouch pin.

    Working homez.g:
    T0 ; select first hot end
    G91 ; Relative coordinates
    G1 Z5 F200 ; Lower bed.
    G4 P500 ; Dwell for 500ms - to ensure bed is down
    G90 ; Absolute positioning
    G1 X35 Y15 F3000 ; Go to first bed probe point and home the Z axis
    M401 ; Lower Z probe (BLTouch)
    G30 ; Calibrate Z-axis
    M402 ; Retract Probe
    G1 Z1 F200 ; Raise bed to 1mm.

    At this point I have not confirmed the reading. It's showing Z as being "1.5" in the web interface.
     
    #2 Proto_BB, Mar 15, 2017
    Last edited: Mar 15, 2017
  3. Proto_BB

    Proto_BB Well-Known Member

    Joined:
    Jul 13, 2016
    Messages:
    73
    Likes Received:
    9
    I have been tuning the distance between the hot end and the bed. The BLTouch was initially set in my config.g for that distance to be 1.5mm when triggered. This is set via G31 X-22.00 Y7.0 Z1.5 P5 ; If you want to tweak this (get a decent first layer) move your Z up to 0 using the machines "move" controls. At 0 do the paper trick under the nozzle, and keep moving it up until its almost touching. Look at what your Z now reads, and alter your Z parameter in G31 accordingly.

    My Z was set to be 1.5mm - yet doing the paper measurement, it worked out that the Z really needed to be 1.35mm for the nozzle to be close enough to the bed to get some squish.

    It should also be mentioned that the BLTouch must be placed a set distance from the bed. My BLTouch is meant to be 8mm from the bed when measured from the plastic housing. Fortunately I have gauge blocks handy and just grabbed a 6mm and a 2mm and pushed the BLTouch into contact to set the height.

    I'm not an expert on this stuff by any means, so if someone knows better please speak up. Others will likely see this thread if they run into issues with their setup.
     
  4. Proto_BB

    Proto_BB Well-Known Member

    Joined:
    Jul 13, 2016
    Messages:
    73
    Likes Received:
    9
    I have been working on my mesh leveling script. All my scripts are adaptations from others.

    My current mesh level which works great with the BLTouch is as follows;

    meshlevel.g
    T0 ; Select first hot end
    G91 ; Relative coordinates - for dropping Z no matter what its current height
    G1 Z4 F6000 ; Lower bed to avoid hotend dragging in bed.

    G28 Y ; Home Y axis first to avoid dock crash
    G28 X ; Home X

    G90 ; Absolute coordinates
    G1 X35 Y15 F3000 ; Go to first bed probe point and home the Z axis

    G28 Z ; Home Z given we are in a known safe on-bed position

    M557 X15:260 Y20:185 S40 ; Bed probe from X15 to 260 and Y20 to 185 in 40mm increments

    M401 ; Lower BLTouch probe
    G29 S2 ; Clears bed height map in RepRapFirmware
    G29 ; Kicks off the Z probing across the height map
    M402 ; Retract BLTouch probe

    M374 ; Save calibration data. Default is sys/heightmap.csv

    G1 X80 Y200 F3000 ; All done - move in front of dock
    G1 X80 Y240 F3000 ; Slide into dock

    --
    The result (after admittedly some tweaking of the bed):
    mesh_map_1.jpg
     
  5. Proto_BB

    Proto_BB Well-Known Member

    Joined:
    Jul 13, 2016
    Messages:
    73
    Likes Received:
    9
    I have performed some crude repeatability tests. I have run the mesh level test 3 times without making any changes to the bed to check on the repeatability of the BLTouch measurements. Note my test environment is the opposite to anything scientific. The bed is dirty (remnants of UHU stick), the weather is hot and muggy. The doors open blowing air in - so expect temperature differences with every test. The results (without any analysis) do however get a thumbs up from me and are as follows:

    Run 1
    RepRapFirmware height map file v1 generated at 2017-02-15 20:53, mean error 0.02, deviation 0.05
    xmin,xmax,ymin,ymax,radius,spacing,xnum,ynum
    15.00,260.00,20.00,185.00,-1.00,40.00,7,5
    0.020, 0.055, 0.070, 0.053, 0.035, 0.012, -0.053
    0.012, 0.053, 0.065, 0.087, 0.058, 0.055, -0.023
    0.007, 0.050, 0.092, 0.082, 0.100, 0.082, 0.017
    -0.025, 0.022, 0.048, 0.077, 0.055, 0.065, 0.010
    -0.095, -0.053, -0.035, -0.038, -0.028, -0.038, -0.070

    Run 2 - No change from 1
    RepRapFirmware height map file v1 generated at 2017-02-15 20:57, mean error 0.02, deviation 0.05
    xmin,xmax,ymin,ymax,radius,spacing,xnum,ynum
    15.00,260.00,20.00,185.00,-1.00,40.00,7,5
    0.010, 0.055, 0.058, 0.048, 0.030, 0.007, -0.050
    0.007, 0.048, 0.067, 0.085, 0.060, 0.050, -0.025
    0.005, 0.045, 0.090, 0.075, 0.090, 0.067, 0.012
    -0.033, 0.022, 0.050, 0.055, 0.053, 0.062, 0.010
    -0.100, -0.065, -0.035, -0.035, -0.035, -0.033, -0.060

    Run 3 - No change from 1 (consistency checking)
    RepRapFirmware height map file v1 generated at 2017-02-15 21:12, mean error 0.03, deviation 0.05
    xmin,xmax,ymin,ymax,radius,spacing,xnum,ynum
    15.00,260.00,20.00,185.00,-1.00,40.00,7,5
    0.017, 0.053, 0.072, 0.055, 0.035, 0.017, -0.040
    0.015, 0.062, 0.075, 0.087, 0.055, 0.053, -0.018
    0.015, 0.053, 0.100, 0.085, 0.097, 0.075, 0.022
    -0.010, 0.035, 0.065, 0.090, 0.070, 0.067, 0.012
    -0.085, -0.043, -0.025, -0.028, -0.023, -0.030, -0.060

    The truly wonderful thing about the Duet Wifi is that you can run the mesh leveling tests in a purely automated manner. No more "paper under the nozzle" stuffing about. In theory if I rip a print off the bed and it moves or I replace the glass with a fresh piece, who cares! It takes a couple of minutes to run fully automated mesh leveling with the BLTouch powered by the Duet Wifi. All automated via a single button click. It doesn't get much better than that! Except of course Duet Wifi BLTouch IDEX! :)
     
  6. Pipshag

    Pipshag Active Member

    Joined:
    Aug 24, 2016
    Messages:
    28
    Likes Received:
    3
    Marlin does this as well with #define AUTO_BED_LEVELING_BILINEAR. It can also synthesize intermediate points for more detailed grid.
     

Share This Page