After working for a semester on the ITP milling machine, I have prepared this report as a starting point for whoever next takes on this project. This report is primarily focused providing the following:
- a how-to for using the machine,
- the code I have written for use with the machine (to be uploaded), and
- my recommendations for how to improve the machine.
It is my hope that this document can help anyone undertaking this project move forward with as easily as possible. To this end, I will start with my recommendations for future development.
One of my goals with this project was to make a tool that would be as versatile as possible, and to do that, I wanted to give users the ability to take their sketches from the computer to the machine rather than base the use of the machine on preset shapes and figures.
While the machine does have manual control that can be used when it is not attached to a computer, I believe that the processing power of a computer is _much_ better suited to figuring out toolpaths than a microcontroller.
Ideally, sketches could be drawn on the computer and then turned into toolpaths for the machine using free software. In practice, however, this toolchain gets caught on the ideosyncracies of many of the programs involved.
For example, if you want to cut a circle of a certain diameter using the mill, this is what I would have to do. There are surely better solutions out there—this is just the best that I have been able to manage:
Draw the circle in Open Office and save it as a Scalable Vector Graphics (SVG) file. Ideally, these files could be generated with Illustrator or Inkscape—however, in practice, these programs create files which cause various errors when used with cam.py.) Unfortunately, OpenOffice can only use two decimal points of precision on shape measurements. To create the precision I desired, it was necessary to convert my circle to milimeters.
In addition, cam.py seemed to create offsets for toolpaths (taking into account the width of the endmill bit) that were slightly inaccurate. To create a circle the size I wanted, it was necessary to create the offset in Open Office, then use an offset of zero in cam.py. This means that you must also convert the size of your bits to millimeters, then subtract that amount from the diameter of your circle. Even a piece with several circles at set distances becomes somewhat complicated.
Once the svg has been made, you can use the python script cam.py from MIT’s Media Lab to generate G-code. However, this G-code will not yet work with the Processing sketch I wrote which sends G-code directly to the mill, sending an instruction when the previous instruction is finished. The reason is that the Arduino in the mill is based on the G-code interpreter from the RepRap project, which is not exactly standard. The reason I used cam.py instead of the RepRap toolpath generator is that it seemed to be designed for negative cutting instead of positive extrusion, and for that reason it seemed more relevant to my project. Perhaps there is something in the RepRap documentation about how to create a cutting toolpath, but I have not been able to find that.
The standard command in G-code G00 is used for rapid positioning of the cutting tool. However, the RepRap code instead uses that command to set the X,Y,Z-values for the current location of the cutting tool. While these two interpretations of the command are very different, I found the command useful and kept it for now. This means that the G-code generated by cam.py must have the G00 commands changed manually to G01. In addition, any adjustments to the speed of cutting during the operation must be made manually to the G-code file. G20 must also be added to specify the correct units for the mill, and a “G00 X0 Y0 Z0” command to set the starting point of the mill is often desired.
Once the file has been edited, it can be sent to my processing sketch and then to the mill. At this point, the machine will cut out your circle.
Cutting out a square or rectangle is easier, but mainly because the G-code can be written by hand more easily than going through the toolchain listed above.
To cut out a design from an Eagle file, cam.py can be used on the relevant file from Eagle. I have found that it does not render drill holes in a useable way, and the offsets might be a little bit off, but with some tweaking, it might be possible to use an Eagle file to cut out a board. (Update: Using cad.py, a successor to cam.py, this solution has been reported to work for generating drill holes: export the pads layer and then fill the rest of the background with white, leaving just the holes in black. Thanks to David Mellis for this tip!)
However, due to the inherent instability of the cutting blade, there is some wobble to the endmill, which can lead to slight inaccuracies. In my experience, bits were prone to breaking very easily due to the mechanical construction of the mill, and any cutting had to be done at the slowest of speeds on the softest of materials. With this machine, I was not able to get the precision I would want for designing circuit boards.
Recommendations for Using the Machine
In my opinion based on a semester of working with this machine, the two biggest obstacles to this tool being useful to the ITP community are the toolchain of software for generating G-code and the mechanical elements of the kit we purchased which serves as the basis for the machine.
While I would love for all of the software used to be free and open-source, I think that this goal should give way to professional providing software for student use. I have yet to see any free software designed for 3D work, limiting us to solely 2D (or at best 2.5D) and I do not think the frustration of using the free software that I have seen provides a satisfactory user experience or good use of student time.
In addition, the use of professional software does not negate the possibility of using free, open-source software as well if a better set of programs can be found or if someone with a better toolchain of software can provide instruction on its use.
The second recommendation I would make is not to use the milling machine kit which is currently in use. The Arduino and stepper motor control which I developed can be easily configured for another machine, and my recommendation would be to spend a few hundred dollars and buy a mini milling machine.
The current kit suffers from material and design flaws.
- The base is not very sturdy and stays in place only by applied weight, which leads to pieces occasionally being picked up or moved by the cutting tool. This jumping behavior is frightening and damages the parts.
- The plastic parts also allow for flexibility which seriously affects the machine’s precision.
- The maximum size for a piece that can be cut is very, very small.
- Material is difficult to connect to the machine and hold for cutting. A vice would be better, but I am doubtful that the machine has enough room or strength to move a vice as well as material to be cut.
- The machine is very delicate and requires frequent recalibration to prevent the axes from seizing up and providing inaccurate cuts.
I believe that buying a non-CNC mill and attaching stepper motors to it could solve the problems listed above.
Without investment in the recommendations above, I am not sure that the machine will be able to provide satisfactory performance or usability.