top | item 25829337

Everything you need to know to design your own CNC router

329 points| mferraro89 | 5 years ago |mattferraro.dev | reply

166 comments

order
[+] jacquesm|5 years ago|reply
If you can, please use servos and not steppers. Steppers are cheap and ridiculously easy to interface and get good positional control out of. As long as they don't skip steps. And they always do. So you end up running at 1/10th of the speed your tool could move at to avoid that, and even then you'll end up tossing workpieces because you lost synchronization somewhere along the line.

For 3D printers they work fine because there is no pushback ('loading') from the extruder. But for anything that cuts servos are the way to go if you want half decent speed and quality cuts, as well as long tool life.

[+] dbcurtis|5 years ago|reply
Steppers skip steps if you are asking for more torque than they can deliver. No other reason. It might be: 1) too small of a stepper motor, so it can not deliver sufficient torque for maximum load, 2) too small of a driver that can not deliver the current needed for the motor to reach its rated torque, 3) software bug that tries to accelerate the motor faster than it is capable of under the load at hand, 4) software bug that throttles the driver.

They all boil down to commanded torque greater that the system is capable of delivering. Fix your design. Be suspicious of software trying to accelerate too aggressively under load.

I have cut a lot of metal on a Tormach PCNC 1100 Series 3 machine, with steppers. NEVER had an issue. Correctly designed stepper systems DO NOT miss steps.

That said, servos systems typically are capable of greater accelerations for a motor of a give volume and current load, because of the closed-loop control. Use servos for speed, not because you are afraid of skipped steps from a stepper.

[+] throwaway9d0291|5 years ago|reply
I disagree.

I've been running a small CNC for a while now and though I've had skipped steps, they've never been the cause of a failure. When they've failed, it's been because:

- I stalled the spindle and I'm trying to plow the no-longer-rotating endmill straight through my stock (and if steps weren't skipped, the tool would break)

- I forgot to turn on the spindle and I'm trying to plow the endmill straight through my stock (and if steps weren't skipped, the tool would break)

- I've somehow forced the machine to try to push through its limits and crashed an axis into the chassis (and if steps weren't skipped, the machine would be seriously damaged)

Basically, the only time the steppers have failed is when not doing so would lead to much greater damage, so I'd go so far as to say that skipping steps are a feature, not a bug.

If your steppers are failing in the middle of a job where nothing has gone wrong, either your steppers or your drivers are messed up but it's not because steppers are inherently bad.

I'd recommend servos for applications that are demanding on torque, power, speed and/or accuracy. I wouldn't recommend them for your first DIY machine because of the additional risk, expense and complexity they add.

[+] yudlejoza|5 years ago|reply
General question regarding robotics/motors:

Is there a classification of a system in terms of 'highly precise pre-defined/pre-programmed' movement vs 'feedback based movement'?

As an outsider, mainly watching youtube demos/videos, I've noticed the old kind of robotics, from ABB, Fanuc, and what not, with massive robotic arms planted to a firm-foundation, is based on precision pre-programmed movement. (I believe) there is no feedback though sensors or cameras or anything.

But the new trend is based on feedback, whether traditional control-theory feedback, or neural network based reinforcement-learning feedback, which I guess eases the rigors of pre-program design and makes the system more flexible in new situations. But of course it's an open research topic, and involves every-increasing sophistication of sensors, high-def cameras, lidars, and what not.

Wondering how the choice of stepper/servo, or some other mechanisms like hydraulics/pneumatics relates to the above categorization.

Thanks in advance.

[+] YZF|5 years ago|reply
You just need enough margin with steppers so you don't lose steps. Particularly during accelerations. That margin shouldn't need to be x10. It also depends on what screws you're using and whether there's any other reduction. You can get huge linear forces from a relatively tiny stepper. You're also going to need margins with a closed loop DC brushless/servo system otherwise while you won't lose your position you will get a position error.

There's also systems with steppers and encoders.

A common issue though is that the steppers are driven at too low of a voltage. You also want the right kind of driver that PWMs a high enough voltage to maintain the current at speed. That's because as the speed goes up the motor has higher back-EMF voltage that the driver needs to overcome. Constant voltage drive really suffers as the motor speeds up.

But sure, DC brushless + servos are nice, more expensive, and require more expensive controllers.

[+] archi42|5 years ago|reply
Does this also hold when using drivers like the ones built by Trinamic? A servo is essentially a feedback control loop, ensuring your motor will slow down if is reaching its torque limit. As I understood the data sheet for the Trinamic controllers, they can measure various parameters (e.g. back EMF, applied current,...). Cooperating with the motion controller, a similar feedback loop can be implemented. (Thinking about this, a servo would need to "talk" to the motion controller as well anyway - if the motion is lagging behind due to a torque limit, the motion controller needs to compensate for that instead of just scheduling motion on an independent axis).
[+] PragmaticPulp|5 years ago|reply
> Steppers are cheap and ridiculously easy to interface and get good positional control out of.

This is exactly why 99% of beginners should start with stepper motors.

Building a CNC is an exercise in tradeoffs. It's tempting to want to choose the best option at every juncture, but that's a recipe for blowing your budget. I strongly recommend that beginners start with sufficiently-large stepper motors to get things done, then consider more expensive motors as a later upgrade.

> As long as they don't skip steps. And they always do. So you end up running at 1/10th of the speed your tool could move at to avoid that

They definitely don't always skip steps. I've never skipped steps on my hobby CNC during normal operation. Only crashing the machine causes skipped steps, at which point I have bigger problems to worry about.

It's very easy to measure the maximum force your stepper-based CNC can apply before skipping steps. You can use a common kitchen scale and manually force the CNC axis to compress the scale until it skips.

In my case, the maximum stepper force is about an order of magnitude higher than the calculated cutting forces in aluminum. If someone was trying to push the cutter so hard that it was overwhelming common NEMA 23 steppers, they're going to need an extremely rigid machine. Most hobby-level machines aren't rigid enough to use high cutting forces, and unless you have a 2.2KW water-cooled spindle, you won't have enough power to cut at those speeds anyway.

As long as your steppers are sized appropriately, it's really not a big deal.

> So you end up running at 1/10th of the speed your tool could move at to avoid that

Again, not really an issue in practice. Use sufficiently-sized stepper motors and the movement speed is just fine.

I strongly suggest that anyone building a CNC focus first and foremost on keeping it simple and cheap. Get it built, learn from the process, and improve on your next iteration. Closed-loop stepper motors are a reasonable upgrade path, but the idea that you're going to be skipping steps with regular steppers just isn't true.

EDIT: Here's a video of a common Shapeoko with significant added weight moving at 1000ipm on the tiny stock steppers without issues: https://www.instagram.com/p/B1wSmXfnm6C/ The stock settings are 200ipm, which leaves ample safety margin for normal operation. 200ipm is plenty fast for rapids unless you're trying to reduce cycle times on large-scale manufacturing, in which case you wouldn't be using a hobby CNC machine.

[+] justinclift|5 years ago|reply
> So you end up running at 1/10th of the speed your tool could move at to avoid that ...

Doesn't that only happen when the controller either doesn't know (or can't decently handle) the limits for a given machine?

eg if a machine could (say) only accurately (without losing steps) push the spindle at 1000mm/min, with maximum jerk of (say) 0.5

If your controller doesn't know to keep in those limits... it makes sense steps will be lost when going past those limits.

So, seems more like a tuning problem?

That being said, closed loop stepper systems exist, though I haven't (yet) personally tried them.

[+] dekhn|5 years ago|reply
I've been curious about this for a while- I've got a modest CNC (X-carve) with steppers. If I wanted to upgrade my machine to feedback servos, how simple could it be?

I already have a CNC controller with stepper drivers. Do servos have a stepper interface, and internalize all the servo logic and feedback? IE, can I just buy "servos" that have internal feedback, and send them the same step and dir signals, or SPI signals, needed to drive steppers?

Or, do I have to replace my controller/drivers with a servo-specific driver? The reason I ask is that I have an extremely inexpensive stepper system (grblesp32 6-pack controller with external drivers) and cheap steppers, and definitely am hitting the point where I have to dial back all my parameters to finish cuts without dropping steps.

[+] craftinator|5 years ago|reply
Or just use a gear reduction? You really need to be dealing with high force systems to justify the cost and added complexity of using servos. I've built a mill from scratch that can handle decent sized steel milling using NEMA23 sized steppers and some decent 10:1 gear reducers and a nice spindle. IMO a better spindle and structure is where you should be spending your money, and if you really are afraid of losing steps, you should use encoders that are DECOUPLED from the motors, not integrated into them...

Servos are great if you're working with huge forces, need a lot of speed, need ridiculously high accuracy, and have a team of engineers to actually build and tune the thing. Ridiculously expensive and complex unless you're looking to go into busines manufacturing CNC systems.

[+] taneq|5 years ago|reply
> As long as they don't skip steps. And they always do. So you end up running at 1/10th of the speed your tool could move at to avoid that, and even then you'll end up tossing workpieces because you lost synchronization somewhere along the line.

My experience has been roughly opposite of this. If you overload your motors, you're going to lose positional accuracy and probably wreck your workpiece regardless of whether you use steppers or servos. If you don't overload your motors then the difference is moot, and with steppers there's less to go wrong.

[+] IgorPartola|5 years ago|reply
You could always run smart steppers like Mechaduinos or the similar option from Big Tree Tech. Your firmware might not even need to be modified, though there is work being done on Klipper to run firmware directly on the steppers so each one is treated as an six board responsible for a specific function.

Nothing against your advice just providing another option that uses steppers that don’t skip an occasional step (that is to say that if you ask for more torque from a stepper than it can handle, smart or not, it will not produce more torque out of thin air).

[+] traverseda|5 years ago|reply
Stepper motor drivers that support stallgaurd (trinamic's stepper drivers) seem like the best of both worlds, and even in-theory can give you some force feedback.
[+] beervirus|5 years ago|reply
I’ve always wondered why more home CNC machines don’t just use closed-loop control.
[+] SV_BubbleTime|5 years ago|reply
As someone with a CNC router with steppers I can not agree more.
[+] devwastaken|5 years ago|reply
Have any recommendations on servos for this purpose?
[+] jiveturkey|5 years ago|reply
tormach doesn't seem to have a problem with it. it's only recently they started offering servo upgrades.
[+] ashtonkem|5 years ago|reply
IIRC, Servos also can provide feedback, which also helps with precision and reliability.
[+] xupybd|5 years ago|reply
I work with commercial CNC machines. I think people are missing out on the second hand commercial market. One of our most reliable CNCs is an old pod and rail that cost $10k. It is much more than any hobby machine.

Please if you're getting into this look around at second hand machines. You'll be able to do really well if you want to setup an old 90s machine with new electronics. It's not as complex as building one from scratch and you get much better mechanical components.

[+] freeqaz|5 years ago|reply
How much would these machines have cost when they were new? Just trying to get an understanding of the price break vs the "risk" with older equipment. Time goes on and I imagine the motors + other mechanical components improve.

But maybe that's a bad assumption from working in tech for too long?

[+] yeuxardents|5 years ago|reply
Where does one look to search for second hand CNCs?
[+] oflannabhra|5 years ago|reply
Do you have a recommended process for accessing the second hand commercial market?
[+] windexh8er|5 years ago|reply
Growing up my dad was a machinist. This was in the 80s and CNC was what he evolved into from manual die cutting. He did a lot of government work where they most often times didn't know what the part was for or it was only a subset of the components. Most often times he'd be working on a 10+ ton die for a huge part, think landing gear, where the tolerances were in the thousandths. I always thought that was amazing the precision he could achieve by hand. That became even more remarkable to me as I got older and realized machines were now doing the math. About 4 years ago I built a homelab CNC. I wanted something more robust than a lot of the belt driven options out there and settled on a company called CNCRouterParts (now called AvidCNC) [0]. The downside is it consumes a fair bit of space. But between the laser cutter (Glowforge), 3D printer (Prusa) and CNC (CNCRouterParts) you can do quite a bit of light fabrication at home these days.

[0] https://www.avidcnc.com/

[+] jacquesm|5 years ago|reply
Large or precise, pick one :)

Making large, precise workpieces is an artform, you have to take temperature of the workpiece into account, compensate for that, expansion of the bed and so on. Very tricky to do that repeatedly with any degree of accuracy.

[+] geokon|5 years ago|reply
The grad students in the lab next door have to sit meticulously for hours/days with dental drills drilling out samples from rocks. I was hoping to be able to automate it with an affordable CNC machine (and an attached scanner bed) – but I seem to not be able to find any clear information about step sizes. Here it says microstepping is bad....

I also don't really need to do any milling, just adjust to the right x-y position and punch a tiny hole and collect the dust. Milling rocks in any case is a no-no from what I understand. Maybe someone could suggest some ideas for my .. unconventional requirements :)

The samples are pretty small (maybe 20cm^2 at the most) and I don't need to do it fast... And I prolly don't have a huge budget

[+] mianos|5 years ago|reply
And watch NY CNC and This Old Tony on youtube. Once youtube starts recommending more CNC channels on account of watching these two you will be addicted. Watching CNC cutting is probably the most relaxing way to waste time.
[+] unangst|5 years ago|reply
Best advice I read before I purchased my CNC: “buy your second machine first”. Five years in and I’m still growing into my 4’x4’ CNC (CNCRouterParts/Avid CNC). Love this thing, only thing I wish for is more time to use it.
[+] pupdogg|5 years ago|reply
Building my own 5ft x 10ft CNC from start to finish (ie frame design/welding to integration of a controller/software) was an amazing journey to learning various engineering concepts involved in making an industrial grade machine that churns out accurate machined parts every time and all the time (my case being wood/composite materials and sometimes aluminum). Video of my machine here: https://youtu.be/qpLQEtcjPSY. Here’s a video of the machine pocketing text CNCZone https://youtu.be/NQFKHyqxvJw. CNCZone is a great resource forum for DIYers.
[+] Azrael3000|5 years ago|reply
I just started building a MPCNC, so I still have time to change one thing or the other, so I'll give your post a good read. Thanks for taking the time to write everything up.

In the German community Estlcam [0] seems to be used a lot. With a 50€ price tag it seems quite reasonable and it might be a nice piece of software to try out.

[0] https://www.estlcam.de/

[+] syntaxing|5 years ago|reply
I had a CNC, mill, and lathe but the biggest problem is how expensive it is to operate it (excluding the machine). You want a good end mill? $100. Vacuum plate because why not? $400. You have to use some serious cash to machine parts which forced me to pretty much use my 3D printer most of the time since it cost me $2 rather than $50 to make the part.
[+] PragmaticPulp|5 years ago|reply
I always warn people that they need to budget about 50% above and beyond the cost of their CNC machine to actually use it.

End mills, work holding, dust collection, and other accessories will quickly add up.

[+] the_cat_kittles|5 years ago|reply
if you find cnc routers cool, as i once did, i recommend you check out the world of machine tools- i.e. things that are used to make steel (and aluminum) parts. i would suggest starting by understanding how a manual lathe and vertical mill work (blondiehacks on youtube might be a good place if you are totally unfamiliar), and then seeing how they are driven with cnc is very cool. though that part is somewhat similar to cnc routers, but just much more demanding. and the precision is incredible if you arent familiar with the world of machining- even low grade hobby machines can hold tolerances of 1 thousandth of an inch easily across 18" of travel. its also a very interesting world because its been steadily evolving over the last 100 years, and metalworking for who knows how long before that. just be prepared to watch 1000's of hours of youtube videos, machinists like to make 45 minute+ videos for some reason.
[+] jkelleyrtp|5 years ago|reply
If you’re interested in a garage-size router and don’t have the time to build, I suggest the Omnio X8 - starts at 2k, and all tooling an upgrades will probably run to a total of 3k.

Here’s some tips and tricks: https://www.chiefdelphi.com/search

[+] YZF|5 years ago|reply
I designed and built my own CNC router from scratch about 10 years ago. I just recently got it out to play with... Fun. But boy does it make a lot of dust to cut wood with a router (which is mostly why it's been sitting in the garage for so long, plus not a lot of time, plus it's not a very practical one, small work area).

EDIT: Random tidbit is that I control it from an old PC's parallel port. The PC runs DOS (the best real time OS ;) ) and uses some old free software called TurboCNC that can read G code and drive step and direction drivers. It has it's limitation but if you have an old PC around...

[+] mferraro89|5 years ago|reply
Very cool! A modern analogue might be LinuxCNC, which runs on old PCs in a realtime manner, generating pulses and sending them out the parallel port, or sending commands over ethernet to a dedicated step generator board for ultra accurate timing. What's old is new again!
[+] SV_BubbleTime|5 years ago|reply
I have an 8x4 foot machine, and it’s a big boy, old software I don’t like, steppers, i rarely use it... but I know ONE thing for sure, I would probably not recommend a wood frame. Our steel frame weighs a figurative ton (or metric literal, IDK) and it STILL is not stiff enough for large 3D contoured parts with tons of little steps.
[+] earleybird|5 years ago|reply
I'm running a 5x10 which physically is 7'x12'6" with Nema 34's. No lost steps over the years, aside from crashes. It will snap a 1/4" bit without losing a step. It's on a steel frame that is 900+ lbs of steel with 3 sheets of 5x10 3/4" mdf and it still vibrates every now and then. Machine time to planning/cad work is probably 1:10 which is about in line with my development work - 10hrs design for each hour of programming.
[+] snarfy|5 years ago|reply
This is a great resource. I've been slowly building one over the last couple months and had to learn all of it from various sites. It's nice to have this all in one place.

It's a 1000mmx600mm gantry design I made in fusion 360. I've been mostly copying a commercial design (omio cnc). It uses 20mm aluminum plates, ground rails, and ball screws.

For electronics I'm using a teensy 4.1 based grbl board (grbl-teensy-4) with external stepper drivers, 34mm steppers, and a 500w brushless spindle. I'd go bigger on the spindle but I'm limited by wattage.

The hardest part for me is the hardware. My design is simple based around plates with holes in them, but a couple plates require threaded holes in the end.

If you are a software guy, drilling a 12mm horizontal hole 30mm deep into the edge of a 20mm x 400mm plate is surprisingly difficult. It won't fit in my drill press that's for sure.

[+] yetihehe|5 years ago|reply
> If you are a software guy, drilling a 12mm horizontal hole 30mm deep into the edge of a 20mm x 400mm plate is surprisingly difficult. It won't fit in my drill press that's for sure.

Welcome to the wonderful world of jig-making. "Making" jigs has about the same amount of "making" like "coding" in programming. You have to invent or search for a jig which will make that task doable. I suggest clamping lightly two planks to sides of your plate, make a thick block with your desired hole, then screw that block onto planks so that your hole is centered between them. Now you have a guide for drill.

[+] konjin|5 years ago|reply
>If you are a software guy, drilling a 12mm horizontal hole 30mm deep into the edge of a 20mm x 400mm plate is surprisingly difficult.

Punch to center the first hole, then a center drill to start, then pilot holes at 3mm, 6mm and 12mm, use duck tape on the drill bit to keep the depth right.

If you really need the holes to be dead straight use a handheld router those are a great thing to have anyway and pretty much all of them have 100mm of or so of travel.

If you're drilling into something very hard skip the 3mm.

A good video on how to tap so you break fewer of them: https://www.youtube.com/watch?v=33wfSMsUbuc

[+] Animats|5 years ago|reply
I miss TechShop. A Tormach 3-axis mill and Shopbots in several sizes. I don't have enough need to have my own shop, but I was happy to pay TechShop to use their variety of machines.
[+] kesor|5 years ago|reply
I very rarely use browser bookmarks, but after reading every letter of this post I just had to bookmark it. Such great writing with short and to the point explanations about ALL the things related to CNC mills.

Some years ago I actually tried building my own desktop CNC. A lot of the warnings and "don't do this" mentioned in the article have gone into my design, which is why it never ever worked or did anything and is now laying disassembled in a box.

[+] dboreham|5 years ago|reply
Stretch goal: get it running BGP.
[+] Stronico|5 years ago|reply
I've always wondered if I was the only one on HN interested in cnc machines
[+] mhh__|5 years ago|reply
HN is small but self-selects to have people who tend to care about what they do so anytime I find myself thinking that for any topic it usually turns out I'm wrong.

The most niche thing I actually care about is probably Cold War espionage, and even if the exact thing I mention doesn't ring any bells with any commenters, someone will usually chime in with at least familiarity with the people involved.

[+] justinclift|5 years ago|reply
Nah, there are quite a few people into CNC things on HN. :)
[+] jbay808|5 years ago|reply
Interesting to see a reference both to Moxer Technologies and Dan Gelbart's prototyping videos in this post. Is the author from Vancouver?