Open-source CNCing
Last year Sienci Labs finished its Kickstarter campaign for the open-source LongMill Benchtop CNC Router — its second successful open-source CNC machine Kickstarter campaign. CNC routers allow users to mill things (like parts) from raw materials (like a block of aluminum) based on a 3D-model. The LongMill is a significant improvement over the original sold-out Mill One and makes professional-quality machining based entirely on open-source technology a reality. As an owner of a LongMill, I will walk through the various open-source technologies that make this tool a cornerstone of my home workshop.
Hardware
The Sienci Labs LongMill is an impressive feat of engineering, using a combination of off-the-shelf hardware components alongside a plethora of 3D-printed parts. The machine, once assembled, is designed to be mounted to a board. This board, called a spoilboard, is a board the machine can "accidentally" cut into or otherwise suffer damage — designed to be occasionally replaced. In most circumstances, the spoilboard is the top of a table for the machine, and Sienci provides documentation on several different table builds done by the community. For builders short on space, the machine can be mounted on a wall.
The complete 3D plans for the machine are available for download, including a full bill of materials of all of the parts needed. The project also provides instructions to assemble the machine and how best to 3D print relevant components. The machine is controlled by the LongBoard CNC Controller, and Sienci Labs provides full schematics [23MB ZIP] of that as well. All mentioned materials are licensed under a Creative Commons BY-SA 4.0 license.
In addition to the open-source design of the machine itself, an open-source-minded community has formed around the project. The company's Facebook user group has 1,600 members, and an active community forum is hosted by the company, which discusses everything from tips to machine support. Community members contribute, among other things, various modifications to improve the original design or to add new features such as a laser engraver.
Software
When it comes to a fully functional CNC, the hardware behind it is only part of the equation. There is an entire software stack needed to go from a model to a physical thing. To explain this, I thought it best to have an example to refer to. For this example, I borrowed this design for a Tux drink coaster, scaled up its size, and used it to produce this quick example of the LongMill in action:
There are a lot of different software options, both open source and commercial, that can be used to mill something like this. In this case, I am starting with an STL file and I need to translate that data into actions for the mill to take to carve the image. Looking at the entire process generically, the steps would be: design something, build tool paths (movements of the CNC machine), and then send tool paths to the machine. I already have the design, so I will start with generating tool paths.
The process of converting a design into a series of movements taken by a machine is called computer-aided machining (CAM). Depending on the work being done, there are many different types of CAM software available to take some sort of model and convert it into one (or more) tool paths. In the open-source world there are many choices — for example there is a list of open-source options that was compiled on Reddit. What CAM software is used depends greatly on the experience of the user and the needs of the project. In this case, I used CAMLab developed and hosted by Sienci Labs; CAMLab is based on the MIT-licensed Kiri:Moto project. CAMLab is meant to be a beginner-level tool that is easy to use; it operates directly on STL files. In other projects, such as when I am using the CNC to create my own prototype PCB circuit boards, open-source projects like FlatCAM (MIT-licensed) are a much better tool for the job. Unlike CAMLab, FlatCAM works from Gerber files generated by electronics-design tools like KiCad (GPLv3) — instead of STL files.
The job is the same regardless of the CAM software used: take the model provided, combine it with information about the material being cut along with the tool that will be used to cut it, and generate a tool path. What follows is a screenshot from CAMLab, showing the tool path generated by a 2mm cutting tool on our Tux model. In this screenshot, the tool path is indicated by the black lines, while non-cutting moves are indicated in blue:
Observant readers may note that the generated tool path appears to ignore portions of the model — specifically the narrow lines in Tux's face. This is not an error, but captures that this model required making a second pass using a smaller 0.8mm tool to fill in the details that the larger tool couldn't accomplish. This tool path would be generated and run separately from the first, with a physical change in tools in between. Ultimately three separate tool paths needed to be generated and executed to complete the carve. Two of them were for the actual relief of Tux (a 2.0mm and 0.8mm end mill), and a third to cut the circle from the wood stock using an 8.0mm end mill.
Ultimately, the tool path generated by the CAM software is saved to a file to be transmitted to the CNC machine using a language known as G-code. Different CNC machine controllers implement different dialects of G-code, depending on the software of the controller. In the case of LongMill, the LongBoard CNC Controller uses an off-the-shelf Arduino Uno as its processing unit, running the open-source G-code interpreter Grbl (GPLv3). The G-code is sent to the Arduino Uno on the controller via a serial connection.
G-code is a line-based, interpreted language (G-code reference). Below is a small G-code example that sets the current position of the tool in the CNC machine as the origin, moves up 10mm, over on the Y axis 10mm, then returns to origin:
P0 L20 X0 Y0 Z0 ; Set current location as origin
G0 Z10 ; Move the head up 10mm
G0 Y10 ; Move the head on the Y-axis 10mm
G0 X0 Y0 ; Move back to origin for X/Y
G0 Z0 ; Lower head back to origin
A look at Grbl internals would tell you that it can only buffer, at best, sixteen G-code instructions at a time. In contrast, tool paths generated by CAM software can be hundreds of thousands of lines of G-code. Thus, for sending the G-code file generated by a CAM tool, we need a utility that can buffer the G-code instructions sent to the CNC controller. Again, there are many different open-source tools available for a job like this, but I use a project called Universal Gcode Sender (UGS — GPLv3 licensed). I selected UGS because it offers features specifically for Grbl and overall works well. In my setup, UGS runs on a Raspberry Pi 4 connected to the LongMill's controller, where G-code files are then opened and transmitted to the CNC to do a job — in this case, carve out our Tux model.
While G-code is typically generated by CAM software, it is not uncommon for it also to be written by hand in a variety of contexts. Some CAM software offers the ability to inject custom G-code at various points in the tool path generation (for example), while almost all G-code sending platforms like UGS provide a serial console for manual G-code input — if not an entire G-code macro system. In typical usage, users often write small G-code scripts (or one-liners) by hand to do specific tasks unique to their device, situation, or preferences. For example, it is often faster to move the tool on a CNC to the desired location on the bed by a line of G-code than it would be to use the provided movement controls in an application like UGS.
Wrapping up
Working with a CNC is the subject of multitudes of books and web sites, and the number of open-source projects available in this space is probably just as large — we've only scratched the surface here. There are many more aspects of this space to cover, such as open-source modeling programs like OpenSCAD, that may make interesting subjects in the future. What we hope to have made clear is that CNC technology from start to finish is now available to the world in a reasonably accessible form — using nothing but gratis open-source projects. For open-source enthusiasts (or professionals), it is most welcome to see another historically proprietary space develop FOSS alternatives.
Posted Jul 29, 2020 23:22 UTC (Wed)
by michaelkjohnson (subscriber, #41438)
[Link] (4 responses)
Thanks, John, for introducing your router. I'm glad you are having fun with it! I've been spending a lot of time in this area, and would like to chime in with what I hope is useful additional information for anyone whose interest was piqued by this article.Pointers to more information
Posted Jul 30, 2020 0:57 UTC (Thu)
by kkremitzki (subscriber, #115703)
[Link] (1 responses)
Posted Jul 30, 2020 12:19 UTC (Thu)
by michaelkjohnson (subscriber, #41438)
[Link]
I should have been a little clearer about FreeCAD and STLs; on re-reading I think I may have given a wrong impression. FreeCAD absolutely can handle STLs and has some powerful tooling available there. It's just that if someone is starting with an STL and doesn't yet know FreeCAD, FreeCAD might not be the shortest learning curve to toolpathing from an STL.
Posted Jul 30, 2020 18:58 UTC (Thu)
by chrismakesstuff (guest, #140526)
[Link] (1 responses)
Posted Jul 30, 2020 19:28 UTC (Thu)
by michaelkjohnson (subscriber, #41438)
[Link]
Posted Jul 29, 2020 23:28 UTC (Wed)
by gerdesj (subscriber, #5446)
[Link]
Slicing a model into something that can be printed or routered is a really complicated problem which seems to be solved only informally. I doubt that anyone can work from "I want this shape with these constraints on shear strength" and the print will be adjusted accordingly.
I have a 1/100 scale Centurion tank sat on my wfh desk (dining room table) and my large plastic garden storage thingie has new hinges on one door instead of being binned when a door fell off and contributing to micro plastic pollution.
I am seriously surprised at how few comments OP has received. It looks like we are turning into old ... people.
I'm nearly 50.
Posted Jul 29, 2020 23:44 UTC (Wed)
by vadim (subscriber, #35271)
[Link] (6 responses)
If you want something for working with metal, probably want something more like a Sieg SX3. They're relatively easy to adapt to CNC, and instructions and kits for doing so are quite common.
Unfortunately this is an area where physics matter a lot, and where you actually need large amounts of heavy metal in your machine for it to have the necessary rigidity to perform well. If the machine is a light one, then there will be very significant limits to what you can do with it.
Posted Jul 30, 2020 2:22 UTC (Thu)
by michaelkjohnson (subscriber, #41438)
[Link] (3 responses)
Thanks for mentioning FreeCAD, Michael, I came here to do just that (project dev/admin here.) The Path Workbench is the component of FreeCAD which deals with CAM/CNC, and it's one of the more active areas of current development; I suggest checking out the Path forum for anyone interested in checking things out with that.
Pointers to more information
Pointers to more information
Great info michaelkjohnson. I've never heard of the MakerForums community and am pumped to check it out. The Arduino-focused GRBL project certainly has always been up to the task of trying to do as much as possible with Unos, and now new boards are starting to come to market that are just as accessible and much more capable. When it comes to GRBL interface software options, CNCjs is another option that many of our customers have turned to if they find that UGS isn't meeting their needs. It's under an MIT license. There are even more options out there that you can find listed on the GRBL wiki, as well there are a handful that we've tested and put into a condensed list on our site resources.
Pointers to more information
One correction I felt I needed to add to what you said is that you mentioned the LowRider CNC as a CNC design that typically uses very few or zero 3D-printed structural parts but this isn't the case. Though it's feasible that the LowRiders parts could be machined, it's ultimately been designed to be heavily 3D printed just as the MPCNC is. These DIY kits also tend to still be split between spindles and routers since trim routers can be lower cost than many spindle options while being a self-contained system and still provide a large RPM range like the Makitas 10-30k RPM capabilities. Ultimately you summarized all the remaining options very well.
Oops, thank you for the correction on LowRider — definitely missed fixing that when I was juggling how to present ideas. Quite right!Pointers to more information
Open-source CNCing
Open-source CNCing
It's worth noting that it's not just mass: cast iron absorbs vibration, but aluminum rings like a bell, which ends up giving surface artifacts. There are two good materials like this in common use; cast iron and granite-filled epoxy. Both are expensive. This is why experienced machinists were skeptical of SwissMak's aluminum-frame construction. But it's worth considering routing and milling separately.Cutting metal
Posted Jul 31, 2020 3:23 UTC (Fri)
by dgc (subscriber, #6611)
[Link] (2 responses)
Years ago I did a CNC fusion kit conversion of a Sieg X2 with an eye to milling aluminium parts for my race car. I now have a Sieg KX3 - a beefed up, factory CNC version of the SX3 that I got near new at a bargain basement price....
The bottom line is that the sieg mills just aren't designed for _regular_ milling of metals. The spindles are not powerful enough, and while the KX3 is far more rigid than then SX3, unless you are really careful and take small cuts the head still vibrates enough to cause chatter even on soft aluminium.
So while you can make decent parts from aluminium and various steels with sieg mills, it takes lots of time and care and many prototypes to dial in the feeds and speeds necessary to minimise vibration and chatter to get the desired accuracy and tolerances in the milled part.
Hence I think the most important question people looking at CNC mill conversions have to answer is this: do you just want to "learn CNC milling" or do you need a CNC mill to make parts for other projects?
If you just want to "learn CNC", then great - buy a second hand sieg mill off ebay and a conversion kit and off you go. That's exactly what I did with the X2. But be aware that you'll quickly outgrow it's capabilities if you want to do any serious metal milling with it - I found the X2 really couldn't mill aluminium with better than ~0.5mm accuracy or repeatability even after substantial modding to improve rigidity, minising play in the table, etc. Hence it was only as I graduated from "learning CNC" into "building other stuff" that I realised I'd started with the wrong mill for what I really wanted to do with a CNC mill.
Which brings me to the other side of the coin: Sieg mills really aren't that cheap. Here in .au, you can get a decent low end Hafco industrial mill/drill with a 1.5-2kW spindle with the weight and rigidity of a KX3 for not much more than a new SX3. These will do a much better job of milling metal than an SX3. And for a bit more $$$ you can get a really solid, good quality industrial mill that will perform far better on metal and run more reliably for longer than any heavily modded, high end hobby mill will ever do...
Hence before you start on your CNC mill adventure, decide/know what you are actually going to do with the CNC mill once it's built. Then go and buy a mill appropriate for that job rather than something that is cheap or "simple to convert". Finding out you can't do what you want to do with the mill after the conversion is complete is not much fun....
-Dave.
Posted Jul 31, 2020 15:16 UTC (Fri)
by joib (subscriber, #8541)
[Link]
Of course that's a 2m side cube that weights as much as a car and needs a sturdy concrete floor to stand on. Not really a solution for apartment dwellers. But hey, much less vibration..
Posted Jul 31, 2020 21:32 UTC (Fri)
by michaelkjohnson (subscriber, #41438)
[Link]
Cutting metal
Cutting metal
Completely agree with your conclusion to start with the destination in mind!Cutting metal
Posted Jul 30, 2020 15:39 UTC (Thu)
by coogle (guest, #138507)
[Link]
Posted Jul 30, 2020 17:58 UTC (Thu)
by chrismakesstuff (guest, #140526)
[Link]
What I can say though is that if you're looking for a machine with a mid-sized cutting area that you can have fun with - cutting woods and plastics without breaking the bank or having to source individual parts for yourself - that's what we offer with the LongMill. It's not for everyone, but there are certainly garage woodworkers who don't want to tackle their own build and like the idea of a reasonably priced, mid-sized machine. Designing our CNC around more readily available components also gives people the option to tackle the build themselves if they so choose 👍
Posted Jul 30, 2020 6:12 UTC (Thu)
by haizzus (guest, #109109)
[Link] (1 responses)
Posted Jul 30, 2020 18:58 UTC (Thu)
by chrismakesstuff (guest, #140526)
[Link]
Open-source CNCing
Open-source CNCing
Open-source CNCing
PCB Isolation Milling