Compact5 Retrofit
One of my earlier projects has been retrofitting a CNC lathe, from an old EMCO compact 5 to something more usable. This project wasn’t hard to do as such, the modifications done were relatively simple, but finding a lathe to rebuild, finding control software, and all the other intricacies involved was quite difficult.
In any case, owning my own CNC mill and lathe had long been something I had wanted, however the exorbitant price made achieving that very difficult, if not impossible. After some searching on the Internet I stumbled upon a CNC control software package for Linux called EMC which was capable of reading a so called g-code file (a standard way of describing the toolpath in discreet steps, typically based on straight lines or circle arcs), be able to output a quadrature signal, which would only need stepper motors drivers. The only part left would be finding a used mill/lathe to retrofit, and fortunately I had an old manual lathe that would be up to the task.
As luck would have it however, quite soon after finding that software package, I attended a crash-course at a local CNC “retailer” (called Cencema) in AllingsÃ¥s, a town around 40 minutes from where I live. There they happened to have two old Compact 5’s, which I got for a very reasonable price, primarily due to their low power (300W) and the very, very old user interface. After I had managed to get a hold of those two machines, the amount of work I had to do lessened greatly, as all the “hard” parts were already done (stepper motors, stepper motor drivers,ballscrews etc). All that remained was making the electrical connections between the computer’s output and the stepper driver’s input, which was extremely simple as the stepper driver just ran on quadrature (full step) signals.
That preliminary connection worked very well, however I felt quite limited by a keyboard when doing manual jogs, when for example touching off to measure the tool’s position. Also I felt that I wanted to be able to cut threads in the machine (the lathe comes with an encoder built into the headstock). So after not all too much work, I had made a control box with controls for jogging in X and Z, as well as controls for feed override and spindle speed override (spindle speed override does not control anything yet, as the computer does not have any control of the spindle speed). Additionally, after some time, I connected the pre-existing “encoder” (a 100-hole disc) attached to the spindle to EMC, which gave me threading support with the new HAL counter module, which works very well.
Unfortunately I don’t have all too much documentation pertaining to the retrofit, the pinouts for the stepper board and the optical encoder, as well as the HAL code used for EMC can be found here (this for the 2.1.x branch of EMC, YMMV.). The electronics consisted only of optocouplers for galvanic isolation and some CMOS inverters for generating the inverted signals that the driver board also wanted. A relay for controlling the motor was also added, this in series with the existing control switch (a very trivial addition). It would appear that someone else has done a very similar retrofit, with more documentation, http://www.stmental.net/~dfoster/emco/ .
