Emergency stop end stops! How to?
-
Hi, so I'm nearly at the stage to wire everything up on the corexy machine I'm building, just waiting for some plywood to mount on...
My X and Y has min and max end stops... But I'm doing 3 point leveling on my Z so 3 independent motors.
Ill have 3 end stop switches at the min and max for each pillar. But how best to wire it?
I cant remember the correct term, but should I wire up the 6 stop switches independently, or have the bottom switches wired in series live, with switch breaking the live (this is where i cant remember the correct term) and that signals that one of the 3 end stops have hit max, and the top three switches, wired live serial, and when one of the three switches are triggered, breaks that live signal and triggers an emergency stop?
You see X and Y stops is used for homing, and I have a bltouch for Z homing. My plan is the Z min switches (IE when the plate is up) is for emergency stop and reverse, as the build plate is crashing like at around Z -3mm.... And Z max for parking at the end of a print.
How should I wire these Z stops? and can some one show me the end stop headers i should use? Theres three pins, I have assumed one is 5v one GND and one is the return signal.... and I guess in firmware/config I would need to change a setting to detect for a break in live rather than a live signal?
Sorry this post is a bit chaotic.... Struggling to work out the best way to explain what I'm trying to do
-
I think min and max endstops for X and Y are overkill. The firmware will enforce axis limits once homed, so as long as they are configured correctly you shouldn't need to worry about exceeding the X and Y travel limits.
Some documentation for you.
https://duet3d.dozuki.com/Wiki/Connecting_endstop_switches
https://duet3d.dozuki.com/Wiki/Connecting_a_Z_probe#Section_BLTouch
https://duet3d.dozuki.com/Wiki/Bed_levelling_using_multiple_independent_Z_motors
-
Yes, having both MIN and MAX endstops is overkill. The exception I made is with my CNC machine, where Zmax is a stepper load endstop and I have a Probe for the Zmin.
As to the wiring, the connector have GND, 3.3V and Signal. Note that the signal is only 3.3V tolerant (unless you have a v1.04 Duet, in which case it is 5V tolerant, but 3.3V recommended). The typical micro switch setup is to use the GND and Signal lines only, and the NC (Normally Closed) connection of the switch, and the config should specify it as active HIGH:
With this configuration, if the endstop is missing, it gives the same signal as being triggered (thus having a safe mode) which can prevent the machine from damaging itself trying to find the endstop that no longer exist.Sometimes we use pre-made enstop boards and modules, which are NO (Normally Open). In this case, we use them in the same way, but in config we configure them to be Active LOW. This works practically the same way, but a missing switch will give the same signal as being away from the switch.
Using the normal endstop switch configuration, the Signal is "Pulled HIGH" - in electrical terminology this simply means that it is connected to the 3.3V via a high resistance (typically something like 10k) resistor. So unless you provide a low resistance path to Ground (via the switch), it is at 3.3V. The change can easily be detected.
If you use other sensors than switches that require 5V and gives 5V signal, you will need to build a simple voltage divider circuit (it is simply a Pull Up and Pull Down resistor setup) that will reduce the Signal to ~3.3V.
For details on the configuration of endstop switches, see https://duet3d.dozuki.com/Wiki/Gcode#Section_M574_Set_endstop_configuration
-
Any endstops that you are not using at all for homing (e.g. because they are on the wrong end of the axis) should be NC switches, all wired in series, and connected to a spare endstop input (e.g. E0 or E1 endstop, or Z endstop if you use a Z probe to home Z). Then use M581 to configure an emergency stop when that endstop input goes high.
-
@dc42 said in Emergency stop end stops! How to?:
Any endstops that you are not using at all for homing (e.g. because they are on the wrong end of the axis) should be NC switches, all wired in series, and connected to a spare endstop input (e.g. E0 or E1 endstop, or Z endstop if you use a Z probe to home Z). Then use M581 to configure an emergency stop when that endstop input goes high.
Just to expand on what David has said, if you have multiple end stops on axes maxima you can also wire them all in series then use a single endstop input on the Duet, which is what I do. The plus side is that it cuts down the wiring and uses less spare endstops. The minus side is that an emergency stop will get initiated when any of the switches trigger. That's not a big issue as it's fairly obvious which axes has triggered the stop.
In practice, for an axis maximum end stop to trigger, you first have to use M564 to allow moves prior to homing, then you have to do something a bit stupid like send a command that will move an axis beyond it's normal maximum. That is exactly the sort of stupid thing that I have done from time to time when working o my printer so having the switches initiate an emergency stop has been useful for me (because I do stupid things).
-
LOL Deckingman, thats basically my reason for having the XY max stops... just in case i do something stupid, and or something goes odd with the steps per mm calculation.
And yeah I was thinking along the lines that the Z Min emergancy stops should be series. And the MCU looks for a low as triggered.
The Z max though is like i said just for parking and sending build plate to at the end of a print.
I still have very little idea of how to setup the config....
But im still a couple of weeks away from there I think, so still time before i have to learn that
-
@mangy_dog said in Emergency stop end stops! How to?:
LOL Deckingman, thats basically my reason for having the XY max stops... just in case i do something stupid, and or something goes odd with the steps per mm calculation.
And yeah I was thinking along the lines that the Z Min emergancy stops should be series. And the MCU looks for a low as triggered.
The Z max though is like i said just for parking and sending build plate to at the end of a print.
I still have very little idea of how to setup the config....
But im still a couple of weeks away from there I think, so still time before i have to learn that
What I would do is still use the Z max to trigger an emergency stop. At the end of a print, you can simply send the bed to somewhere near Z max if you want to but I would advise against it. If you do choose to go to near Z max at the end of print it means that you have to raise the bed all the way up before you can start another print. Z axes usually run quote slow so it can take some time to go to Z max then back to home at Z close to zero. It's a bit of a pain if you want to print a number of objects that are only a few mm tall. On my CoreXY, I just drop the bed 5mm and move the print head to Y max which makes it easy to get parts off.
Configuration is easy. Assuming you wire all the switches in series and they are normally closed, just put this line at the end of you config.g file.
M581 En S1 T0 C0
Where "n" is the number of the end stop that you connect to. S1 means detect rising edge, T0 means initiate an emergency stop (like M112), and C0 means check for a trigger at any time.
-
My ballscrews have 4mm lead so shouldnt take too long...