Water Purification    Water Desalination    Energy Demand Crisis   Water for Poor   Water From air


This is currently prototype content please let me know if you have comments.   joe@xdobs.com


CNC pages for XDOS.COM

CNC Process   CNC Problem   CNC Solution  CNC Software  Our Setup  CNC Projects

 

 

Note:  A while back I separated this document to place the links in a document of it’s own.  If you encounter a link that doesn’t work then try the cnc-links document.

 

A while back I realized that I knew how to solve some problems that have been plaguing man kind for thousands of years.    Since then I have slowly worked through the process of building prototypes to prove that our ideas work.  The demands of this process have forced me branch out beyond my core expertise of high end computer software into machining and CNC.   I have always fancied my self as a handyman but I rapidly learned that my selection of common tools was inadequate to built parts sufficiently accurate to prove my ideas.

 

During this invention validation process I have developed practical experience using CNC for machining complex parts.    I am not and never will be a certified machinist but I believe that what I have learned along the way would be of value to other Inventors and small machine shops.

 

As we have worked through this process it was obvious that there was a lot of assumed knowledge by most authors producing machining documentation both in book form and available on the web.  This made it difficult to determine what I needed to purchase or how to approach the process.      It was complicated by the fact that the most common prevailing wisdom would have rapidly spent a lot of money and even worse after I spent that money the performance both in quality and production rates would have been questionable.

 

I have shared part of this experience via our Software Library below and in this document.    I hope it helps you avoid hundreds of hours of learning, research and uncertainty that I had to endure along the way.      We can provide additional help as consulting services which can be used directly on your project or to enhance our library which you can use for free.   Contact sales@xdobs.com or call 1-800-658-8745 for additional information.

 

This process takes time.    You can not expect to make a decision and be milling away a week later.  Looking back on our experience it CNC from start to production does not require not as much time as the machine shops would have you believe and the cost does not have to be nearly as high as some would lead you to believe.   In short I spent more time learning some 3D CAD software as it took to mill my first relatively complex part.

 

I have made available some scripts and the associated GCODE generated for some parts we milled for our projects.   People with a simple CNC milling setup should be able to use this GCODE code to produce the parts for a simple Tesla Engine or they can use our library and product their own GCODE.

 

Why CNC

We found it nearly impossible to produce the parts we needed without CNC.   Many of our parts must be made out of metal with high strength and high thermal conductivity so we could not use the new generation of 3D prototyping printers and as such where reduced to milling metal.  I don’t have the patience or the expertise to mill complex parts requiring thousands of individual movements with a manual mill so CNC in house or outsourced production where our only viable choices.

 

We found that the cost per part when using local machine shops was so prohibitively expensive that it prevented us from being able to experiment with different shapes of parts as we worked through the solution.

 

I tried recruiting some remote machinists for the purpose of building some parts on a participatory basis but simply found that the cost of communications even after furnishing 3D drawings was so high that I spent more time in that process than setting up our CNC capability to the point where we could produce our parts.

 

The net result is that we found a small local CNC production capability to be essential for our invention process but we could not use common approach most recommended because it was either too expensive or did not produce adequate quality.

 

I started with some free 3D software from http://www.emachineshop.com/ and if you only need a few parts they represent a viable option.   You can directly order the part after it is drawn and the software imposes most of the important rules to ensure the part can actually be fabricated.   There are much more sophisticated software packages available but I still use eMachineShop  software when visualizing parts because it is fast and easy.

 

What is GCODE

I digress at this point to discuss GCODE which sits in the middle of the CNC milling process.

 

GCODE is simply a scripting language that a special software driver such as EMC2 reads and interprets and then uses to drive the motors on the mill that move the milling head.  

 

GCODE is similar to many scripting languages but for a programmer it is almost absurdly primitive and simple.  It is possible to write very complex programs manually but it is time consuming and error prone so I found it better to use a GCODE generator such as our  Library that automates and simplifies the process.

 

GCode is composed of a series of instructions that include both G and M codes.   Do not let this be confusing since both G and M codes are processed by the same software interpreter.

 

The software mill will either start in inch or millimeter modes but can be switched latter.

 

An example of GCODE is as follows

            G00 Z 0.5           (Retract Bit)

G00 X0 Y0         (move the head home)

G01 Z-0.5          (Plunge bit 0.5 inches down)

G01 X1 Y1 F8   (Move bit to X=1 inch and Y = 1 inch)

 

·        G00 moves the as fast as possible.

·        The letters X,Y,Z or A followed by a number will move the milling head to that position on the specified axis.   Normally this is in a absolute position.

·        The G01 moves the head but rather than moving as fast as possible like G00 it moves at a speed specified by F followed by a number in the range of 1 to 20 where 1 is very slow and 20 very fast.

 

In addition to the codes shown here there are a series of others such as G02 and G03 which will draw arcs.  There are also a series of G and M codes that can control various aspects of the machine.   As you can see it could easily require tens of thousands of individual movements to complete a complex milling operation.

 

Quite a while back, Apple published a language called LOGO which was intended to help teach children to program and the GCODE appears to be similar to in concept to the Turtle in Logo.

 

GCODE is not nearly as powerful as normal programming languages so we use a Ruby a modern and free programming language request complex operations such as milling out a round pocket.  This request which takes 3 lines of Ruby code may generate over a thousand GCODE statements.

 

Other approaches to generating GCODE involve using a CAD package and a CAM conversion package which can be nice because they let you visualize things at a 3D picture and not worry as much about bit movement but this approach has serious problems which I discuss below.

 

I have published a more extensive GCODE introduction at:   http://xdobs.com/cnc/gcode-introduction.html   It also includes a  discussion about coordinate space which can be of great help when using CNC and GCODE.

 

 

The CNC Production process

There are a lot of approaches to CNC machining but the approach that is:

1.      Draw the part in a 3D cad package such as AutoCad Inventor.

2.      Export the 3D drawing software into an intermediate format such as  STL, DXF,  IGS or STEP format using the CAD software’s built in export feature.

3.      Use a CAM converter to convert from the STL (intermediate format) into GCODE using software such as MeshCAM

4.      Verify the GCODE makes sense using a GCODE CNC emulator such as  CNCSimulator by Microtech.

5.      Determine if you need 2, 3 or 4 axis capability to mill the part.  Limiting requirements to 3 axis saves a lot of time and money.

6.      Determine your material and required milling bits.   Make sure you have collets to hold the bits.

7.      Design a bracket or clamp set that will hold the work to the milling surface during the milling process.

8.      Dry run the GODE through a CNC driver software that actually moves the milling head such as EMC2.       Do this the first time with the milling motor off and the head raised above the table.    A lot of problems otherwise not obvious become apparent during this step.

9.      Mount the actual milling material and mill the part.

We found that this process works great if you have in the range of $20,000 available to purchase all the high end versions of all these packages.   We found though that the low end and intermediate range packages did not provide the quality we needed which could have been in

The Typical Small shop process

1.      Visualize the parts you need.

2.      Write the GCODE to move the milling head

3.      Verify the GCODE makes sense using a GCODE CNC emulator such as  CNCSimulator by Microtech.

4.      Determine if you need 2, 3 or 4 axis capability to mill the part.  Limiting requirements to 3 axis saves a lot of time and money.

5.      Determine your material and required milling bits.   Make sure you have collets to hold the bits.

6.      Mount the part normally with brackets or clams already on hand

7.      Mill the part

8.      Dry run the GODE through a CNC driver software that actually moves the milling head such as EMC2.       Do this the first time with the milling motor off and the head raised above the table.    A lot of problems otherwise not obvious become apparent during this step.

9.      Mount the actual milling material and mill the part.

In our experience this is the process we have found most small machine shops using.   There are good reasons for this but the dominant seems to be that they have had problems getting the parts they desired at the required quality without using this process.   Some of these shops have moved to Bobcad which allows the bit movement to be explicitly stated in a graphical fashion.

The new and emerging processes.

There are two new formats IGS (IGES) and Step both of which can be directly fed into some high end machines.  These appear to keep the information at a higher level which allows the machine software to make better tool movement decisions.   I have not yet found cost effective for free demo software capable of using these formats so I have not had a chance to try them but I suspect the Step format may eventually remove most of the problems associated with the CAD to GCODE conversion process common now.

The CNC problem

When I first started this process I took the standard approach which includes drawing the part in a 3D cad package and then converting it to GCODE using a CAM package.    What I found was very disappointing because it the GCODE it produced was incredibly inefficient so much so that a part that could be produced in 6 minutes using optimal GCODE required over 2 hours.  

What it was doing is starting at one end of the part and moving across the part left to right on the X axis raising and lowering the bit as it went.  It would then shift about ½ a bit radius front to back on the Y axis and make the X pass again.       The net result is that my circles looked like circles but had left quite a bit of ragged edges which where intolerable for our application and the part I produced was fairly simple so our more complex parts would take all day.

I tried the process with two of the CAM packages mentioned most often on the Internet and with two different CNC driver packages and 3 different cad packages which used 2 different intermediate formats.     One of the CNC drivers EMC2 did improve the milling time by about 30% but the net result for quality was the same with all other combinations.

My understanding is that some high end packages take a better approach but I have not had a chance to try them because most of them involve over $6,000 and as high as $30,000 which just did not fit our project budget.       I understand that Bobcad which is only about $2,000 also does better but I have not had a chance to try it.

The problems with this approach are as follows

·        Every machine builds up a small amount of error as it moves the full length of it’s axis.  The ability of a machine to return to exactly the same point every time is one of the key issues separating the $2,000 micro mills from the $300,000 professional mills.   This means that if you can complete closely related cuts with the minimum movement away it improves accuracy but the approach of end to end movement actually maximizes the effect of any error built up in the machine.

·        Every time the software has to raise and lower the bit to get around a vertical wall the X and Y axis has to come to a complete stop which dramatically slows down the entire process.   In contrast if you can mill everything at the same level in the same pocket at the same time it allows the X and Y movement to make maximum progress while improving accuracy since the Z axis never has to move during that part of the process.

·        Every time the bit is stopped to raise or lower at the vertical wall it imposes a local spin or dwell time which allows that bit to take off a very small amount of additional material.   It wouldn’t be an issue if they moved the bit back a small amount before raising but since they do not you can actually see the dwell points on the wall.   This may be removed by using a harder material and a better bit but hey those both cost more.

·        I have a limited amount of time to work on the machining aspects of this project. It is important to maximize the use of this time and you almost can not walk away from a live machine so this process which multiplies the milling time by at least a factor of 10 is not acceptable.

·        Most expert machinists will give advice that when milling a bored shape such as a circle you start in the center and mill out in increasing circles until you reach the final diameter making sure the last cut taken is with a sharp bit and is much shallower than the roughing cuts.  Taking this approach will provide the smoothest and most accurate results.    The software approach of moving end to end is almost the exact opposite of this approach and just does not provide accurate results.

·        Most end mills can operate in a plunge mode for drilling but they are not optimized for this purpose so you never want to plunge close to the finished vertical wall or you will get a ragged result.   This kind of raggedness is exactly what I saw in the resulting parts.

·        One of the critical tool movements which is mentioned in almost every book on mill usage is basically always working against the bit movement especially when using small machines or small bits.  This is called climb versus descent movement.    The reason this is critical is that if you encounter edges and corners when moving the wrong direction the teeth on the bit will grab and yank the bit out of position which will either ruin the piece, break the bit, knock the machine out of alignment or other bad things.  I have had this happen once and it was quite scary since I didn’t know if I could get the power shut down before the machine self destructed.  The approach of blind back and forth simply ignores this problem and is destine to cause additional problems.

When I first encountered this issue I had already spent about $3,500 on a Taig mini mill, bits, aluminum,   CNC conversion, etc and it looked like it was going to be a waste of money.   After some further thought I came up with a workable solution.

So we know that the cost effective strategies for CAD + CAM conversion are not effective and we know that we can not afford the cost of the very expensive solutions that can automatically provide more intelligent tool movements and it would take a million years to hand write the GCODE to do it the manual way.     What is the answer?    Our answer is using a software library that allows us to script at a much higher level and which generates the needed GCODE but which still leaves the needed control with the designer. 

I think much of the issue is caused by the DXF and STL file formats supported by the dominant CAM packages.    There may well be other viable candidate solutions in particular BobCad seems to be on the right tract but at some point I was forced into a situation of mandatory production and just could not afford to keep trying different software alternatives and of course as we build more and more capability into our library it become harder to switch.   In addition I always seem to be pushing the CAD vendors just past their design intent because some of the things we model are best described with complex math and other than Autocad and Intellicad most of the cad packages do not support rapid scripting of complex formulas. .

Our CNC Solution

As described above the process recommended by the industry and which seems to be the most common process used by small machine shops just could not meet our production time or quality goals.     

One solution would have been to outsource all the prototyping work but that was so expensive that it would have made the entire project infeasible.

Our solution was to write a software library that we could easily script to make complex parts.       It gives us the control of GCODE but eliminates much of the complexity while automating common operations  such as circular pocketing so that they can be completed in 2 or 3 statements.

This strategy allows us to ensure that tool movements will be optimized in much the same way an expert machinist would  do while encapsulating some of the most critical portions of this knowledge directly in the high level libraries.

Our  GCODE Library

Our library is composed of thousands of lines of Ruby source code which understand many of the basic machining rules and can perform many basic machining operations.   It works  by taking a set of  easy  instructions and generating the necessary GCODE.    It was specifically designed so that non programmers can easily combine these script calls in a way that a few lines of code can accomplish sophisticated results.    It requires that you have some ability to visualize the tool movement so that you can determine which parts should be milled first.    It does not provide a graphical approach like drawing and milling but when you know what you need and you know more or less how a milling machine should move in can quite often be faster to use than the graphical approach and it makes some things possible such as complex parabolic curves with changing formulas that are very difficult to draw in normal cad packages.

The best way to understand how our process works is a non trivial example. 

I challenge you to duplicate the object his script produces using your 3D cad package and measure all the time it takes until you have the GCODE verified and ready to mill.    It took me about three hours and part of that was figuring out the some of the shapes.   It would take less than one hour to prepare the matching lid for the housing.   I would be quite interested in your timing results.    The listing below is a provided as a links to a source member which I have heavily commented  to explain how the library works.

 

# test_motor_block.rb

#

# Produces the main motor block for Tesla Engine

#

# test a motor block for CNC mill

#

# By Joseph Ellsworth of XDOBS.COM LLC  2005-2006 Changes

# and enhancments available at our standard consulting rates.

# Free for use by all - No warranty,  No Claims, No Charges.

# No Liability, Free to change

# Free to re-distribute under any terms.

# Written in the Ruby Programming Language. which is available

# for free download from http://ruby.org

# Updates available at http://xdobs.com/cnc

# XDOBS reserves the right to change distribution rights in

# future versions but versions prior to that time will retain

# the old rights.

 

 

require 'cncMill'

require 'cncShapeCircle'

require 'cncShapeRect'

require 'cncShapeArc'

require 'cncGeometry'

 

width = 4.0

length = 4.0

height = 1.0

offset = 0.3

depth = -1.0

diam  = 0.25

pocket_x        = 2.5

pocket_y        = 2.5

pocket_diam   = 2.5

pocket_depth = -0.85

island_height   = -0.10

 

aMill = CNCMill.new

aCircle = CNCShapeCircle.new(aMill)

 

aMill.job_start

aMill.home

 

#aCircle.mill_pocket(pocket_x, pocket_y,  #pocket_diam,-0.85, pocket_diam - 0.4)

#                               X             Y            DIAM         DEPTH    ISLAND

 

 

aCircle.mill_pocket(pocket_x,  pocket_y,  0.65,   -0.75)

                         #    X             Y          DIAM  DEPTH

aCircle.mill_pocket(pocket_x, pocket_y,  pocket_diam, -0.85, 0.65)

aCircle.mill_pocket(pocket_x, pocket_y,  0.5,  -0.90)

aCircle.mill_pocket(pocket_x, pocket_y, 0.25, -1.0, 0.0)   

aMill.retract

 

#The Tesla motors need a place in the center for the exhaust air to exit.

#We will bore these out now.    We could also use the circular array or rotate

# an object by degrees.    Our center island is 0.65 inches wide centered over

# X1.5"and Y2.5" so to clear the island we must move at least 0.325" away

# from the center.  I use rectangles here only to show how they work but

# would normally use a series of arcs to optimize air flow.

aRect = CNCShapeRect.new(aMill)

aRect.reset(pocket_x - 0.45, pocket_y - 0.3,  pocket_x - 0.60, pocket_y + 0.3, depth)

aRect.do_mill.retract

aRect.centered(pocket_x + 0.55,  pocket_y,  0.15,  0.5, depth).do_mill.retract

aRect.centered(pocket_x,  pocket_y - 0.55,  0.5, 0.15, depth).do_mill.retract

aRect.centered(pocket_x,  pocket_y + 0.55,  0.5, 0.15, depth).do_mill.retract

 

 

 

 

# Drill the holes at each corner that will be used to bolt on the lid and to bolt this portion of the motor to the next portion.

aCircle.mill_pocket(offset, offset, diam, depth)

aMill.retract

aCircle.mill_pocket(width - offset,  offset, diam, depth)

aMill.retract

aCircle.mill_pocket(width - offset,  (length - offset),  diam,  depth)

aMill.retract

aCircle.mill_pocket(offset, (length - offset), diam, depth)

aMill.retract()

aMill.retract()

 

# The last step is to mill out the feed area that allows high velocity gas or fluid flow into the motor

# compartment and aims it in a way that maximized the energy transfer.      

# This needs to approximate a rocket nozzle shape to cause the input flow to

# accelerate as it enters the motor compartment.

aMill.retract

pr = pocket_diam / 2

pxe =  pocket_x - pr

 

px1 = pxe + 0.05

py1 = pocket_y

px2 = pxe - 0.8

py2 = pocket_y - 1

px3 = 0.4

py3 = 0.5

px4 = 1.6

py4 = 0.5

px5 = pxe - 0.45

py5 = pocket_y - 1.2

px6 = pxe - 0.0200

py6 = pocket_y - 0.15

 

if false

aMill.plung(-0.5)

aMill.move(px1,py1)

aMill.mill_arc(px4,py4, 0.0)

aMill.move(px4 - 0.05, py4)

aMill.mill_arc(px1,py1, 3.0)

aMill.mill_arc(px4 - 0.1, py4,  3.0)

aMill.move(px4 - 0.15, py4)

aMill.mill_arc(px1,py1, 3.0)

end

 

tx = 1.6

r = 3.0

tpe = py1

tpx = px1

while tx > 0.5

   aMill.retract()

   aMill.move(tpx,tpe)

   aMill.plung(-0.5)

   mill_arc(aMill, tx, py4, r)

   tx -= 0.05

   tpe -= 0.015

   #tpx += 0.001

   #r = r += 0.01

end

 

 

 

if false

aMill.move(px1,py1)

aMill.plung(-0.7)

aMill.move(px2, py2)

aMill.move(px3, py3)

aMill.move(px4, py4)

aMill.move(px5, py5)

aMill.move(px6, py6)

 

tx = px2 + 0.05

ty = py2 - 0.1

tpy = py6

while(tx < px5)

  aMill.move(tx,ty)

  tx += 0.05

  tpy += 0.01

  aMill.move(tx,ty)

  aMill.move(px6,tpy)

  tpy -= 0.00

  tx += 0.05

end

 

 

end

 

#aMill.move(0.4, 0.5)

#aMill.mill_arc(0.4, 0.5, 1.5)

#aMill.mill_arc(1.6, 0.5, 1)

#aMill.move(1.6, 0.5)

#aMill.mill_arc(px2 - 0.08, pocket_y - 0.9, -1.5)

#aMill.move(px2 - 0.1,  pocket_y -0.9)

#Mill.move(px2, pocket_y)

aMill.retract

 

 # now mill out the center.

 

 

aMill.retract

 

aMill.home

aMill.job_finish

 

So now you can write ruby code or at least read relatively simple ruby scripts but that is one of the strengths of ruby, you start simple and only expose complexity as you need it.

Our library obviously contains many more features and functions but they will be covered in a separate users guide.

Our current intention is to make the library available for free use by all with no warranty.   If we do make money off it then it will be by the consulting revenue we generate from those who want us to add specific features to the library to meet their specific requirements.

Let me know if you would like a current copy of the library of have comments on desired features and functions.  I can be reached at joe@xdobs.com or at 800-658-8745.        

·        Download entire Library in ZIP format.

·        Brows Library module by Module

Our library requires that the ruby interpreter be installed and users should be familiar with running scripts from either the windows command line or the Linux shell prompt.   The windows installation is a single click style executable file that takes about 1 minute.   The Linux version requires a bit more effort but still took less than 1 hour.

I have also published a  GCODE tutorial which goes into further detail.   The users guide for the CNCUtil library is also available.

Ruby the Scripting Language

There are many languages we could have chosen for implementation of CNCUtil.   I choose Ruby because of it's extreem ease of learning for new users who may not be programmers.    It also provides strong object oriented support which made it somewhat easier to build complex projects rapidly.   Finally it is free and readily available on most operating systems including Linux, Windows and Macintosh.  I discuss it further  in our Ruby Notes document which also provides an extensive set of links to Ruby related resources and training. 

 

I expect that most people who have ever written any computer script, language or used developed spreadsheets will be able to produce sophisticated GCODE simply by reviewing our examples and that they may never need to learn the more advanced parts of Ruby.

CNC Software

All this software works together in the CNC process.  It can be confusing but if you understand the process it becomes much easier to understand.   If you have not read our explanation of the process then please do so.

The sheer variety of software available is bewildering and a person or group could easily loose man years getting started by evaluating all these packages.    My general theme is to choose the clear market leaders in each category unless there are overriding budget or functionality reasons not to.   For our purposes this approach was not viable due to both cost and quality concerns.  

Coming up to speed with CNC and buying and assembling all the parts is a much more difficult proposition than people typically understand.  There is a weird combination of assumed knowledge and lack of people skills that is extremely daunting.   Our  Taig mill with CNC retrofit showed up with one page of instructions for a job that should  have included at least 90 pages and that is typical of this industry segment.      There are lots of pieces and they are not factory configured to just work together so it takes diligence and time.    Once it is all figured out and working end to end it is easy to look back and improve so force yourself or your people to go end to end for producing simple parts as rapidly as possible for the least possible amount of money even before they finish the selection process on expensive components like CAD.   What they learn will allow them to make much better decisions and will quite probably save your company thousands or hundreds of thousands of dollars.     

Avoid making department wide commitments up front but rather get a single seat or better yet free demo versions which you can test on your early parts and those elements that work well you keep and buy more of.

CAD

The CAD (Computer Aided Design) or as most people use them (Computer Aided Drawing) packages are used to help visualize the parts.   Some of the more capable ones can be used to draw all the parts and assemble them together before a physical part is ever drawn.   They start at $50 and go up to well over $35,000.   The most popular for use by inventors seems to be Autocad Inventor which costs in the range of $6,000 but there are free packages such as EMachineShop which are OK for drawing single parts and a couple of mid range products such as CadMax which at $300 that have very good 3D support and  Alibre Design at $999 provides full parametric capabilities but takes a long time to master.   I have tried both Turbocad and DesignCad which start at under $100 but just do not find them productive for our inventor type use.

The key with CAD packages is to buy  one good enough to meet your requirements but not overspend initially.  This must be balanced with the knowledge that there is generally a loss of information when moving drawings from package to package and sometimes this is so bad that the items must be redrawn.    

To be clear we started out thinking that our CAD package would both support our product design needs and directly feed the CAM process for production of prototypes but have shifted away from that approach to using CAD as a documentation support and design aid tool which imposes a different set of requirements.    This means that we shifted to valuing different features such as independent 2D slice views over some of the 3D rendering capabilities.

If you are using CAD for patent drawings then a tool with advanced documentation support like CadMax and  Autocad Inventor are good for their ability to produce scaled 2D views complete with labeling directly from the 3D models.     The package most heavily used for complex 3D surface design appears to be Rhinoceros which supports 3D NURBS surface modeling.

We originally thought we would draw the parts in CAD and let the drawings directly drive the CNC process.    As I discuss elsewhere this process has seems to have serious problems so we have adopted a different strategy that relegates CAD mostly to a communications and documentation vehicle which the less expensive packages such as CADMAX can handle reasonably well.

There is a CAD package called CADSM which only costs $29 that can provide motion simulation in 3D.   It has a completely non standard user interface and looks like it takes considerable time to setup up a 3D model but the resulting 3D moving models could be indispensable for communications purposes and there appear to be some very good training tools.

I have included a more comprehensive list of CAD vendors with comments about each vendor below in the links section.

CAM

CAM is roughly the process of  moving from visualized components to GCODE which can be executed by the CNC stepper driver software.  This can be done a number of ways but the default process is to use 3DCAD and some intermediate software.

Alternative processed can generate GCODE directly from drawings or library modules like our library does.  

In many shops people are using simple text editors and writing GCODE directly which would still be considered part of the CAM process.

There are some packages such as Bobcad which merge the CAD and CAM process and which directly drive the GCODE generation.  We do not have extensive experience but I believe this approach will tend to produce better GCODE with more efficient tool paths.

A list of CAM packages is included in our links section.

GCODE Editor

GCODE can be edited with a simple text editor and when using our library a free programming editor works well.  There are times though during the learning curve where a editor which understands and enforces the GCODE syntax can be helpful.      A list of GCODE editors is included in our links section.

CNC Simulator / Emulators

Running a CNC mill can be an expensive process especially if it is loaded with an expensive material such as stainless steel.      A CNC emulator basically reads the GCODE and pretends to be a mill while showing the movement of the tool as the GCODE is processed.  The better emulators allow the rate of simulation to be changed so you can watch the movements in detail.  

The one I like the best is Microtech CNC Simulator which is free but there is quite a selection of options and many of the CNC drivers include graphical display options that are equally good.

I have enclosed a list of some CNC emulators in the links section.

CNC Stepper Driver Software

This is a piece of software which I feel dubious about because I don’t think any software should be required or rather think every mill should come with either a network port or a SD card slot that can be used to feed GCODE in and start the milling process.    The whole idea of requiring a dedicated computer for this process is archaic and should be replaced.   There are some mills that have this built in which I have provided links to below.

With the rant over it is easy to see how the low end and hobbies market evolved in this direction and the hobbyists and quite a few professionals will need a dedicated computer to run the milling operation for the foreseeable future.

My favorite driver software is EMC2 since it provides modern features such as acceleration control and it is easy to burn a CD that self installs a version of BDI Linux and the EMC software in a single step saving money by not having to by Windows and in general allowing a lower powered computer to be used.    EMC did not come with a correct configuration file for our Xylotex 4 axis controller I use but you can get it  for free from me.

Other popular packages are Mach2 and TurboCNC which lacks modern acceleration control which can dramatically slow down some milling jobs.  My impression is that Mach2 and it’s sister products provide a superior graphics interface.

I have provided a more comprehensive list in the links section.

What the CNC vendors need to learn

One thing the major players in the space should fully understand is that new product groups have extremely limited budgets but after they have successfully delivered a rev 1 product their budgets are typically relaxed.  If these groups want to get the larger sales they need to attract and retain the early users through rev 1.  

I experienced this in my first project at HP where spending 200K for software up front was impossibility but after our successful deliver of our rev 1 product we turned around and spent 5 times that amount and the product we had used during rev 1 was the obvious candidate for the upgrade.  

The other thing these vendors need to learn is that free downloadable training videos are their best sales aids and while they would sacrifice some follow on revenue by making them widely available their core product may never be seriously considered due to the fact that the evaluating users never make it over their initial learning curve.     As a result they may get a few hundred dollars of additional initial revenue but end up sacrificing hundreds of thousands of dollars when successful groups upgrade from a single or small group of designers to department wide usage.

Sun has clearly figured this out with the Java programming language and they correctly found that it was essential to put the core tool into as many hands as possible so that when enterprise projects start the entire group wants to use their high end tools.   

Incidentally 30 days is not enough to become proficient in these tools.    I am hesitant to invest a lot of time and energy on AutoCAD Inventor right now because I don’t want to have to spend the $6,000 in 30 days which will be before I see any revenue but if I could use Inventor for 6 months I would jump in feet first and if my project is still viable in 6 months I would have so much invested learning and drawings that I would have no choice but to pay the $6,000 not only for me but for the 4 other people I am likely to hire in that timeframe.

Our Setup

The Machine Chosen

The Mill

The Controller

GCODE Library

Buy a Collette set

Buy a larger vice from Harbor Freight

Making tBolts

Making Clamp brackets

The good,  The bad and the Ugly

Environmental Considerations

Protect the controller box.

Allow adequate space.

Keep the controller and computer in a space where they can  be isolated from the metal shavings.

Mills that directly process GCODE

The current generation of  low end CNC mills requires a computer dedicated to furnishing signals over a parallel port to drive the motors on the mill.   This solution works but it imposes extra costs,  a lot of extra hassle and space requirements.   

The parallel port strategy makes sense from some perspectives but parallel cables which use low voltage TTL signals are notoriously susceptible to electrical noise which is quite prevalent in shops where large motors are being used.    I used this strategy for a robot in 1988 but in today’s world there are simply better and more reliable ways to approach the problem.  

It is possible to buy mills that include all the computing power needed to directly read the GCODE and process it without the extra hassle.

·        A wide selection of machines from Alibaba

·        CNC Router XHYZ6090 –  $3,800 plus shipping from China plan $1,500.  This mill is huge 600mm by 900” by 120mm working (23.6” X  35.4” X 4.7”).   It includes ball screws which are better for accuracy than the simple screws supplied on the Taig and Sherline mills.   It only accepts 220V power so we are waiting to buy one until we get a larger shop.   It started out as a CNC design so it is cleaner than the retrofit packages.   I obviously can not vouch for the machine until we test it but it looks like a good combination.

·       

The Open Loop and Closed Loop Decision

CNC Projects

 

Let me know if you have specific needs.   If  your needs coincide with our own I may be able to publish an example.

 

We have quite a few projects which are listed on our CNC index page.     A few of the projects you will find there are shown here.

 

Joe’s comments on CNC Util and the CAD / CAM / CNC industry

Warning:  These comments will not make sense unless you have read the rest of this document or are already familiar with the CAD, CAM software process.

 

CNC Util is a Ruby based library that machinists can script to produce sophisticated GCODE.

 

 CNCUtil eliminates the need for CAD and then CAM conversion software and it allows the Machinist intimate control over tools paths while eliminating over 90% of the labor normally associated with working in GCODE.  

 

Before I continue let me add a disclaimer.  I have not evaluated every CAM product available and there are a lot of them so there is at least some chance that one or more vendors have produced products that fully satisfy the need and solve the problem and I don’t know because we stopped doing serious evaluations about the time I got focused on CNCUtil.     There are a few like Feature CAM which costs several thousand dollars per user and BobCad that costs over $1,000 per user that combine the CAM and CAD functionality and look promising.    In an ideal world I would stop work on CNC-Util and give both of these products a full evaluation but I am not in a situation where I could afford a month or more lost productivity which this would require and I really don’t want to spend the money for Feature-CAM since that amount of money is enough to import a mill with a 30” X 40” axis from China.

 

One may ask why there is a need for yet another CAM / GCODE generator in a crowded market where products start at $69 and go up to over $15,000.  The reason is that the entire low and mid range market seems fixated on an approach that software engineers have repeatedly tried and dis-proven many times over several decades.     It has always been a holy grail in software engineering to produce fully executable, highly complex programs capable of handling all the boundary conditions and exceptions using graphical tools.     I have followed this enthusiastically and have invested in every generation of graphical tool since the 1980’s including Rose, UML,  Rational and a bunch of less known strategies but the fact of the matter is that while these tools may have helped in some parts of the process and they greatly helped in the person to person communications process they where failures when it came time to write  full fledged executable products.   Just like the software graphic tools today’s 3D cad packages are essential when visualizing a product and building a plan that can be communicated to managers, customers and investors but the process seems to break when moving from that step to actually producing the part.

 

I found the same core issues driving problems when trying to use 3D CAD to directly drive CAM conversion to generate machine executable GCODE.  I am confident that this core issue is one of the reasons it is so expensive to get single parts made in today’s market.     For every part an expert machinist has to either re-specify the part for their local machines or at the very least manually edit the GCODE to get it do exactly what is needed both of which are time consuming and error prone and this time cost has to be passed back to the buyer.      This is complicated by the fact that every time the GCODE is generated it must be re-edited and it must be re-generated every time the CAD drawing changes.   There are no tools to help preserve the previous edits so each cycle requires a repeat of the manual editing process.   It is no wonder that Machinists charge an arm and a leg every time a design changes because it means that they are going to be spending hours figuring out the newly generated GCODE and then re-edit it to put in changes very similar to those they just entered for the last version.

 

To put the GCODE editing process in perspective our moderate complex jobs require in the range of 50,000 lines of GCODE none of which is organized in anything but a sequential list and there are no visual queues to what each step is doing and the code is a simple linear list with no functional grouping so it is hard to even find the line that is milling a given piece of a part let along figure out how to change it.      The only way I have found to figure this out is to watch the entire sequence in an emulator and wait until it gets to the part I am interested in and mark it manually for the change and it takes a long time and intense concentration to watch 50,000 discrete moves, my time and energy are better spent on tasks which make better use of reasoning skills than this dead boring task.    I routinely make changes in large complex software systems so editing GCODE should be no big deal but I cringe at the thought of having to crawl through that much linear code simply because of the tedium so it can be expected that Machinists who are not natural programmers would hate it even worse.    In software engineering we try to keep most individual chunks of code (methods) short in the range of 20 to 300 lines with 300 lines considered long and 3000 lines considered unacceptable for a single method so to have a single linear chunk that is  160 times longer than what we already considered long is simply daunting.

 

 The popularity of scripting languages for programming the Web has proven that for very complex task as text / language based scripting approach is more capable than graphical drawing formats which is why that even after software engineers use graphical tools to describe what they will build they ultimately still write the software in languages like Ruby, Python, C++, C# and Java.  This is because by the time they use the graphical tools to fully specify the problem to the point where all the exceptions have been handled they have actually spent more time than they would have writing the software using a standard computer language   and in most instances they encounter limits in the graphical drawing tools that prevent them from even being able to complete the project.   The experience from Software Engineering  is similar in many ways to what is encountered in the standard CAD / CAM process and is one of the reasons CNC projects end up employing expert machinists after they have already drawn the parts and thought they could have produced the part directly from the drawings.

 

The computer industry is still trying to fabricate drawing tools capable of handling the entire software process but it is just too complex for these tools the handle even after 20+ years of intensive effort.  Progress is being made but the solution is still a ways off.    

 

The CAD / CAM industry generally does not encounter individual parts that create problems quite as complex as we do in software engineering but I believe that their problems are sufficiently complex to cause a very similar set of issues.      When CAD and CAM products are taken together they are substantially less mature that the current generation of software visualization tools when it comes time to handle the full complexity of the job.    The primary difference is that their customer base does not have the same background as the software engineering customers so they are unable to fall back to a text based language strategy and they also do not have any decent tools to make it cost effective or even feasible to do so even if they wanted to.    As a result the CNC  buyers does not understand that they are bound to hit the same set of problems encountered by the software engineers so there are a lot of companies making a lot of promises that just can not be met with the current generation of tools.

 

CNCUtil provides a unique solution that allows the use of scripting to bypass or at least effectively manage the complexity hurtles while using libraries to keep people focused on their jobs rather than the nuts and bolts.  This is the same strategy that has proven effective for software engineers and I believe it will be equally effective for the CAM / CNC process.

 

It could be argued that the CNC users can always fallback to GCODE but in many ways GCODE today is very similar to Assembler language in the 1970’s but more limited because it does not provide tools for jumps and compares which became the foundation of today’s computer software.    GCODE is simply requires too many steps for an average person to produce a reasonable number of parts in a reasonable amount of time.   GCODE does not provide any of the tools such as declarative specifications, functional decomposition and Object Oriented encapsulation that have proven essential when allowing normal people to participate in the software process.    GCODE is simply not suited to wide spread human scripting.  Just like the software industry there are experts who can write GCODE fast and efficiently and equally like the software industry these exceptional individuals are rare and expensive and the average person will not be able to afford the time so they are forced back into the standard process above where they still end up editing the GCODE.   

 

CNCUtil is designed to move GCODE generation into the world of modern software engineering where mere mortals can easily and quickly script the movement of their machine while still retaining detailed control where they need it.   It allows people to start small with straight line scripts and then as their complexity need grow they can take advantage of advanced features like functional encapsulation for re-usable libraries.   

 

Hopefully CNCUtil will fill the same niche for CNC that VB, JavaScript,  Perl and Python did for Web applications from the 1990’s until now where they have fundamentally enabled an entirely new generation of programmers to produce incredibly sophisticated results with minimal learning curves.

 

The movement to Step and IGES is helping but they are merely descriptive formats and can not embody conditional logic and decision making capability which has proven essential in software engineering so you are almost back to trying to take a graphical representation of an object and invert the proper tool movement to produce the object. Which is bound to break down in places similar to where the 3D cad / CAM process breaks down?    I am as guilty as everybody else in wanting to take a IGES file and have my mill produce the part flawlessly every time and without having to manually edit the GCODE and I will buy many tools to do this and may even write a conversion utility that reads the IGES and writes the ruby script that uses CNCUtil which at least will be easier to read and tweak since it is 100 to 1000 times shorter than the GCODE.    I suspect that I will wind up back using CNCUtil for several years to come especially when building the harder parts.

 

There is an exception to problem condition described above where the CAD to part seems to have more promise for direct delivery without the need for a machinist expert.   That is with the new generation of 3D printers which use a variety of technologies to produce plastic parts by building them up layer by layer where the layers may only be 1,000 of an inch thick.    The nature of these machines means that they will be more capable of direct production without a human touching the part until it comes out of the machine and without ever looking at the intermediate GCODE.   This is because the machine controls the layer deposition and that process can be reduced a set of simple planes which is relatively simple and doesn’t involve sophisticated 3D trajectory planning.     Same thing some of the inexpensive CAM software used the same strategy but it was really stupid when milling and equally smart for the 3D printers.  The current cost for these printers during early 2006 starts at $25,000 and the cost per part is quite high.  The quotes I received during 2005 from the service bureaus were roughly 25 times the cost of locally machining the same part.    Never the less I expect that if any company finds a way to break the $5,000 price point with these printers that they will rapidly become as common place as laser printers and may grow in the market even faster.      Most of my machining requires a material with high thermal conductivity such as Aluminum or stainless and to date there are no 3D printers capable of directly producing the metal parts but even so I will buy one when economically feasible because we could use the plastic parts to produce one off plaster or sand molds that could be used to produce short run aluminum castings.  I don’t relish the idea of locally casting Aluminum since dealing with 1,300 degree metals seems inherently dangerous but it would be a good way to approach produce a small number of parts and it could make more efficient use of the metal than milling it out does.   This could be an ideal implementation because the casting operation can be done by relatively unskilled labor whereas the CAD drawing and use of CNCUtil requires a higher degree of skill so if we can get to the point of directly producing mold