Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Optical Endstop Firmware detection

    Scheduled Pinned Locked Moved
    Duet Hardware and wiring
    5
    6
    473
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Katzundefined
      Katz
      last edited by

      I'm struggling with the detection of my optical endstop on my duet 2 Wifi.

      EndStop used : https://www.aliexpress.com/item/32861519345.html?spm=a2g0s.9042311.0.0.27426c378PGuhp

      I have wired 3 of them this way (on x, y and z) :

      V -> 3.3v
      S -> Signal
      G -> Ground

      There is only those 3 optical sensor connected to the board.
      With power, the optical switch are correctly powered and the red led on top is On

      (this LED)
      text alternatif

      And the LED on the Duet board are also On (and very bright) and when i toggle the switch, both LED on the switch and the Duet turn off.

      text alternatif

      But when i try to send M119 (with the sensor triggered or not) i get :
      Endstops - X: no endstop, Y: no endstop, Z: no endstop, Z probe: at min stop

      What i tryed :

      • Solder a 220Ohm resistor to the R1 Resistor of my switch to get a 100 Ohm average resistor. -> no difference, the LEDs have the same behaviour and same for M119.

      • Changing M574 from S1 to S0

      • Connect the sensor differently :

        V -> 5v
        S -> Signal
        G -> Ground

      5V taken here :
      text alternatif

      No difference, the LEDs still works like a charm but nothing more with the M119 command.

      I don't think the issues come from the sensor or the duet board but rather on the firmware side because of the LED working normally.

      Here is my my config.g :

      ; Configuration file for Duet WiFi (firmware version 1.21)
      ; executed by the firmware on start-up
      ;
      ; generated by RepRapFirmware Configuration Tool v3.2.3 on Thu Mar 04 2021 23:01:24 GMT+0100
      
      ; General preferences
      G90                                     ; send absolute coordinates...
      M83                                     ; ...but relative extruder moves
      M550 P"HyberCube"                       ; set printer name
      M667 S1                                 ; select CoreXY mode
      
      ; Network
      M551 P"Nice try :)"                     ; set password
      M552 S1                                 ; enable network
      M586 P0 S1                              ; enable HTTP
      M586 P1 S0                              ; disable FTP
      M586 P2 S0                              ; disable Telnet
      
      ; Drives
      M569 P0 S1                              ; physical drive 0 goes forwards
      M569 P1 S1                              ; physical drive 1 goes forwards
      M569 P2 S1                              ; physical drive 2 goes forwards
      M569 P3 S1                              ; physical drive 3 goes forwards
      M584 X0 Y1 Z2 E3                        ; set drive mapping
      M350 X16 Y16 Z16 E16 I1                 ; configure microstepping with interpolation
      M92 X80.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 X6000.00 Y6000.00 Z180.00 E1200.00 ; set maximum speeds (mm/min)
      M201 X500.00 Y500.00 Z20.00 E250.00     ; set accelerations (mm/s^2)
      M906 X800 Y800 Z800 E800 I30            ; set motor currents (mA) and motor idle factor in per cent
      M84 S30                                 ; Set idle timeout
      
      ; Axis Limits
      M208 X0 Y0 Z0 S1                        ; set axis minima
      M208 X300 Y300 Z300 S0                  ; set axis maxima
      
      ; Endstops
      M574 X1 Y1 Z1 S1                        ; set active high endstops
      
      ; Z-Probe
      M558 P5 H5 F120 T6000                   ; set Z probe type to switch and the dive height + speeds
      G31 P500 X0 Y0 Z0                       ; set Z probe trigger value, offset and trigger height
      M557 X15:215 Y15:195 S20                ; define mesh grid
      
      ; Heaters
      M305 P0 T100000 B4138 R4700             ; set thermistor + ADC parameters for heater 0
      M143 H0 S120                            ; set temperature limit for heater 0 to 120C
      M305 P1 T100000 B4138 R4700             ; set thermistor + ADC parameters for heater 1
      M143 H1 S280                            ; set temperature limit for heater 1 to 280C
      
      ; Fans
      M106 P0 S0 I0 F500 H-1                  ; set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned off
      M106 P1 S1 I0 F500 H1 T45               ; set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned on
      
      ; Tools
      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
      M575 P1 S1 B57600                       ; enable support for PanelDue
      
      

      Thanks a lot if your have ideas to solve this issue, i lost many hours on it...

      1 Reply Last reply Reply Quote 0
      • alankilianundefined
        alankilian
        last edited by alankilian

        My endstop definitions look like this:

        ; generated by RepRapFirmware Configuration Tool v3.2.3 on Wed Feb 17 2021 12:04:29 GMT-0500 (Eastern Standard Time)
        ; Endstops
        M574 X2 S1 P"xstop"                                     ; configure active-high endstop for high end on X via pin xstop
        M574 Y2 S1 P"ystop"                                     ; configure active-high endstop for high end on Y via pin ystop
        M574 Z2 S1 P"zstop"                                     ; configure active-high endstop for high end on Z via pin zstop
        

        SeemeCNC Rostock Max V3 converted to V3.2 with a Duet2 Ethernet Firmware 3.2 and SE300

        1 Reply Last reply Reply Quote 0
        • mrehorstdmdundefined
          mrehorstdmd
          last edited by mrehorstdmd

          @Katz In my printer I use active high opto endstops on all three axes. I used these because they include a comparator chip to ensure hard on or hard off switching. They work fine with the 3.3V supplied on the endstop connectors on the Duet board, but I had to swap two of the wires on the supplied cables to match the pinout of the Duet board.

          My config looks like this:

          M574 X2 S1 P"!xstop"
          M574 Y2 S1 P"!ystop"
          M574 Z1 S1 P"!zstop"

          The ! inverts the signal.

          Is your Z endstop actually at Zmax?

          You should probably update your firmware...

          https://drmrehorst.blogspot.com/

          1 Reply Last reply Reply Quote 0
          • Phaedruxundefined
            Phaedrux Moderator
            last edited by

            See if this applies to your endstops.

            https://duet3d.dozuki.com/Wiki/Connecting_endstop_switches#Section_3_3V_compatible_optical_endstop

            Z-Bot CoreXY Build | Thingiverse Profile

            1 Reply Last reply Reply Quote 0
            • fcwiltundefined
              fcwilt
              last edited by fcwilt

              This post is deleted!
              1 Reply Last reply Reply Quote 0
              • Katzundefined
                Katz
                last edited by

                thanks to all of you, you just made my day.

                and specially for the "You should probably update your firmware..." from @mrehorstdmd

                I was already on 3.2.2 firmware version but in the RepRapFirmware Configuration Tool i have selected 1.21 ... what a noob mistake ^^

                @alankilian yes, when i saw your endstop definition, i realisez they were something wrong with mine.

                @Phaedrux I have already did this trick but thanks for the tips anyway.

                @fcwilt Hi, i don't know where you see me talking about this piece of code :

                M574 X2 S1 P"xstop"                                     ; configure active-high endstop for high end on X via pin xstop
                
                M574 Y2 S1 P"ystop"                                     ; configure active-high endstop for high end on Y via pin ystop
                
                M574 Z2 S1 P"zstop"        
                

                But now it works ! Thanks all of you.

                1 Reply Last reply Reply Quote 1
                • First post
                  Last post
                Unless otherwise noted, all forum content is licensed under CC-BY-SA