Z-probe released with a solenoid
-
@marcossf said in Z-probe released with a solenoid:
I think the flyback diode it's already included in the mosfet used as per component schematic:
That's not a flyback diode. A flyback diode is connected in parallel with the solenoid, cathode to positive side, anode to negative side. Its purpose is to catch the back EMF spike produced by the solenoid when the mosfet turns off and dissipate it, mostly in the resistance of the solenoid.
Without it, the back emf will be dissipated by avalanche breakdown of the mosfet. Power mosfets generally have an avalanche energy rating, but the energy stored in a solenoid may exceed this rating.
The Duet fan outputs have flyback diodes built in, except on older Duet WiFi boards.
-
@dc42 The homez.g was generated by RRF config tool selecting zprobe as zhome method.
; homez.g ; called to home the Z axis ; ; generated by RepRapFirmware Configuration Tool v3.2.3 on Wed Mar 24 2021 10:52:22 GMT+0100 (hora estándar de Europa central) G91 ; relative positioning G1 H2 Z5 F6000 ; lift Z relative to current position G1 H1 Z-105 F1800 ; move Z down until the endstop is triggered G92 Z0 ; set Z position to axis minimum (you may want to adjust this) ; Uncomment the following lines to lift Z after probing ;G91 ; relative positioning ;G1 Z5 F100 ; lift Z relative to current position ;G90 ; absolute positioning
-
@marcossf said in Z-probe released with a solenoid:
@dc42 The homez.g was generated by RRF config tool selecting zprobe as zhome method.
When I select Z probe, this is the generated homez.g:
; homez.g ; called to home the Z axis ; ; generated by RepRapFirmware Configuration Tool v3.2.3 on Wed Apr 21 2021 10:45:13 GMT+0100 (British Summer Time) G91 ; relative positioning G1 H2 Z5 F6000 ; lift Z relative to current position G90 ; absolute positioning G1 X15 Y15 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 F100 ; lift Z relative to current position ;G90 ; absolute positioning
So I think either you must have made the wrong selection, or there is a bug in the config tool that is getting triggered by some other selection you have made.
-
@dc42 Yes, could been edited in some of the test we did.
When manually trigger the Z endstop the Zaxis homed. Just do not deploy the probe. It is configured as Bltouch.
I have edited it to the default values you posted but the solenoid when Z home still does not activate. Here some configuration is missing, or we have something that we have not seen or understand.
Config.g:
; Endstops M574 X1 S1 P"!40.io0.in" ; configure active-high endstop for low end on X via pin !40.io0.in M574 Y1 S1 P"io0.in" ; configure active-high endstop for low end on Y via pin !io0.in M574 Z1 S2 ; configure Z-probe endstop for low end on Z ; Z-Probe M950 S0 C"io3.out" ; create servo pin 0 for BLTouch M558 P9 C"io3.in" H25 F120 T6000 ; set Z probe type to bltouch and the dive height + speeds G31 P500 X0 Y0 Z2.5 ; set Z probe trigger value, offset and trigger height M557 X15:200 Y15:195 S20 ; define mesh grid
Deployprobe.g:
;Rutina de despliegue de sonda M42 P0 S1 ;despliega la sonda activando el pin P0 en io3.out
Retractprobe.g:
; Rutina para recoger la sonda M42 P0 S0 ;recoge la sonda P0 conectada a io3.out pin
Homez.g
; homez.g ; called to home the Z axis ; ; generated by RepRapFirmware Configuration Tool v3.2.3 on Wed Mar 24 2021 10:52:22 GMT+0100 (hora estándar de Europa central) G91 ; relative positioning G1 H2 Z5 F6000 ; lift Z relative to current position G90 ; absolute positioning G1 X15 Y15 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 F100 ; lift Z relative to current position ;G90 ; absolute positioning
-
@marcossf, please test whether the probe deploys when you send G30 to do a single probe of the bed.
Are you certain you want to use P9 instead of P8 in your M558 command? P9 is intended for BLTouch, and causes the probe to be retracted again immediately it touches the bed. So when probing multiple points or probing a point multiple times, it deploys and retracts once per probe. Whereas with P8 the probe can be deployed just once, and retracted just once.
-
@dc42 Ok, I inmediatelly do that test.
Those test we are doing is simply to see that our autolevel part of the system works. What we really want to do on this machine is more complex, and we still don't quite know how to do it.
The Autolevel just define the tilt or geometry for the print surface for all tools. Each toolhead need to set their X Y offset manually (at this moment) and Z offset automatically.
The printer could have up to three manual switchable printheads (1LC inside each), where each tool one would be different. At least we have planned 10 types of printhead suitables to fit in this machine. Still we don't know how manage the Can ID, nozzle offsets and other doubts still not arisen.
-
Changed P9 by P8 in M558 at config.g. Still not Z homming and no G30
We would try other P options?
-
If I invert the pin and put the P5 option in config.g:
M558 P5 C"!io3.in" H25 F120 T6000
the G30 command deploy the probe without the previous error but the endstop doesn't trigger.Same behaviour when tried with P8 option: M558 P8 C"!io3.in" H25 F120 T6000
It's like the deployprobe.g and retractprobe.g it is not being obeyed during G28 routine.
-
@marcossf, the message "Error: Z probe already triggered during probing move" is causing RRF to command the probe to retract as soon as it has deployed. Does your probe report "triggered" whenever it is not deployed? If so, then you need to add a delay to allow the probe to deploy before it is tested. The simplest way is this: in deployprobe.g, after the M42 command add a G4 command to insert a suitable delay. For example, G4 P200 will add a delay of 200ms.
-
@dc42 Ok, we tested with the pause for probe deploy as you suggest.
G30 now deploy the probe, but the endstop doesn't recognize that it is being activated. DWC "see" the activation in the status area, but not trigger it.
Doing HomeZ don't deploy the probe despite the delay. However, M42 or M401/M402 works, but this only demonstrate the sucesfull solenoid pin activation.
I suspect that the problem is in our Z endstop flag that is in it's trigger status when the probe is retracted and stay in this position until the probe is released for the probing at G28, so the Zhome always think is in Z=0.
When the solenoid release the probe, el endstop waits for be triggered again by the flag when its pushed by the probe. Once retracted, the flag back to the endstop active status.In Marlin, it works because there is a define that use endstops only for homing: home x, home y, deploy probe, trigger Z endstop, retract probe and ignore the endstop status after that. Doesn't matter the Z endstop remain active after probing.
We think Duet are monitoring endstops at all times so no probe deploy or z-endstop are beeb triggered because is already done.We will prototype a new flag that it release the activated status when the probe is retracted and check if we are right.
-
Ok @dc42 , tested with a probe flag that doesn't activate when the probe is in retracted position. Same behaviour.
The Z endstop is only activated in a small area of probe flag movement (±4mm). When activated by hand it is seen in the status goes from 0 to 1000 so it works ok.
The G30 command obeys the deployprobe.g file by releasing the probe, but it does not detect that the endstop is being activated, while this change is seen in the DWC status, as well as in the LED of the Z endstop.
When doing homeall.g the probe is never deployed. So, it doesn't obey the deployprobe.g file.
However, if I enter the solenoid activation lines before the G30 in homez.g, it doesn't deploy it either, but it does detect the activation of the endstop, stopping the Z axis motor when triggered by hand.Config.g:
; Endstops M574 X1 S1 P"!40.io0.in" ; configure active-high endstop for low end on X via pin !40.io0.in M574 Y1 S1 P"io0.in" ; configure active-high endstop for low end on Y via pin !io0.in M574 Z1 S2 ; configure Z-probe endstop for low end on Z ; Z-Probe M950 S0 C"io3.out" ; create servo pin 0 for solenoid M558 P8 C"io3.in" H25 F120 T5000 ; set Z probe type to bltouch and the dive height + speeds G31 P500 X0 Y0 Z2.5 ; set Z probe trigger value, offset and trigger height M557 X15:200 Y15:195 S20 ; define mesh grid
Deployprobe.g
;Rutina de despliegue de sonda M42 P0 S1 ;despliega la sonda activando el pin P0 en io3.out G4 P400 ; temporiza la sonda 400ms
Homeall.g
; homeall.g ; called to home all axes ; ; generated by RepRapFirmware Configuration Tool v3.2.3 on Wed Mar 24 2021 10:52:22 GMT+0100 (hora estándar de Europa central) G91 ; relative positioning G1 H2 Z5 F6000 ; lift Z relative to current position G1 H1 X-205 Y-205 F1800 ; move quickly to X and Y axis endstops and stop there (first pass) ;G1 H2 X5 Y5 F6000 ; go back a few mm ;G1 H1 X-205 Y-205 F360 ; move slowly to X and Y axis endstops once more (second pass) G1 H1 Z-105 F360 ; move Z down stopping at the endstop G90 ; absolute positioning G92 Z0 ; set Z position to axis minimum (you may want to adjust this)
Homez.g:
; homez.g ; called to home the Z axis ; ; generated by RepRapFirmware Configuration Tool v3.2.3 on Wed Mar 24 2021 10:52:22 GMT+0100 (hora estándar de Europa central) G91 ; relative positioning G1 H2 Z1 F6000 ; lift Z relative to current position G90 ; absolute positioning G1 X100 Y100 F6000 ; go to first probe point ;M42 P0 S1 ;******just for testing****** ;G4 P400 ;******just for testing****** 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
-
@marcossf, I plan to test this today using a configuration similar to yours.
-
-
6HC in standalone mode.
M122 diag:
m122 === Diagnostics === RepRapFirmware for Duet 3 MB6HC version 3.2.2 running on Duet 3 MB6HC v1.01 or later (standalone mode) Board ID: 08DJM-956L2-G43S4-6J9F4-3S46N-TU4QD Used output buffers: 3 of 40 (12 max) === RTOS === Static ram: 149788 Dynamic ram: 92148 of which 608 recycled Never used RAM 116288, free system stack 181 words Tasks: NETWORK(ready,197) ETHERNET(blocked,110) HEAT(blocked,356) CanReceiv(blocked,848) CanSender(blocked,371) CanClock(blocked,352) TMC(blocked,51) MAIN(running,1119) IDLE(ready,19) Owned mutexes: === Platform === Last reset 00:01:12 ago, cause: power up Last software reset time unknown, reason: MemoryProtectionFault iaccViol, FilamentSensors spinning, available RAM 116360, slot 1 Software reset code 0x416d HFSR 0x00000000 CFSR 0x00000001 ICSR 0x00400804 BFAR 0x00000000 SP 0x2041fd38 Task MAIN Freestk 1756 ok Stack: 2041fdb4 00000000 00000000 00000000 20427384 0045261b 00000000 000f0000 00000001 00444b2b 2041b928 00000000 2041b928 0045260d 00000000 00000000 40400001 3d99999b 00000000 20429288 00000000 2041dbcc 00000000 a5a5a5a5 0873bbcf a5a5a5a5 a5a5a5a5 Error status: 0x00 Aux0 errors 0,0,0 Aux1 errors 0,0,0 MCU temperature: min 22.2, current 33.5, max 33.6 Supply voltage: min 24.0, current 24.1, max 24.1, under voltage events: 0, over voltage events: 0, power good: yes 12V rail voltage: min 12.1, current 12.2, max 12.2, under voltage events: 0 Driver 0: position 0, standstill, reads 16779, writes 11 timeouts 0, SG min/max 0/0 Driver 1: position 0, standstill, reads 16776, writes 14 timeouts 0, SG min/max 0/0 Driver 2: position 0, standstill, reads 16777, writes 14 timeouts 0, SG min/max 0/0 Driver 3: position 0, standstill, reads 16780, writes 11 timeouts 0, SG min/max 0/0 Driver 4: position 0, standstill, reads 16780, writes 11 timeouts 0, SG min/max 0/0 Driver 5: position 0, standstill, reads 16780, writes 11 timeouts 0, SG min/max 0/0 Date/time: 2021-04-22 10:01:30 Slowest loop: 4.39ms; fastest: 0.05ms === Storage === Free file entries: 10 SD card 0 detected, interface speed: 25.0MBytes/sec SD card longest read time 2.3ms, write time 0.0ms, max retries 0 === Move === DMs created 125, maxWait 0ms, bed compensation in use: none, comp offset 0.000 === MainDDARing === Scheduled moves 0, completed moves 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1 === AuxDDARing === Scheduled moves 0, completed moves 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1 === Heat === Bed heaters = -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1, chamberHeaters = -1 -1 -1 -1 === GCodes === Segments left: 0 Movement lock held by null HTTP is idle in state(s) 0 Telnet is idle in state(s) 0 File is idle in state(s) 0 USB is idle in state(s) 0 Aux is idle in state(s) 0 Trigger is idle in state(s) 0 Queue is idle in state(s) 0 LCD is idle in state(s) 0 SBC is idle in state(s) 0 Daemon is idle in state(s) 0 Aux2 is idle in state(s) 0 Autopause is idle in state(s) 0 Code queue is empty. === Network === Slowest loop: 6.65ms; fastest: 0.02ms Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0), 0 sessions Telnet(0), 0 sessions HTTP sessions: 2 of 8 - Ethernet - State: active Error counts: 0 0 1 0 0 Socket states: 5 2 2 2 2 0 0 0 === CAN === Messages queued 12, send timeouts 0, received 12, lost 0, longest wait 1ms for reply type 6042, free buffers 48
-
Thanks! .....
-
@marcossf, please post your complete config.g file too.
-
@dc42 Keep in mind that it is a test bed for functionality, not the final printer. There are tons of things to define, add and configure.
Config.g file:
; Configuration file for Duet 3 (firmware version 3) ; executed by the firmware on start-up ; ; generated by RepRapFirmware Configuration Tool v3.2.3 on Fri Mar 26 2021 17:48:23 GMT+0100 (hora estándar de Europa central) ; General preferences M552 S1 ; activa la configuracion de red ethernet G90 ; send absolute coordinates... M83 ; ...but relative extruder moves M550 P"Duet 3" ; set printer name G4 S1 ;wait for expansion boards to start ; Drives M569 P40.0 S1 ; physical drive 0.0 goes forwards M569 P0.1 S1 ; physical drive 0.1 goes forwards M569 P0.2 S1 ; physical drive 0.2 goes forwards M569 P121.0 S1 ; physical drive 121.0 goes forwards M584 X40.0 Y0.1 Z121.0 E0.2 ; set drive mapping M350 X1 Y16 Z16 E16 I1 ; configure microstepping with interpolation M92 X86.00 Y80.00 Z400.00 E420.00 ; set steps per mm M566 X900.00 Y900.00 Z60.00 E120.00 ; set maximum instantaneous speed changes (mm/min) M203 X24000.00 Y6000.00 Z180.00 E1200.00 ; set maximum speeds (mm/min) M201 X1500.00 Y500.00 Z20.00 E250.00 ; set accelerations (mm/s^2) M906 Y1000 Z800 E1000 ; set motor currents (mA) M84 S0 ; Disable motor idle current reduction ; Axis Limits M208 X0 Y0 Z0 S1 ; set axis minima M208 X200 Y200 Z100 S0 ; set axis maxima ; Endstops M574 X1 S1 P"!40.io0.in" ; configure active-high endstop for low end on X via pin !40.io0.in M574 Y1 S1 P"io0.in" ; configure active-high endstop for low end on Y via pin !io0.in M574 Z1 S2 ; configure Z-probe endstop for low end on Z ; Z-Probe M950 S0 C"io3.out" ; create servo pin 0 for solenoid M558 P8 C"io3.in" H25 F120 T5000 ; set Z probe type to bltouch and the dive height + speeds G31 P500 X0 Y0 Z2.5 ; set Z probe trigger value, offset and trigger height M557 X15:200 Y15:195 S20 ; define mesh grid ; Heaters ; Fans ; Tools M563 P0 D0 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
-
@marcossf, thanks.
I've just tried a configuration similar to your, and it is working for me. I have connected a LED to io3.out to simulate your solenoid. When i execute a single G30 command, the LED lights up, then goes out when I trigger the probe.
I am running the 3.3beta3 candidate firmware. Therefore it is possible that there is a bug in the 3.2.2 firmware that you are running, which is already fixed. Please try the 3.3beta firmware when we release it, which we hope will be later today.
-
@dc42 OK, we will try with the new version and back here for feedback. Thanks!!
-
@marcossf, here is one thing that could be confusing you. When you send G30, RRF will only deploy and retract the probe if it thinks it is not already deployed. To tell whether the probe is already deployed, it counts the number of M401 deploy calls that have not been undone by M402. So if you were to send M401 to deploy the probe, then retract it by sending M42 P0 S0 (instead of sending M402), then RRF would think the probe was already deployed, and not deploy it when you send G30.