orien piezo z sensor requires power cycle
-
I have my Orien Piezo sensor nicely configured, BUT if I do a homing macro, it works perfectly the first time but the second one will say already triggered while homing. Looking at the Z-Probe numbers on the display, it's 524 during the first z homeing, but will jump to 545 or higher following, forcing me to do that POWER reset to get it to settle down. My question is is there a way to reset the sensor only without a full power reset? OR, why am I getting higher numbers following the first homing operation?
btw, it's a home built idex corexy
Here's my homeall.g, config.g and bed.g
; homeall.g ; called to home all axes echo "running homeall.g" T0 P0 ;select tool 1 but don't run any tool change macro files M140 S80 ;heat the bed M109 S210 ;heat the hotend and wait ;Z HOMING SECTION - this just gets the bed out of the way and will not be used in any calculations ;lower the bed to the bottom G1 H1 Z300 F800 ;home Z quickly down, set current position to ZMax based on M208 in config.g or config-override.g ;G91 ; relative positioning ;G1 Z-5 F800 ; lift Z relative to current position ;G90 ;G1 H1 Z300 F100 ;rehome slowly down and set Z to M208 S0 = 220 as previous line ;Y HOMING SECTION G1 H1 Y-300 F4600 ;home y quickly G91 G1 H0 Y5 ;back off 5mm G90 G1 H1 Y-300 F200 ;rehome Y slowly ;X HOMING SECTION G1 H1 X-500 F4600 ; move quickly to X or Y endstop and stop there (first pass) G91 G1 H0 X5 F200 ;back off a few mm G90 G1 H1 X-500 F200 ; home X axis slowly ;U HOMING SECTION G1 H1 U650 F4600; home U axis quickly G91 G1 H0 U-5 F200 ; go back a few mm G90 G1 H1 U650 F200 ;rehome slowly ;DETERMINE MAX Z HEIGHT G1 X150 Y150 F3600 ;move probe over the bed M291 S3 P"Clip any ooze from the bottom of the X hotend" G1 Z35 G30 ;home Z by probing the bed to find Z0 G92 Z15; ;G1 H3 Z300 F1000 ;update maximum Z G32 ;run bed.g M500 P10:31 ;save config-override.g M501 ;load config-override.g G29 S1 ;load heightmap echo "finished homeall.g"
Bed.g
;G28 ;home all so it's out of the way ;M190 S80 ; set target temperature for bed to 80 degrees and do nothing until reached ;zmotor order is 2 (front left),5(center rear),6(front right) ;G30 S-2 ; Probe the bed at the current XY position. When the probe is triggered, adjust the Z offset of the current tool to make the current position Z=0. ;G1 Z10 ;move the bed to within probing distance G30 P0 X20 Y40 Z-99999 ;probe the left front near the leadscrew and set the offset (driver motor 2) G30 P1 X150 Y290 Z-99999 ;probe the rear center near the leadscrew, set the offset and calculate three point compensation (Motor6) G30 P2 X270 Y40 Z-99999 S3 ;probe the right front near the leadscrew and set the offset (motor 5)
finally, because someone will ask, my config.g
; Configuration file for Duet WiFi (firmware version 3.4.5) ; Randy's corexy idex 17 February 2023 ;General preferences M111 S0 ;Debugging S1 on S0 off G21 ;Work in millimetres G90 ;send absolute coordinates... M83 ;...but relative extruder moves M555 P0 ;Set firmware compatibility to look like RepRap_Firmware to look like rrf M404 N1.75 D0.6 ;Set nominal filament diameter to 1.75 and nozzle width to 0.4 M575 P1 S1 ;General preferences M111 S1 ;Debugging G21 ;Work in millimetres G90 ;send absolute coordinates... M83 ;...but relative extruder moves M555 P0 ;Set firmware compatibility to look like RepRap_Firmware to look like rrf M404 N1.75 D0.6 ;Set nominal filament diameter to 1.75 and nozzle width to 0.4 M575 P0 B250000 ;Set baud rate for USB port for Octoprint M575 P1 S1 B57600 ;enable support for PanelDue (Default B57600) ;Network M550 P"Randy corexy idex" ;set printer name M552 S1 ;enable network M586 P0 S1 ;enable HTTP M586 P1 S1 ;enable FTP M586 P2 S0 ;disable Telnet M575 P1 B57600 S1 ;Set auxiliary serial port baud rate and require checksum (for PanelDue) ;Drives M569 P7 S0 ;Drive 9(X) M569 P8 S1 ;Drive 1(Y) M569 P9 S1 ;Drive 8(U) change to a 1 for forwards M569 P1 S0 ;Drive 1(V) M569 P2 S0 ;Drive 2(Z1) Right front lead screw driver 2 M569 P5 S0 ;Drive 5(Z2) Center rear lead screw driver 5 M569 P6 S1 ;Drive 6(Z3)Left front lead screw, driver 6 M569 P3 S1 ;Drive 3(e0) M569 P4 S1 ;Drive 4(e1) ;stepper drive configuration M669 K5 ; select 5=corexyu 8=CoreXYUV mode M584 X8 Y7 Z2:5:6 U9 V1 E4:3 P4 ;stepper motor assignments ;lead screws M671 X10:186:306 Y80:291:80 S5.0 ;F10 ;lead screws are located at drive 2 = front left, 5 at rear center, 6 at front right ;AXIS LIMITS ;M208 S0 X290 Y307 U423.4 Z225.00 ;set axis maxima S0 means maxima V350 - V240 ;M208 S0 X290 Y307 U423.4 Z179.00 M208 S0 X290 Y307 U393.82 Z179.00 M208 S1 X-130 Y0 U20.4 Z-2.5 ;set axis minima S1 means minima V80 ;ENDSTOPS M574 X1 S1 P"duex.e6stop" ;X homes to the low end of gantry M574 U2 S1 P"duex.e5stop" ;U homes to the high end of gantry M574 Y1 S1 P"ystop" ;Y min active high endstop switch=, home to low end of bed M574 Z2 S1 P"e1stop+zstop+duex.e2stop" ;configure active-high endstops for high end on Z - bed lowers to the three switches for initial self leveling ;FILAMENT SENSORS ;addinging BTT Smart filament sensors later, use this code ;https://forum.duet3d.com/topic/17107/how-to-setup-the-bigtreetech-smart-filament-sensor/42 ;DUEX5 does NOT support pulse filament sensors, MUST use estop connections on the Duet2 M591 D0 P7 C"e0stop" S1 E10 L9 R10:300 A0 ; X filament sensor bigtree smart filament sensor suggested code M591 D1 P7 C"xstop" S1 E8 L6.296 R30:300 A0 ; U filament sensor ;HEATERS ;Bed M140 H0 ;map heated bed to heater 0 M308 S0 P"bedtemp" Y"thermistor" T116000 B4138 ;configure sensor 0 as thermistor on pin bedtemp M950 H0 C"bedheat" T0 ;create bed heater output on bedheat and map it to sensor 0 M143 H0 S120 A2 ;set temperature limit for heater 0 to 120C M307 H0 R0.659 K0.294:0.000 D1.39 E1.35 S1.00 B0 ;bed tuning settings M570 H0 P10 T60 ;after a heater has been switched on, wait 120 seconds for it ;to get to the set temperature. If it takes longer, raise a heater fault. ;X carriage hotend sensors (E0) M308 S1 P"e0temp" Y"thermistor" T105500 B4680 C6.455513e-8 ;configure sensor 1 as thermistor on pin e0temp M950 H1 C"e0heat" T1 ;create nozzle heater output on e0heat and map it to sensor 1 M307 H1 R2.170 K0.401:0.000 D10.44 E1.35 S1.00 B0 V24.1 ;disable bang-bang mode for heater and set PWM limit M143 H1 S285 A2 ;set temperature limit for heater 1 to 280C M570 H1 P30 T20 ;new heater faults for rff3.5 ;Hnnn Heater number Pnnn Time in seconds for which a temperature anomaly must persist on this heater before raising a heater fault (default 5 seconds) ;Tnnn Permitted temperature excursion from the setpoint for this heater (default 15C) ;Tnnn Permitted temperature excursion from the setpoint for this heater (default 15C) ;U carriage hotend sensors (E1) M308 S2 P"e1temp" Y"thermistor" T117200 B4680 C6.455513e-8 ; configure sensor 2 as thermistor on pin e1temp M950 H2 C"e1heat" T2 ;create nozzle heater output on e1heat and map it to sensor 2 M307 H2 R1.658 K0.406:0.000 D6.64 E1.35 S1.00 B0 V24.2 ;heater tuning parameters M143 H2 S285 A2 ;set temperature limit for heater 2 to 280C M570 H2 P30 T20 ;Hnnn Heater number Pnnn Time in seconds for which a temperature anomaly must persist on this heater before raising a heater fault (default 5 seconds) ;Tnnn Permitted temperature excursion from the setpoint ;M305 P2 X101 ;Use thermocouple for heater P2// note for when I upgrade ;to a K type thermocouple ;show the MCU and stepper driver temperature, send the following commands: M308 S10 Y"mcu-temp" A"MCU" M308 S11 Y"drivers" A"Steppers" ;TOOLS ;T0 (X carriage) M563 P0 S"X" D0 H1 F2 ;X0 Y1Fan0 is thermostatically controlled, F2 is gcode controlled by tool P0 G10 L1 P0 X0 Y0 Z0 ;X has no offsets M568 P0 R230 S235 ;set standby temperature at 230 and active temperature at 235 ;X hotend M307 H1 R2.366 K0.483:0.003 D5.16 E1.35 S1.00 B0 V24.1 M950 F0 C"duex.FAN6" ;create fan 0 on pin duex.FAN5 duex.FAN4 is dead. M106 P0 T40 S255 H1 ;when heater 0(XHotend) reaches 75 Celcius, turn on Fan0 at 100% (0-255) M950 F2 C"FAN2" ;H1 x part fan ;ORION2 PIEZO SENSOR ;https://www.precisionpiezo.co.uk/_files/ugd/e08222_cbf0c833679c42d9bb7d8fa12e2c09fb.pdf ;Use Mode P1, non inverted, Probe height 2mm, Delay 0.5s, Probe at 7mm/sec M558 P1 C"zprobe.in" H15 R1.0 F1000:900 A4 T5000 S5 ;Try up to 3 attempts, when two are within 5mm, average those two G31 P530 X0 Y0 Z-0.47 ;P=sensitivity up the number line to increase the gap. Reducee Z to loosen the gap ;0.18 too tight, 0.65 tighter, -0.47 almost perfect ;E0 Print settings M207 P0 S4.0 R0.0 F3600 Z0.15 ;Retraction M572 D0 S0.05 ;Set or report extruder pressure advance M592 D0 A0.06 B0.03 ;https://reprap.org/forum/read.php?262,802277 ;T1 (U carriage) M563 P1 S"U" F3 D1 H2 X3 Y1:4 ;Fan3 is thermostatically controlled, F3 is gcode controlled by tool P1 X mapped to U axis, Y mapped to Y axiswhere X=0, Y=1, Z=2, U=3 etc, not by driver number G10 L1 P1 U0 Y-1.0 Z0 ;use U_find_the_dot to tweak ;X change the U max axis limit. Higher U_max moves the U head further left. ;Y Y-9.20 E1 is too low by 1.5mm...Y-10.7 moved E1 in the increase Y direction ;Z: 0.00 was loose, 1.00 was tight, 0.50 was perfect.... M568 P1 R230 S235 ;initial tool set and stanby temperatures M307 H2 R2.505 K0.443:0.091 D7.04 E1.35 S1.00 B0 V24.1 M950 F1 C"FAN1" ;create fan 1 on pin fan1 M106 P1 T40 S255 H2 ;when heater 2(UHotend) reaches 40 Celcius, turn on Fan1 at 100%(255/256) M950 F3 C"duex.FAN8" ;H2 u part fan ;E1 Print settings M207 P1 S4.0 R0.0 F3600 Z0.2 ;Retraction M572 D1 S0.05 ;Set or report extruder pressure advance M592 D1 A0.06 B0.03 ;https://reprap.org/forum/read.php?262,802277 ;T2 (Copy mode) ;https://duet3d.dozuki.com/Wiki/ConfiguringMultipleIndependentXcarriagesCartesian ;M563 P2 S"copy" D0:1 H1:2 X0:3 F2:3 ;G10 P2 X50 Y0 U-50 S0 R0 ;M567 P2 E1:1 ; set mix ratio 100% on both extruders ;T3 (Mirror mode) ;M563 P3 S"Mirror" D0:1 H1:2 X8:9 Y7:1 F2:3 ;G10 P3 X0 Y0 U25 ; set tool offsets and temperatures ;M567 P2 E1:1 ; set mix ratio 100% on both extruders ;M568 P2 S1 ; turn on mixing for tool 2 ; ;chamber M308 S3 P"duex.e2temp" Y"thermistor" T100000 B4138 ;configure sensor 3 as thermistor on pin duex.e2temp M950 H3 C"duex.e2heat" T3 ;create chamber heater output on duex.e2heat and map it to sensor 3 M307 H3 B1 S1.00 ;enable bang-bang mode for the chamber heater and set PWM limit M141 H3 ;map chamber to heater 3 M143 H3 S150 ;set temperature limit for heater 3 to 100C ;machine M92 X160.213 Y160.213 U160.213 V160.213 Z809.69 ;set axis steps per mm M92 E228.964:228.964 ;set extruder steps per mm M350 X16 Y16 U16 V16 Z16 E16:16 I1 ;configure microstepping with interpolation M566 X500 Y500 U500 V500 Z20 E120:120 ;set maximum instantaneous speed changes (mm/min) M203 X4000 Y4000 U4000 V4000 Z1200 E1200:1200 ;set maximum speeds (mm/min) M201 X300 Y300 U300 V300 Z100 E250:250 ;set accelerations (mm/s^2) M906 X1100 Y1100 U1100 V1100 Z800 E800:800 I20 ;set motor currents (mA) and motor idle factor in per cent M84 S30 ;Set idle timeout M204 P600 T600 ;set print and travel accel M566 P1 ;uses jerk between all moves. yes or no. M593 F60 ;Configure Input Shaping - Dynamic acceleration ;CPU temp calibration M912 P0 S0 ;Automatic power saving M911 S22 R23 P"M913 X0 Y0 Z50 U0 G91 M83 G1 Z3 E-1 F1000" ;Set voltage thresholds and actions to run on power loss ;Miscellaneous ;G29 S1 ;Load the height map from file and activate mesh bed compensation. ;M501 ;load settings from /sys/config.override.g0 B250000 ; Set baud rate for USB port for Octoprint M575 P1 S1 B57600 ;enable support for PanelDue (Default B57600)
-
@RandyL00123 said in orien piezo z sensor requires power cycle:
;ORION2 PIEZO SENSOR
;https://www.precisionpiezo.co.uk/_files/ugd/e08222_cbf0c833679c42d9bb7d8fa12e2c09fb.pdf
;Use Mode P1, non inverted, Probe height 2mm, Delay 0.5s, Probe at 7mm/sec
M558 P1 C"zprobe.in" H15 R1.0 F1000:900 A4 T5000 S5 ;Try up to 3 attempts, when two are within 5mm, average those twoG31 P530 X0 Y0 Z-0.47 ;P=sensitivity up the number line to increase the gap. Reducee Z to loosen the gap
;0.18 too tight, 0.65 tighter, -0.47 almost perfectThis is your Z probe setup. You have a trigger value of 530 set in the G31 command. I don't know what would cause the value reported by the probe to change after homing, but I guess you can increase the trigger value above the second reported value, eg to 575. I haven't used piezos as probes, so I'm not sure how sensitive they are.
Ian
-
@droftarts It's like the electrical noise increases once everything is homed....I did decrease the sensitivity to 340, and that helps but doesn't eliminate the issue....I'm going to try having it power down all steppers etc then retrying...
-
@droftarts piezos are quite suspectible to noise and ambient influences and need careful retuning. I seem to remember that the eazipiezi control board does a little bit better than the precision piezo, but I stopped worrying and switched away from piezos years ago.
@RandyL00123 what you could do is read the current value of the probe while its not probing before each G30, and then reset the sensitivity value to that plus 50 or whatever is a stable higher-but-not-too-low-for-noise-and-not-too-high-for-probing value dynamically.
-
-
@oliof I like that idea, but how do I query the piezo and change the sensitivity in gcode?
-
@RandyL00123 you read the current value from the object model and adjust with G31 by doing something like
G31 K0 P{sensors.probes[0].value[0] + 50}
(untested, needs validation, maybe add 100 instead of 50) with added safeguards should the idle value already be something high (above 850 or so) to avoid crashing with a triggered sensor