I would rather eliminate the source, than cover it up.
Al.
If your are having noise issues with your cnc machines limit switches and getting random false limit or input triggers. This filter is for you and does not matter if its wired as a parallel, or a series limit switches setup. You can build the filter as pictured. It in theory should clean up noise regardless of your voltage. Again this is a standard limit switch filter IGNORE the fact that its showing an arduino. I have now used this filter with an arduino, a planetcnc and the mach3 usb motion controller with wonderful success.
Similar Threads:
I would rather eliminate the source, than cover it up.
Al.
CNC, Mechatronics Integration and Custom Machine Design
“Logic will get you from A to B. Imagination will take you everywhere.”
Albert E.
I cringe every time I see an Arduino running a CNC machine with naked 5V logic. (Frankly, most Arduino projects make me cringe, but those "CNC controllers" are the most typical examples of Arduino-style misingeneering.)
So what is misengineered with Arduino?
Lack of optoisolation, buffering or?
Limit switches should be wired as NC and a majority of false triggering will disappear
Make no mistake between my personality and my attitude.
My personality is who I am. My attitude depends on who you are.
Lack of optoisolation, protection or even basic buffering.
Single ended TTL-level signals running through long wires in a noisy environment.
The problem is not the Arduino per se. The problem is that many Arduino "developers" - and I use this term loosely - seem to be blissfully unaware of the most basic principles of electronics.
I have 'cured' it many times here by advising all power commons earth grounded to the star point connector, i.e. no various sections of the system kept separate/isolated and floating.
Al.
CNC, Mechatronics Integration and Custom Machine Design
“Logic will get you from A to B. Imagination will take you everywhere.”
Albert E.
Looking at the "schematic" (i guess it really is), the resistors aren't for a low pass filter but rather for strong pullups. The LP filter would be better if he used 10K ohms in series with the switch input. That would make for a decent cut-off frequency. The 4.7K pullups do make it a little more resilient to noise though running the input switches NC would have been better.
If you think that is bad, there is a guy on a certain other CNC forum that is pushing his home built arduino Torch Height controller for plasma CNC. No isolation and a 25V electrolytic cap as a "filter" on the voltage input. And, he just crams the electrolytic's lead into the arduino socket along with the input lead from the plasma cutter's torch voltage output. No screw terminals, just friction and god on his side. He's got other people building them, too. I have visions of that lead working loose and causing havoc. He is way proud of it. I tried to gently explain the things he should be doing differently but it was like talking to a wall. Hopefully the only bad thing that happens is a fried arduino.
Last edited by berin; 11-28-2020 at 11:49 PM.
Many motion controllers are very sensitive to noise, eliminating the source is always best not always possible or even capable to a one hundred percent of certainty of elimination. Cost $$$$ associated with fixing the issue is not always reasonable to correct when a simple R/C filter will clean up the noise very well. ESPECIALLY if you are converting a machines control system. NC can help limit noise no argument but it the noise its self has not been corrected then a NC setup is only a portion of the solution. And not a good one at all if the issue is still there.
Last edited by berin; 11-28-2020 at 11:52 PM.
Here are two photos of my filter on my mach3 usb motion controller that is in the middle of being built per time of this photo. The MPG encoder "" input "" 10 pin header can also be used as general inputs as well. The down fall to this card is that it is very susceptible to noise of any kind. That filter works wonders. I could have used a 10k bridged resistor but I chose 4.7k for the greater degree of protection it provides, especially in a very long wire run build with a brush less spindle and stepper motors and 120vac lines and everything else running in the drag chains. with the addition of this simple to build filter my low voltage 5v signal inputs are rock solid now as general inputs. I'm using them to increase the number of inputs on the card. The card by default only has 4 inputs. That is rather limited when it comes adding limit switches, touch probes, estop. and any other kind of input.
Last edited by berin; 11-28-2020 at 11:58 PM.
Well to be fair, those caps do create an LPF, just not much of one. The wire has some resistance. Let's say it is 22 Ga and 1 meter long. That makes for 0.053 Ohms. Using the .1 uF caps and .053 ohm you get a LPF 3db cutoff of 30 MHz. Radio Free Reboot will probably still get in. Now if he put a 1K ohm resistor in-line it would have a cutoff frequency of 1.59 kHz which will kill a lot of EMI. Not perfect but probably acceptable. Optos are a much better solution, though.
I agree fully with respect to the design being more of a vanilla braud range design and non tuned. A filter is a rather loose description. On the other hand this is a general design that will guaranteed correct most not all diy machines, false input triggering problems.
I worked up a quick schematic for an opto board with 7 inputs (3 axes + 4 control). I show 12V for the switches which will be more resilient to EMI than 5V. But any voltage can be used with a change to the resistor values. Each input can be used separately for NO or NC switches. Generic Grbl doesn't support different input pin inversion but others, like grblHAL, do. Limit switches can be run either way. I show suggested use for Grbl.
Btw, I used single channel optos because that is what I use on my board designs - in even small volume you get significant price reductions. But multi-channel optos can be directly substituted. The most expensive item in this design? The screw terminals. Pinheaders can be substituted, at your peril...It would be easy to pull all the output grounds together and reduce the number of output terminals.
Last edited by philba; 11-29-2020 at 01:55 PM.
This is a grbl machine im building for my daughter using the same filter. Works at this point but has a few areas that need to be finished. Made from HDPE "starboard". I have all of the cad files available if there is interest. All my design, with a work area of about 5"x5". An optional setup where the pen holder can be removed and a micro DC spindle motor can be mounted in its place. (for when she's older)
CNC, Mechatronics Integration and Custom Machine Design
“Logic will get you from A to B. Imagination will take you everywhere.”
Albert E.
That's a very cool thing to build for your kid. I remember how my dad made me a simple lab power supply when I was 6 or 7 - so I could play with small motors, lightbulbs and switches. Having a personal CNC machine back then would be the same as having your own pet dragon today.