Intermittent Alarm 1 and noise on Limit switches #568
-
I am currently battling a problem with noise on my limit switches which in turn results in an Alarm 1, and i know this is not exactly a software issue, but i felt that it would still be a good place to document, as i didn't find much about it while searching the discussion forum. I started this documentation in the AutoSquaring conversation, but figure it'll be easier to find if it has it's own topic. I'm using a Teensy on Phils breakout board T41U5XBB (https://github.com/phil-barrett/grblHAL-teensy-4.x) witch has worked excellent for the last 3 years. Now i've rebuilt my CNC with new Z and X axis and many more improvements. Among other things, i've moved from mechanical limitswitches to optical ones. (https://www.aliexpress.com/item/1005002900573779.html) - which are supposed to be a clone of this one: https://www.ia.omron.com/product/item/2223/ My CNC has a 2.2kw china spindle with a equally chinese VFD. I've experienced the following: Problem: Alarm 1 when running a program of about 20minutes with 6 toolchanges. Alarm 1 would occour about 1-2 minutes into the program. Problem: I get intermittent Alarm 1 when i home the machine, move around by jogging - but strangely not when turning on and off the spindle. Z Limit Signal: (that's a std. mechanical endstop like this one: Y1 Limit signal: Another experiment i tried disconnecting the shielding from one of the limit input wires, and to my big amazement that gave a cleaner signal on the input. So my Earth is definitely not particularly clean. So I guess the big question is: If I have such varying noise signatures, I guess that it could also be down to the fact that i use the 5v from the USB to drive everything that uses 5v. Should i go for a 5v supply seperately? Alternatively i was looking at the sensors, and they support up to 24v, and i already have 24v in the cabinet for driving the VFD control inputs. so I was wondering if there might be a solution in a Logic conversion board, from 24v to 5v, and then running the sensors on 24v. (could be something like this: https://www.fruugo.dk/24v-to-5v-plc-optocoupler-isolation-board-4-channel-voltage-converter-module/p-286023466-638021991?language=en&ac=croud&asc=pmax&gad_source=1&gclid=Cj0KCQjwwuG1BhCnARIsAFWBUC168UUohKjOnhwLjvqOJOsYX-QVe1O9MzrUBwmWwVJKOhHgfcskYbIaAmPkEALw_wcB) Or any other suggestions on what directions to look in? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 31 replies
-
This comment implies that your switches are not NPN as advertised? If NPN and open collector the voltage at the board terminal should be be the same regardless of the switch beeing connected or not (when triggered). When not triggered it should be close to 0V (unless the output is inverted). A connected switch should never drive the voltage at the input higher than the not connected voltage.
I am not sure about the T41U5XBB board, but at least the Pro prototype I have is designed to run the switches on 12V so 12V might be a better option. Check the manual or perhaps @phil-barrett may chime in. |
Beta Was this translation helpful? Give feedback.
-
I had not noticed this thread until Terje tagged me. Sorry, I would have jumped on sooner had I known. Your problem sounds like EMI, especially given the intermittent symptoms. It certainly can be infuriating. I'd start by looking for the source(s). Motors, especially brushed, are a prime contributor. Given that using simple switches has been reliable in the past leads me to believe that your chinese sensors are fairly sensitive. Even if you have shielded cables, if the sensors are picking up the EMI then shielding won't help much. It is also possible the EMI is entering via the USB cable. You might try an experiment - wrap as much of the sensor as possible with aluminium foil and connect it to the shield. Switching to a 5V PSU may help but if your USB cable is the EMI vector it probably will not. Usually when you have EMI on the USB cable you get garbled communications. A typical error there is Error 1, 2 or 3 and not an Alarm. In general, I recommend Ethernet for comm rather than USB. This might give you some ideas. Phil |
Beta Was this translation helpful? Give feedback.
-
You might not have to completely change your electronics box. A metal plate (Aluminium or steel) at the bottom would form a good base for the star ground to earth. Also, your VFD could be mounted on a separate metal plate (that is how mine is set up) and the plate tied to earth. A metal box is better for EMI immunity but not absolutely needed. EMI resilience is not a binary thing - there are a series of things you can do. Sometimes the simplest works, other times you have to go the full distance. This is why I recommend doing as much as possible when building the machine - retrofitting is always harder. |
Beta Was this translation helpful? Give feedback.
You might not have to completely change your electronics box. A metal plate (Aluminium or steel) at the bottom would form a good base for the star ground to earth. Also, your VFD could be mounted on a separate metal plate (that is how mine is set up) and the plate tied to earth. A metal box is better for EMI immunity but not absolutely needed. EMI resilience is not a binary thing - there are a series of things you can do. Sometimes the simplest works, other times you have to go the full distance. This is why I recommend doing as much as possible when building the machine - retrofitting is always harder.