Hi need a bit of advice,

Hi need a bit of advice, finally got my mill running but have hit another issue, i can run a whole program no issue without the spindle on but with it on the machine stops all motion at random if I’m lucky to get a connection to the pc at all. This means the motor is kicking off some major interference, has any one else experance this and has a solution or was it a huge mistake to mount the grbl shield on the back of the y axis??

Hi Ryan, with no idea how your cabling looks like, my take would be to first disable limit switches and then try another air job with running spindle. Physically disconnecting limit switches would also be advised for trying. I got most of my interferences from those cables.

I have done that and with out the motor running everything if fine, my main thought is how close the spindle is to the arduino board, is there a simple method to shield that?

What is your limit switches wiring, normally open (NO) or normally closed (NC)? What type of spindle do you have? I played a lot with noise and finally my recommendation is:

  • use NC switches and pull down resistor (some rewiring us needed if you have NO currently), as NC configuration is less sensitive to noise
  • check proper ground wiring for the machine
  • use at least low pass RC filter or if possible optocouplers for limit switches connections
    Additionally there is a software debouncing which you may optionally enable in grbl.

Thanks Sebastian, at the moment I don’t have any end stops , sp there are no false signals causing the issue. The motor I have is a 1.5 kw air cooled spindle,

Even if you don’t connect limit switches, the appropriate limit input pins on your arduino are still active, so noise may interfere and cause false alarms. Does the problem disappear when you disable limits?

I had that happen to me, using the same spindle. I ended up adding TONS of capacitance to the 5V rail of the arduino (I mean, TONS) and making sure the cable of the spindle is nowhere near the logic cables.

Also, I also added capacitance to the endstops.

The best way to debug your problem is to put a scope on the various rails and see what the noise level is… It’s likely very high, so add capacitance of various values until you get it more stable…

Also make sure your ground is filtered; I use one of these IEC noise cancelling plugs for the 24V supply I use for the steppers and the 5V rail to the arduino.

@Michel_Pollet I was hoping you would jump in on this :slight_smile: I don have a scope to measure teh noise being generated so i will have to take more general approach to the noise, the IEC suppression filter looks a good start thanks for the tip, what caps did you fit to the limit switches? I have not fitted these yet, which i’m regretting, but as i need to address this issue i will fit them at the same time. i can see in your build image 3 caps on a PCB is this the one you added to the 5V line, the power for my arduino is ccoming form the grbl sheild so i may not be able to do the same.

@Ryan_Lovejoy I added the caps ‘externally’ ie I made a small board with 2 wires, added the caps there and hooked the wires to the shield itself. It’s not high frequency so the wires won’t matter.
I used 0.47uF (from the top of my head) for the endstops. I have to say, that works really well; I had occasional mishaps until I added these…
It’s not too hard to wire the endstops, but then again I also used good quality /shielded/ cable, and hooked the shield to the chassis.

@Michel_Pollet thanks again, just two more questions, what size were the caps you connected to the arduino and what cable did you use to connect the motor to the inverter?I have acquired s metal enclosure so if this does not work I’ll rewire the whole thing in to that.

@Ryan_Lovejoy I used 1000uF’s ! :slight_smile: Bit heavy handed, but it did the job. For cabling I used a good quality ‘mains’ cable. Nothing particularly special. What’s a bit special about my setup is that the cable goes straight up to some sort of gantry I have over the CNC, the so cable doesn’t go anywhere near the logic.

@Michel_Pollet You say you connected endstop shields to chassis - which chassis, the Ox framework or the chassis of the Uno(whatever that is)? Connecting to Ox framework is not a good idea, in my opinion. all I/O wires emanating from the UNO/GShield, including motor drive wires, should be in shielded cables, with the shields all connected together and grounded at the UNO end, only, and not the Ox End.
My guess would be that your noise issue is due to conducted interference over the AC mains, which can be difficult to get rid of. Try not to, for example, plug your Uno power supply and the Spindle power supply into the same power strip or extension cord.

@Michel_Pollet ​ thanks for the help , finally have rebuilt the machine with a control box, all shielded cable, and filters. The good news is the motor noise no longer a issue and it does not get shut down, only issue now real odd, when jogging with the grbl controls it all moved in the rich direction and it show in the simulation, but when I run a program all the axis get inverted! Any clue on thsi?