MDME: MANUFACTURING, DESIGN, MECHANICAL ENGINEERING 

Robot CNC

CNC Programming of Robot Base Profile

Isel Version: CNC Isel G3.exe | CNC Isel G3.zip
Instructional Video CNC-01: (CNC Composer. G&M code Lines, Circles, mirror): 60 secs: 20100921: 2.7MB
This Visual Basic program was written by Tim Lovett.

Old Boxford Version:  CNC_Box_BX9c.exe | CNC_Box_BX9.zip

DeskCNC Instruction Manual

CNC machining...
  • Robot platform - mounts to gearbox, castors etc.
  • Can also be used to produce wheels and other components
  • You need safety gear to be in the workshop (anywhere downstairs)

Design of Robot Base for CNC machining

The platform is to be cut from plastic (Polycarbonate 4.5mm thick) using a CNC mill. The design incorporates the motor mounts, location of the front wheel and clearance for the drive wheels. A suggested design is shown below. For more information see the webpage Robot CAD.


CNC Programming

The basic language for controlling a CNC machine is called G&M code. While programs can be generated directly from 3D models and 2D drawings, a knowledge of G&M code is helpful needed for analysing or editing the programs. To start our first program, we need to know only a handful of G&M codes.

G00     Move the axis at full speed (keep clear of the job!). In other words - "cutting air"
G01     Move the in a straight line (at controlled speed for machining). 
G02     Circle Clockwise
G03     Circle Anti-Clockwise
G90     Absolute coordinates
G91     Incremental coordinates
M02     Spindle on CW
M05     Spindle off
M30     End of program

Advanced codes (Not used in CNC Composer):

G40 Cutter Compensation Off
G41 Cutter Compensation left
G42 Cutter Compensation right

A typical line of code works like this;
G01 X50 Y100
which means: "Using a controlled speed, go in a straight line (from where you are right now) to the point (X50, Y100)".
 
Now let’s write a program; The centreline of the tool will follow the toolpath below. Coordinates are written with an X, Y or Z before them. Notice that coordinates that remain unchanged do not need to be written. F150 means a feedrate (movement) of 150mm per minute. S1000 means a spindle speed of 1000RPM. I & J are the coordinates of the centre of the circle. This program is written in absolute coordinates.

 G90
 G00 X0.00 Y0.00
 M02 S1000
 G01 Z0.00     F150
 G01 X75.00
 G01 Y10.00
 G03 X65.00 Y20.00 I65.00 J10.00
 G01 X55.00
 G01 X35.36 Y39.64
 G03 X0.00 Y25.00 I20.71 J25.00
 G01 Y0.00
 G00 Z10.00
 M05
 M30 

Notice that we have not made allowance for the diameter of the tool, so the actual part will be SMALLER than the toolpath (by the tool diameter).

Before you begin to write the code, take the sketch of the platform and then offset the perimeter by the tool diameter (The tool is 3mm diam, so offset by 1.5mm).

Dimension the drawing so that the bottom left hand corner is the datum point (0,0). You need to know all you dimensions as absolute coordinates. On the platform job, the datum point is the bottom left hand corner of the 191 x 146 mm BLANK. Set this up in SE draft, and make sure all you measurements are based on this point.

PRACTICE

Rewrite the above program in incremental coordinates (G91). Write the code as a text file – using Notepad. Use 2 decimal places on all numbers. Display the font as Courier New or some other font that has equal spacing for each character (non-proportional font). Assume the tool begins at the first point (lower left hand corner) at a height of 10mm above the job.

 

Cutter Compensation Example:

N100 G90 F600
N105 M6 T1
N110 G00 X0 Y0
N115 G17 G41 D1 G01 Y20
N120 Y40
N125 X40
N130 Y20
N135 X10
N140 G40 G00 X0 Y0

In this example, M6 sets the tool and calls it T1 (Tool 1). Later, when the G41 code is run (left compensation), the diameter of Tool 1 is called (D1). The tools then traces around the contour staying on the LEFT of the job.



Writing CNC code

Get the CNC Program above (ISEL or BOXFORD versions)
  • Before you start CNC programming, you have to convert your Solid Model (Inventor *.ipt) into a toolpath (1.5mm offset around the drawing because cutter is 3mm). See Inventor-to-AutoCad 



  • A rounded profile and inboard wheels was much more successful in the maze - the rounded shape reduced the tendency to get caught. It is also better to have inboard wheels so they cannot be snagged when going around a corner. Actually, the general shape of a clothing iron seems to be effective in reducing snagging (on corners) and helps to turn parallel to the wall.

     
  • Since the cutter is only 3mm diameter, this requires 2 cuts to penetrate the full 4.5mm depth of the polycarbonate.
  • Use mirror command for symmetrical shapes. Use copy code to repeat code (e.g. When doing the 2nd cut).
  • Note that the blank must have 2 bolt holes drilled before mounting onto the wooden backing board. The holes are diam 6.5mm and 100mm apart. The datum point is at the front left of the machine.
  • Once the CNC program is complete, save it to disk or memory stick ready for machining on the ISEL CNC machine. Make sure you save the file your file in *.tim format because this is the most reliable. The CNC machine uses the G&M code format.

ISEL LAYOUT
See the Program settings for bolts positions at (100, 100) and (200, 100) and with an assumed height of 10mm. 
Base blank size = 210 x 160 mm (Isel)

BLANK SETUP FOR BOXFORD CNC MACHINE



  • Set the Job Setup settings for bolts positions at (70, 70) and (170, 70) and with an assumed height of 10mm. 
  • Working area: X=260, Y=140mm (Effectively 257 x 137mm when using a 3mm cutter). (light yellow colour)
  • The maximum base size =  210 x 136 mm. (light green colour) 
  • Set the Top side at 138 mm
  • Remember - smaller robots tend to go faster than larger ones!


Relevant pages in MDME
Other
  • INVENTOR tutorials.