GRBLDuino MegaShield w/ optical limit switches

Use, set up, assembly help, and any other GRBLDuino related questions or comments.
Post Reply
goofyag
Posts: 2
Joined: Mon Apr 19, 2021 11:12 am

GRBLDuino MegaShield w/ optical limit switches

#1

Post by goofyag »

I am trying to use a 3-wire optical switch for a limit switch without success. I can hook the signal line up to pin 10 (XLIM) directly without the Mega shield and it behaves correctly with the GRBL monitor I am using but I have had no luck with the Mega shield attached. I've tried a few scenarios.

Can this shield be used with this type of switch? Any suggestions for troubleshooting?

Thanks, in advance.
User avatar
EccentricWorkshop
Admin
Posts: 37
Joined: Thu Jan 17, 2019 9:33 pm
Location: Olympia, WA
Contact:

Re: GRBLDuino MegaShield w/ optical limit switches

#2

Post by EccentricWorkshop »

I haven't heard of anybody using optical limit switches but many are using 3 wire inductive switches. I'm assuming they are similar with power, ground, and signal. It should be a matter of connecting the signal line to the limit switch port on the shield and tapping into power and ground.

For troubleshooting:
  • Is the Lim H/L jumper in place? It won't work without it.
  • Does a normal mechanical switch work as expected? You can use a piece of wire to connect the screw on the terminal to ground.
  • What does it do if nothing else is connected to the shield? Remove as many variables as possible.
  • Have you checked the operation of the switch with a meter? What does the signal line do when (de)activated?
  • Are the grounds connected? It could do some weird stuff.
--------------------
Andy
Eccentric Workshop
Store - Tindie - eBay
goofyag
Posts: 2
Joined: Mon Apr 19, 2021 11:12 am

Re: GRBLDuino MegaShield w/ optical limit switches

#3

Post by goofyag »

Hi and thanks for your response.

Link to the optical switches: https://www.amazon.com/gp/product/B07MF ... UTF8&psc=1

A little background may be helpful. I am migrating my design from an UNO with a CNC shield. It was working in that setup but I am discovering the CNC shield is a more simplistic design. Its limits are connected with a double row of pin headers with the outer/black row associated directly with ground and the other row associated directly with the corresponding Arduino GRBL pin. The MEGAShield design is obviously more involved and has caused me unexpected confusion when porting my original design.

I appreciate your suggestions but it may take a few days for me to try them out.
  • I'll try physical switches but expect them to work. I also have different 5V proximity sensors I can also try.
  • all troubleshooting has been performed with the drivers removed to minimize variables.
  • Lim L/H has been tried in different configurations. This is a point of confusion for me as the signal line of the optical switch design does not require a pullup or pulldown resistor. In the UNO CNC Shield design, I can supply power/GND from elsewhere on the shield and use the single signal wire hooked up directly to the appropriate pin and have it work as expected.
  • Are the grounds connected? Not exactly sure what you mean here. I am supplying ground to the optical switch, is there something else you are referring to?
  • What is the voltage of the signal line? It is behaving erratically with my auto-ranging voltmeter so I am going to look further into this. I am also going to locate a better source for 5V and GND on the shield as I was using the LIMSEL headers as a source and is likely complicating things.
Question: I am only using a single home switch for each axis. What do I do with the second limit switch connection? In other words, if I hook up the home switch to X- connection pair, what should I do with the X+ connection pair. Tried different things but want to know what is expected.

Thanks again for you help.
Post Reply