LinuxCNC Integrator Es
LinuxCNC Integrator Es
4, 25 Jan 2025
Integrator Information V2.9.4, 25 Jan 2025 ii
Índice general
1. Stepper Information 1
1.1. Stepper Motor Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2. Selecting a Stepper Power Supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3. Resonance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.4. Microstepping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.5. Open and Closed Loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2. Stepper Timing 6
Capítulo 1
Stepper Information
Stepper motors operate by sequentially energising and de-energising several coils surrounding the
rotor in such a way that the shaft is magnetically forced to rotate around in discrete steps. Steps of
0.9 - 1.8 degrees are quite common, giving 400 - 200 steps per full revolution of the shaft.
As in real life, nothing can change from one state to another with absolutely no time delay. In the case
of the stepper motor, the current passing through each coil, and thus the magnetic field that pulls
the rotor around to each step of rotation takes some time to take effect. This is due to the coil having
inductance (expressed in Henries, abbreviated to the letter H) which has a natural tendency to resist
the flow of a rapidly changing current. More coil inductance results in a slower rate of current change
and thus a slower rate of magnetic field expansion and contraction.
The maximum torque that the stepper motor can achieve is when the motor is stationary with one
winding energised. This figure may be quoted on a stepper motor datasheet as the holding torque. As
the rate at which each coil is energised and de-energised increases to induce rotation in the shaft, the
time that each coil can exert its full magnetic attraction on the rotor reduces, thereby reducing the
overall torque. This relationship between speed and torque is largely inversely proportional.
In the below example, the charging time for three coils is shown when the applied voltage is stepped
from 0 V to 40 V. While all three coils can easily reach the full current limit of 5 amps (A), the time
taken varies for each coil. The 4 milli-Henry (mH) coil (blue trace) takes twice as long to reach full
current than the 2 mH coil (green trace), and the 8 mH (red trace) coil takes twice as long again:
Integrator Information V2.9.4, 25 Jan 2025 2 / 18
If the rate at which step changes are applied to the coils is significantly shorter than the rise time,
it’s easy to see that the winding has less time to attain full magnetic attraction on the rotor, and thus
maximum torque is curtailed. In the below example the 2 mH coil can achieve the full 5 A limit before
the step voltage is removed, but the 4 mH and 8 mH coils cannot:
The accepted way of improving motor speed while maintaining torque is to increase the speed at which
the magnetic field of the motor coils can expand and collapse. The easiest way to accomplish this is to
increase the supply voltage to force the current in each winding to rise and fall much more rapidly. A
quicker magnetising time equates to faster step rates while improving torque at higher speeds, both
of which are obviously desirable in a CNC system.
Using the same example as above, but increasing the step voltage to 80 V it can be seen that all three
coils can now reach the 5 A maximum quite easily:
However, careful management of a higher drive voltage is required, as a higher voltage will increase
current flowing in each coil with a corresponding increase in temperature of the winding. Excessive
temperature rise in the winding will lead to eventual overheating and failure of the motor.
In most stepper-based CNC systems the voltage of the supply feeding the stepper driver is several
orders of magnitude greater than the voltage of the motor itself. A typical NEMA23 stepper motor
may have a rating of only a handful of volts, yet the power supply and driver could be operating at
48 VDC or more.
Nearly all modern stepper motor drivers on the market today are constant-current types. That is,
the current being applied to each winding is fixed irrespective of how much voltage is being applied.
Integrator Information V2.9.4, 25 Jan 2025 3 / 18
Most drivers accomplish this by monitoring the current being drawn through the motor windings and
rapidly switching the outputs on and off at a very high frequency to maintain this current. Depending
on the drivers being used, it may even be possible to hear this high frequency whistling in the motors
themselves when stationary. Because the voltage is rapidly switched on and off to maintain the winding
current at an approximate fixed value, these types of drivers are also known as chopper drive.
While a higher voltage is directly related to more speed and torque, obviously there comes a limit
where increasing supply voltage is no longer beneficial. The first limitation to the maximum power
supply voltage is likely to be what the stepper driver itself is capable of withstanding. This value
should be provided in the datasheet for the stepper driver, and exceeding this voltage will result in
the destruction of the driver. Ideally the power supply voltage should be chosen with a degree of
headroom that falls under this maximum voltage limit of around 10 %. If, for example a stepper driver
has a Vmax rating of 80 VDC, the maximum power supply voltage should be limited to 72 VDC.
As mentioned above, excessive motor supply voltage also leads to excessive heat rise in the motor
windings, which can lead to eventual failure of the motor through overheating. A commonly used
equation for providing a guideline in determining the maximum voltage to prevent excessive heat
rise is to take the square-root of the winding inductance quoted in the motor datasheet (expressed in
mill-Henries) and multiply by 32. For example, choosing a stepper with a coil inductance of 4 mH will
result in a maximum power supply voltage of 32 x SQRT (4) = 64 VDC.
Many stepper motor datasheets will also provide speed/torque curves, often plotted using different
supply voltages. By studying the graphs it may be determined that increasing the supply voltage by
a factor of two will not result in a corresponding improvement in speed/torque by the same degree.
If there is little to be gained in running a stepper motor at 64 VDC, this may help in narrowing down
the proposed power supply to 32 VDC which will also help minimise excessive heat rise in the motor
windings.
The other factor to consider is the current rating of the power supply. This is based from the motor’s
winding current ratings and whether the motor windings are wired in series or parallel, both of which
should be listed in the motor’s datasheet. A good rule of thumb is to size the power supply current
rating at 2/3 of the rated phase current of the stepper motor if the windings are in parallel, or 1/3 of
the rated current if wired in series. Thus, for a stepper motor rated at 4 A wired in parallel, the power
supply needs to have a current rating of at least 2.7 A, or 1.3 A if wired in series. The total current
rating of the complete system is then the sum of all stepper motors’ current requirements.
1.3. Resonance
Motor resonance occurs when the rate at which the steps are applied to the windings matches the
natural frequency of the motor itself. Applying steps for a prolonged period of time at this rate results
in the torque dropping dramatically, and the motor may stall or even rotate in random directions.
Some stepper motor datasheets provide plots of the torque/speed relationship and show a dip in the
graph where resonance is likely to occur. It should be noted that this resonant peak provided in the
datasheet is only for the motor itself - as soon as the motor is coupled to other components (i.e.,
installed in a CNC system) the resonant frequency may be altered, or even multiple new resonances
introduced.
Several methods exist to help control the effects of resonance, all with varying degrees of complexity,
effectiveness and side effects:
Microstepping can help reduce resonance by using smaller step changes in current between each
step. These smaller step changes cause less ringing in the motor and windings and thus cause less
excitation at the point of resonance.
Integrator Information V2.9.4, 25 Jan 2025 4 / 18
Ensuring the motor is never operated at a particular frequency for a sustained period is a very basic
method of reducing resonance, always accelerating or decelerating through the resonant peak.
Increasing inertial load will damp unwanted resonances at the expense of some torque and poten-
tially some accuracy. Elastomeric motor mounts, shaft couplings or bearing mounts can be emplo-
yed.
More advanced stepper motor drives may have the ability to switch between stepping modes such
that the resonant peak is managed at certain rates of operation. Other systems exist to place elec-
trical load on the windings, which has a similar effect to mechanical damping, above.
1.4. Microstepping
A stepper motor operating with each winding being fully energised in a sequential fashion is operating
in full-step mode. That is, the maximum rotation resolution possible for that motor is the same as the
number of whole steps that motor is manufactured to perform at (e.g., 200 steps per revolution for a
1.8 degree/step motor). As each winding is energised the rotor clocks around fully from one detent to
the next.
Additional rotational resolution from a stepper motor can be obtained by performing microstepping,
whereby the current being driven into each winding can essentially be ramped in discrete interme-
diate steps. This then causes the rotor to gradually straddle across each rotational detent rather than
making the full jump from one step to the next.
Microstepping is commonly performed in multiples of 2 (4x, 8x, 16x, 32x etc). For example, a drive set
to 4x microstepping will divide each step into four discrete current levels in the motor windings, thus
affording an improvement in rotational resolution by a factor of four. This obviously means that for a
typical step/direction control interface there will need to be four times as many step pulses generated
to make the motor move the same amount had it been operating in full-step mode. To make the motor
rotate at the same speed the rate at which pulses need to be applied to the drive also needs to be four
times as fast.
At low rotational speeds, microstepping actually results in slightly higher torque than when full step-
ping. This is due to the smaller changes in current between intermediate steps resulting in less energy
being wasted exciting natural resonances in the motor. As RPM increases however, torque tends to
fall off at a similar rate as full stepping.
However, continuing to increase the degree of microstepping will eventually lead to some real-life
limitations. Step pulse generation, particularly when using the parallel port, is limited in frequency.
This will inevitably limit the maximum speed at which the drive can be commanded to step at. With
high degrees of microstepping this will result in unacceptably slow RPM of the motor.
Excessively-high rates of microstepping have no real benefit if the resultant accuracy is too small to
be mechanically useful. A 1.8 degree per step motor running at 16x microstepping is theoretically
capable of 0.1125 degrees per step. Coupled with a 20 TPI leadscrew this should result in a positional
resolution of 0.000016” or 0.0004 mm. In reality it is incredibly difficult to achieve such fine degrees
of control. All components in the CNC system will contain tolerances and countering forces (backlash
in leadscrews, flex in gantries, runout in the spindle and cutting tool, static friction in the stepper
motor itself, stepper detent error , etc.) that will render such small amounts of resolution completely
meaningless. In practice, microstepping at rates in excess of 4x or 8x on a CNC machine fitted with
leadscrews serves little purpose. In some cases it may even be more beneficial to run at lower degrees
of microstepping or even full steps, and operate the stepper motor through a gear reduction to obtain
the necessary resolution and torque gains.
Integrator Information V2.9.4, 25 Jan 2025 5 / 18
In the simplest CNC systems employing stepper motors, the host computer and/or stepper driver
receives no feedback from the motor that it has achieved the desired outcome when commanded
to begin stepping. The assumption by the software, driver and end user is that the motor operated
correctly and the axis has moved to the expected new position. A system operating in this fashion is
said to be running in open loop, where the device at the end of the signal chain (the stepper motor)
does not provide any indication to the device at the start of the chain (the computer) that the target
was reached.
A further enhancement to the basic stepper motor is to run the system in a closed loop. This is achieved
by equipping the stepper motor with a rotary encoder whose positional signal is returned back to a
device higher up in the signal chain. In this way the motors’ actual position can be compared to the
expected position at all times, and the drive parameters adjusted in real time to ensure that the motor
does not fall behind. This enables closed loop stepper systems to be able to achieve better speed
and torque performance than open loop systems, due to the system constantly compensating for any
deviation to the stepper’s performance under varying loads.
Basic systems operating in this fashion may only close the loop between the motor and the driver,
leaving the software on the host computer out of the loop. The software issues step/direction pulses
to the downstream driver as it would normally when running in open loop. In these situations the
drivers usually include an alarm output which signals the software to halt when the load placed on
the stepper becomes too great for the driver to compensate without losing steps.
More advanced implementations of closed loop operation bring the encoder signal all the way back
to the host computer, but require that a much higher hardware and software overhead be installed to
manage the encoder feedback and calculation and delivery of drive compensation.
Integrator Information V2.9.4, 25 Jan 2025 6 / 18
Capítulo 2
Stepper Timing
Manufacturer
Model Step Step Direction Direction Steps Spec
Time Space Hold Setup on Sheet
Chinese TB6560 150000 150000 150000 150000 Falling http://hyu68.com/-
Blue CNC Edge cp8.htm
Boards Stepper
Motor
Driver
Contro-
ller
Board
Gecko 201 500 4000 20000 1000 Falling http://www.geckodrive.com
Edge support/-
motor-
control-
manuals/-
stepper-
drives/-
g201-
rev-
16.html
Integrator Information V2.9.4, 25 Jan 2025 7 / 18
Manufacturer
Model Step Step Direction Direction Steps Spec
Time Space Hold Setup on Sheet
Gecko 202 500 4500 20000 1000 Falling http://www.geckodrive.com
Edge support/-
motor-
control-
manuals/-
stepper-
drives/-
g202-
rev-
15.html
Gecko 203v 1000 2000 200 200 Rising http://www.geckodrive.com
Edge support/-
motor-
control-
manuals/-
stepper-
drives/-
g203v-
rev-
7.html
Gecko 201x 500 3000 20000 1000 Falling http://www.geckodrive.com
Edge support/-
motor-
control-
manuals/-
stepper-
drives/-
g201-
rev-
16.html
Gecko 212 500 4000 20000 1000 Falling http://www.geckodrive.com
Edge support/-
motor-
control-
manuals/-
stepper-
drives/-
g212-
rev-
15.html
Gecko 213v 2000 1000 200 200 Rising http://www.geckodrive.com
Edge support/-
motor-
control-
manuals/-
stepper-
drives/-
g213v-
rev-
7.html
Integrator Information V2.9.4, 25 Jan 2025 8 / 18
Manufacturer
Model Step Step Direction Direction Steps Spec
Time Space Hold Setup on Sheet
Gecko 320 3500 500 200 200 Rising http://www.geckodrive.com
Edge support/-
motor-
control-
manuals/-
dc-
servo-
drives/-
g320-
rev-
7.html
Gecko 320x 1000 2500 200 200 Rising http://www.geckodrive.com
Edge support/-
motor-
control-
manuals/-
dc-
servo-
drives/-
g320x-
rev-
10.html
Granite VSD- 125 125 125 125 Rising http://granitedevices.fi/-
Devices E/XE Edge assets/-
Evolu- files/-
tion vsd-
e_160_manual.pdf
Granite VSD- 150 1850 150 800 Rising http://granitedevices.fi/-
Devices E/XE Edge assets/-
DualDC files/-
vsd-
e_160_dualdc_manual.pdf
JVL SMD41 500 500 2500 2500 Rising http://www.jvl.dk/-
Edge files/-
pdf/-
lb043gb.pdf
JVL SMD42 500 500 2500 2500 Rising http://www.jvl.dk/-
Edge files/-
pdf/-
lb043gb.pdf
LinistepperRULMS1 30000 100000 4000 4000 Rising http://www.piclist.com/-
Open Edge techref/-
Source io/-
stepper/-
linistep/-
index.htm
LinistepperTHB6064 2300 2300 4600 1000 Rising http://www.piclist.com/-
Open Edge techref/-
Source io/-
stepper/-
THB6064/-
index.htm
Integrator Information V2.9.4, 25 Jan 2025 9 / 18
Manufacturer
Model Step Step Direction Direction Steps Spec
Time Space Hold Setup on Sheet
*Motion MSD542 >1500 2000 2000 2000 Rising http://www.motioncontrolpr
Control Edge c2/-
uploads/-
msd542 %20datasheet.pdf
Parker OEM750 200 300 0 200000 Rising http://www.compumotor.com
Edge manuals/-
OEM750/-
OEM750_Entire_Rev_B.pdf
ST L297 ? 500 4000 1000 Rising http://www.st.com/-
Edge stonline/-
books/-
pdf/-
docs/-
1334.pdf
Xylotex XS- 2000 1000 200 200 Rising http://www.xylotex.com/-
3525/8S- Edge XS3525V202.pdf
3
Xylotex XS- 1000 1000 200 200 Rising http://www.xylotex.com/-
3525/8S- Edge XS3525V400.pdf
4
Lin Silverpak 20000 20000 200 200 Rising http://www.linengineering.c
Engi- 17D/DE Edge site/-
neering products/-
pdf/-
SilverPak17D_DE-
manual.pdf
Hobbycnc Pro 2000 2000 2000 2000 ? http://www.hobbycnc.com/-
Chop- products/-
per hobbycnc-
Board pro-
chopper-
driver-
board-
kits/
*Routout 2.5amp 200 1000 1000 ? ? http://www.routoutcnc.com/
Stepper 2-
Driver 5ampdriver.pdf
*IntelligentIM483 1000 1000 1000 1000 Rising http://www.imshome.com/-
Motion Edge im483.html
System
Keling 4030 5000 5000 20000 20000 ? http://www.
Keling 6852 1750 1750 10000 10000 Rising http://www.kelinginc.net/-
Edge kL-
6852.pdf
Sherline 8760 1000 6000 24000 24000 ? https://www.sherline.com/-
Manufacturer
Model Step Step Direction Direction Steps Spec
Time Space Hold Setup on Sheet
www.cncdrive.com
Dugong 1000 2500 1000 1000 ? http://www.cncdrive.com/-
content/-
dugong.htm
www.cncdrive.com
DG2S- 1000 2500 1000 1000 ? http://cncdrive.com/-
08020 DG2S_08020.html
Wantai DQ542MA 5050 5050 500 500 ? http://www.wantmotor.com/
Motors ProductsView.asp?id=257&
Leadshine Digital 7500 7500 20000 5000 Rising http://leadshineusa.com/-
USA DM422 Edge UploadFile/-
40V Down/-
2.2A DM422m.pdf
Leadshine Digital 2500 2500 10000 5000 Rising http://leadshineusa.com/-
USA DM556 Edge UploadFile/-
50V Down/-
5.6A DM556m.pdf
Leadshine Digital 2500 2500 10000 5000 Rising http://leadshineusa.com/-
USA DM856 Edge UploadFile/-
80V Down/-
7.0A DM856m.pdf
Leadshine Digital 2500 2500 10000 5000 Rising http://leadshineusa.com/-
USA DM870 Edge UploadFile/-
80V Down/-
7.0A DM870m.pdf
Leadshine Digital 2500 2500 10000 5000 Rising http://leadshine.com/-
USA DM1182 Edge UploadFile/-
150VAC Down/-
8.2A DM1182m.pdf
Leadshine Digital 10000 2500 10000 5000 Rising http://leadshine.com/-
USA EM402 Edge UploadFile/-
40V Down/-
2.2A EM402d_P.pdf
Leadshine Digital 2500 2500 10000 5000 Rising http://leadshine.com/-
USA EM503 Edge UploadFile/-
50V Down/-
4.2A EM503d_P.pdf
Leadshine Digital 2500 2500 10000 5000 Rising http://leadshine.com/-
USA EM705 Edge UploadFile/-
70V Down/-
7.0A EM705d_P.pdf
Leadshine Digital 2500 2500 10000 5000 Rising http://leadshine.com/-
USA EM806 Edge UploadFile/-
80V Down/-
8.2A EM806d_P.pdf
Leadshine Analog 1500 1500 8000 5000 Rising http://leadshineusa.com/-
USA M415B Edge UploadFile/-
40V Down/-
1.5A M415Bm.pdf
Leadshine Analog 1500 1500 8000 5000 Rising http://leadshineusa.com/-
USA M542 Edge UploadFile/-
50V Down/-
4.2A M542V2m.pdf
Leadshine Analog 1500 1500 8000 5000 Rising http://leadshineusa.com/-
USA M752 Edge UploadFile/-
75V Down/-
5.2A M752m.pdf
Integrator Information V2.9.4, 25 Jan 2025 11 / 18
Manufacturer
Model Step Step Direction Direction Steps Spec
Time Space Hold Setup on Sheet
Leadshine Analog 1500 1500 8000 5000 Rising http://leadshineusa.com/-
USA M880A Edge UploadFile/-
80V Down/-
7.8A M880Am.pdf
Leadshine Analog 1500 1500 8000 5000 Rising http://leadshineusa.com/-
USA M860H Edge UploadFile/-
80VAC Down/-
7.2A MA860Hm.pdf
Leadshine Brushed 2500 2500 10000 5000 Rising http://leadshineusa.com/-
USA servo Edge UploadFile/-
DCS303 Down/-
30V 15A DCS303m.pdf
Leadshine Brushed 2500 2500 10000 5000 Rising http://leadshineusa.com/-
USA servo Edge UploadFile/-
DCS810 Down/-
80V 20A DCS810V1m.pdf
Leadshine Brushed 1000 1000 7000 5000 Rising http://leadshineusa.com/-
USA servo Edge UploadFile/-
DCS810S Down/-
80V 20A DCS810Sm.pdf
Leadshine Brushless 2500 2500 10000 5000 Rising http://leadshine.com/-
USA servo Edge UploadFile/-
ACS306 Down/-
30V 15A ACS306hm.pdf
Leadshine Brushless 850 850 6700 5000 Rising http://leadshineusa.com/-
USA servo Edge UploadFile/-
ACS606 Down/-
60V 15A ACS606m.pdf
Leadshine Brushless 850 850 6700 5000 Rising http://leadshineusa.com/-
USA servo Edge UploadFile/-
ACS806 Down/-
80V 20A ACS806m.pdf
Pololu A4988 1000 1000 200 200 Rising http://www.pololu.com/-
Stepper Edge catalog/-
Motor product/-
Driver 1182/
Carrier
Pololu DRV8825 1900 1900 650 650 Rising http://www.pololu.com/-
Stepper Edge catalog/-
Motor product/-
Driver 2132/
Carrier
cnc4you 2000 8000 5000 5000 Rising http://cnc4you.co.uk/-
Edge resources/-
CW5045.pdf
Integrator Information V2.9.4, 25 Jan 2025 12 / 18
Capítulo 3
Electrical noise in a system is caused by Electromagnetic Interference (EMI), where signals appearing
in one electrical circuit interfere with an adjacent circuit, either through electromagnetic induction,
electrostatic coupling or conduction. EMI can cause problems with the daily operation of a CNC ma-
chine, and can manifest itself in various ways such as false triggering of limit switches, prematurely
interrupted tool probing operations, corruption of a serial data link to a VFD or erratic behaviour of
the CNC control systems and software.
When current passes through a conductor a magnetic field is created. As the current increases the
magnetic field gets stronger, and then collapses again when current ceases to flow. If this alternating
magnetic field happens to cross another conductor it can induce an unwanted voltage into it, which
presents itself as noise.
There are several methods that can be employed to minimise the effects of EMI in any electrical
system. The most effective of these is obviously to prevent the noise from occurring in the first place.
In reality the method of controlling the effects of EMI is usually by applying measures to prevent noise
from contaminating wanted signals in the CNC system.
Confusion can arise when using terms such as earth, ground and common. In some cases they may be
used to describe the same thing; that being the point in an electrical system to which all voltages are
referenced to. For the purpose of this article, the terms earth and ground refer to the point at which
the incoming mains supply is earthed to, whereas common is the return or negative terminal on a DC
supply. In some cases it is permissible to ground the common on a DC supply, thereby making the
negative terminal on that supply the same potential as the incoming AC earth, but for the purposes of
this discussion the terms earth and common must be made distinct from each other to avoid confusion.
Wire comes in many types, sizes and configurations. Wading through all the wire available is a monu-
mental task of its own, but for the purposes of this article it is only necessary to consider the types of
wires typically used when wiring a CNC controller. Additionally, how the wire is to be used can have
some effect on the overall system. What follows are some tips that may prove helpful.
Integrator Information V2.9.4, 25 Jan 2025 13 / 18
The incoming mains AC that powers the CNC system can pick up and carry noise into the power
supplies and other equipment. For example, if the incoming supply is also used to feed large motors,
Integrator Information V2.9.4, 25 Jan 2025 14 / 18
electrical noise may be generated on the line feeding the CNC components. Although most modern
electronic devices feature built-in mains filtering to help minimise the susceptibility to mains-borne
interference, the custom and modularised nature of a CNC system can mean that components used
come from a wide variety of sources with differing degrees of inherent noise immunity.
Inline filters may be installed on the incoming mains supply feeding the CNC control system to help re-
duce any induced noise. Running the CNC system from a different mains circuit to any large electrical
sources of noise may also help minimise any potential sources of mains-borne interference.
nota
Be aware that in many countries, the installation and alteration of mains circuits can only be carried
out by licensed electricians.
3.5.1. AC Ground
A typical CNC machine may have several different Power Supply Units (PSUs) installed in the system.
Any device powered from the incoming mains designed to be earthed must be properly and perma-
nently terminated to mains earth. Ideally this should be made to the same point in the system, which
may be a threaded post or bolt, a copper/brass termination strip or a large metallic mounting plate
within the control enclosure.
The prevalence of high-frequency switchmode PSUs used in CNC systems increase the likelihood of
RF noise being coupled from them to adjacent circuitry. Many of these PSUs have a metal case which,
if connected to mains earth, will help screen the coupling of high frequency EMI into other electrical
components.
From a safety standpoint, it is important that these mains earth connections also be mechanically
strong and unlikely to break free, and the wire used has a cross-sectional area sufficient to carry the
anticipated fault current should a short to earth occur. It is also imperative that mains earth is never
used as a current-carrying conductor for other components in the system. Earth shall be used for one
purpose only: safety earthing.
Note also that the colour of the jacket used to make a termination to earth may be prescribed by the
wiring code for your country, and the conduction of other unrelated signals in that same wire colour
may be prohibited.
3.5.2. DC Common
Commoning of a DC PSU is somewhat dependent on the electrical operating requirements of the CNC
system. For example, a stepper motor driver operating with a 24VDC motor supply and a 5V logic
supply may have optically-isolated signal input lines which provide complete electrical separation of
the driver’s input and output circuitry for safety and noise immunity purposes. Tying the stepper
motor and logic control supply commons together in this case may have a detrimental impact on the
operation of the system.
In general it makes most sense to keep the commons of the various DC PSUs used in the CNC system
separate from each other, and separate from the AC mains earth unless there is a specific requirement
to tie them together. In most cases the common points of the heavy-duty power sections of the CNC
system (eg, stepper motor or servo motor drivers, spindle motors etc) will be segregated from common
points of the electrically-sensitive sections of the CNC (control interface boards, limit switches, tool
probe circuitry etc) to prevent cross-contamination of the two systems.
Integrator Information V2.9.4, 25 Jan 2025 15 / 18
Should it be necessary to connect several common points of different PSUs together, or to connect
a common of a PSU to AC main earth, it should be done at a single point only and as close to the
common terminal of the PSUs as possible.
In CNC machines where the hardware drivers and interfacing circuitry are pre-assembled, the deci-
sion as to which DC commons are tied where is usually taken out of the hands of the end user.
In situations where a DC circuit is run with the common point disconnected from the mains earth
(ie, the supply is floating), it can be helpful to run DC supplies using twisted pairs of wires, whereby
each pair of wires in the circuit (eg, the positive and negative leads) is physically twisted together in
a helix pattern. The twist in the wire allows both conductors to share the same real estate as closely
as possible. Any EMI that passes across them will therefore be largely canceled as both conductors
will receive the same degree of EMI. For additional protection use twisted wire that is housed in a
shielded jacket with the shield terminated to mains earth.
Note however that twisted pairs of wires are less effective at combating the effects of EMI if one
of the two wires is referenced to mains earth, as the conductor at earth potential is less able to be
influenced by EMI than the un-earthed conductor. In these instances the twisting of the wires has less
of an impact on the overall noise immunity, and shielded cable will be intrinsically more effective at
reducing noise pickup.
The wires that are used to transmit logic signals to and from various peripherals in the CNC (eg,
stepper motor controller inputs, axis limit switches etc) are the most susceptible to noise interference.
The reason for this is the low level voltages that are used to convey the information. When a limit or
home switch is engaged, or a tool probe has made or broken contact, this signal is used to signify the
event has taken place. Typically this is done by using input pins on the computer interface card or
parallel port which, dependent on the application, may be signaled using as little as 3.3V. Evidently a
2V noise spike has the potential to corrupt the validity of a signal if the useful range is only 0-3.3V.
If possible, isolate the common point of the PSU supplying the logic peripherals from the rest of the
system. For example, keeping the common of the low voltage power supply isolated from the common
of the stepper motor supply will reduce the chances of large currents flowing in the stepper motor
return line contaminating the common of the low voltage supply.
If the controller uses differential signaling, use twisted pairs to carry the signal. Shielded cable is
preferred when the control lines are single-ended, or if the distances traversed are long or through
electrically hostile environments. When grounding the shield in the cable, terminate to the mains
earth.
If the controller and interfacing devices can withstand higher control signals, consider altering the
wiring and power supply requirements to use a bigger voltage for signaling (eg, 12V or 24V). The
same 2V EMI noise spike that could corrupt a 3.3V limit switch signal will be far less likely to cause
issues with a limit switch operating with a 24V signal.
The metal housing of the driver should be connected to the local mains earth in the CNC system. Some
driver enclosures will indicate a specific terminal as being the earthing point, in which case this point
must be connected to earth via a dedicated wire.
Integrator Information V2.9.4, 25 Jan 2025 16 / 18
Control and power wiring should be segregated as much as possible. Route signal input wires well
away from power supply and motor drive output lines.
It is recommended to run both driver input and motor output wiring in shielded cable with the shield
terminated to mains earth. The shield on the input lines helps reduce the amount of interference they
can receive, while the shield on the output lines reduces the amount of noise they can radiate.
If at all possible the Variable Frequency Drive (VFD) should be mounted in a separate enclosure or
cabinet to reduce the risk of it radiating noise into adjacent wiring. If the VFD enclosure is metallic it
must be earthed as per any recommendations in the manufacturer’s documentation.
Because the VFD is a high power, high frequency electronic switching device, the output is notoriously
prone to EMI radiation, and it is advisable to run the VFD output to the connected motor in a shielded
cable, with the shield terminated to mains earth.
Any wire that will be moved about during normal operation of the CNC falls into this category. For
example, wires running from stepper drivers through a cable management system (drag chains) and
then to the stepper motors mounted on a movable gantry. Cables and wires operating in these cir-
cumstances should be rated for extra flexibility. This precludes the use of solid-core wires and cables,
as the constant flexing will lead to fatigue and eventual failure of the conductors.
If running cables in a cable track/carrier, tie them down at both ends of the cable track. If not, ratche-
ting can occur and fatigue the cable prematurely. Care should also be taken to ensure that mechanical
rubbing of conductors against other parts of the machine is prevented.
In a cable track/carrier observe the neutral axis idea. Have the wire run as close to the neutral axis
as possible. Make sure the wire is not in tension in the longest neutral axis situation.
As discussed earlier, running different signal classes (high voltage and low voltage) in proximity to
each other has the tendency to exacerbate EMI interference. Separate conductors by as much distance
as possible. If two conductors must cross over each other make the crossing as close to a 90 degree
angle as possible.
Avoid long loops of excess wire at any peripheral devices - they are great antennas for receiving or
transmitting noise. Where possible, run wires in close proximity to large earthed structures. If the
controller enclosure features a large metallic back plate that is earthed, secure all control wiring
against this surface as much as possible while wiring between two points.
Very few mechanical switches (eg, an axis limit switch or tool probe input) will close or open perfectly
when operated. More often than not the switch contacts will physically bounce against each other
several times within a very short space of time when operated. This may be interpreted by the machine
Integrator Information V2.9.4, 25 Jan 2025 17 / 18
controller as multiple operations of the same signal when in reality only one clean state change was
expected. Sometimes it doesn’t matter, but in many circumstances it is desirable to ensure that any
state change is as clean as possible and does not interfere with the operation of the machine. This is
accomplished by debouncing.
Debouncing is achieved by permitting a state change on a mechanical switch to only register with
the controller after a fixed period of time to allow any bouncing in the switch contacts to settle. Time
delays of 5-15 milliseconds are usually sufficient. This can be done with the addition of some hardware
to the signal circuit or in software within LinuxCNC.
Several schemes exist to implement debouncing of switches and relay contacts with hardware, ranging
from the addition of a single capacitor across the signal and common lines, to dedicated debouncing
integrated circuits such as the MC14490 or MAX6818. Several hardware debouncing schemes can be
found via the link below:
https://electrosome.com/switch-debouncing/
The Hardware Abstraction Layer (HAL) of LinuxCNC includes a debounce component. This component
has a single input pin and a single output pin. Its job is to monitor the input and to send an output
after the input has activated for a programmed delay period. More information can be found for the
debounce component by visiting the following page:
link:../man/man9/debounce.9.html
3.12. Documentation
The importance of documenting the installed wiring and components cannot be over-emphasised.
Should the user want to modify the CNC system further down the track, or if trouble should arise that
needs correcting, then complete and concise documentation of the wiring and equipment can save
many hours of head scratching and frustration.
At a minimum, make sure to save any documentation associated with the installed hardware in a safe
place. Stepper controllers, break out boards, power supplies, VFDs, interfaces and controllers, servo
and stepper drivers and any associated device settings are all critical components of the system and
their documentation should be kept at hand for easy reference.
As the CNC machine is wired, make sure to draw up a schematic that can be referenced to later. The
schematic does not have to be all that neat, but it should be understandable in such a way that it
could be easily interpreted at a later date, ideally by anyone who may need to service the equipment.
Include details such as wire colours used, pin numbers, part numbers and any other notes that will
help explain particular details not immediately apparent from first glance at the schematic.
Integrator Information V2.9.4, 25 Jan 2025 18 / 18
Take the time to identify each wire in the system. When a bundle of wires has been cable-tied in place
it can be very difficult to look at them and know for sure which wire goes where. Label the motor wires
with the joint or axis they are associated with, or identify each signal wire so that it is easy to identify
what that signal does. It will also help if this information is transferred to the wiring schematics.