BLTouch only works once on a Duet 3 MB6HC
-
Hello.
I'm new in the Duet 3 environment and I have a problem with my BLTouch.
The symptoms are: When I turn on the printer and start a job everything works fine. But when I want to start another job, the G32 command in the startup sequence of my job does not eject the pin of the BLTouch. To start the job I have to make a hard reset of the Duet 3 board. After reset it works normal again.
I have tried almost everything I can think of, changed the IO pin, replaced the BLTouch, modified the homexyz macros and so on.
In this and other forums I found similar topics, but no solution for my problem.Here my environment:
config.g
; Configuration file for Duet 3 (firmware version 3) ; executed by the firmware on start-up ; ; generated by RepRapFirmware Configuration Tool v3.2.3 on Sat Jun 19 2021 20:40:03 GMT+0200 (CEST) ; General preferences G90 ; send absolute coordinates... M83 ; ...but relative extruder moves M550 P"Duet 3" ; set printer name M669 K1 ; select CoreXY mode M80 ; Drives M569 P2 S1 ; physical drive 2 goes forwards x/y rechts M569 P1 S1 ; physical drive 1 goes forwards x/y links M569 P0 S0 ; physical drive 0 goes forwards extruder M569 P3 S0 ; physical drive 3 goes forwards z vorne links M569 P4 S0 ; physical drive 4 goes forwards z hinten M569 P5 S0 ; physical drive 5 goes forwards z rechts M584 X1 Y2 Z3:4:5 E0 ; set drive mapping M671 X-36.5:190.85:418.2 Y7.0:435.7:7.0 S3 ; offsets for bed leveling M350 X16 Y16 I1 ; configure microstepping without interpolation M350 Z16 E16 I1 ; configure microstepping with interpolation M92 X53.33 Y53.33 Z800.00 E400.00 ; set steps per mm M566 X1000.00 Y1000.00 Z200.00 E1500.00 ; set maximum instantaneous speed changes (mm/min) M203 X30000.00 Y30000.00 Z1200.00 E5000.00 ; set maximum speeds (mm/min) M201 X6000.00 Y6000.00 Z1000.00 E2000.00 ; set accelerations (mm/s^2) M906 X1200 Y1200 Z1100 E1300 I30 ; set motor currents (mA) and motor idle factor in per cent M84 S30 ; Set idle timeout ;M593 F198.0 ; Axis Limits M208 X0 Y0 Z0 S1 ; set axis minima M208 X380 Y385 Z360 S0 ; set axis maxima ; Endstops M574 X1 S1 P"^io1.in" ; configure active-high endstop for low end on X via pin io1.in M574 Y1 S1 P"^io0.in" ; configure active-high endstop for low end on Y via pin io0.in M574 Z1 S2 ; configure active-high endstop for low end on Z ; Z-Probe M950 S0 C"io7.out" ; create servo pin 0 for BLTouch M558 P9 C"io7.in" H5 F120 T18000 ; set Z probe type to bltouch and the dive height + speeds G31 P25 X0 Y-34.7 Z3.090 ; set Z probe trigger value, offset and trigger height M557 X15:375 Y15:375 S25 ; define mesh grid ;M307 H7 A-1 C-1 D-1 ; Heaters M308 S0 P"temp0" Y"thermistor" T100000 B4138 ; configure sensor 0 as thermistor on pin temp0 M950 H0 C"out0" T0 ; create bed heater output on out0 and map it to sensor 0 M307 H0 B1 S1.00 R1 ; enable bang-bang mode for the bed heater and set PWM limit M140 H0 ; map heated bed to heater 0 M143 H0 S120 ; set temperature limit for heater 0 to 120C M308 S1 P"temp1" Y"thermistor" T100000 B4725 C7.06e-8 ; configure sensor 1 as thermistor on pin temp1 M950 H1 C"out1" T1 ; create nozzle heater output on out1 and map it to sensor 1 M307 H1 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit M143 H1 S280 ; set temperature limit for heater 1 to 280C ; Fans M950 F0 C"out8" Q500 ; create fan 0 on pin out8 and set its frequency M106 P0 S1.0 H1 T45 ; set fan 0 value. Thermostatic control is turned on ;M106 P0 C"Hotend" S1.0 H-1 ; set fan 0 value. Thermostatic control is turned on M950 F1 C"!out4" Q500 ; create fan 1 on pin out7 and set its frequency M106 P1 C"Duetboard" S1.0 H-1 ; set fan 1 value. Thermostatic control is turned off M950 F2 C"out9" Q500 ; create fan 2 on pin out9 and set its frequency M106 P2 C"Partcooling" S0.0 H-1 ; set fan 2 value. Thermostatic control is turned off ;Not Halt M950 J0 C"io2.in" M581 T0 P0 S1 R0 ; Tools M563 P0 S"Hemera" D0 H1 F2 M572 D0 S0.025 ;Pressure Advance ;M563 P0 D0 H1 F0 ; define tool 0 G10 P0 X0 Y0 Z0 ; set tool 0 axis offsets G10 P0 R0 S0 ; set initial tool 0 active and standby temperatures to 0C ; Custom settings are not defined ; Miscellaneous M501 ; load saved parameters from non-volatile memory M911 S10 R11 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; set voltage thresholds and actions to run on power loss
bed.g
; bed.g ; called to perform automatic bed compensation via G32 ; ; generated by RepRapFirmware Configuration Tool v3.2.3 on Sat Jun 19 2021 20:40:03 GMT+0200 (CEST) M561 ; clear any bed transform ;G29 S2; Clear bed height map ; Probe 3-point ;M401 ; Deploy probe - deployprobe.g G30 P0 X10 Y10 Z-9999 ; Front Left G30 P1 X190 Y355 Z-9999 ; Center Rear G30 P2 X370 Y10 Z-9999 S3 ; Front Right ;M402 ; Retract Probe - retractprobe.g
homeall.g
; homeall.g ; called to home all axes ; ; generated by RepRapFirmware Configuration Tool v3.2.3 on Tue Jun 22 2021 10:09:09 GMT+0200 (CEST) ; BLTouch M280 P0 S160 ; Precautionary alarm release M280 P0 S90 ; Ensure the pin is raised G91 ; relative positioning G1 H2 Z5 F6000 ; lift Z relative to current position G1 H1 X-390 Y-390 F4000 ; move quickly to X or Y endstop and stop there (first pass) G1 H1 X-390 ; home X axis G1 H1 Y-390 ; home Y axis G1 X5 Y5 F6000 ; go back a few mm G1 H1 X-390 F360 ; move slowly to X axis endstop once more (second pass) G1 H1 Y-390 ; then move slowly to Y axis endstop G90 ; absolute positioning G1 X192.5 Y227.2 F6000 ; go to first bed probe point and home Z G30 ; home Z by probing the bed ; Uncomment the following lines to lift Z after probing ;G91 ; relative positioning ;G1 Z5 F100 ; lift Z relative to current position ;G90 ; absolute positioning
homez.g
; homez.g ; called to home the Z axis ; ; generated by RepRapFirmware Configuration Tool v3.2.3 on Tue Jun 22 2021 09:53:15 GMT+0200 (CEST) ; BLTouch M280 P0 S160 ; Precautionary alarm release M280 P0 S90 ; Ensure the pin is raised G91 ; relative positioning G1 H2 Z5 F6000 ; lift Z relative to current position G90 ; absolute positioning G1 X15 Y49.7 F6000 ; go to first probe point G30 ; home Z by probing the bed ; Uncomment the following lines to lift Z after probing ;G91 ; relative positioning ;G1 Z5 F6000 ; lift Z relative to current position ;G90 ; absolute positioning
parts of M122
M122 === Diagnostics === RepRapFirmware for Duet 3 MB6HC version 3.3 (2021-06-15 21:45:47) running on Duet 3 MB6HC v1.01 or later (SBC mode) Board ID: 08DJM-956BA-NA3TN-6J1F8-3S46K-1AAAS Used output buffers: 1 of 40 (12 max)
Start gcode from the slicer
M140 S{material_bed_temperature} ; start preheating the bed WITHOUT wait to what is set in Cura M104 S{material_print_temperature} T0 ; start preheating hotend WITHOUT wait to what is set in Cura G91 ; Relative Positioning G1 Z5 ; Move Z down 5mm G90 ; Absolute Positioning ;G28 XY ; Home XY M561 ; Clear any bed transform ;G1 X192.5 Y192.5 ; Move Probe to middle of bed ; Ensure the pin is raised G32 ; Start 3-point probe sequence M375 P"heightmap.csv" ; Load heightmap ; Go to front left corner G1 Z20.0 F18000 ; Move Z to 20 G1 X5 Y5 ; Move Head to front left ;G92 E0 ; Zero Extruder ;G1 F200 E20 ; Prime the extruder M190 S{material_bed_temperature} ; start heating the bed to what is set in Cura and WAIT M109 S{material_print_temperature} T0 ; start heating hotend to what is set in Cura and WAIT ; Prime nozzle G1 Z0.2 F3000; get ready to prime G92 E0; reset extrusion distance G1 X180 E20 F600; G1 X220 F5000; quick wipe G92 E0 ; Zero Extruder
I hope someone has an idea what this problem could be.
Regards
helmut -
@hekav Does the BLTouch start flashing when it stops reacting to commands? I've heard of another case where the SBC connection was too slow so the BLTouch entered error mode at some point. You can reduce the communication delay in DSF v3.3 on the Pi by changing
SpiPollDelay
in/opt/dsf/conf/config.g
from 25 to 10 or less. Note that this will increase CPU usage slightly but it may help. Also note that the next version v3.4 will not be affected by this problem.I presume you have the correct
deployprobe.g
andretractprobe.g
macros in place as well. -
No it does not flash. The red LED is on all the time
deplyprobe.g
; deployprobe.g ; called to deploy a physical Z probe ; ; generated by RepRapFirmware Configuration Tool v3.2.3 on Sat Jun 19 2021 20:40:03 GMT+0200 (CEST) M280 P0 S10 ; deploy BLTouch
retractprobe.g
; retractprobe.g ; called to retract a physical Z probe ; ; generated by RepRapFirmware Configuration Tool v3.2.3 on Sat Jun 19 2021 20:40:03 GMT+0200 (CEST) M280 P0 S90 ; retract BLTouch
I also did some testing with M401 and M402, because I read that the firmware does some sort of stacking with the deploy and retract command. But this did not help.
helmut
-
Couple things I notice which maybe won't have any impact.
The X Y position of your G30 is different in homeall and homez. They should be the same point in the center of the bed for consistency.
In your homing files where you call to raise the pin just in case, instead of using M280 P0 S90, use M402 to retract the pin. That way the firmware is updated on the state of the pin.
In your bed.g you should add a single G30 at the center of the bed before and after the tilt correction to ensure the Z0 is accurate.
In your slicer start gcode I don't actually see where you are homing the axis. You have ;G28 XY commented out. Are you manually homing first?
-
@phaedrux Regarding: "...In your bed.g you should add a single G30 at the center of the bed before and after the tilt correction to ensure the Z0 is accurate...."
I understand the purpose of the second G30, but what is the system doing with the results of the first G30 and why is it necessary? I ask because my bed.g has only the second G30 and "appears" to be operating correctly, but maybe I'm mistaken.
-
More so as a safety to establish where the bed is before trying to correct for tilt in case it's very out of whack.
-
@hekav What gcode is run at the end of the print? Anything from slicer or stop.g file?
-
@Phaedrux
I can homez at the same position, but accurate homing this ist not my problem.In my homing files I used both M401/M402 M280 P0 S10/90 to retract or deploy the BLTouch. But there were no difference.
When I turn on my printer I call a homeall and the printer is homed as long as i turn off my printer.
When I start a job I only run a G32 to make sure the bed is leveled. Thats why I do not call a G28 XY.
Why should i do that after each job it's wasted time?helmut
-
M104 S0 M140 S0 ;Retract the filament G92 E1 G1 E-1 F300 G91 G1 Z10 G90 G1 X5 Y380 F6000 ;M84 ; Shutdown ;M81 S1
Sometimes I uncommet M81 S1 to turn off the printer when I am not present.
Helmut
-
@hekav said in BLTouch only works once on a Duet 3 MB6HC:
In my homing files I used both M401/M402 M280 P0 S10/90 to retract or deploy the BLTouch. But there were no difference.
You should not use any of these when using BLTouch.
In your homez.g:
; BLTouch
M280 P0 S160 ; Precautionary alarm release
M280 P0 S90 ; Ensure the pin is raisedI suggest that you either remove those commands, or add a G4 delay command between those two M280 commands. The first one will get overridden almost immediately by the second, and might confuse the BLTouch. You could also add a delay after the second M280 command.
-
When I started I did not use any of these commands.
Here my original settings:
bed.g
; bed.g ; called to perform automatic bed compensation via G32 ; ; generated by RepRapFirmware Configuration Tool v3.2.3 on Sat Jun 19 2021 20:40:03 GMT+0200 (CEST) M561 ; clear any bed transform G29 S2; Clear bed height map ; Probe 3-point G30 P0 X10 Y10 Z-9999 ; Front Left G30 P1 X190 Y355 Z-9999 ; Center Rear G30 P2 X370 Y10 Z-9999 S3 ; Front Right
homez.g
; homez.g ; called to home the Z axis ; ; generated by RepRapFirmware Configuration Tool v3.2.3 on Tue Jun 22 2021 09:53:15 GMT+0200 (CEST) G91 ; relative positioning G1 H2 Z5 F6000 ; lift Z relative to current position G90 ; absolute positioning G1 X15 Y49.7 F6000 ; go to first probe point G30 ; home Z by probing the bed ; Uncomment the following lines to lift Z after probing G91 ; relative positioning G1 Z5 F6000 ; lift Z relative to current position G90 ; absolute positioning
The results where always the same. Not only the G32 does fail after I run a Job, also the homez command.
I cannot believe that I'm the only having problems like that with the same hardware and software.
I checked the hardware connections several time and used different IO ports, but with no success.helmut
-
I think I found the problem. Since I have a Hemera Extruder I wired all the wires from the print head in one channel to the control board. The length is about 1.8 m. I figured the main difference when printing is the extruder motor. So I made a different cable for the BLTouch and routed it away from the extruder wires. And it works now.
Is it possible that the long path of wires of the BLTouch an extruder in parallel influences the IO behavior of the Duet3 board? Do I have to rewire my printer, or is there an other solution (shielding the BLTouch and/or extruder wires)?
helmut
-
@hekav said in BLTouch only works once on a Duet 3 MB6HC:
Is it possible that the long path of wires of the BLTouch an extruder in parallel influences the IO behavior of the Duet3 board?
I'm glad you found the problem. Yes, that is entirely possible. Stepper motor cables induce voltages capacitively to any nearby cables, especially high-impedance signals such as BLTouch in its default open-drain mode. So if you need to route stepper motor wires next to any other cables other than heater or fan power wires, it's best to use shielded cable for the stepper motor cable - ideally, 2 twisted pairs inside a shield. Alternatively, use shielded cable for the signal wires.
Workarounds that may have worked with your original wiring include:
- Send BLTouch the command to output a 5V signal instead of operating in open drain mode
- Add a pullup resistor of e.g. 3K3 between the BLTouch output and +3.3V
- Add a capacitor of e.g. 10nF between the BLTouch output and ground (although that would delay the signal a little)