Arduino, EMC2, and the open-source conundrum
I was flattered to receive a thumbs-up from Bob Warfield on my previous post. Bob is in my mind one of the leading figures in the new wave of CNC practitioners, and his new product, GWizard, is among the most interesting out there. Bob asked a question I’ve heard dozens of times since putting this project online: “what about using an Arduino to generate steps?” As my reply to Bob got longer I decided to make a post of it.
Basically, my position on this question has long been, “why would you want to do that?”
While it’s true that you don’t find parallel ports on laptops or new Dell cheapo boxes, you can easily assemble a brand-new Intel Atom system capable of running EMC2 very nicely for less than what a Mach license costs. These motherboards are so cheap, they come with the CPU and sell for about $75, retail. If you can still get a parport header on a $35 motherboard, where they are going to wring every fraction of a penny out of the manufacturing cost, my sense is that we probably have many years left before they disappear from the earth.
There are a couple of projects I know of in this vein: RepRap uses drip-fed G-Code for its main control chain, and as I understand, there are some issues with the interpretation of arcs that have yet to be addressed; they may not be problematic for RepRap’s own use. There’s another, seemingly more sophisticated effort in the GRBL Project, which uses optimized AVR-native C code to turn an Arduino into a proper interpreter. However, it can’t do trajectory planning, homing, or spindle control, let alone threading, rigid tapping or control of auxiliary mechanisms. Like most open-source projects, it’s the pet project of one or two guys, and with no updates to the website since this past summer, it’s quite likely it’s reached the end of its evolution.
Part of the reason why I feel compelled to rain all over this idea is that the open-source CNC community is tiny and yet has plenty of overlapping and duplicative projects underway. In the past year, we’ve seen two separate groups of people launch new GUIs for EMC. One of them, Touchy, doesn’t provide a toolpath preview, and according to the author, there’s no plans to add it, presumably because he doesn’t want it. The other, Mocca, has all that and more, but is built in OpenLazlo, which one commenter memorably referred to as a “bizarre moon language,” virtually guaranteeing that no one but the original developers will ever touch it. Meanwhile, other people are finding ways to adapt Axis to use a touchscreen despite it being a mess of spaghetti code even the original developers are reluctant to go near.
In fairness to all involved, they’re giving their efforts to the community freely, and one of the points of open source is precisely to enable individuals to scratch their own itches, their way. I’m not complaining. But fragmentation brings costs. HAL files of more than trivial complexity remain byzantine, and GUI customization remains largely an unfulfilled goal. A trip to the EMC forums or mailing list shows dozens of people trying to figure out how to get some part of their machine to work. Meanwhile, a trip to the Mach forums finds hundreds of people writing macros, wizards, or screen layouts. It makes one wonder if the vision of openness and flexibility has it all backwards.
Now it’s true that above a certain level, Mach doesn’t cut it. If you happen to have some seriously large iron around with a dead control, it’s EMC or something far more costly than a Mach license. And there is the little bit of uncertainty that Windows will cause your machine to have a “senior moment” once every so often–while EMC seems rock-solid. But these points are arguing over the area between the 99th and 100th percentiles, when large gaps remain between 50 and 75.
I’ve had numerous people ask me about why I chose the Arduino when there are “better” options available that have more IO pins, true USB, better CPU speed, etc. The simple reason is that Arduino is far and away the most widely-known, used, and supported platform out there, and platforms have enormous value beyond the stuff that fits on a spec sheet. Pretty much the entire history of the PC is a story of platforms beating technologies, and I am not going to fight that.
Likewise, while I do intend to commercialize this project in the form of PCBs, kits, or instructional DVDs, I’d rather capture 10% of several thousand users than 90% of a hundred or so. My biggest marketing problem is going to be to get people to notice, and if the cost of doing that is helping 90% of people to do it for free, I still think the remaining 10% will more than make up.