WWW Ukcnc Net Index PHP 6 Axis CNC Controller
WWW Ukcnc Net Index PHP 6 Axis CNC Controller
New 6-Axis Dual Mach3/GRBL CNC Controller that we have designed
to control our new CNC D-500 Machine.
Machine.
This new controller has dual inputs and allow the popular Mach3 software to
be used via the parallel port and also USB port to control GRBL rmware
running on the Arduino Mega2560 board.
Convert web pages and HTML files to PDF in your applications with the Pdfcrowd HTML to PDF API Printed with Pdfcrowd.com
We have programmed the Arduino board with the Grbl-Mega-5X rmware
which is open source and can be downloaded from the following link
https://github.com/fra589/grbl-Mega-5X
As you can see in the picture above the main breakout board in the middle
will plug into the Arduino Mega 2560 R3 board and then the board on the
right plugs into the breakout board.
Convert web pages and HTML files to PDF in your applications with the Pdfcrowd HTML to PDF API Printed with Pdfcrowd.com
When mounted in our controller box that we designed, you can see you have
easy access to the USB port, DC power input and parallel port.
Convert web pages and HTML files to PDF in your applications with the Pdfcrowd HTML to PDF API Printed with Pdfcrowd.com
Inside the controller box there is plenty of room to mount the controller as
well as power supply and cables.
The box itself is all made out of aluminium plates that have been nished with
a black oxidisation and laser marked.
The whole box acts as a sturdy heat sink and helps keep everything nice and
cool.
Also their are two AC input sockets on the back, one for the main power
supply and another for the spindle. Both have power switches at the front of
the box.
We are supplying it with a branded, genuine MEAN WELL 36V 8.9amp power
supply that has a wide range working voltage input of between 88V and 264V
AC.
As you can see there are no stepper drivers inside the controller box as we
now use Closed Loop Stepper motors on all our machines. the Closed Loop
Convert web pages and HTML files to PDF in your applications with the Pdfcrowd HTML to PDF API Printed with Pdfcrowd.com
Stepper motors have the driver built on on the motor. along with an encoder
that makes sure their are no lost steps and great performance.
So all we need to do is supply power to each motor and data control lines
from our controller board.
The controller board itself has a huge number of inputs and outputs to take
full advantage of the features found the 6-axis GRBL rmware and the Mach3
interface. These I/O’s can be switched to to either con guration by simply
setting a jumper or by connecting a single way switch.
Convert web pages and HTML files to PDF in your applications with the Pdfcrowd HTML to PDF API Printed with Pdfcrowd.com
To view the picture above in more details, you can right click and save
the image or click on it and choose view full size from the bottom of the
image frame.
All the I/O’s have been been broken out to connector blocks and the PCB has
legends next to each one. It also has JST connectors for some of the I/O’s that
are commonly used on a 3-Axis machine such as the D-500. These allow for
Convert web pages and HTML files to PDF in your applications with the Pdfcrowd HTML to PDF API Printed with Pdfcrowd.com
custom made cables to be simply pushed in and connected back to the
motors and limit switches.
For each of the X, Y, Z, A, B, C Axis outputs there is a 5V, Enable, Step and Direction
lines.
The X, Y1, Y2, Z also have Alarm monitoring connections for the each motor. These
are found on Closed Loop motors. These are monitored by an ARM processor on
the main board which will display which one is triggered by lighting up the
indicators at the front of the controller box.
The Y Axis also has dual output, so we have Y1 and Y2 which is for gantry systems
that use two motors. Y1 and Y2 are synchronised.
All motor control lines are electronically protected with open collector bu ers.
Being open collector means they switch the step line with a negative pulse.
Each Axis has a Limit switch connector block and supplies power +/- and an input
back in. The + output can is based on the voltage of the Limit switch input. We use
5V inductive switches with our machine and so simply loop the 5V output of the
board to the Limit supply input.
You can connect between 5-24V DC from a separate supply if you want to use other
Limit switches.
Each Limit input is opto isolated and designed for negative input switching.
There is a Limit Min and Limit Max input for each Axis and this is mainly for GRBL.
For Mach3 you would usually just use the Min inputs but there are jumpers to allow
the Max inputs if preferred.
For the Emergency Stop input there is a input and GND output that can be
connected to a N/O switch.
This is also monitored by the ARM processor on the main board that will trigger an
alert for Mach3, but also send a reset to the Arduino board that is running GRBL.
When a trigger is detected by he ARM processor it will light up the indicators at the
front of the controller box.
The Reset, Probe, Cycle, Feed, Spindle Enable, Spindle Direction, Spindle PWM,
Motor Coolant, Flood Coolant, Safety Door I/O’s all go directly to the Arduino
Convert web pages and HTML files to PDF in your applications with the Pdfcrowd HTML to PDF API Printed with Pdfcrowd.com
processor and more information can be found on the GRBL wiki
https://github.com/fra589/grbl-Mega-5X/wiki
Finally there is a jumper on the top board that switches control to the Printer Port
input for use with Mach3 or if removed, switches control to GRBL which uses the
USB port. If you do not want to use the jumper then this input can be taken out to a
switch like we do on our controller box.
So that is a quick run down of the I/Os and below is a quick connection
diagram.
To view the picture above in more details, you can right click and save
the image or click on it and choose view full size from the bottom of the
image frame.
Included on the picture is the 8 pin JST connector that we use on our machine
which shows connections to the Closed Loop motor.
If not using cables with JST plugs and the connector blocks instead then
remember to split our the single 5V line to each input of the stepper driver.
Convert web pages and HTML files to PDF in your applications with the Pdfcrowd HTML to PDF API Printed with Pdfcrowd.com
To view the picture above in more details, you can right click and save the image or click on it
and choose view full size from the bottom of the image frame.
For both the Mach3 and GRBL con gurations below we have set the travel
speed to 6000mm/min which should be fast enough for anyone. But feel free
to have a play with the speed and acceleration settings until you nd a
suitable setup for your needs.
Note this is travel speed and not cutting speed. Cutting speed you will specify
when creating your Gcode and this will vary depending on the material you
want to cut.
Convert web pages and HTML files to PDF in your applications with the Pdfcrowd HTML to PDF API Printed with Pdfcrowd.com
It can be downloaded from Newfangled Solutions on this link,
https://www.machsupport.com/software/mach3/
Note that it is not free of charge and will limit you to only a few lines of gcode
you can send until you purchase a licence.
If choosing to use Mach3 software then you will need to download the
con guration le, extract the zip le and copy the CNC Design D-500.xml to
your C:\MACH3 folder.
http://www.ukcnc.net/Mach3-CNC-D-500-con g- le.zip
Convert web pages and HTML files to PDF in your applications with the Pdfcrowd HTML to PDF API Printed with Pdfcrowd.com
Pin16 Y-Step/Pulse
Pin17 B-Direction
The Mach3 Gcode engine software still uses the printer port (Parallel Port)
from the computer to send Step, Direction and enable signals, as well as
switching spindle and limit inputs. Direct fast output from your PC with no
latency like USB.
We still use Mach3 to run our workshop machines and tend to pickup old
computers from Ebay that still have the printer port. Most new computers
these days just have a USB ports.
There are USB to Parallel adapters that work well, but must be designed to
work with Mach3 such as the USB motion controller UC100. We have tested
these and they work well.
After you have copied the CNC Design D-500.xml le to your C:\Mach3 folder
then launch the Mac Loader Icon.
Convert web pages and HTML files to PDF in your applications with the Pdfcrowd HTML to PDF API Printed with Pdfcrowd.com
Mach3 should now load and be con gured for the D-500 machine.
Next Press Reset and press Tab key to bring up the Jog interface.
You should now be able to jog the machine around.
GRBL uses the USB port and bu ers commands in the Arduino board
processor. This then sends out the Step, Direction and enable signals, as well
as switching spindle and limit inputs.
We supply the Arduino Mega 2560 already programmed with the Grbl-Mega-
5X rmware that has been con gured to work with our controller and
machine.
So you will not need to re-program it unless you buy a new board or
something serious goes wrong!
For people wanting to play and compile it for themselves, here is the main
changes we made.
Edited the con g.h le and set the following sections:
// To use with RAMPS 1.4 Board, comment out the above de nes and
uncomment the next two de nes
#de ne DEFAULTS_RAMPS_BOARD
#de ne CPU_MAP_2560_RAMPS_BOARD
Convert web pages and HTML files to PDF in your applications with the Pdfcrowd HTML to PDF API Printed with Pdfcrowd.com
// After homing, Grbl will set by default the entire machine space into negative
space, as is typical
// for professional CNC machines, regardless of where the limit switches are
located. Uncomment this
// de ne to force Grbl to always set the machine origin at the homed location
despite switch orientation.
#de ne HOMING_FORCE_SET_ORIGIN // Uncomment to enable.
As our breakout has the same pin-out as the popular Ramps Board we have
changed this to suit in the defaults.h
Note we have not setup the A, B or C Axis as people would be using these for
a rotary Axis and it would be di erent depending on which one they have
purchased.
#ifdef DEFAULTS_RAMPS_BOARD
#de ne DEFAULT_AXIS1_STEPS_PER_UNIT 160
#de ne DEFAULT_AXIS2_STEPS_PER_UNIT 160
#de ne DEFAULT_AXIS3_STEPS_PER_UNIT 320
#de ne DEFAULT_AXIS1_MAX_RATE 6000.0 // 9000 mm/min = 9000/60 = 150
mm/sec
#de ne DEFAULT_AXIS2_MAX_RATE 6000.0 // 9000 mm/min = 9000/60 = 150
mm/sec
#de ne DEFAULT_AXIS3_MAX_RATE 1000.0 // 300 mm/min = 300/60 = 5
mm/sec
#de ne DEFAULT_AXIS1_ACCELERATION (300.0*60*60) // 300*60*60
mm/min^2 = 300 mm/sec^2
#de ne DEFAULT_AXIS2_ACCELERATION (300.0*60*60) // 300*60*60
mm/min^2 = 300 mm/sec^2
#de ne DEFAULT_AXIS3_ACCELERATION (100.0*60*60) // 100*60*60
mm/min^2 = 100 mm/sec^2
#de ne DEFAULT_AXIS1_MAX_TRAVEL 500.0 // mm
#de ne DEFAULT_AXIS2_MAX_TRAVEL 500.0 // mm
#de ne DEFAULT_AXIS3_MAX_TRAVEL 100.0 // mm
#if N_AXIS > 3
#de ne DEFAULT_AXIS4_STEPS_PER_UNIT 8.888889 // Direct drive : (200 pas
par tours * 1/16 microsteps)/360°
Convert web pages and HTML files to PDF in your applications with the Pdfcrowd HTML to PDF API Printed with Pdfcrowd.com
#de ne DEFAULT_AXIS4_MAX_RATE 1440 // °/mn
#de ne DEFAULT_AXIS4_ACCELERATION (100.0*60*60) // 100*60*60
mm/min^2 = 100 mm/sec^2
#de ne DEFAULT_AXIS4_MAX_TRAVEL 360.0 // °
#endif
#if N_AXIS > 4
#de ne DEFAULT_AXIS5_STEPS_PER_UNIT 8.888889 // Direct drive : (200 pas
par tours * 1/16 microsteps)/360°
#de ne DEFAULT_AXIS5_MAX_RATE 1440 // °/mn
#de ne DEFAULT_AXIS5_ACCELERATION (100.0*60*60) // 100*60*60
mm/min^2 = 100 mm/sec^2
#de ne DEFAULT_AXIS5_MAX_TRAVEL 180.0 // °
#endif
#if N_AXIS > 5
#de ne DEFAULT_AXIS6_STEPS_PER_UNIT 8.888889 // Direct drive : (200 pas
par tours * 1/16 microsteps)/360°
#de ne DEFAULT_AXIS6_MAX_RATE 1440 // °/mn
#de ne DEFAULT_AXIS6_ACCELERATION (100.0*60*60) // 100*60*60
mm/min^2 = 100 mm/sec^2
#de ne DEFAULT_AXIS6_MAX_TRAVEL 180.0 // °
#endif
#de ne DEFAULT_SPINDLE_RPM_MAX 1000.0 // rpm
#de ne DEFAULT_SPINDLE_RPM_MIN 0.0 // rpm
#de ne DEFAULT_STEP_PULSE_MICROSECONDS 10
#de ne DEFAULT_STEPPING_INVERT_MASK 0
#de ne DEFAULT_DIRECTION_INVERT_MASK 0
#de ne DEFAULT_STEPPER_IDLE_LOCK_TIME 255 // msec (0-254, 255 keeps
steppers enabled)
#de ne DEFAULT_STATUS_REPORT_MASK 1 // MPos enabled
#de ne DEFAULT_JUNCTION_DEVIATION 0.02 // mm
#de ne DEFAULT_ARC_TOLERANCE 0.002 // mm
#de ne DEFAULT_REPORT_INCHES 0 // false
#de ne DEFAULT_INVERT_ST_ENABLE 1 // false
#de ne DEFAULT_INVERT_LIMIT_PINS 0 // false
#de ne DEFAULT_SOFT_LIMIT_ENABLE 0 // true
#de ne DEFAULT_HARD_LIMIT_ENABLE 1 // false
#de ne DEFAULT_INVERT_PROBE_PIN 0 // false
Convert web pages and HTML files to PDF in your applications with the Pdfcrowd HTML to PDF API Printed with Pdfcrowd.com
#de ne DEFAULT_LASER_MODE 0 // false
#de ne DEFAULT_HOMING_ENABLE 1 // true
#de ne DEFAULT_HOMING_DIR_MASK 3 // move positive dir
#de ne DEFAULT_HOMING_FEED_RATE 300.0 // mm/min
#de ne DEFAULT_HOMING_SEEK_RATE 2500.0 // mm/min
#de ne DEFAULT_HOMING_DEBOUNCE_DELAY 250 // msec (0-65k)
#de ne DEFAULT_HOMING_PULLOFF 5.0 // mm
#endif
If you simply want to download the compiled rmware HEX le instead of re-
compiling it then you can download it from our site http://www.ukcnc.net/SD-
500-GRBL-Mega-5X-Firmware.zip
Convert web pages and HTML files to PDF in your applications with the Pdfcrowd HTML to PDF API Printed with Pdfcrowd.com
You can do these manually by communicating with grbl using a terminal
emulator such as HyperTerminal or there are various applications around for
di erent platforms.
Please note the values shown in the screenshot above are not the same as
values in our default settings, this screenshot is just to show what the
interface looks like and values will be di erent when reading out from our
controller. In other words I was too lazy to do a new screenshot
Convert web pages and HTML files to PDF in your applications with the Pdfcrowd HTML to PDF API Printed with Pdfcrowd.com
Software for sending Gcode to grbl-
Mega-5X.
You are spoilt for choice when it comes to software to send Gcode to Grbl and
your best place is to google it.
Convert web pages and HTML files to PDF in your applications with the Pdfcrowd HTML to PDF API Printed with Pdfcrowd.com