|
CNC Noise Cures
After backlash, the second
biggest source of frustration seems to be noise problems on homebrew CNC
systems. Noise can manifest itself in a variety of ways including uncommanded
movements, servo encoder problems, and limit switches tripping unexpectedly.
There are many noise sources, but motors and VFD's appear to be the worst.
Any source of electrical sparks or arcing is going to make noise. In fact,
the first radio transmissions were nothing more than great big sparks!
Noise suppression is often a matter of surrounding the
noise producers and/or the noise victims with a grounded metal shield.
With enough foil and grounding, you can shield anything from noise:

With enough foil and grounding,
you can shield anything from noise!
Fortunately, there are easier ways,
so put away your aluminum foil and read on. Below
is a laundary list of tips I've come across that you can consider and
try if you think you're having a noise problem.
Important
Preventitive Tips
These are the things you should
always do as you're building the system to avoid having to deal with noise
later on. They're either madatory or so cheap and easy you may as well
do them anyway.
Use an Opto-Isolated Breakout Board
Your CNC electronics and your PC are each a source of noise as well
as being vulnerable to noise from the other. Putting each into its own
grounded chassis will help keep them isolated and the opto-isolators help keep them isolated.
Use Shielded
or Twisted Pair Cables
Shielded cabling
for the stepper/servo motor wiring, encoder wiring, and limit switch wiring
is ideal for noise resistance.
I bought a 500'
spool of 6 conductor shield 22 AWG cable from Action Electronics.
For connectors, I'm using some microphone
connectors, also from Action Electronics :

6 conductors and a foil shield: this is the
right cable for my step motors!
For others who
may read this, you want to use shielded cables or noise will make your
system unreliable. FWIW, when I first got my limited switches going, I did not ground the cable shields to the CNC cabinet. As a result, I had a bogus limit fire about every 2 to 3 minutes. Grounding the shields made that go away completely. If you didn't think you had noise in your system, maybe it was because you didn't have a way to check?
Other thoughts:
-
You can use CAT-5
cable for encoders or limit switches, just be sure you use the twisted
pair feature and pair each signal with it's ground to provide noise immunity.
Apparently this idea has been blessed by none other than Mariss F., Mr
Gecko, himself.
-
DIN cables such as are used as MIDI patch cables in the music business
and older keyboard cables (before the PS/2 and USB styles) in the PC business
are another possibility. Even Radio Shack carries some DIN cable componentry.
DIN for MIDI applications have 5 conductors plus a ground/shield and are
supposed to be rated to 2 amps @ 100V. What's nice is you can get premade
DIN cables in a variety of colors and lengths. If they'll serve the power
needs of your system, they could be quite convenient. Mini-DIN is the
PS/2 keyboard connector, and is also shielded. It might be useful for
limits and encoders. Cables are available already made up. Note
that Homann
sells a mini-DIN breakout board that would make it easy to connect to
your mini-DIN cables with point to point wiring.

MIDI DIN patch cable...
- Cinch
connectors are another common type of connector used for motors. They
will carry a bit more current than DINs or microphone connectors.

Cinch connectors...
Higher Voltage Control Signals Have Better
Noise Immunity
3-5V DC is pretty marginal from a noise immunity
standpoint. If you can run 12V or more to your limit switches you will
find it is much less susceptible to noise. Unfortunately, this may be
difficult to change as your breakout board
will likely have made the voltage decision for you. My GRex uses 12V.
Sometimes you can use a Zener diode to run
a higher voltage and convert it back to 5V for your breakout board. Run
a 24V circuit and have the switch ground that. Then use a resistor in
series something like 1K to the digital input, with a 5V1 zenner diode
across the input and ground. (Bar of diode to input). The Zener diode
will clamp the digital voltage at 5volts.
There are also opto-isolators that allow
differential voltages so you could have +5V to your breakout (actually
may as well go to the parallel if you are using an opto-isolator--don't
need 2 of them!) and 24V to your switch circuits.
Higher Current Helps Too!
If you can not up the voltage try putting
some 100 ohm pull up resistors to +5 on the switch, this will give you
50 milliamps of current through the
switch and may help increase reliability. This is .250 watts so get ½
watt resistors or they will get warm.
Wire Home and Limit Circuits Normally
Closed
Noise spikes are usually positive, so a normally
open circuit can see a noise spike as circuit closure. Wire the circuits
normally closed and they're less susceptible. Most of the time normally
closed is a good idea from a reliability standpoint too as any damage
to the circuit usually opens it and trips the circuit.
Keep "Noisy" Wires Aways from
"Quiet" Wires
For example, don't run the limit wiring in
the same conduit as the cable from VFD to motor! When noisy wires must
be near quiet wires, try to cross them at right angles rather than running
them parallel. Parallel wires are good at passing noise to each other.
Separate Chassis for PC, Driver Electronics,
and VFD
Put each of these components into its own
chassis (don't just stick your VFD in a box next to a bare PC motherboard,
next to a bare breakout board, next to bare servo drives), and then run
a common ground to each chassis.
VFD Noise
If you were asked to produce a noise generator
in order to sabotage a CNC or other sensitive electronic system, you couldn't
ask for a more efficient one than a VFD!
A grounded flexible metal conduit is very
desirable with the VFD connection to the motor. T&B SuperFlex also
has a small copper wire wound with the metallic sheath for ground continuity.
Use of twisted conductors inside the flex conduit will also help reduce
the noise emissions from the VFD.
Keep the wiring length from VFD to motor
as short as possible. Long lines can radiate more noise.
VFD manufacturers like Hitachi sell special
filters called EMI, RFI, or EMC filters that cut out noise. They're installed
on the AC mains side of the VFD. They also sell line reactors that go
on the line between the VFD and the motor. A line reactor reduces noise
by cutting out harmonics, and it will also increase the performance of
the system since power is being lost through the harmonics. Outfits like
AutomationDirect
sell them, but they aren't cheap so I wouldn't necessarily add one unless
you were running out of noise reduction steps to try.
Avoid Ground Loops
If you're familiar with ground loops and
their impact on stereos and hi-fi equipment, you know they are a source
of noise. Ground loops occur when all grounds are not quite a the same
zero potential. The best way to avoid them is to use a common ground for
all equipment. The exception to this rule is when using a plasma cutter
you will want to keep the grounds for the plasma cutter separate from
the rest of the equipment all the way back to the mains box if possible.
Diagnosis
Tips
Your machine is behaving as though haunted--limits trip
unexpectedly, motors don't move right, or your servos act as if the encoders
aren't connected properly. What to do?
Diagnosis is a bit of trial and error. If you can figure
out where the noise is coming from through a process of elimination, you
will be that much closer to deciding what to do about it.
Try Disconnecting the VFD
Pull the plug on your VFD and see whether the noise problems
continue.
Disconnect your DC supply
If the shutting down the VFD didn't help, next try shutting
down the DC supply to your steppers. This one is hard with servos because
the encoders will fault the system out if the shafts don't turn. With
steppers, things will move merrily along juts as though everything was
working. If you're seeing false limits hit with the DC shut off, you know
the noise isn't due to your step motors.
Now try some combinations
If you've disconnected various motors until the noise
problem stops, congratulations, you're on a good track. Now try different
combinations of reconnection to see where the problem lies. Each individual
motor is a possibility. Perhaps the shielded ground connection for a particular
motor is not making a good connection and vibration has shaken it loose.
When you find your bad actor, check that sort of thing very carefully.
Other
Tips
If you've taken the preventative steps described above
and still have noise problems, consider investigating the tips from this
section.
Use Mach 3 Debounce
I put this one first because it is easy to try. Limits
and similar inputs can be debounced in software using Mach 3. This can
help to reduce noise sensitivity. Most sources recommend trying a debounce
value of 1000 to see if it improves the situation. Values as high as 2000
are sometimes recommended.
Sometimes this debounce option can cause problems in homing
circuits, such as strange reversals of motion, so be on the lookout. It
is not a panacea. Lower values of debounce may make your switches more
accurate and repeatable. It's worth experimenting to find the optimum
lowest value that eliminates false hits from noise.
Ferrite Beads
Ferrite beads
can really help on noise problems. Pop a bead onto each power line--AC
to power supplies, DC to each Gecko, +5V logic supply, etc. The beads
eat the noise. Ferrites
are particularly good for VFD noise and should be one of the first things
tried after shielding the cables.
They come in two
forms:

Raw ferrite beads: thead the wire through them:

Wire threaded through a ferrite bead...

Clamp-on ferrite: ideal for power cords and adding
after the fact...
Add a Low Pass Noise Filter
Low pass noise filters: These will primarily be of use
on limit switches and other connections that don't need to respond blindingly
quickly. A simple resistor and capacitor may be used to create the filter.
Values of 3K ohms and
0.1 microfarad yield an upper cutoff frequency of 500 Hz. So, signals
changing faster than 500 Hz will tend to be cut out by the filter. I wouldn't
bother with one proactively, but if you are finding noise on your limit
switch circuits, you should try one. Position it as close to the breakout
board end of the line as possible.
Source for Professional Noise Filters
Try Vortex Technologies. They make a variety of devices
that may be helpful. These include line filters as well as more innovative
devices like their Ground Transient Eliminator, which can be used to clear
up noise on the ground lines.
Another source of line filters is Ajax
CNC which has them for $20:

EMI Line Filter stops noise from
coming in your AC lines...
These filters are generally used to keep
noise from coming in the AC line. For example, if noise is glitching your
PC, put one of these between the AC outlet and the PC power supply.
Use Suppressor Diodes With Mechanical Relays and Solenoids
Mechanical relays and solenoids (are you using solenoid
switches to operate pneumatic systems or turn coolant on and off?) can
create noise as the magnetic field collapses when power is cut to these
devices. A
simple 12V relay can generate up to 1500V in this way when current
to its coil is cut!
A number of sources recommend placing a rectifier diode
in parallel with the relay coil and it will eliminate these transients
to the point where noise problems are greatly reduced. The difficulty
is that the diode will also slow the speed with which the relay operates,
which can lead to tack welding of the relay contacts as they spend too
long in close proximity while opening and arcing across the small gap
creates the tack welding effect. This phenomenon only affects normally
open relay circuits, and the diode method is fine for normally closed.
More complex suppression methods may be helpful in preserving
the dynamic response of the relay and eliminating this tack welding problem.
A rectifier and Zener diode combination produces optimum results. However,
it also turns out a resistor installed in parallel with the coil can do
a better job than the diode will alone while preserving good dynamics.
Resistances in the relatively small range of 82 to 220 ohms will work
best for this application. Make sure your resistor is up to the current
demands of the application.
Put Plasma Cutters On A Separate Ground
Plasma cutters throw out huge amounts of noise as you
would expect. Make sure they're on a separate ground that doesn't meet
up with the ground for the rest of your system until it gets back to the
mains. If the plasma noise is bad enough, I would consider looking at
something like the Vortex Technologies
Ground Transient Eliminator.
Physical Separation When All Else Fails
If you can arrange to move noise producers further from
the components hit by the noise, this can help. Don't set your plasma
cutter right under the control circuitry for your CNC plasma table! Try
to move your VFD further from the drive electronics. Put the VFD at the
top of the mill near the motor on the left side and the drive electronics
cabinet down low on the right side, for example.
Sometimes Your Breakout Board is the Problem
I read one account where a
fellow was sent the wrong version of his breakout board which led to noise
trouble. I'm not sure how they figured it out, but the problems went
away when he swapped boards.
Ground all Your Power Supplies to the Same Ground
You've got separate chassis for VFD, PC, and the rest
of your CNC electronics. You've grounded those chassis together, right?
Now make sure the power supplies in each chassis are grounded together
so that no supply is floating relative to ground. There is a great series
of posts on
this CNCZone thread about common grounds for power supplies.
Bypass Capacitors Can Help With Noise
US Digital HEDS encoders are very common on servo systems
because they're cheap, and come with a lot of inexpensive servos. Unfortunately,
they're very prone to noise sensitivity.
Mariss
F. has been saying that there is a problem with servos that use HEDS encoders.
These are the usual cheap US Digital encoders, and they're exactly what
I have in my homeshopcnc servos. Some folks have said they had no problem
with their encoders, others have said they have all kinds of problem.
Mariss proposed a fix that involves some simple bypass capacitors, so
I took it on myself to install the capacitors on my servos. Here is what
it takes:

3 Allen-head
bolts hold the rear cover on the servo...

Here's what
the innards look like. The HEDS encoder is connected by a simple little
harness...

We're bypassing
the power supply to filter out noise, so the capacitor goes between pins
1 (Gnd) and 4 (+5V)...

The easiest
thing is just to bend the capacitor leads, insert into the connector,
and then reinstall...
The ceramic 1uF
capacitor goes across the HEDS power supply terminals at the encoder.
Use Digikey BC1151CT-ND capacitors. They cost $1.80 for a package of 10
pieces and Digikey was happy to send them to me without requiring a minimum
order.
The result? I
immediately noticed my servos were quieter when not moving--less dithering.
Some odd glitches and faults that would happen every now and again while
jogging went away. Best of all, my part was suddenly being more accurately
made--I was getting some false feedback from the encoder due to noise.
This is a quick
and easy fix: highly recommended if you have HEDS encoders!
I've heard other
folks mention the same little caps work wonders for home and limit switches
(put the cap at the switch across the contacts) and even for probing and
electronic edgefinders.
Software Debounce in Mach3
Mach3 has a very nice capability to debounce contacts
on a lot of its incoming lines. This is where the software looks at the
signal and treats it as one single pulse even if it gets multiple pulses
when the pulses are close enough together. You can specify an appropriate
time period.
OddBall: To ground or not to ground the Gecko heat
sink?
This
fellow seems to feel that a scratch in the anodizing (hard anodizing
provides isolation and doesn't conduct well) allowed his Gecko Drive to
ground and create noise problems. I'm still not sure what I make of it.
I would have thought you were supposed to ground the darned things.

Be sure to check out G-Wizard, our Machinist's Software!
|