Home › Forums › TinyG › TinyG Support › $zsw support timeline
- This topic has 5 replies, 3 voices, and was last updated 12 years, 9 months ago by barclayo.
-
AuthorPosts
-
March 19, 2012 at 1:49 pm #1382barclayoMember
I’ve got all the axis moving and have verified the X and Y limit switches function correctly. I was planning on doing my Z homing with a touch plate similar to:
http://www.youtube.com/watch?v=sCnZs7A59yg
which requires using a NO mode instead of NC.Any ETA on supporting per-axis limit switch modes?
Thanks,
-BMarch 19, 2012 at 3:36 pm #1383greyhound716MemberThere are a couple of options I can think of, even if that’s not a short-term feature..
If you’re willing to do a little soldering, I think you could adapt the switch input using a transistor. It’s been a while, but since we’re only talking 3.3v, you should be able to bias the transistor to pass current (NC) until your switch is pressed, which shorts the base to ground.
If you’re more of a software person, you can probably hack the TinyG code to either use one of the GPIOs for your limit switch or program one for NO functioning. I haven’t looked at that part of the code, but inverting the input from one of the limit bits shouldn’t be that difficult.
-MattMarch 19, 2012 at 5:22 pm #1384aldenMemberThe limit switches are currently programmed for NO operation, not NC. Given your interest in different modes I can escalate the priority, but I’m reluctant to promise a date just yet. Greyhound is right – all the code for this is in the gpio.c/.h module if you want to give it a go in the mean time.
If you go for a hardware solution bear in mind that these are 3.3v inputs. Do not feed them w/5v or you risk burning them out. They are set to “totem pole pullup mode” as per the ATxmegaA data sheet (page 132 in Atmel’s doc #8077.pdf).
It may be as easy as wiring an NC switch across the input and ground and changing the interrupt edge for that bit in gpio.c
March 19, 2012 at 6:39 pm #1385barclayoMemberI must admit I’m better on the SW side that the HW side, so I’ll probably poke around gpio.c. However, I could have sworn that I wired my existing endstops for NC and that they were functioning correctly – perhaps they were actually trigger on the switch release instead of the depress. I’ll have to double-check that when I get home. (Side note: I consider NC to be a “safer” default, since if an NC switch accidentally disconnects or otherwise fails, the system thinks it hit a stop and won’t try to run off the end. It’s less likely that a NO switch will accidentally fail closed.)
Of course, if I find out that my X and Y switch are actually operating NO, then I can just swap terminals on the switches and they should all work. 🙂
March 19, 2012 at 7:21 pm #1386aldenMemberI agree with you on the NC side – it’s more failsafe. This is one of the reasons I want to get to the SW parameter.
Many limit switches have both – i.e. are SPDT switches. Do yours?
March 20, 2012 at 2:15 pm #1387barclayoMemberYes, mine have both, so I can wire them either way. I didn’t get any shop time last night to double-check my config, but I should be able to make everything work with NO as the default. So you can defer my request for switch mode setting. 🙂 (And I’m looking forward to v.93 for spindle control!)
-
AuthorPosts
- You must be logged in to reply to this topic.