Then I decided, I would make a series of tutorials on how to locate an input pin, write the G-Code and everything else related to setting up a touch off plate for the new guys and gals out there trying to figure all this stuff out. It was during this exercise that I learned my neat and pretty wiring job was not conducive to a properly operating CNC Machine. I discovered this when I was trying to run a G38.2 linear probe command and it would stop and some random position along the way. I would restart it and it would stop again. I had to run the commands several times before the probe command would finally complete. I knew that something wasn't right, so I made a video and posted the question to the LinuxCNC forums. Within a few hours, a couple of folks on the forum had given me enough information to understand what was going on. A HUGE thank you goes to ArcEye? and Andy Pugh for all the advice and suggestions they gave me. The culprit it seemed was noise. |
Then I decided, I would make a series of tutorials on how to locate an input pin, write the G-Code and everything else related to setting up a touch off plate for the new guys and gals out there trying to figure all this stuff out. It was during this exercise that I learned my neat and pretty wiring job was not conducive to a properly operating CNC Machine. I discovered this when I was trying to run a G38.2 linear probe command and it would stop and some random position along the way. I would restart it and it would stop again. I had to run the commands several times before the probe command would finally complete. I knew that something wasn't right, so I made a video and posted the question to the LinuxCNC forums. Within a few hours, a couple of folks on the forum had given me enough information to understand what was going on. A HUGE thank you goes to ArcEye? and Andy Pugh for all the advice and suggestions they gave me. The culprit it seemed was noise. |
The AC that you use can inject noise into your power supplies and other equipment. If you have motors running on the same circuit for example, can create noise on the line if it is running on the same circuit as your CNC components. RF signals can also be superimposed onto AC line voltage. Years ago, this fact was exploited in some home entertainment systems to provide music to a remote speaker over the AC line. In-line filters are made to attenuate (reduce or block) this type of noise from the AC line voltage before it is run into your equipment. AC Line Filters can be found at electronic supply houses. LinuxCNC forum user “lead_injection” recommends Medical Grade filters as they have the lowest leakage current. |
The AC that you use can inject noise into your power supplies and other equipment. If you have motors running on the same circuit for example, can create noise on the line if it is running on the same circuit as your CNC components. RF signals can also be superimposed onto AC line voltage. Years ago, this fact was exploited in some home entertainment systems to provide music to a remote speaker over the AC line. In-line filters are made to attenuate (reduce or block) this type of noise from the AC line voltage before it is run into your equipment. AC Line Filters can be found at electronic supply houses. LinuxCNC forum user “lead_injection” recommends Medical Grade filters as they have the lowest leakage current. |
:The hardware abstraction layer (HAL) of LinuxCNC has a Debounce component. The Debounce component has a single input pin and a single output pin. Its job is to look at the input and to send the output after a programmed delay time. The Debounce HAL component will be covered in a separate tutorial when we create a touchoff plate for the CNC machine. More information can be found for the Debounce component by visiting the following URLs: |
:The hardware abstraction layer (HAL) of LinuxCNC has a Debounce component. The Debounce component has a single input pin and a single output pin. Its job is to look at the input and to send the output after a programmed delay time. The Debounce HAL component will be covered in a separate tutorial when we create a touchoff plate for the CNC machine. More information can be found for the Debounce component by visiting the following URLs: |
:1. LinuxCNC and Machine Related Questions |
:1. LinuxCNC and Machine Related Questions |
:Additional Information and help can be found by using the LinuxCNC forums. If you are not a member of these forums, I encourage you to join. Please visit: |
:Additional Information and help can be found by using the LinuxCNC forums. If you are not a member of these forums, I encourage you to join. Please visit: |
:http://www.gartechenterprises.com/downloads/IPC-A-620.pdf |
:https://roycroft.us/LinuxCNC/ipc-a-620s.pdf |
:http://www.engineering.schneider-electric.dk/Attachments/ia/instal/electromagnetic_compatibility_install_guide.pdf |
:https://roycroft.us/LinuxCNC/electromagnetic_compatibility_install_guide.pdf |
I would like to thank the following people from the LinuxCNC forums for their input on this tutorial. It is with their help I am able to give you the information contained herein. |
I would like to thank the following people from the LinuxCNC forums for their input on this tutorial. It is with their help I am able to give you the information contained herein. |
Written by Joe Hildreth - www.myheap.com
When I built my first CNC machine, I didn't have a cabinet and really ran nothing more than the stepper motor controllers and power to the parallel port break out board (BOB). Later I added a touch off plate to make setting up the tool to the surface of my material easier. Wires were all over the place, components mounted to a board and away I went.
When I built my second machine, I thought I would do a neater job of things and I made a metal drawer that would slide into a computer rack and mounted all my components to it. I carefully bundled all the wires together. I even used zip tie squares to hold the wiring to the enclosure. It sure was “purdey”!
Then I decided, I would make a series of tutorials on how to locate an input pin, write the G-Code and everything else related to setting up a touch off plate for the new guys and gals out there trying to figure all this stuff out. It was during this exercise that I learned my neat and pretty wiring job was not conducive to a properly operating CNC Machine. I discovered this when I was trying to run a G38.2 linear probe command and it would stop and some random position along the way. I would restart it and it would stop again. I had to run the commands several times before the probe command would finally complete. I knew that something wasn't right, so I made a video and posted the question to the LinuxCNC forums. Within a few hours, a couple of folks on the forum had given me enough information to understand what was going on. A HUGE thank you goes to ArcEye? and Andy Pugh for all the advice and suggestions they gave me. The culprit it seemed was noise.
So what is noise. Electrical noise comes from a couple of things. First is EMI (Electromagnetic Interference) caused by current flowing through wires and the second is electrical mechanical noise cause by physical switches bouncing when they open or close. Both of these conditions can cause you problems with the daily operation of your CNC machine. The mechanical noise can be dealt with pretty easily, but the EMI noise on the other hand requires a little work to help reduce and prevent it. The guidelines that follow are some things that you can do to reduce this problem. Before we get to the list of things to do, let's first discuss a little more what EMI is.
EMI as I stated above is caused by current running through a wire, but there is a little more to it. When current runs through a wire a magnetic field is created. As the current builds the magnetic field gets stronger. Then when the current ceases to flow through the wire the magnetic field collapses. This in itself isn't too bad, but if this magnetic field happens to cross another wire it will induce a voltage across it. This is how a transformer works. It uses a magnetic field in one coil of wire to induce a voltage in another coil of wire. If a wire is able to induce a voltage across another wire that we are using for a signal at logic level voltages, it may drive the voltage level in that wire to some state that the logic circuits reading it cannot understand. To be clear, 5V TTL work on distinctive voltage ranges. An input voltage of 0V to .8V is considered a false or low logic level. A voltage level of about 2V to 5V is read as a true or high level input. If however a voltage somewhere in between the .8V and 2V is on the input then we do not know what the output will be. When an input in this range is given the output could be either a high or a low level and this has to be avoided for a reliable circuit. Knowing the above information we know that a magnetic field crossing our signal wires could drive the input voltage to a TTL circuit into this band resulting in unexpected operation. But this is only half the story.
When current is switched on and off in a circuit we know that it creates a magnetic field but when current is switched on and off repeatedly it is possible to create another kind of noise. If the rate the current is being switched on and off is fast enough, it can generate radio frequencies that can interfere with other equipment nearby. The strength of these radio frequencies again depends on the amount of current that flows through the wire.
Now that we know what EMI is and the effects that it can have let's discuss what we can do about it by giving some general wiring tips.
AC Line Voltage
The AC that you use can inject noise into your power supplies and other equipment. If you have motors running on the same circuit for example, can create noise on the line if it is running on the same circuit as your CNC components. RF signals can also be superimposed onto AC line voltage. Years ago, this fact was exploited in some home entertainment systems to provide music to a remote speaker over the AC line. In-line filters are made to attenuate (reduce or block) this type of noise from the AC line voltage before it is run into your equipment. AC Line Filters can be found at electronic supply houses. LinuxCNC forum user “lead_injection” recommends Medical Grade filters as they have the lowest leakage current.
PSU's (Power Supply Units)
Stepper Motor Controllers
When wiring the controllers up, the following list should be helpful.
Variable Frequency Drives (VFDs)
VFDs are used to drive spindles and work by varying the frequency of the AC going to the spindle. VFDs are great noise producers. If at all possible locate your VFD in a separate enclosure or cabinet to reduce the risk of it injecting noise into your other wiring. Recommended wiring for the VFD is foil braid or copper tape shielded wire and observing good grounding practices. A PDF document from Belden on the topic can be found at the following URL.
http://www.mc-mc.com/Portals/1/articles/WP-VFDCablingPractices.pdf
Wire Selection and Use
Wire comes in many types, sizes and configurations. Wading through all the wire available is a monumental task of its own, but for our purposes we only have a look at the types of wires suitable for wiring a CNC controller. Additionally, how the wire is to be used can have some affect on the overall system. What follows are some tips that may prove helpful.
Signal Wires
The wires that are used to transmit logic signals are the most susceptible to noise interference. The reason for this is the low level voltages that are used to convey the information. The following will prove helpful in keeping your signal wires clean.
Stranded Wire
Wire comes in two forms, solid conductor and stranded. Both have their ups and downs. Stranded wire is pretty common in cables because it is more flexible. When using any stranded wire keep the following things in mind.
Control Signals
When a limit or home switch is engaged, or a probe has made or broken contact, we use this signal to signify the event has taken place. Typically this is done by using input pins on the parallel port. The signal voltages used on the port are in the 3 to 5 volt range depending on the type of port you have. It only takes a small noise injected onto the signal wires to put it in that unknown voltage area we discussed above, resulting in an unknown TTL state. If after careful wiring and planning you are still having these kind of issues, there are a couple of things you can do to fix the problem.
Mechanical Noise
Mechanical Noise happens when mechanical contacts open and close, as in a switch or relay contacts. As they open or close they will bounce against each other creating a rapid state change in the circuit. The electronics monitoring the change in state, the opening and closing of the contacts, can detect these quick changes. Sometimes it doesn't matter, but more often than not, you don't want this condition to interfere with the operation of your machine. For example, it will generate errors when probing. However, like I mentioned above, this situation is pretty easy to remedy.
Documentation
Documenting your wiring cannot be over stressed. With power feeds, motor leads, signal wire and everything else you stuffed into your your wiring compartment, you will be grateful that you documented your wiring. A year after you completed your CNC wiring and you want to add something, or some trouble arises, you will have your documentation to fall back on.
So, what should you document? The list that follows probably should be the minimum you hang onto and if you think you should note or save something else, you probably should.
Additional Information
Acknowledgements
I would like to thank the following people from the LinuxCNC forums for their input on this tutorial. It is with their help I am able to give you the information contained herein.
Andy Pugh - Arc Eye - Clive S. - Jake - lead_injection - Peter Ommen
(End of Tutorial – Last Update 12 APR 2017)