End stop switch restarts duet/causes ajax error



  • I am wiring up my micro switch endstops, with them being normally closed. I can see that the led next to the corresponding stepper axis connection is lit up red and when i press the switch the led flashes off (I also see a few other led lights flash very dimly at the same time, like the hotend leds and other stepper driver leds).

    Here is a portion of my config.g
    ; Endstops
    ; XY Axis
    M574 Z0 S0 ; Define active low and unused microswitches
    M574 X1 Y1 S1 ; Define active high microswitches
    ; Z Axis
    M558 P1 X0 Y0 Z1 F120 H5 R1 T6000 ; Set Z probe type to unmodulated, the axes for which it is used and the probe + travel speeds
    G31 P500 X0 Y0 Z2.5 ; Set Z probe trigger value, offset and trigger height !!!MUST BE AFTER M558!!!

    The endstops are from open builds. If i am connected to the web interface and push the switch I get an ajax error and am disconnected. This was powered from an external 24v source. I tried powering from USB off my computer and when i push the switch i can hear the windows sound like a USB device is being unplugged and plugged back in.

    Any ideas?


  • administrators

    Are they 3-wire endstop switches, rather than common microswitches with only 2 wires connected? If so then you probably have the wrong pin connections and you are shorting the 3.3V rail to ground. See https://duet3d.com/wiki/Connecting_endstop_switches#Makerbot_Mechanical_Endstop_v1.2 for how to connect popular 3-wire endstop switches to the Duet.



  • So guess i just wasnt too sure on the wiring, I had all 3 wires hooked up. Just have the 2, ground and stop with the switch being normally closed and seems to work now.

    Edit: I did not see your reply. Just to clarify, I have the ground connected to the switches common and the pin labeled stop connected to switch's normally closed pin. The switch has 3 connectors but I am only using 2.


  • administrators

    @nikker:

    So guess i just wasnt too sure on the wiring, I had all 3 wires hooked up. Just have the 2, ground and stop with the switch being normally closed and seems to work now.

    Edit: I did not see your reply. Just to clarify, I have the ground connected to the switches common and the pin labeled stop connected to switch's normally closed pin. The switch has 3 connectors but I am only using 2

    That's the normal way to connect standard microswitches. See https://duet3d.com/wiki/Connecting_endstop_switches#Microswitch.


Locked
 

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