Home › Forums › TinyG › TinyG Support › Wiring e-stop
- This topic has 6 replies, 2 voices, and was last updated 11 years, 11 months ago by alden.
-
AuthorPosts
-
December 9, 2012 at 3:58 pm #3645rickmellorMember
Hey guys. I’m wrapping up my TinyG install and am wondering how to hook up the e-stop. I’d like to wire it to in0 (GPIO1:5) … probably wire the switch across pins 3 and 5. I’m wondering how to configure the software for this. Is pin 5 high or low by default? Can I configure it? Is there a setting in FW to say that “when pin 5 goes high (or low) then trigger e-stop”?
-Rick
December 11, 2012 at 12:09 am #3646rickmellorMemberOK… I found a reference to e-stop in the G code support for TinyG. The suggestion there is that instead of invoking ‘Abort’ that you electrically disconnect your motors. I have an 8 relay module in the drawer (one of these) so I think I’ll rewire my motor circuits to pass through this thing. I’ll wire this into the e-stop button and maybe even wire the ‘reset’ line into it as well. This way when the e-stop is pressed the motors will stop (I could try to brake them but it seems unnecessary on this small of a machine) and the TinyG will stop thinking it’s doing anything. I think this is workable.
As it stands the spindle won’t stop turning when the e-stop is triggered. I did wire a switched auxillary power plug on my controller box. Maybe I could put a high current SSD relay on that line to kill the spindle. Hmmm….
-Rick
December 11, 2012 at 10:24 am #3647aldenMemberRick, The answer to your question depends a lot on what version you are using. I’ll answer the question first for what you are probably using (version 0.94 or earlier), then for the branch currently in Dev – soon to be in edge – which is the 0.95 behaviors. A lot of work has been done on homing and limits for 0.95.
0.94 homing. See this page:
https://github.com/synthetos/TinyG/wiki/TinyG-Homing-(version-0.94-and-earlier)
All switches actually work “in parallel”, and work for normally open (NO) switches only. So any NO switch can be wired to any port – but avoid the A ports. So you could wire switches for Xmin, Ymin, Zmax (a common homing config) to the Xmin, Ymin and Zmax pin pairs (input and gbn per pair), or you could just wire the the first 3 switches (which happen to be Xmin, Xmax, Ymin). You need to configure the switches via the $xsm parameter (and Ysm and Zsm) for Homing, or for homing and limits.
Adding a relay for electrical disconnect is a good idea as well.
0.95 homing. See this page:
https://github.com/synthetos/TinyG/wiki/TinyG-Homing-(version-0.95-and-above)
0.95 homing supports NC and NO switches, and actually requires switches to be connected to the correct line. This is necessary for NC switch support. The $xsm param has been replaced by $xsn and xsx for min and max, respectively, also for NC support. NC switches are much more noise immune and are recommended over NO connections – especially if you intend to use them for limits. The spindles often trip the switches with noise, and spindles are not normally enabled during homing.
The page should describe all else. Please let me know if this is clear, or go in an edit or leave comments and let me know. It’s an open wiki.
Alden
December 11, 2012 at 3:48 pm #3648rickmellorMemberAlden, thanks for the reply. I’ve got all my limit switches mounted now and luckily I can easily switch to NC… there are tabs for NO and NC on my lever switches so no worries at all there. I’m waiting on my Mouser order to deliver with my AVR programmer and then I can update to the latest dev build.
I have one question about home vs. limit though. For the X and Y axis, limit switches make sense to me sense to me because there are hard limits on travel. For the Z axis, however, travel can vary. For the highest limit that makes sense because the head can only move up so far. For the minimum limit, though, the ‘minimum’ changes depending on what tool I have installed. My chuck is a lot longer than my collets and the drill bits are all different lengths… even endmills are different lengths. So, I’m not sure that a minimum limit switch makes as much sense on the Z axis as a ‘home’ does. I’ve currently installed the minimum limit switch on Z as a home with the expectation that the head will travel below it while in use. I want to retain the ability to ‘home’ the axis even when a tool is installed so it needs to be higher than the minimum travel. Does this make sense? Do you have any comments on this type of setup?
Here’s what my current homing looks like for the Z axis: http://www.youtube.com/watch?feature=player_detailpage&v=l-KwJHMeyq0#t=235s
Finally, e-stop. I didn’t see this in your reply. Is there a recommended way to wire an e-stop to the TinyG or should I pursue my relay disconnect method I mentioned above?
Thanks.
-Rick
December 12, 2012 at 11:17 am #3649aldenMemberRick,
Typically Z homes to the top of travel for he reasons you just listed. Set the Zmax as homing. I don’t have a Zmin configured as it’s not meaningful. In the 351 builds (dev branch) the search will always move towards the switch that is designated as homing, in this case Z will move upwards.
In you setup I’d use one of the A pins to wire as an abort triggered by your estop, say configure Amin as a limit and run one of the relay contacts to it.
Alden
December 15, 2012 at 5:49 pm #3654rickmellorMemberSorry, but how do I set the Zmax for homing? I’m looking but can’t find it.
-Rick
December 15, 2012 at 8:29 pm #3655aldenMemberAre you using an 0.94 revision or a pre-0.95 build from edge?
If you are using 0.94 or earlier then set $zsm=1 (or 2). You can refere to these pages:
https://www.synthetos.com/wiki/index.php?title=TinyG:Configuring
https://github.com/synthetos/TinyG/wiki/TinyG-Homing-(version-0.94-and-earlier)
If you are using one of the experimental builds set $zsx=1 (or 3)
You can refer to these this page:
https://github.com/synthetos/TinyG/wiki/TinyG-Homing
We are in the process of converting the wiki over to the github wiki for 0l.95 and beyond.
Alden
-
AuthorPosts
- You must be logged in to reply to this topic.