DIY 3-axis CNC Mill/Enhanced Machine Controller
This project has moved! Check out the latest version of the DIYLILCNC, complete with free plans and CAD files!
Taylor and I have been working on a DIY 3-axis CNC mill over the last few months. I’m posting this mostly to brag :), but also as an excuse to do some documenting on the process that might be useful to others. We’ll keep posting as things progress.
The original plans use 1/2″ MDF for all the panels. We decided to go with with clear acrylic for the visual effect. Also, we were able to use a laser cutter for most of the cutting to the edges are nice and clean. The downside is the brittle nature of acrylic, which likes to crack when drilled from the edge (and this design requires a lot of that).
CONTROLLER & CONFIGURATION
We’re using linux-based Enhanced Machine Controller to run the mill, with a modified version of the standard stepper configuration. Here’s our EMC configuration files. So far, I’ve been really pleased with the performance. It was trial-and-error figuring out the scaling– I ended up attaching a pencil to a dremel collet, then manually jogging each axis until I could draw a one-inch line in each direction. The scaling factors I came up with are: 520 for X and Y, and 16000 for Z, and that’s with quarter stepping set on the hardware controller board.
We kept getting a “Joint 2 Following error,” indicating that the z-axis was losing its position. I found that this was happening only when using G00 (rapid-positioning) codes. I’m still a little unclear as to whether we need to even worry about positioning in this case, but for now I’m just replacing G00 codes in my toolpaths with G01 (linear motion). It’s a little slower, but for now the error is not happening anymore. See Feed Speeds for the permanent fix.
There doesn’t seem to be a way to directly set the feed and plunge speeds in EMC. The NCD post-processor defaults the feed speed to 3.7 and the plunge speed to 7.3 and the units are inches per minute. So we’ve been doing a search and replace in the post-processed files setting plunge to 14 and feed to 10 (this is easier than going back to RhinoCam to re-generate the toolpath with new feed speeds). We also then modified the MAX_FEED_OVERRIDE setting in the stepper_inch.ini file to 3, meaning we can increase the feed override up to 300%. We now limit the max override to 150%, and more deliberately set feed and plunge speeds in RhinoCam, under the Feeds & Speeds tab — these vary depending on material.
We kept getting a “Joint 2 following error” while testing, and found–after consulting the EMC documentation wiki–that changing the FERROR setting to 5.0 and the MIN_FERROR to 1.0 (that’s percent) for all axes in stepper_inch.ini alleviated this error. There’s the potential with increasing the FERROR settings of losing some accuracy, but that’s not our main concern at this point.