Confirmation required for wiring end stop switch with led
-
Can you bypass the LED? If so then you can just connect the contacts to the E0 endstop pins in the usual way. Otherwise, I suggest you connect it between the In and Gnd pins of the Z probe connector, with a pullup resistor of about 220 ohms to 1K between In and +3.3V, use Z probe type 1, use the I1 parameter in the M558 command, and set a suitable trigger level using G31.
-
Thanks David. The LED is kind of moulded in to the lead so the only way to bypass it would be to cut it out which no doubt would invalidate any warrantee. I'm a bit reluctant to do that as it cost me 34 quid. I'll try your plan B. Ian
-
David,
Sorry to be a pain again. I was rather hoping that I could retain your IR probe in case my sliding mount doesn't work out. What I had in mind was to leave that connected to the Z probe input but connect this switch to the E0 input and select mode 4. That is to say, it'd be cool if I could have them both wired and switch between them in my config. I'm assuming from you reply that this is not possible but can you just confirm that that is the case please.
Thanks.
-
Can you bypass the LED? If so then you can just connect the contacts to the E0 endstop pins in the usual way. Otherwise, I suggest you connect it between the In and Gnd pins of the Z probe connector, with a pullup resistor of about 220 ohms to 1K between In and +3.3V, use Z probe type 1, use the I1 parameter in the M558 command, and set a suitable trigger level using G31.
David,
Did you really mean probe type 1? Reading the Wiki instructions, it says that type 1 is for analogue inputs whereas type 5 is for a switch or digital output.
-
If there is a LED in series with the switch and you can't bypass it, then I do mean type 1.
-
OK thanks David. With it wired and configured as you suggest, the led on the switch illuminates when the switch makes but I see no change in the state of any of the LEDS on the board. Is that expected behaviour? And one final question, I had set up E0 to be used as an emergency stop using a second micro switch and M581. I have temporarily disconnected and disabled this. Can I reinstate it as is or should I use one of the other estops on the Duex5 instead of E0? Thanks
-
Update on this. If I try to home Z with the switch wired like this, when I trigger the switch, the bed rises slowly but continues to rise. Fortunately I had the bed well down which gave me enough time to kill the power before anything got mangled. What to do now?
-
Endstops and Z probes should always be tested using M119 or the DWC machine properties page before relying on them.
-
Yes OK but what can I try next to get this working? It sort of triggers because the in built LED illuminates and the bed rises at a slower rate. Like it does with your IR probe but the bed doesn't stop - it just carries on at a slower rate. For info I'm using a 550 ohm resistor because it is more or less in the middle of the 220 ohm to 1k ohm you suggested. Would a lower/higher value work?
What about my other questions? i.e. should the LED on the duet board change state with this configuration and can still use E0 as and emergency stop or should I reconfigure it?
I tried Misumi's site to see if I could buy a non LED version of this switch but it's been discontinued. The only version available is the LED version. It's a precision positioning switch, designed for homing machinery so I'd be disappointed if there is no way to get such a switch to work with the Duet.
-
What is the Z probe value shown in DWC when the switch is/isn't closed?
-
In it's "normal" state, the value is 0. When it is made (as in if the end stop limit was triggered), it is 474. According to the data sheet, it's a normally open switch.
Edit. Didn't know about the M119 command. Just tried it and with the switch triggered I get "Endstops - X: not stopped, Y: not stopped, Z: near min stop, Z probe: near min stop"
-
Got impatient so I tried a 1.2k ohm resistor and the probe value went up to 484. Tried a 4k7 and it went up to 500 and M119 now reports Z at min end stop. So seems to work with that value resistor. Is it safe to leave it like that?
Further edit. Just realised that I can change the trigger value in G31, as well as the trigger height. I've only ever used the mini height sensor so always had it set to 500 and completely forget that it can be set to any other value. So back to the 500 ohm resistor and setting a trigger value of 450 works. Given that the value changes between O and 474, is 450 a reasonably safe number to use?
-
So it was just the trigger level? You could in theory just lower that?
Also I'm interested in the outcome of this. I've got issues with 3Dlac and the IR sensor.
-
Got impatient so I tried a 1.2k ohm resistor and the probe value went up to 484. Tried a 4k7 and it went up to 500 and M119 now reports Z at min end stop. So seems to work with that value resistor. Is it safe to leave it like that?
I suggest you lower the trigger level (G31 P parameter) to 250.
-
Sorry guys, we were all typing at the same time. I've just edited my post having remembered that I can edit the trigger value. I've only ever used DCs probe so it's always been 500 and I've never changed it - completely forgot that it was editable.
-
So it was just the trigger level? You could in theory just lower that?
Also I'm interested in the outcome of this. I've got issues with 3Dlac and the IR sensor.
Well I'm pretty confident that the switch will work - that's what it's designed to do. However, it is a contact switch so you can't use it directly on the bed unless you use some mechanism to deploy it. That is to say, you can't have it permanently lower than the nozzle because it will be scraping on the printed part, and you can't have it higher because the nozzle will touch the bed before the probe does. My plan is to use it above the hot end mount with the nozzle itself being the probe. Check my sliding mount thread to see what I mean.
So it's the sliding mount part that could screw up the repeatability. I've nearly got a working prototype but I have to change the entire XY carriages to test it.
Ian