About a year and a half ago, I bought a small CNC milling machine that is controlled by an Arduino UNO with Grbl firmware. The machine's spindle is three phase 110VAC and is controlled by a VFD that I believe is well-suited for the task.
Well, a few weeks ago, the Arduino began to detect false triggering of the machine's limit switches and would therefore stop at certain unpredictable moments. I noticed that if I were to lower the spindle's speed, the false triggering would diminish dramatically. The problem is that I can't run the spindle at above 60% of its total speed or the Arduino will detect a false limit switch trigger and flag an error.
After much testing, I arrived at the conclusion that the culprits are not:
I know this because:
None of the adjustments made any difference in the machine's behavior. Even though it worked fine for a year or so.
Finally, it occurred to me that maybe the VFD was producing EMI that was being sent back through the mains 110VAC and affecting the Arduino in some way. And I remembered that I had a line filter laying around that I normally use to filter stepper motor drives that I use in some of my projects. Here's its datasheet.
So I connected said filter between mains and the VFD and voilá! ... the machine performed much, much better. But not perfectly. That is, I am now able to run the spindle at up to 85% without a false limit switch detection.
My conclusion is then that the culprit must be back-EMI that the VFD is producing and affecting the Arduino when it's run above certain speeds. Or rather, when the VFD draws current above a certain limit. Why it started happening recently and not from the very beginning is beyond my knowledge. Perhaps some components in the VFD have been degrading with time and use. I suspect it might be a couple of big fat capacitors that I noticed.
By the way, I am trying to avoid installing RC filters at the limit switches' inputs because that could possibly affect the machine's home position calibration.
QUESTION: Any suggestions as what would be the best EMI filter I could use to completely get rid of this problem? And I mean other than the expensive alternative of using an isolation transformer. I know that the EMI filter I used is rated at 10A, whilst the VFD itself is rated at 17.5A, perhaps that is why my filter only partially worked?
This is the chinese-co VFD that my machine is using, btw.
Well, a few weeks ago, the Arduino began to detect false triggering of the machine's limit switches and would therefore stop at certain unpredictable moments. I noticed that if I were to lower the spindle's speed, the false triggering would diminish dramatically. The problem is that I can't run the spindle at above 60% of its total speed or the Arduino will detect a false limit switch trigger and flag an error.
After much testing, I arrived at the conclusion that the culprits are not:
- the limit switches themselves
- the otpoisolators that interface the limit switches with the Arduino's inputs
- the Arduino's inputs themselves
I know this because:
- I tested the limit switches' states with an oscilloscope and didn't find any transient anomalies
- I installed a well filtered regulated power supply exclusively for the Arduino
- I changed the optos' resistors so that more current (well within their specs) would flow through them
- I installed external 10k pull up resistors at the Arduino's pins used to detect the limit switches' states, to make sure that they were being pulled up strongly enough and not completely rely in the Arduino's weak internal pull-ups.
None of the adjustments made any difference in the machine's behavior. Even though it worked fine for a year or so.
Finally, it occurred to me that maybe the VFD was producing EMI that was being sent back through the mains 110VAC and affecting the Arduino in some way. And I remembered that I had a line filter laying around that I normally use to filter stepper motor drives that I use in some of my projects. Here's its datasheet.
So I connected said filter between mains and the VFD and voilá! ... the machine performed much, much better. But not perfectly. That is, I am now able to run the spindle at up to 85% without a false limit switch detection.
My conclusion is then that the culprit must be back-EMI that the VFD is producing and affecting the Arduino when it's run above certain speeds. Or rather, when the VFD draws current above a certain limit. Why it started happening recently and not from the very beginning is beyond my knowledge. Perhaps some components in the VFD have been degrading with time and use. I suspect it might be a couple of big fat capacitors that I noticed.
By the way, I am trying to avoid installing RC filters at the limit switches' inputs because that could possibly affect the machine's home position calibration.
QUESTION: Any suggestions as what would be the best EMI filter I could use to completely get rid of this problem? And I mean other than the expensive alternative of using an isolation transformer. I know that the EMI filter I used is rated at 10A, whilst the VFD itself is rated at 17.5A, perhaps that is why my filter only partially worked?
This is the chinese-co VFD that my machine is using, btw.



