Bed leveling problem with IR probe

  • I have installed the IR probe and all works well. The probe detects all position heights but then when it is done it goes all the way to the top and disregards the end switches. After 1-2 seconds mechanically hitting the switches it stops and nothing I do will bring it back to normal. The 'home' button does not even work. I thought it might have something to do with the last command in the bed.g file where the Z150 should probably bring the hotend up 150mm. Instead it goes all the way up, way more than it should. If I power off and power back on again everything is back to normal and the 'Home' button works as to be expected. My printable height is around 490mm. Config file and home file have been adjusted for this height. Also after auto leveling, is there something I need to do or are all the positions automatically stored somewhere?

  • administrators

    Please attach your bed.g and config.g files.

  • Don't know how to attach my files…

    So here is bed.g

    ; Auto calibration routine for delta printers
    ; Before running this, you should have set up your zprobe Z offset to suit your build, in the G31 command in config.g.

    M561 ; clear any bed transform, otherwise homing may be at the wrong height
    G31 X0 Y0 ; don't want any probe offset for this
    G28 ; home the printer

    ;*** Remove the following line if your Z probe does not need to be deployed
    ;M98 Pdeployprobe.g ; deploy the mechanical Z probe

    ; The first time the mechanical probe is used after deployment, it gives slightly different results.
    ; So do an extra dummy probe here. The value stored gets overwritten later. You can remove this if you use an IR probe.
    ;G30 P0 X0 Y0 Z-99999

    ; Probe the bed and do 6- or 7-factor auto calibration
    G30 P0 X-73.6 Y-42.5 Z-99999 ; X tower
    G30 P1 X0 Y-85 Z-99999 ; between X and Y towers
    G30 P2 X73.6 Y-42.5 Z-99999 ; Y tower
    G30 P3 X73.6 Y20 Z-99999 ; between Y and Z towers
    G30 P4 X0 Y67 Z-99999 ; Z tower
    G30 P5 X-73.6 Y20 Z-99999 ; between Z and X towers
    G30 P6 X-36.8 Y-21.25 Z-99999 ; half way to X tower
    G30 P7 X36.8 Y-21.25 Z-99999 ; half way to Y tower
    G30 P8 X0 Y42.5 Z-99999 ; half way to Z tower
    G30 P9 X0 Y0 Z-99999 S6 ; centre, and auto-calibrate 6 factors

    ;*** Remove the following line if your Z probe does not need to be retracted
    ;M98 Pretractprobe.g ; retract the mechanical Z probe

    G1 X0 Y0 Z150 F10000 ; get the head out of the way of the bed

    And this is config.g

    ; Configuration file for Mini Kossel kit from Think3DPrint3D for testing Duet WiFi

    ; Communication and general
    M111 S0 ; Debug off
    M550 PMiniKosselWiFiTest ; Machine name and Netbios name (can be anything you like)
    M551 Preprap ; Machine password (used for FTP)
    ;*** If you have more than one Duet on your network, they must all have different MAC addresses, so change the last digits
    M540 P0xBE:0xEF:0xDE:0xAD:0xFE:0xED ; MAC Address
    ;*** Wifi Networking
    M552 S1 ; Enable WiFi

    M555 P2 ; Set output to look like Marlin
    M575 P1 B57600 S1 ; Comms parameters for PanelDue

    G21 ; Work in millimetres
    G90 ; Send absolute coordinates...
    M83 ; ...but relative extruder moves

    ; Axis and motor configuration
    M569 P0 S0 ; Drive 0 goes forwards
    M569 P1 S0 ; Drive 1 goes forwards
    M569 P2 S0 ; Drive 2 goes forwards
    M569 P3 S1 ; Drive 3 goes forwards
    M569 P4 S1 ; Drive 4 goes forwards
    M574 X2 Y2 Z2 S0 ; set endstop configuration (all endstops at high end, active low)
    ;*** The homed height is deliberately set too high in the following - you will adjust it during calibration
    M665 R166.36 L316.0 B140 H490.87 ; set delta radius, diagonal rod length, printable radius and homed height
    M666 X0 Y0 Z0 ; put your endstop adjustments here, or let auto calibration find them
    M350 X16 Y16 E16 I1 ; Set 16x microstepping with interpolation
    M92 X100 Y100 Z100 ; Set axis steps/mm
    M906 X1000 Y1000 Z1000 E800 I60 ; Set motor currents (mA) and increase idle current to 60%
    M201 X1000 Y1000 Z1000 E1000 ; Accelerations (mm/s^2)
    M203 X20000 Y20000 Z20000 E3600 ; Maximum speeds (mm/min)
    M566 X1200 Y1200 Z1200 E1200 ; Maximum instant speed changes mm/minute

    ; Thermistors
    M305 P0 T100000 B3950 R4700 H30 L0 ; Put your own H and/or L values here to set the bed thermistor ADC correction
    M305 P1 T100000 B3974 R4700 H30 L0 ; Put your own H and/or L values here to set the first nozzle thermistor ADC correction
    M305 P2 T100000 B3974 R4700 H30 L0 ; Put your own H and/or L values here to set the second nozzle thermistor ADC correction
    M570 S180 ; Hot end may be a little slow to heat up so allow it 180 seconds

    ; Fans
    M106 P1 H-1 ; disable thermostatic mode for fan 1

    ; Tool definitions
    M563 P0 D0 H1 ; Define tool 0
    G10 P0 S0 R0 ; Set tool 0 operating and standby temperatures
    ;*** If you have a single-nozzle build, comment the next 2 lines
    M563 P1 D1 H2 ; Define tool 1
    G10 P1 S0 R0 ; Set tool 1 operating and standby temperatures
    M92 E400:400 ; Set extruder steps per mm

    ; Z probe and compensation definition
    ;*** If you have a switch instead of an IR probe, change P1 to P4 in the following M558 command
    M558 P1 X0 Y0 Z0 ; Z probe is an IR probe and is not used for homing any axes
    G31 X0 Y0 Z-538 P500 ; Set the zprobe height and threshold (put your own values here)

    ;*** If you are using axis compensation, put the figures in the following command
    M556 S78 X0 Y0 Z0 ; Axis compensation here

    M208 S1 Z-1.0 ; set minimum Z
    T0 ; select first hot end

  • administrators

    The problem is the Z-538 parameter in the G31 command in config.g. You need to set that parameter to the Z probe trigger height as described in the commissioning instructions at The parameter will normally be between 1.0 and 2.0.

  • Thanks for the quick reply. Makes sense and will try it tonight. That value is the value I read back from the IR probe sensor, pretty stupid of me. Will try to find out where I can read the actual height in mm's.

  • administrators

    From the page I linked to:

    To calibrate the sensor for Z homing and bed probing, home X and Y, then position the head over the centre of the bed. With the nozzle at operating temperature, lower the head so that it is just touching the bed or just gripping a sheet of paper, then send G92 Z0 to define that position as Z=0. Raise the head 5mm and remove the paper. Then send command G30 S-1 to probe the bed at that point without adjusting the Z height setting. Read off the Z height and use that value for the Z parameter in your G31 command in config.g. Please note:

    .. the G31 command in config.g must come after the M558 P1 command. This is because the firmware supports different G31 values for different sensor types.
    After turning your printer on, do not perform any operation that uses the sensor (e.g. X homing on some printers) for 5 seconds, until after the LED has done its 4 flashes.

  • @scheffer:

    …...........Will try to find out where I can read the actual height in mm's.

    It's top right on the Duet Web Control Page. You'll see Head Position, then to the right the X Y and Z values. Z will be somewhere around 2mm depending on your print surface etc. Ignore the Z probe value but as DC42 says in his instructions, use 500. So, you'll end with something like G31 P500 X0 Y0 Z2.00 (assuming you have no X and Y offset and substitute your recorded Z value for the 2.00 I've illustrated). HTH

  • Thanks!
    That solved it!

Log in to reply