This article appeared in Make: Vol. 92. Subscribe for more maker projects and articles!

Compass is a DIY handheld CNC router designed to make CNC machining more accessible. Unlike traditional CNCs that move a cutting tool within a fixed workspace, Compass relies on you to guide the device around your workpiece. As you move it, it automatically adjusts the cutting tool to stay on the programmed design path, enabling accurate, large-scale cuts with a much smaller device.

This is all accomplished using optical flow mouse sensors to track the position of the device, and a leadscrew-driven gantry to adjust the tool. The brains are a Teensy 4.1 microcontroller.

Why a Handheld CNC?

The concept of a handheld CNC machine may seem a little backwards at first. CNC machines are big hunks of metal and motors, with spinning blades to cut things with. How and why would I ever put one of these into my hands?

When you think about it, though, it makes sense. CNC is a technology that helps you bring a design in your head to life in the real world, with the help of a computer to automate the fabrication. This is awesome — until you realize that a standard entry-level CNC machine can cost thousands of dollars and take up an entire room. This leaves many of us enthusiastic makers to rely on more traditional methods of shaping wood and metal, using cheaper hand tools like jigsaws and handheld routers. These are affordable, small, and portable, but they require a lifetime of learned skills and expertise — and usually stable hands — to bring an idea to reality.

Photo by Sam Freeman

A handheld CNC combines the computer precision of CNC technology with the flexibility and cost of standard hand tools. You control it like you would a standard handheld router, moving it roughly along your design, but now it’s able to auto-correct to cut your design perfectly. Using the same workflow to get a design from computer to CNC machine, you simply upload your toolpath, set your origin on your workpiece, and move the device where it tells you to. The UI screen on the front of the device will show you exactly where to move the router, and alert you if you’re going too far off track. Compass does the rest, leaving you with a beautiful cut and a sleek CNC machine that can fit in your suitcase or on your shelf.

Origin of Compass

Makers and making — having some vessel for unleashing my creativity, working with my hands — have been a big part of my life, from making skateboards with my dad in my garage when I was 8 to practically living in the makerspace for four years at my university. I created Compass because I wanted to make a device that could lower the barrier to entry to making, and give more people this channel to unleash their creativity. 

3D printing and CNC machining are great, but they can feel very foreign to people who aren’t already familiar with engineering, computers, and electronics. There’s a disconnect between the user and what they’re creating. These are amazing technologies that allow you to push a button and have your creation made before you, but you can lose the “maker” in the process. There’s nothing tangible to grasp onto and feel like, “I’m making something right now!” 

Cameron Chaney shows Sam Freeman how to make his first cut. Photo by Keith Hammond

Handheld CNC routers bring this tangible interface back to digital fabrication, allowing the user to really feel like they’re a part of the fabrication process while also lowering the barrier to entry of woodworking. People with shaky hands, or a condition like Parkinson’s, don’t have to count themselves out from creating beautiful handmade things.

My goal with Compass is to make CNC machining more accessible to woodworkers, and make woodworking more accessible to everyone. I found a piece of my identity in discovering makerspaces, digital fabrication, and woodworking tools. I want to help others experience that same sense of belonging, creativity, and freedom.

Where Am I? Solving for XY

The hardest part of this project by far was figuring out how to get the robot to know where it is. I brainstormed a ton of different ways to do it — including string potentiometers, ToF beacons, cameras, following a drawn line, or even driving itself around on wheels — but decided on using the same technology that a computer mouse uses to track its movement in space. This was the simplest solution and the cheapest to implement. No setup required, no external beacons, and the user still plays a part in the movement of the device. 

Photo by Cameron Chaney

I spent the next month or so dissecting a bunch of mice, figuring out how to connect them to my microcontroller and get readings from them. Once I verified that this would work, I found a breakout PCB for a nice gaming mouse sensor, ordered four of those, and started the challenge of how to transform all that data to a position and orientation estimate of the router. Luckily I had taken a class in rigid body kinematics the year before, which was exactly what I needed to do this.

Once I got the sensing working, I constructed the device and went to test it with a pen instead of a cutting spindle. This definitely did not work on the first try! I finally got it to draw just a simple straight line, and I was elated. Once I actually used it to cut something, the feeling was euphoric. It was just a little sine wave in corkboard, but the feeling of having this robot moving and reacting to my motion, while the Dremel was spinning at 35,000rpm to cut the material and make my design, was really second to none. 

Demo Sine Wave Cut

Four Eyes Good

The crux of this project is how Compass figures out where it is on the workpiece, by using four optical flow sensors on the bottom of the device. These are small cameras which constantly watch the surface and detect whether it moves or not, and by how much. A computer mouse has one sensor; by adding a second sensor, we’re able to detect rotation as well. Using simple rigid body dynamics, we can estimate precisely where Compass is in space and how it’s oriented. Using four sensors gives us multiple ways to calculate these position-orientation values, making the system more robust by adding redundancy and error correction.

Photo by Cameron Chaney

This sensing technology accomplishes the same concept as Shaper’s Origin router, without the need for computer vision or proprietary fiducial tape. You just set Compass down on your workpiece and you’re good to go, with no setup or workpiece mapping needed. 

Photo by Cameron Chaney

Each of these sensing methods have their benefits and drawbacks. Shaper’s technology is absolute positioning, whereas Compass’ is relative. This means that with Compass, over a long enough run, the sensor readings will begin to drift. This can be problematic for big cuts if not prepared properly, but there are a few ways to counteract it. Drift is minimized by the aforementioned redundancy of sensors, as well as by using top-of-the-line, high-precision, highly sensitive gaming mouse sensors. To reduce error stack-up, we start off with as accurate a reading as possible for each time step. We can also predict, based on surface quality readings, how soon the drift will exceed a desired threshold. This can be used to prompt the user to simply re-home the device after long intervals, pausing the cut when necessary and keeping track of where to resume the design from. A simple 3D-printed corner bracket does the trick for device homing. 

Build Your Own

Most of the physical components of Compass are 3D printed to ease manufacturing and to allow DIYers to build their own more easily. Assembling your own handheld CNC router is pretty simple. Once you have all the parts, it’s like an adult Lego set: all the pieces come together with three Allen wrenches, a screwdriver, and minimal soldering. (I hope to make it “no soldering” with new PCBs.) 

Photo by Cameron Chaney

You build the spindle mount first, plopping in the linear bearings, leadscrews, smooth rods, and stepper motor. Then everything else mounts to the aluminum base, with the spindle mount sliding nicely onto the X axis’ smooth rod gantry. A few more screws for the motors, sensors, and handles, and then all that’s left is to route the wires, which all snap in with connectors or go into screw terminals. Once assembled, the device needs to go through a simple calibration and then you’re good to go!

Photo by Cameron Chaney

Open Source

All the designs and firmware for this project are open sourced, so anyone can make a Compass and modify it as they see fit. If you want to put a laser on it, be my guest! The full build instructions, code, 3D files, and BOM are online. Make your own for about $500, or buy a kit from my website for a little more, and get CNC technology in your hands. 

This article appeared in Make: Vol. 92. Subscribe for more maker projects and articles!

What will the next generation of Make: look like? We’re inviting you to shape the future by investing in Make:. By becoming an investor, you help decide what’s next. The future of Make: is in your hands. Learn More.