Duet 3 1XD board Bed leveling problem



  • For a special machine I need to drive 2 x Z motors with hi-current (5 or 6 A/24V)
    I have made a temporary installation of the new Expansion 1XD with 2 External drivers of Z motors connected on it.
    Duet 1XD drive the 2 Zmotors. It works, the Z motors are OK, Z homing is OK (I just had to disconnect the Enable on the external drivers).

    The problem is my bed leveling does not work any more...

    On this high temperature machine, we have special bed leveling, because we have to deport the system from the heated chamber .
    8dc90d78-f2ea-46a6-bde3-54212667db46-image.png
    We use an electromagnet that pushes a probe into the chamber. When the Bed rises, it pushes the sensor and a blade (in red, in the drawing above), because the electromagnet is not very powerful. A standard low cost optical sensor (https://www.aliexpress.com/item/32817734162.html) placed in a cooled area gives the information of Z.
    This system works since more than 2 years, with Repetier firmware and RRF3 on your Duet3 since 8 months

    With the 1XP, the sensor gives random errors, sometime during the first probe, sometime after 2 or 3 probe, sometime in the middle of the G29...
    ![Error: Z probe was not triggered during probing move](68104aed-5fe3-43ee-91c9-22da2e5e2670-image.png

    If I deploy the probe by M401, the Z_Probe info switch to 0, it looks OK
    !(3461dfb3-f22d-4e4d-acba-9b1100363bbe-image.png
    If I retract the probe by M402, the Z_probe info switch to 1000, it look OK too.
    2718eeac-c0ff-4874-848f-3240f7dd0fc9-image.png

    I try with the optical sensor of bed probe connected to MotherBoard 6HC (in config.g)
    M558 P9 C"0.io8.in" H8 F200 T3000 ; set Z probe type to switch and the dive height + speeds
    M557 X15:285 Y15:235 P6 ; define mesh grid

    and connected on the 1XP
    M558 P9 C"122.io0.in" H8 F200 T3000 ; set Z probe type to switch and the dive height + speeds
    M557 X15:285 Y15:235 P6 ; define mesh grid

    For deploying the Z probe I use the out8 port, the electromagnet requires 300mA
    The deployprobe.g :
    M950 P1 C"0.out8" Q5000 ; allocate GPIO port 8 to expansion board out8 port, 5000Hz for reducing vibration of Electromagnet
    M42 P1 S0.8 ; set 80% PWM on GPIO port 1, avoid to too much heat the Electromagnet

    The retractprobe.g :
    M42 P1 S0

    I tried to add ferrites on the optical sensor cable... same random results.

    Due to hi-temperature and thermal dilations, I have to do a bed leveling before each print.
    In my print gcode, I have a G32 that call the bed.g :

    M561 ; clear any bed transform
    T0 ; Activate T0 head (the one with the sensor)
    M401 ; deploy Z probe (run deployprobe.g file)
    G1 X150 Y125 Z20 F1000 ; move head in the middle of bed before establish a Z=0 datum using the Z probe
    M400 ; wait current move to finish
    G30 ; establish a Z=0 datum using the Z probe
    G1 X150 Y125 Z20 F300 ; move head in the middle of bed
    G29 ; probe the bed and enable compensation
    M402 ; retract Z probe (run retractprobe.g file)
    M376 H10 ; Set bed mesh compensation taper to 10mm (bed mesh error are compensated on 10mm)
    G1 X150 Y125 Z60 ; Move the head down in the middle of bed

    Note :

    • The same configuration worked fine without the 1XP board.
    • On 6HC Firmware is : MB6HC version 3.1.1 running on Duet 3 MB6HC v0.6 or 1.0 (standalone mode) and Board EXP1XD : firmware 3.1.0+ (2020-06-03b1) on 1XP

    Do I made error, or you have any ideas or things to test ?



  • For information, I placed an oscilloscope on the input signal of the board (122.io0.in), the signal seems to be correct.
    I switch M401/M402 every 0.5sec!
    5e703c16-4d7d-4a58-ad1f-d01948a77da5-image.png

    In fact the G30 works every time, it's the G29 that's the problem, now it's almost always at the second point I'm getting the message : 5c269125-5235-4d22-a569-cec74088f314-image.png


  • administrators

    Does the probe deploy and retract once per G29 command, or once per probe point?

    There is a maximum rate at which sensors on an expansion board can send data to the main board, so adding a settling time delay may help. See the M558 R parameter.



  • Does the probe deploy and retract once per G29 command, or once per probe point?
    The probe deploy & retract once per G29 command... The error message appear after the first G29 point during the probe of the second point just after the probe is triggered .

    There is a maximum rate at which sensors on an expansion board can send data to the main board, so adding a settling time delay may help. See the M558 R parameter.
    Tried with R 0.2, R0.5 R1.0 same result...

    I use G32 for testing the Z probe
    My bed.g file :
    ; bed.g
    ; called to perform automatic bed compensation via G32
    ;
    M561 ; clear any bed transform
    G1 X150 Y125 Z12 F1000 ; move head in the middle of bed before establish a Z=0 datum using the Z probe
    G30 ; establish a Z=0 datum using the Z probe
    G29 ; probe the bed and enable compensation
    M376 H10 ; Set bed mesh compensation taper to 10mm (bed mesh error are compensated on 10mm)
    G1 X150 Y125 Z60 ; Move the head to Z60

    My ZProbe configuration in config.g
    ...
    M558 P8 R0.5 C"122.io0.in" H7 F200 T3000 ; set Z probe type to switch and the dive height + speeds
    G31 X0 Y0 Z3.0 ; set default Z probe trigger value,
    M557 X15:285 Y15:235 P6 ; define mesh grid
    ...



  • A short Video explaining better :
    Bed Leveling Problem
    You can see the first G29 point is OK and the problem appear during the second point.


  • administrators

    Thanks. Do you think it is probing to the full depth allowed by the dive height? Or it the probe triggering when it should and stopping the Z motion, but another part of the firmware hasn't registered that the probe triggered?



  • It seems the probe triggering when it should and stopping the Z motion, but another part of the firmware hasn't registered that the probe triggered.
    ( on the second point, I see the probe trigerring on the oscilloscope)

    The config is : Z motors, Z home Sensor, and Bed leveling on the 1XD board



  • I tried with the Z probe connected to the motherboard (0.io6.in), it works better but the G29 fail about 10-15 probing...

    It seems the signal is different between the first Zprobing and second z probing of G29

    The first Z probing
    035f14e8-f4c1-46b4-8a54-7eb30ce0caa4-image.png

    The seconds and more Z probing
    acd7c488-c9a5-4274-9dba-cb022a632488-image.png



  • Sometime the signal is like that and the probing fails
    716a4c8a-f1aa-4e19-8ea8-f8c798ee567d-image.png



  • I have checked manually the bed level (in case of the bed was too much inclinated), it is at about 0.3mm error.

    I have also checked the probe sensor by sending M401/M402 at 100ms delay, it looks OK !
    5e311de5-28e0-4418-a5cc-d6f78e742252-image.png

    I'm confounded, any idea or thing to test ??


  • administrators

    The signal from the probe certainly looks wrong. Is it varying depending on the XY position of the probe? Are you certain that you have set the dive height large enough, in case the probe isn't travelling down (or the bed up) quite far enough?


  • administrators

    PS - another possibility: perhaps the Z axis is skipping steps in such a way that on each probe in the G29 sequence, the probe starts a little higher than last time.



  • @dc42

    Thanks, I will try to increase dive height, just for summarize :

    1 - The Z Motors are connected on the 1XD board with 2 external drivers
    https://www.omc-stepperonline.com/download/DM556N-L.pdf

    If I connect the Probe on the 1XD board :

    • The signal is OK on the G30 probe
    • The signal is OK on the first G29 probe, then wrong on the second probe

    If I connect the Probe on the 6HC board :

    • The signal is OK on the G30 probe
    • The signal is OK on the first G29 probe, then reduce on other probes and after about 10-15 probe the signal is wrong.

    2 - If I connect the Z Motors and Z Probe on the 6HC (Same dive height), ZProbe works (but I have other problems with brakes of Z motors)



  • @dc42
    I do not see or hear any Z skipping steps, Z movements are smooth and regular.



  • Increased dive height to 15mm > the G29 fails on the twelfth probe
    (Z motors on the 1XD, and ZProbe on the 6HC)



  • I made an other test :
    Connect the 2 Z-motors to the drivers of the 6HC board, and changing only the configuration of the Z stepper motors... (No change in the others parameters of config.g)
    Z probing works fine ! no error, bed is fully probed
    fc47b70b-4a37-4bcb-9659-4ae51e6fd170-image.png



  • 100 probe points works too...
    fd86a0c8-19ed-41bd-8b73-134edb8b446e-image.png



  • The problem with this configuration is :
    Z motors needs brakes, it works fine in normal use. But if I push Emergency Stop button, the bed goes down quickly...
    Is there a way to activate brakes when pushing Emergency Stop button ? (before doing the Emergency Stop ?)


  • administrators

    Are the brakes the sort that are normally engaged, and you have to supply power to them to release them?


  • administrators

    PS - the reason why it didn't work using the external stepper drivers is most likely that the M569 timings you are using are insufficient, so that on each G29 probe, the bed drops a little.



  • Yes the brakes are normally engaged and we supply power for release them



  • In fact I made tests on my development machine because a customer already has a big machine with external stepper drivers that's run with Repetier firmware and he though to switch to Duet3 and RRF3. As the Motors need 6A and more and brakes (like in my development machine). It is not possible to use the Duet3 drivers.
    You think there is no possibility to use external drivers for Z and ZProbe ?


  • administrators

    @Philippe71 said in Duet 3 1XD board Bed leveling problem:

    Yes the brakes are normally engaged and we supply power for release them

    Currently there is no facility to de-energise the brake solenoids on an emergency stop, but we could add that to the firmware.

    @Philippe71 said in Duet 3 1XD board Bed leveling problem:

    In fact I made tests on my development machine because a customer already has a big machine with external stepper drivers that's run with Repetier firmware and he though to switch to Duet3 and RRF3. As the Motors need 6A and more and brakes (like in my development machine). It is not possible to use the Duet3 drivers.
    You think there is no possibility to use external drivers for Z and ZProbe ?

    Do the motors really need more than 6A peak current? The drivers on Duet 3 supply up to 6.3A peak. It's rare to run stepper motors at their full rated current, because they get very hot if you do.

    Did you check what timing the external stepper drivers need, and adjust the M569 T parameter for them accordingly? Duet 3 can generate step pulses very fast, and although we slow them down to 2.7us for external drivers by default, this isn't enough for some external drivers. That's why we provide the M569 T parameter.



  • Thanks, it is Nema 42... Data sheet said 6A

    The datasheet of external driver said :
    For reliable response, the pulse width should be greater than 2.5μs
    On the 1XD board, does it means the M569 T parameter is automatically set to 2.7µs ?
    In that case it should work no ? or do I have to setup M569 T2.5 ?


Log in to reply