Help with Optical endstop.



  • So I'm in the process of setting up power loss recovery on my CoreXY, and the last piece I am missing is a means of homing the Z axis to Z Max.

    I got an optical endstop which supposedly works on 3.3v. One of the reviews for it claimed to have it working on a DuetWifi even. But I can't get it to actually trigger.

    This is the endstop: https://spool3d.ca/optical-endstop/

    I'm using this mount for it. https://www.thingiverse.com/thing:2070697

    I have a piece of electrical tape on the flag to completely block the beam.

    It's wired to the Z endstop connection, and the light on both the endstop and the Duet register that the beam as been broken, but when I do a G1 S1 move towards Z max and break the beam by hand, the bed does not stop.

    Here is my config settings, which I think is correct based off the wiki, but maybe not?

    M574 Y2 S0		; Set active-low switch (Makerbot 3-wire) at the high end endstop for Y Max.
    M574 X1 S1		; Set active-high switch (NC Switch) at the low end for X Min.
    M574 Z2 S1		; Set active-high switch (Opto) at the high end for Z Max.
    M574 Z1 S2		; Use zprobe and home to Z Min.
    

    When I measure the voltage at the endstop it reads 3.3v. I've read that a resistor may be required, but I'm pretty clueless when it comes to that stuff and I wouldn't know where to begin.

    What am I missing?

    Thanks in advance.



  • I think I have the same end stop. It should be labeled G S V for the pins. Make sure it's connected like so (however don't take my word for it try and find documentation of both the switch and the board, I don't want to be responsible for a damaged board and I believe you can damage the board if you wire it wrong to the endstop) :

    G - Ground
    V - Voltage 3.3v Pin
    S - Signal

    I had to rewire my cable because the pins were not in the same order.

    If you have that right you should be able to see the light on the board next to the corresponding motor go on or off if you block the sensor.

    Lastly if it's not working you can try to change the endstop modes from S1 to S0 or S0 to S1.

    It should not be too difficult as long as the wiring is correct.


  • administrators



  • @phaedrux said in Help with Optical endstop.:

    It's wired to the Z endstop connection, and the light on both the endstop and the Duet register that the beam as been broken, but when I do a G1 S1 move towards Z max and break the beam by hand, the bed does not stop.

    So it sounds like it is wired to the Duet correctly, track through to DWC following the page David linked to ensure that it is seen there and reads the way you expect.

    On my optical switch the light is on when the beam is not broken and off when it is broken, that seems like active (beam broken) low? Nonetheless in that case your G1 S1 move should stop immediately?



  • @phaedrux I am using a generic endstop I bought off Amazon with good results, I did have to swap two wires going into my duet wifi though because they would have not landed right the way the manufacturer had designed it.

    Also you are probably smarter than me but when I first played with these, coming from mechanical endstops I did not realize something had to physically pass between those two black towers to trigger it. Lol



  • Hi
    New to Duet, so just quessing here, but...Looks like you have 2 endstops defined for Z axis, switch for max and probe for min. As far as i understand, you can have only one endstop per axis, min or max, not both. Maybe you should define your Z max switch as external trigger (look at M581 Gcode wiki).
    And sorry my bad english.



  • @aidar I wondered about this, but assumed that using a probe for z Min meant it didn't count as an endstop.

    I'll have to do some testing. Perhaps putting the M574 Z2 S1 into the macro for the Zmax homing?



  • Thanks for the help everyone, it looks like the issue was as aidar said, the Z probe M574 command appears to overwrite the Zmax command.

    I moved M574 Z2 S1 for Zmax to be after the M574 Z1 S2 for Zprobe, and now everything works as expected.


  • administrators

    You don't need a M574 command for the Z probe, except in the unusual case that you are using the Z probe to home the X or Y axis, as a few printers do.


Locked
 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.