Help/advice needed on grounding/interference type problem...

Help/advice needed on grounding/interference type problem… sorry this is probably going to be a long post…

Today I finished setting up my machine with dual drivers on the x axis. So I was testing, trying to get nice clean circles.

During setup of the new x axis layout I was motoring back and forth, adjusting, back and fourth again etc until I got nice clean run along the length in both directions. Then I played with speed to find a rate that worked reliably etc. This was all good.

The I started cutting circles. With the spindle switched on I experienced dropped steps/interference that tended to push the x axis motors out of alignment with each other and messing up the circles.

When the spindle starts up I can see the z axis motor twitching. But it stops when the spindle is at speed.

So I started to experiment. I ran the job with the spindle raised and off. And everything sounded right. No stalling of motors etc.

Then I got the multimeter out and decided to check the voltage difference between the z axis motor casing and the spindle casing. The readings jumped around between 0 and 1v. So I checked again while the spindle was running…
This caused all axis motors to go a little haywire, running enough to move the axis.

So… my wiring…
I have a normal the cite power cable from plug socket to vfd with earth connected to earth terminal.
Then I have heavy duty shielded 4 core from vfd to spindle. 3 for the 3 phase power and one for earth
The earth is connected to pin four on the spindle connector and the earth terminal at the vfd end. The shielding touches the spindle case via the connector and is also connected to the earth terminal at the vfd.

Independently my motors are all connected to sparkfun easy drivers. They are powered via a 24v supply that has one of those cylinder connectors like a laptop power supply.
The drivers take their signals from an arduino. All the drivers and the arduino share ground point on a little circuit board.
The arduino is connected via USB to laptop which is plugged in.
So the earth of every part ultimately connects to the earth pin of power plugs and everything runs off the same multi way connector.

I had thought that I might need to connect the ground/case of the spindle to the ground shared by the motor drivers, but making that connection sends things crazy. Without it things run mostly fine, but are having some kind of interference from the spindle running.

I’m clearly missing something, but in really not sure what.
Any input/advice is gratefully received.

@Peter_Fouche1 when I was reading up wiring the vfd I found conflicting advice regards shielding connected at both ends versus one. So at the moment I do have it connected at both ends, easy enough to disconnect one end and see if it helps. But it will have to wait until next weekend.

I had severe interference problems with my CNC project myself. I finally hit upon a solution of optically isolating my step, and direction control signals, and that cleared things up for me. I put optical isolation on each of my motor drive control lines. You can see how I did it in this schematic here:

I outlined the optical isolation part of the circuit in blue. It may be a bit tricky to understand how it works but it is really simple. A low input signal causes the optocoupler to output a high signal which is squared up, and inverted by a Schmitt trigger.

The high current draw of the optocoupler makes sure that other superfluous noise signals are ignored. The physical barrier the optocoupler has makes sure no noise propagates out of a motor drive too.

I looked at the schematics for the stepper drives you’re using and they look very susceptible to noise to me. Maybe there’s an easier way to filter noise out of a stepper system, but if there is I’m unaware of it. So this is as much help as I have to give. Your cheap stepper drives are about a buck away from being decent. Because that is what it’d have cost in parts to add optical isolation to them. That is the difference between chip carriers and real drives though. Technically what you have is a drive, but not practically.

Frankly I’m amazed you haven’t run into problems sooner.

@Paul_Frederick thanks for the suggestion. I’ve had all sorts of troubles before now, hard to say whether interference has been a factor. But as I’ve slowly solved more serious issues I’m narrowing down on more subtle issues.
The driver boards where obviously cheap, such was their appeal. It’s a good pointer though to look specifically at the step/dir signal lines, I can run a test with those disconnected to check that this is where rogue signals are coming through. Assuming that is the case then there must be something I can do to protect those lines… maybe with optical isolation as you suggest.

Part of me is tempted to buy better driver boards, but I feel like if I don’t understand the problem with these, then there is no garuntee I won’t run in to the same or other problems with more expensive parts.

Sounds to me like your power supply cant provide enough amps, or you need to turn up the amps on the z axis.

@Mongrel_Shark all axis run smoothly and fine whilst the spindle is not running so I’d discounted the power supply being an issue. If I can get to the point that I can start the spindle without it having an effect on the stepper motors, then if I still see dropped steps I’ll review the power supply rating.

So the spindle is powered by an isolated second supply? And is not drawing power from the same source as the steppers?
You realize the spindle will need to draw 3x its rated wattage to start up? What is the total amp draw of the machine?

Connect all your Shields only at one end and personally I would say that should be the supply end as they should all be connected to the same ground point. You can’t really do that if you ground the shield at the motor end.

@Mongrel_Shark well it’s separate to a point, it’s still all coming off my house mains supply. I know the spindle will likely spike it’s draw on start up, but it should still not cause the steppers to move. And once running at steady state should allow the steppers to run the same as when it isn’t running. But right now that is not the case.

@Mark_McKinlay that is also the easier thing to do so I’ll give it a try as soon as I can.

Sounds like 2 nice ground loops.
I had issues with that before until I fixed my cabling.

Also: you don’t happen to have anything else running from tie power supply of the Steppers? Like a water pump? :wink:

@Marcus_Wolschon no, the water pump is totally separate again.

How many capacitors do you have in the Controller box?
I would recommend One next to every driver. At least 100 uF.
and make sure the wires from the power supply to the drivers are thick enough. Good luck!

@Daniel_Would good.
Then try to wire your earth in a star configuration.
Only one power plug gets earth and that’s the one point for PC, spindle-VFD and stepper-power-supply.
Only the spindle connects earth to the machine body.
Interference is easy to see on a super cheap 48KHz pocket-oscilloscope. A multimeter is usually too slow. (like a DSO nano V1)

You could buy new drives but you seem to be using the drives you have now OK except for this interference problem. I can’t guarantee 100% that my circuit will fix things but I’m 99.999% sure it will. Which is to say no one would be more surprised than me if it didn’t work.

Your problem isn’t so much noise as it is a lack of noise immunity. Industrial machines are noisy and that has to be accepted. Chasing after every cause of noise in an industrial environment is a game of whack a mole. Improving the noise immunity of your system is reasonably attainable though.

It only takes billionths of an amp to trigger a logic gate. You can literally pick up radio out of the air off the legs of an integrated circuit (this is why unused inputs need to be tied off). They’re that sensitive. My circuit on the other hand won’t even bat an eyelash with current thousands of times higher than that. With that kind of immunity noise isn’t an issue anymore. Let the moles come!

I looked at your driver boards and the pins for step and direction just go out to header pins. They might as well have just put antennas onto the boards. Right now you have zero noise immunity protection. That stuff needs to be clamped down!

Tackling noise by itself is like saying you can put a car together with bubble gum. Yeah sure I guess if you’re really careful it’ll be OK. It’d hold together better if you used decent fasteners though.

In my last reply I showed you a schematic and that is kind of theoretical. Maybe a picture of the actual hardware would help? In this picture I have two motor drives breadboarded and one of them has an optical isolation circuit for the step input. I’ve circled the optical isolation circuit with blue

Those motor drives each generate enough noise to drive the other one completely batshit crazy. That’s a technical term BTW. But with just my optical isolation circuit in there they run gentle like lambs. Because my isolation circuit blocks the drive noise, and isn’t affected by noise anyways. That’s a win win.

@Paul_Frederick that certainly sounds like the sensible approach, make it resiliant to noise rather than stop noise. The photo helps on the sense that I see your setup is not as neat as the schematic implies, much like my own :slight_smile: I have lots of ideas now to try both improving the shielding and protecting the inputs from interference.

That is just the breadboard. This is the final drive

The optical isolation circuit is the two ICs on the left.