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

    Optical Endstops

    Scheduled Pinned Locked Moved Solved
    Duet Hardware and wiring
    7
    25
    1.2k
    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.
    • Adamfilipundefined
      Adamfilip
      last edited by

      Using Duet2Wifi and Duex5 expansion

      I have Dual Optical Endtops on Y axis (Dual motor Y)
      and Single Optical Endstop on X axis

      ; Endstops
      M574 X2 S1 P"xstop" ; X max active high endstop switch
      M574 Y2 S1 P"ystop+e6stop" ; Dual Y Optical endstops

      Motor Map
      M584 X0 Y1:9 Z5:6:7:8 E3 ; MOTOR MAPPING WITH 4 Z STEPPERS dual y

      I keep getting failed to enable endstops
      lights stays on all the time. except when triggered.

      I am not sure if the optical switches are 3.3 or 5v.. cant tell
      is there a specific model of 3.3v optical endstop i should use. just using some i found on amazon

      Alex.crundefined mrehorstdmdundefined 2 Replies Last reply Reply Quote 0
      • Alex.crundefined
        Alex.cr @Adamfilip
        last edited by

        @Adamfilip

        Can you link the exact end stops you have wired up? Also a picture or diagram of you wiring would help.

        Here is my first guess. You may be using the wrong type of end stop or need to enable a pull up resistor to get them to work properly. The end stop input pins need to be pulled to ground in order to trigger.

        Voron2.4/Duet3 SBC+6HC+3HC+1LC+1HCL(x2) - Delta/Duet2 Wifi - CubePro/Duet2 Wifi+Duex5 - Laser/Duet3 Mini5+ - Cel Robox - U̶p̶3̶0̶0̶+/D̶u̶e̶t̶3̶ ̶6̶H̶C̶+̶LC1̶ - F̶T̶-̶5̶/̶D̶u̶e̶t̶2̶ ̶W̶i̶f̶i̶ - S̶o̶l̶i̶d̶o̶o̶d̶l̶e̶

        Adamfilipundefined 1 Reply Last reply Reply Quote 0
        • Adamfilipundefined
          Adamfilip @Alex.cr
          last edited by Adamfilip

          @Alex-cr these are the ones
          6PCS Optical Endstop Light Control Limit Switch for RAMPS 1.4 Board 3D Printers Parts with 3 Pin Cable Accessories https://a.co/d/123OLTb

          I will draw up a wiring diagram tomorrow

          dc42undefined Adamfilipundefined 3 Replies Last reply Reply Quote 0
          • Phaedruxundefined
            Phaedrux Moderator
            last edited by

            Please post your full config.g and your homing files.
            Also the output of sending M122 and M98 P"config.g"

            Z-Bot CoreXY Build | Thingiverse Profile

            Adamfilipundefined 2 Replies Last reply Reply Quote 0
            • dc42undefined
              dc42 administrators @Adamfilip
              last edited by

              @Adamfilip if they are compatible with RAMPS then they are designed for 5V. You can convert them to 3.3V if you identify the LED series resistor and solder a lower value resistor on top of it. See https://docs.duet3d.com/User_manual/Connecting_hardware/Sensors_endstops#h-33v-compatible-optical-endstop.

              Duet WiFi hardware designer and firmware engineer
              Please do not ask me for Duet support via PM or email, use the forum
              http://www.escher3d.com, https://miscsolutions.wordpress.com

              Adamfilipundefined 1 Reply Last reply Reply Quote 0
              • Adamfilipundefined
                Adamfilip @dc42
                last edited by

                @dc42 the resistors on the sensor are so small and my skills with a soldering iron arent great. I dont think I would be able. to do. thats why I wondering where I can buy a 3.3v one ready to go. wish Duet made one TBH that was plug and play.

                945a9657-4c1e-4858-8fb1-89d9a36e5349-image.png

                dc42undefined A Former User? 2 Replies Last reply Reply Quote 0
                • Adamfilipundefined
                  Adamfilip @Adamfilip
                  last edited by

                  @Adamfilip here is my crude wiring diagram lol

                  cb2b5c0f-5ee9-4de4-b1bc-02afd0cc9d29-image.png

                  1 Reply Last reply Reply Quote 0
                  • Adamfilipundefined
                    Adamfilip @Phaedrux
                    last edited by

                    @Phaedrux

                    Config

                    ;389.86; Configuration file for Duet WiFi (firmware version 3)
                    ; executed by the firmware on start-up
                    ;
                    ; generated by RepRapFirmware Configuration Tool v2.1.5 on Wed Jan 08 2020 19:38:55 GMT-0500 (Eastern Standard Time)
                    
                    ; General preferences
                    ;M564 H0											; allow movement without homing
                    G90                                              ; send absolute coordinates...
                    M83                                              ; ...but relative extruder moves
                    M550 P"TitanXY"                                  ; set printer name
                    M929 S3		;Log console to SDCard
                    M669 K0                                          ; Motion Kinematics for Cartesian mode
                    
                    ; Network
                    M552 S1                                          ; enable network
                    M586 P0 S1                                       ; enable HTTP
                    M586 P1 S0                                       ; disable FTP
                    M586 P2 S0                                       ; disable Telnet
                    M586 P1 S1 C"*"									 ; allows Cross Origin Resource Sharing (CORS). 
                    
                    ; --- drive map ---
                    ;    	 _______ 280,280
                    ;   	| V6 | W7 |
                    ;   	| ----- |
                    ;   	| U5 | Z8 |
                    ;    0,0 -------
                    ;         front
                    
                    ; Drives
                    M569 P0 S0                           			; X Motor physical drive 0 goes backwards previously P0
                    M569 P1 S1										; Y Motor
                    
                    M569 P3 S1                                  ; E0 Extruder physical drive 3 goes Forwards
                    M569 P5 S0								; FRONT LEFT Z Drive 5 on Duex 5 0.10
                    M569 P6 S1 								; REAR LEFT Z Drive 6 on Duex 5 0.10
                    M569 P7 S1 								; REAR RIGHT Z Drive 7 on Duex 5 0.10
                    M569 P8 S0  							; FRONT RIGHHT Z Drive 8 on Duex 5 0.10
                    ;M584 X0 Y1 U5 V6 W7 Z8 E3						; TEST MAPPING
                    ;M584 X0 Y1 Z5:6:7:8 E3						; MOTOR MAPPING WITH 4 Z STEPPERS single y
                    M584 X0 Y1:9 Z5:6:7:8 E3						; MOTOR MAPPING WITH 4 Z STEPPERS dual y
                    M350 X16 Y16 Z8 I1                             ; configure microstepping without interpolation, previously 32
                    M350 E16 I1                                     ; configure microstepping with interpolation
                    ;M92 X80.09 Y80.28 Z321.62 E397            				; set steps per mm.
                    M92 X80 Y80.0 Z2400 E478.4            				; july 21 set steps per mm
                    M566 X900 Y900 Z60 E800 						; Set maximum instantaneous speed changes (mm/min) JERK
                    M203 X18000 Y18000 Z750 E2500 				; Set maximum speeds (mm/min)
                    M201 X3000 Y3000 Z250 E1000 					; Set accelerations (mm/s^2)
                    M906 X1200 Y1200 Z1200 E600 I30 				; Set motor currents (mA) and motor idle factor in per cent X1400 Y1400 Z1300
                    M204 P1500 T2000                ; Set printing acceleration and travel accelerations
                    M84 S30 ; Set idle timeout
                    
                    M572 D0 S0.025									; Pressure Advance                                        
                    
                    ; Axis Limits
                    M208 X0 Y0 Z-1 S1                                 ; set axis minima
                    M208 X280 Y270 Z550 S0                           ; set axis maxima.
                    
                    ;SKEW COMPENSATION .
                    ;M556 S100 X-0.2
                    ;M556 S100 X-0.313			;july 21
                    
                    ;911 PRINT RECOVERY MODE
                    M911 S19.8 R22.0 P"M913 X0 Y0 G91 M83 G1 Z1 E-5 F1000"
                    
                    ; Endstops
                    M574 X2 S1 P"xstop"   ; X max active high endstop switch
                    ;M574 Y2 S1 P"ystop"   ; Y max active high endstop switch
                    M574 Y2 S1 P"ystop+e6stop" ; Dual Y Optical endstops
                    
                    ;M574 X2 S3 P"xstop"   ; X max active high endstop switch SENSORLESS
                    ;M574 Y2 S3 P"ystop"   ; Y max active high endstop switch  SENSORLESS
                    ;M915 X Y R0 F0			; enable stall detection
                    ;M591 D0 P3 C"e0stop" S1 E3  ; filament monitor connected to E0_stop
                    M591 D0 ; display filament sensor parameters for extruder drive 0
                    
                    ;M574 Z0 P"nil"        ; zstop is free
                    ;M950 J1 C"!zstop"		; Use Z endstop as Emergency Stop if Triggers, due to head Plunge
                    M581 P1 T0 S1 R0
                    
                    ;Euclid Settings
                    M574 E1 S2  			 ;configure Z-probe endstop for low end on Z
                    ;
                    M558 P5 C"^zprobe.in" H10 F500 60 T9000 A2 S0.03    ; K0 for probe 0, P5 for NC switch, C for input pin, 
                                                                  ; ^ for enabling the native pullup resistor on Duet 2 
                                                                  ; hardware running RRF3  
                                                                  ; H dive height of 8mm, F300 probing speed 6mm/sec, 
                                                                  ; T9000 travel speed 150mm/sec,   
                                                                  ; A3 number of probes 1, S0.01 max tolerance of 0.01
                    											  
                    G31 K0 P500 X-21 Y0 Z7.55      		; CHECK for LOOSE things first! set Z probe trigger 
                                                                  ; value, offset and trigger height.  Higher numbers
                                                                  ; makes nozzle closer to bed
                                                                  ; switch plunger is 16.4mm to the LEFT and 29.27mm in
                                                                  ; FRONT of the nozzle. Switch triggers 0.9mm BELOW nozzle
                                                                  ; https://duet3d.dozuki.com/Wiki/Test_and_calibrate_the_Z_probe#Secti
                    											  
                    ; Bed leveling
                    ; --- drive map ---
                    ;    	 _______ 280,270
                    ;   	| V6 | W7 |
                    ;   	| ----- |
                    ;   	| U5 | Z8 |
                    ;    0,0 -------
                    ;         front
                    M671 x-75:-75:367:367 Y-100:440:440:-100 S40     ; Define Z belts locations (Front_Left, Back_Left, Back_Right, Front_Right), S10 = MAX 10MM DIFFERENCE ALLOWED
                    ;M671 x-76:-76:382:382 Y-37:421:421:-37 S40     ; Define Z belts locations (Front_Left, Back_Left, Back_Right, Front_Right), S10 = MAX 10MM DIFFERENCE ALLOWED
                    ;M671 x15:15:298:298 Y15:298:298:15 S20      ; Define Z belts locations (Front_Left, Back_Left, Back_Right, Front_Right), S10 = MAX 20MM DIFFERENCE ALLOWED
                    
                    M557 X50:250 Y50:250 P5                      ; define mesh grid S86 =  Spacing 86mm P3 = 3 point spacing
                    M376 H3									; taper bed levelling off after 10mm height
                    M581
                    
                    ;Accelerometer
                    M955 P0 C"spi.cs4+spi.cs3" I60
                    M593 P"zvd" F35.5 ; use ZVD input shaping to cancel ringing at 35.5Hz
                    ;M593 P"none"      ; disable input shaping
                    ;M593 P"custom" H0.4:0.7 T0.0135:0.0135 ; use custom input shaping
                    
                    ; Heaters
                    M308 S0 P"bedtemp" Y"thermistor" T100000 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
                    M140 H0											; Map heated bed to heater 0
                    M143 H0 S120                                     ; set temperature limit for heater 0 to 120C
                    ;M307 H0 R0.668 K0.284:0.000 D5.21 E1.35 S1.00 B0 ; PID BED Tuning
                    M307 H0 R0.671 K0.370:0.000 D6.13 E1.35 S1.00 B0
                    
                    M308 S1 P"e0temp" Y"thermistor" T100000 B4725 C7.060000e-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
                    M143 H1 S300									; set temperature limit for heater 1 to 300C
                    M307 H1 R4.107 K1.013:0.000 D1.94 E1.35 S1.00 B0 V24.0   ;REVO 24V
                    
                    M308 S2 P"e1temp" Y"thermistor" T100000 B3950  ; configure sensor 2 as thermistor on pin e1temp
                    M950 H2 C"e1heat" T2                           ; create chamber heater output on e1heat and map it to sensor 2
                    M307 H2 B0 S1.00                               ; disable bang-bang mode for the chamber heater and set PWM limit
                    M141 H2                                        ; map chamber to heater 2
                    M143 H2 S100                                   ; set temperature limit for heater 2 to 100C
                    
                    
                    ; Fans
                    M950 F0 C"fan2" Q500                         ;create fan 2 on pin fan0 and set its frequency
                    M106 P0 S0 H-1                            ; set fan 0 value. Thermostatic control is turned off
                    
                    
                    
                    ; Tools
                    M563 P0 D0 H1 F0                                 ; define tool 0
                    ;M563 P1 D1 H2 F1                                 ; define tool 1
                    G10 P0 X0 Y0 Z0                                  ; set tool 0 axis offsets
                    G10 P0 R0 S0                                     ; set initial tool 0 active and standby temperatures to 0C
                    
                    M17 Z										;engage z stepper to prevent gantry falling
                    
                    

                    HomeX

                    ; homex.g
                    ; called to home the X axis
                    ;
                    ; generated by RepRapFirmware Configuration Tool v3.3.10 on Thu Dec 16 2021 09:51:49 GMT-0500 (Eastern Standard Time)
                    if !move.axes[0].homed || !move.axes[1].homed     ; If the printer hasn't been homed, home it
                       M98 P"0:/sys/homexy.g"  
                    G91              ; relative positioning
                    G1 H2 Z5 F6000   ; lift Z relative to current position
                    G1 H1 X285 F1000 ; move quickly to X axis endstop and stop there (first pass)
                    G1 H2 X-5 F6000  ; go back a few mm
                    G1 H1 X285 F360  ; move slowly to X axis endstop once more (second pass)
                    G1 H2 Z-5 F6000  ; lower Z again
                    G90              ; absolute positioning
                    
                    1 Reply Last reply Reply Quote 0
                    • Adamfilipundefined
                      Adamfilip @Phaedrux
                      last edited by

                      @Phaedrux homeall.g homex (1).g homey (1).g homez (1).g config (1).g homexy (1).g

                      1 Reply Last reply Reply Quote 0
                      • Adamfilipundefined
                        Adamfilip @Adamfilip
                        last edited by Adamfilip

                        @Phaedrux M122

                        M122
                        === Diagnostics ===
                        RepRapFirmware for Duet 2 WiFi/Ethernet version 3.4.5 (2022-11-30 19:36:12) running on Duet WiFi 1.02 or later + DueX5
                        Board ID: 08DLM-996RU-N85T0-6JKF2-3SJ6Q-1AVVR
                        Used output buffers: 1 of 26 (26 max)
                        === RTOS ===
                        Static ram: 23836
                        Dynamic ram: 75956 of which 40 recycled
                        Never used RAM 11984, free system stack 134 words
                        Tasks: NETWORK(ready,4.7%,242) HEAT(notifyWait,0.5%,333) Move(notifyWait,0.0%,282) DUEX(notifyWait,0.0%,24) MAIN(running,94.5%,442) IDLE(ready,0.3%,30), total 100.0%
                        Owned mutexes:
                        === Platform ===
                        Last reset 16:24:31 ago, cause: software
                        Last software reset at 2023-01-19 16:51, reason: User, GCodes spinning, available RAM 12384, slot 0
                        Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0041f000 BFAR 0xe000ed38 SP 0x00000000 Task MAIN Freestk 0 n/a
                        Error status: 0x04
                        Step timer max interval 0
                        MCU temperature: min 33.3, current 33.9, max 35.4
                        Supply voltage: min 24.0, current 24.1, max 24.3, under voltage events: 0, over voltage events: 0, power good: yes
                        Heap OK, handles allocated/used 0/0, heap memory allocated/used/recyclable 0/0/0, gc cycles 0
                        Events: 0 queued, 0 completed
                        Driver 0: standstill, SG min 0
                        Driver 1: standstill, SG min n/a
                        Driver 2: standstill, SG min n/a
                        Driver 3: standstill, SG min n/a
                        Driver 4: standstill, SG min n/a
                        Driver 5: standstill, SG min 0
                        Driver 6: standstill, SG min 0
                        Driver 7: standstill, SG min 0
                        Driver 8: standstill, SG min 0
                        Driver 9: standstill, SG min n/a
                        Driver 10: 
                        Driver 11: 
                        Date/time: 2023-01-20 09:16:09
                        Cache data hit count 4294967295
                        Slowest loop: 291.81ms; fastest: 0.18ms
                        I2C nak errors 0, send timeouts 0, receive timeouts 0, finishTimeouts 0, resets 0
                        === Storage ===
                        Free file entries: 9
                        SD card 0 detected, interface speed: 20.0MBytes/sec
                        SD card longest read time 26.8ms, write time 3.4ms, max retries 0
                        === Move ===
                        DMs created 83, segments created 11, maxWait 1260235ms, bed compensation in use: none, comp offset 0.000
                        === MainDDARing ===
                        Scheduled moves 23, completed 23, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 18], CDDA state -1
                        === AuxDDARing ===
                        Scheduled moves 0, completed 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1
                        === Heat ===
                        Bed heaters 0 -1 -1 -1, chamber heaters 2 -1 -1 -1, ordering errs 0
                        === 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
                        Daemon is idle in state(s) 0
                        Autopause is idle in state(s) 0
                        Code queue is empty
                        === DueX ===
                        Read count 23, 0.02 reads/min
                        === Network ===
                        Slowest loop: 30.97ms; fastest: 0.00ms
                        Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0)
                        HTTP sessions: 2 of 8
                        = WiFi =
                        Network state is active
                        WiFi module is connected to access point 
                        Failed messages: pending 0, notready 0, noresp 0
                        WiFi firmware version 1.27
                        WiFi MAC address 84:0d:8e:b2:f8:6f
                        WiFi Vcc 3.31, reset reason Turned on by main processor
                        WiFi flash size 4194304, free heap 18176
                        WiFi IP address 192.168.0.183
                        WiFi signal strength -33dBm, mode 802.11n, reconnections 0, sleep mode modem
                        Clock register 00002002
                        Socket states: 0 0 0 0 0 0 0 0
                        

                        M98

                        M98 P"config.g"
                        HTTP is enabled on port 80
                        FTP is disabled
                        TELNET is disabled
                        FTP is enabled on port 21
                        Error: Unknown pin name 'e6stop'
                        Extruder 0 has no filament sensor
                        Endstop configuration:
                        X: high end switch connected to pin xstop
                        Y: none
                        Z: noneError: in file macro line 111: M581: missing parameter 'T'
                        Error: Accelerometer not found on specified port
                        
                        Phaedruxundefined 1 Reply Last reply Reply Quote 0
                        • A Former User?
                          A Former User
                          last edited by A Former User

                          This post is deleted!
                          Adamfilipundefined 1 Reply Last reply Reply Quote 0
                          • dc42undefined
                            dc42 administrators @Adamfilip
                            last edited by dc42

                            @Adamfilip it is the resistor marked 181 that is too high a value for 3.3V. The good news is that you don't need to remove it (which is tricky), you can solder a 180 or 220 ohm resistor of the same size (probably 0603) on top of it, so that the two resistors are in parallel and make about 100 ohms.

                            Alternatively, if your Duet 2 is a sufficiently recent version, you can provide 5V power to those endstops as explained in the link that I posted.

                            5V endstops sometimes do work on 3.3V, so it's worth using M119 or the Object Model Viewer in DWC to test whether they are working.

                            Duet WiFi hardware designer and firmware engineer
                            Please do not ask me for Duet support via PM or email, use the forum
                            http://www.escher3d.com, https://miscsolutions.wordpress.com

                            Adamfilipundefined 2 Replies Last reply Reply Quote 0
                            • Adamfilipundefined
                              Adamfilip @A Former User
                              last edited by

                              @Herve_Smith 6 for $13 in US or 1 for $28 in Canada lol 28d28efb-f5c8-4b35-ae29-65e44861981d-image.png

                              1 Reply Last reply Reply Quote 0
                              • Adamfilipundefined
                                Adamfilip @dc42
                                last edited by

                                @dc42 So if i manage to solder on a 220ohm resister like this. it should work.

                                ddc4e832-177e-4b51-af7a-aaeb3e9caaf9-image.png

                                1 Reply Last reply Reply Quote 0
                                • Adamfilipundefined
                                  Adamfilip @dc42
                                  last edited by

                                  @dc42 I can pickup some of these. but cant tell if they will work 3.3

                                  https://wanhao.store/products/wanhao-duplicator-d7-end-stop-switch-v1-2

                                  Adamfilipundefined 1 Reply Last reply Reply Quote 0
                                  • Adamfilipundefined
                                    Adamfilip @Adamfilip
                                    last edited by

                                    https://www.youtube.com/watch?v=g5L1AnrOytY&t=4s

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

                                      @Adamfilip said in Optical Endstops:

                                      Error: Unknown pin name 'e6stop'

                                      Where is it actually connected?

                                      Z-Bot CoreXY Build | Thingiverse Profile

                                      Adamfilipundefined 1 Reply Last reply Reply Quote 0
                                      • Adamfilipundefined
                                        Adamfilip @Phaedrux
                                        last edited by

                                        @Phaedrux duex5 e6stop

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

                                          Change your pin name to duex.e6stop

                                          https://docs.duet3d.com/Duet3D_hardware/Duet_2_family/DueX2_and_DueX5#pin-names

                                          Z-Bot CoreXY Build | Thingiverse Profile

                                          Adamfilipundefined 1 Reply Last reply Reply Quote 1
                                          • Adamfilipundefined
                                            Adamfilip @Phaedrux
                                            last edited by

                                            @Phaedrux Amazing thank you! that fixed it all. its all homing properly now. im shocked to be honest.

                                            I am curious why you need to add duex before e6stop but not when declaring the drive number on duex with M584

                                            1 Reply Last reply Reply Quote 0
                                            • Phaedruxundefined Phaedrux marked this topic as a question
                                            • Phaedruxundefined Phaedrux marked this topic as a regular topic
                                            • First post
                                              Last post
                                            Unless otherwise noted, all forum content is licensed under CC-BY-SA