Wire digital controlled z-probe to z-probe header?



  • I have a modified bltouch witch is driven by a digital signal (0/1) not PWM. Can I use the Z_PROBE_MOD to control it? I am not sure if this is possible. As far I understand I need the mode 5 https://duet3d.dozuki.com/Wiki/Connecting_a_Z_probe I am right?


  • administrators

    You might be able to do that, because in mode 5 the MOD pin is driven high during probing moves and low at other times.



  • Sounds good, one question more - can I take 5V from the EXT 5V header? I tried putting jumper on the EXT 5V EN but I didn't measure 5V output on the header. I know it is for inputting the 5V not output, is they a diode with stops the voltage getting out?


  • administrators

    No, you can't take 5V from that header because there is a diode in between. Take it from the expansion header instead.



  • Do I need put something into deployprobe.g? The input of the probe works fine but it isn't deployed. My endstop settings in config.g is:

    [[g-code]]
    ; Endstops
    M574 X2 Y2 S1                             ; Set active high endstops
    M574 Z1 S2                                ; Set endstops controlled by probe
    M558 P5 H5 F120 T6000 I1                  ; Set Z probe type to switch and the dive height + speeds
    G31 P600 X10 Y0 Z2.5                      ; Set Z probe trigger value, offset and trigger height
    M557 X10:290 Y10:290 S20                  ; Define mesh grid
    
    

  • administrators

    Please explain what you mean by "The input of the probe works fine but it isn't deployed.".



  • By input I mean that the status is read. When I pull the bltouch probe pin out manually z-probe sensor in ui changes it reading from 1000 to 0. But when I do Home Z they is no signal on MOD pin with puts the pin out (remember this is a moded bltouch - a high signal pull the pin out.


  • administrators

    Are you using a G30 command to home Z?



  • ohhh… yeah when using g30 it works fine. So I need to modify homez.g and homeall.g to use G30, I am right?

    [[g-code]]
    G91               ; relative positioning
    G1 Z5 F6000       ; lift Z relative to current position
    G1 S1 Z-355 F1800 ; move Z down until the switch triggers
    G1 Z5 F6000       ; go back a few mm
    G1 S1 Z-355 F100  ; move slowly to Z axis endstop once more (second pass)
    G92 Z2.5          ; set Z position to trigger height
    
    ```This is my homez.g now. How do I make double probing with G30? Not sure how since G30 doesn't have F parameter as I see.

  • administrators



  • Hmmm ok, G30 turns now the Z_MOD but only if the endstop isn't triggered and in my solution the endstop is triggered before Z_MOD goes high. When Z_MOD goes high the pin is pushed out and the endstop goes low so it is ready to trigger. Is they anyway to ignore "Error: Z probe already triggered at start of probing move"? I hope.


  • administrators

    Please post the gcode sequence you are using and explain what happens when.



  • [[language]]
    G91                ; relative positioning
    G1 Z5 F200 	   ; raise head 4mm to ensure it is above the Z probe trigger height
    G90 		   ; back to absolute mode
    G1 X155 Y155 F2000 ; put head over the centre of the bed, or wherever you want to probe
    G30 		   ; lower head, stop when probe triggered and set Z to trigger height
    G92 Z2           ; set Z position to trigger height
    G90;
    G1 Z0 F200
    G1 Z5 F200
    
    ```My homez.g. The problem is my bltouch isn't triggered only when Z_MOD is HIGH. When G30 runs it is triggered and shows an error. Now G30 works I assume this way:
    1\. Check if probe isn't triggered
    2\. If not pull Z_MOD pin high
    3\. Probe z-height.
    
    I need to change it behavior to this:
    1\. pull Z_MOD high
    2\. check if probe isn't triggered
    3\. Probe z-height.


  • Bump, any update on that?
    I made a video, maybe it will explain it better what is happening:
    https://www.dropbox.com/s/hwvtikp42t1pcfm/VID_20180325_123803.3gp?dl=0
    as you can see, the first homing failed. Z_MOD isn't pulled high because the probe is already triggered. The second time i pulled the pin by hand and now the homing is working like expected - the Z_MOD is pulled high (bltouch lights up).


  • administrators

    Does adding a delay before probing (R parameter in M558) make any difference?



  • No, I have already 2s delay. It is added only when I pull the pin manual before probing.


  • administrators

    I think you will need to connect that control wire to a pin on the expansion connector and control it using M42 commands in deployprobe.g and retractprobe.g. The problem is that RRF doesn't set the MOD pin high until the probing actually starts, which is too late for your probe. I can't change that behaviour without breaking other types of sensor.



  • Hmmmm what if I would add a transistor to the Z_MIN to block the signal when Z_MOD is low? I think this should work. I don't like the idea to wiring to the expansion connector because it looks ugly :D.


  • administrators

    You may need to add a delay to that circuit before the Z probe IN pin is allowed to go low, but I am sure that something like that could be made to work.


Log in to reply