-
Hi Phil and friends! I'm a bit stymied right now and I was hoping someone with a little more know-how might be able to help me here. I've yet to find a set of mechanical limit switches that I find reliable enough for my machine, and inspired by the robustness my LinuxCNC router, I'm aiming to switch over to inductive limit switches. I've read through the threads and issues I could find on the topic, and while I still have a hard time wrapping my head around sourcing and sinking and how that factors in, I was able to get things working. No problems finding suitable resistors to get the output voltage from 12V down to 5V (or between 4.25-5.25 if I'm remembering a comment on the subject correctly). I experimented with a few different sensors and had best results with an NPN-NC for what it's worth. My problem comes in when testing the failure modes. In disconnecting different wires, best case is everything fails seen as the limit switch triggering except if either a positive or ground connection is lost, depending on the sensor. As I understand it, all of the inputs on the bottom of the board have +5V on the optos and are just looking for a path to ground to emit. So grounding the pin registers the input, and no connection or +5V(ish) would be keep the pixies from flowing. The beauty of sticking an NC mechanical switch in there is that any loose or broken wire will tell the board the limit switch is triggered. I've seen some mention using hall effect sensors, but they're still NPN/PNP transistors, so wouldn't those face the same issue? Is there a way to gain that safety with transistor-based limit switches? Any help is greatly appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
I've been running with NPN/NO proximity sensors in parallel. I assume you want to have min and max sensors on a single input. A single NC prox sensor can be used that way but not multiple in parallel. To gain the fail-alarm feature with multiple NC sensors, you would need to use some logic circuits to combine the signals. |
Beta Was this translation helpful? Give feedback.
-
Thanks Phil! I believe the issue came from the resistor I was using as a voltage divider to keep the voltage to the input pin at ~5V. Are the the sensors you're using running directly on 5V? I ended up having success testing with an opto-coupled DIN mount solid state relay (commonly found as a MRD-060D2). While it drives up my overall cost a bit, I'm a fan of the simplicity of it. Right now I've just got mechanical switches at my min limits for homing, but the other benefit I see of inductive sensors is being able to use the same sensor for min and max limits, with something as simple as a steel screw head in a t-nut at each end to trigger the limits. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Just a quick follow up for posterity:
I'm attaching a crude diagram of how I've got everything wired with NPN-NC inductive sensors running on 24V connected through opto-coupled solid-state relays (MRD-060D2). Appears to work as described above, where a loss of any wire will be detected in grblHAL as a limit triggered.
Probably better ways of accomplishing all of this, but it's a solution that works well for my needs, so it seems worth sharing.