May 18, 2015 09:39
Upgrading a CNC milling machine Part 1
Retrofitting modern stepper drivers and a BeagleBone Black for control.
The mill, control computer and control cabinet
Compact CNC machines have been around for a long time and there are affordable and often well built units available to buy from surplus suppliers and via auction. Provided a machine is of good quality and has not been abused the hardware will likely work for many years to come.
Though the mechanical side may be serviceable it can be a different story when it comes to the software; the machines may not come with their original control computers, if they do this may not boot or may be missing the security 'dongle' for the control software. In addition there have been numerous improvements in motor drive technology in recent years.
We have a Denford Novamill 3-axis mill that came with a rusty old computer that did not boot up. From initial inspection the mill itself looked promising, leaving us with the challenge of connecting a new computer with new software to run the machine.
In this first post we will determine how our machine is wired and bring it up to date with new stepper motor drive electronics, and with a brand new embedded control computer.
Note that CNC machine control cabinets often have dangerous voltages present so care must be taken when working on them.
Out with the old
Inside the control box
Fortunately for us, Denford provide plenty of documentation for their old machines, facilitating modification and repair. They also have an active forum where people discuss their machines and changes they have made. This was incredibly useful when researching updates for the Novamill.
The original control board was removed as it is designed to work with the original, proprietary software via an RS232 connection. This sits on top of a larger board with the electronics to drive the stepper motors. Whilst it would be possible to interface with the old driver board, it was instead replaced with modern higher performance driver modules, the Geckodrive G201X.
The original control board
Next it was determined that the control PC was to be replaced with a much more compact solution: a BeagleBone Black and Probotix breakout board. This will allow use of LinuxCNC, an open source machine control software. It also has the added benefit that the control computer can be placed inside the cabinet.
Fitting the stepper drivers
The original control board was mounted on an aluminium plate. This was reused as a solid surface on which to mount the new drivers, with the additional benefit of acting as a heat sink. Heat sink compound was applied to the drivers before mounting.
The new Geckodrive driver modules and power supply mounted on original aluminium plate
DIP switches on each module allow for setting of the output current, with a maximum of 7A. After checking our stepper motors these were set to 1.6A.
Detail of the power supply
Originally power to the steppers and control electronics was provided by a large transformer with rectification, smoothing and fuse protection on the driver board. This was replaced with bridge rectifiers and capacitors mounted on an acrylic plate, with a DIN rail fuse holder.
Geckodrive provide guidelines for specifying power supply components. We budgeted for 40V at 5A using the formula below and chose components accordingly.
Above diagram taken from the GeckoDrive website. Values changed according to our application. Note 39.2VDC rounded to 40VDC.
Mounting the BeagleBone Black and Probotix cape
The Probotix cape on mounting plate
An acrylic plate was cut for mounting the BeagleBone and cape. This was secured in place with DIN rail clips.
Conveniently the cape can be powered by 12-76VDC. It is also possible to power the BeagleBone from the cape as 5V is bussed out through header pins. To enable this two jumpers on the cape were soldered, as detailed in the wiki.
Short extension cables with panel mounted connectors for USB, HDMI and RJ45 were used to extend the BeagleBone ports. Holes were drilled into the side of the cabinet – using a vacuum cleaner to minimise spread of swarf – and a mounting plate made up for the three connectors.
Panel mount connectors on mounting plate
After drilling an air line was used to blow out any remaining swarf that may have fallen into the cabinet. Removing this is essential as metal filings could easily short things out, resulting in damaged electronics or worse!
Wires in the cabinet
Removing the original control board left plenty of wires to be identified. Referring to the data sheets it was clear that there were several revisions of this machine and control cabinet, so despite there being thorough information we felt it prudent to double-check connections with a multimeter.
Useful connections such as the emergency stop and manual override potentiometers were noted down for later reference.
Once tested, the logic and stepper drive power supply was connected. The drivers were then connected to the cape and stepper motors. Where possible the original wires were used, otherwise new wires were cut to length and the markers were swapped over. All changes to the wiring were noted down.
The retrofitted cabinet
Care was taken to ensure that all wires not yet connected were adequately insulated and secured in order to prevent accidental shorting and unnecessary clutter.
In part two we will get LinuxCNC up and running on the BeagleBone and configure this to drive the mill.
maker, hacker, doer
CommentsLogin to comment
September 16, 2015 10:04
Thanks for the comment and well done for spotting our error. You have in fact highlighted two things that we have now fixed.
Firstly, the diagram showed example values from the GeckoDrive website, and in copying the text was changed in error - from 5,882 uF to 5.882 uF - the comma replaced with a full stop!
Secondly, it showed to me that it would be more appropriate to use our actual values, rather than simply example values from the GeckoDrive site. Therefore I have changed the values in the diagram to reflect this.
Note that there are two independent supply rails - each with their own bridge rectifier and smoothing capacitor - shown in the photograph.
September 16, 2015 04:55
The DC power supply circuit shown contains capacitance value of around 5uf., but I feel the capacitance value must be 14000 uf.
On PCB, mounted capacitance value is showing two 10000uf which works.
My calculation of capacitce is C = Rl / 1000. where C in farads, Rl load resistance I ohms. Rl is calculated by dividing DC voltage / DC Max., Load curret.
Thu Rl = 68/5 = 13.6 Ohms = App. 14 ohms.
C = 14/1000 = 014 farads i.e. 14000uf. ay value more than this Value is suitable.
Thus the calculation shown in circuit diagram is not correct.
June 23, 2015 14:26
@wellnitzeli no position feedback and just relies on the steppers. Note that parts 2 and 3 are now up.
May 26, 2015 13:56
I couldn't tell. Does this mill have position feedback or does it just rely on the steppers?
I'm also looking forward to part II.
May 25, 2015 18:07
Usually the rectifier bridges have a hole to attache them to a heatsink, only low power ones do not have holes
May 25, 2015 15:25
The holes in the bridge rectifiers are for mounting screws. If they pull heavy current, they should be mounted to a heatsink.
Excellent project, btw.
May 25, 2015 14:22
> My experience since then is that whilst a bit more complicated in terms of hardware,
> it is better to have a local controller to drive the steppers, &c. rather than rely
> on the PC (unless it is running an absolutely dedicated control program without
> an Windows OS, e.g. TurboCNC under DOS) .
One of the benefits of the BeagleBone is that, in addition to having an ARM processor which runs Linux, it has a Programmable Realtime Unit (PRU) — a microcontroller that can be used to generate pulses without the overhead of an O/S.
Nice project btw!
May 25, 2015 13:38
connectable, those holes are intended to mount the rectifiers to a heatsink, they can get quite hot.
May 25, 2015 10:18
Hi, excellent piece. I look forward to Part II.
I did something similar to an Emco F1 CNC mill back in 2004, although in that case I interfaced directly to a PC running Mach3.
My experience since then is that whilst a bit more complicated in terms of hardware, it is better to have a local controller to drive the steppers, &c. rather than rely on the PC (unless it is running an absolutely dedicated control program without an Windows OS, e.g. TurboCNC under DOS) .
The biggest challenge was machining sleeve adaptors to convert the new stepper motors' 6.0 mm shafts to match the 1/4" shaft apertures in the timing belt pulleys (of course I could have got 1/4" shaft steppers, but I was using what I had to hand).
So now I still use Mach3 but have an 'Ethernet SmoothStepper' controller to twiddle the control lines (no more dropped steps).
May 25, 2015 09:52
I wonder why the Bridge Rectifiers have holes in them?
May 20, 2015 15:08
Stuart, thanks for this and I'm really looking forward to the next part. I've been planning something similar for a while now, I was going to use a small PLC for the control so I'm really interested in how you get on with your solution.