Abandoning an old computer
When I started with this project my plan was to reuse some old computers I have. One reason for this was that the stepper controller card was, as almost every other DIY CNC controls are, based on parallel port and rely on this port. Parallel port does not exist in modern computers, but all older ones have it as standard. Of course, even modern desktop computers can use PCI cards, so even if the parallel port is no longer standard, that is easily solved even today.
It is worse for laptops, but laptops were not powerful enough a few years ago to drive a CNC anyway, so almost nobody was using laptops, and even today, laptops are rare in this fairly traditional environment.
OK, back to the parallel port
This port type was originally designed for printers, but it turned out to be very suitable to use for many other equipment outside the normal office or home environment.
If a complex machine, like a CNC, is to be controlled by a computer then there is a need for setting different control pins in real time, and those pins are varying in both the total number, and also in timing between different states. Some of those pins (bits) are high or low over a longer period during the work of a CNC than others, some of them, for example the ones giving the step pulses, are pulsing at a high pulse rate and with very short pulse widths, some others, like the step Enable or the Stop signal are constantly on during the whole milling work, but almost none of the signals are synchronous to each other in their state changes. Synchronization is based on needs for the movement, of course if all three (or more) axes must move synchronously then pulses are synchronized, but that is not always the case and is very much dependent on the shape of milling.
Nothing lasts forever
Up to and including Windows XP professional, the control of parallel port pins was easy and very flexible for a programmer. However, Windows 7 changed all that, it made it more difficult to set each pins of a parallel port in real time. This type of port became less and less common in computers, today basically not existing in laptops at all, and communication with printers and other peripherals rely on USB interface instead of parallel port. Printers with parallel port are gone from the market, so there is no real need for this port in normal office or home environments.
Some advantages of USB
USB port has many advantages over the parallel port, but when it comes to controlling CNC, it has a huge disadvantage. It is a serial interface, so setting individual bits in real time isn’t that simple any more, not even if one connects a USB to parallel printer port converter to the computer.
To be able to control a CNC using the USB port, one needs a USB motion control interface, which is not only an advanced USB to parallel port converter, but also interprets the G-codes and converts those codes to real time signals, setting the different pins to the levels as needed. In other words, some of the functionality of the CNC software is moved out of the computer and into a USB motion control card because of the loss of possibilities to control individual signal pins in real time through USB.
Some disadvantage of USB
One disadvantage of using USB is, apart from added costs because of the need for a motion control interface, is the need for not just the card but also an interface software, also called plug-in, which interfaces the driver with the CNC software so that the CNC software can talk to CNC stepper controllers. This is necessary unless you have a CNC software which is exclusively designed for the USB motion control card you are using. This plug-in emulates a printer port, so that existing CNC software can be used. Every CNC software is different, so one plug-in which works with one software will not automatically work with another. In other words, the flexibility of use and possibilities of selecting, changing and trying out different CNC software is considerably reduced compared with using the old parallel port solution. Also choosing between Windows or Linux is not possible at all with USB motion controllers, these simply must be designed for the one or the other.
Using USB definitely has greater advantages then disadvantages, especially when it comes to future computers, so I decided to go for this change and to abandon my old Windows XP Pro based desktop computer, which I intended to use as CNC computer. This saves me a lot of space and offers greater flexibility since with USB I can use any computer, even a laptop, so I can do the design of the milled pieces in my living room, move the laptop to my workshop, plug in the computer and just run the CNC which will mill the pieces.
The old desktop is a dinosaur with the external screen, external keyboard, external mouse and a huge mini-tower case, so the possibility of moving all that functionality into a small laptop is really nice and offering great flexibility.
The decision is made in December 2014. The old computer is out of the loop and USB will be used. Of course, this meant some design change… again…
Please continue with reading part 5.